feat(memory): add memory.autoWrite alias for autoMemoryEnabled (#1326)#1396
Open
Pablosinyores wants to merge 1 commit into
Open
feat(memory): add memory.autoWrite alias for autoMemoryEnabled (#1326)#1396Pablosinyores wants to merge 1 commit into
Pablosinyores wants to merge 1 commit into
Conversation
…wb#1326) The attribution half of Gitlawb#1326 was fixed via Gitlawb#1335 (merged 2026-05-26). The memory half — '[memory writes should be] explicit and configurable' with the exact shape `memory.autoWrite` requested by the issue — remains. Rather than parallel-tracking a new key, alias `memory.autoWrite` to the existing `autoMemoryEnabled` opt-out and document the relationship. Either key opts out; when both are set, the more restrictive (false) value wins so a parent-scope opt-out can't be silently re-enabled by a narrower memory.autoWrite: true. The new `memory` namespace is intentional — future opt-in fields (approval gates, etc.) can be added under it without claiming a new top-level key each time. - types.ts: add `memory.autoWrite` to the settings schema; cross-link to autoMemoryEnabled in the description. - paths.ts isAutoMemoryEnabled: read both keys; opt-out wins on conflict; default unchanged (enabled). - paths.test.ts (new): pins default, both opt-out paths, both opt-in paths, opt-out-wins-on-conflict in both directions, env-var still overrides settings. Tests 7/7 green. Default behavior unchanged — this is purely an additive discoverable alias for governance / regulated / client- sensitive repos that prefer the namespaced shape called out in the issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Partial #1326. The attribution half landed via #1335 (merged 2026-05-26). The memory half — '[memory writes should be] explicit and configurable' with the exact shape
memory.autoWriterequested by the issue — remains.Rather than parallel-tracking a new key, alias
memory.autoWriteto the existingautoMemoryEnabledopt-out and document the relationship. Either key opts out; when both are set, the more restrictive (false) value wins so a parent-scope opt-out can't be silently re-enabled by a narrowermemory.autoWrite: true.The new
memorynamespace is intentional — future opt-in fields (approval gates, etc.) can be added under it without claiming a new top-level key each time.Changes
src/utils/settings/types.ts— addmemory.autoWriteto the settings schema; cross-link toautoMemoryEnabledin the description.src/memdir/paths.tsisAutoMemoryEnabled()— read both keys; opt-out wins on conflict; default unchanged (enabled).src/memdir/paths.test.ts(new) — pins default, both opt-out paths, both opt-in paths, opt-out-wins-on-conflict in both directions, env-var still overrides settings.Test plan
bun test src/memdir/paths.test.ts— 7/7 green.