Skip to content

feat(memory): add memory.autoWrite alias for autoMemoryEnabled (#1326)#1396

Open
Pablosinyores wants to merge 1 commit into
Gitlawb:mainfrom
Pablosinyores:feat/memory-autowrite-setting
Open

feat(memory): add memory.autoWrite alias for autoMemoryEnabled (#1326)#1396
Pablosinyores wants to merge 1 commit into
Gitlawb:mainfrom
Pablosinyores:feat/memory-autowrite-setting

Conversation

@Pablosinyores
Copy link
Copy Markdown

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.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.

Changes

  • src/utils/settings/types.ts — add memory.autoWrite to the settings schema; cross-link to autoMemoryEnabled in the description.
  • src/memdir/paths.ts isAutoMemoryEnabled() — 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.
  • Default behavior unchanged — this is purely an additive discoverable alias.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant