Context
PR #12542 completes #12541 by moving the maintenance backup/defrag retention resolvers to direct ADR-0019-aligned reads from the top-level maintenance subtree:
aiConfig.maintenance.backup.retention
aiConfig.maintenance.defrag.snapshotRetention
That resolves the B3 optional-chain / fallback cleanup, but it leaves a non-blocking follow-up: after #12542 merges, the Memory Core backupRetention config leaf is no longer consumed by backup.mjs.
V-B-A before filing:
- PR #12542 is
APPROVED, CLEAN, and all checks green at f0223ce60.
- On the #12542 branch,
rg -n "backupRetention|memoryCoreConfig\.backupRetention|resolveBackupRetention" ai/scripts/maintenance/backup.mjs ai/mcp/server/memory-core/config.mjs ai/mcp/server/memory-core/config.template.mjs test/playwright/unit/ai/scripts/maintenance/backup-retention.spec.mjs learn shows the runtime resolver now reads resolveBackupRetention() from top-level maintenance config; remaining backupRetention references are Memory Core config/template declarations and stale test commentary.
gh issue list --state all --search "backupRetention orphan Memory Core config leaf" returned no equivalent issue.
gh pr list --state open --search "backupRetention Memory Core maintenance AiConfig" returned only #12542, not a cleanup PR.
ask_knowledge_base(type='ticket', query='backupRetention Memory Core maintenance orphan AiConfig ticket') surfaced historical #11663 context, not an active duplicate.
Problem
Once #12542 lands, ai/mcp/server/memory-core/config.mjs and config.template.mjs still advertise backupRetention, but the only live backup retention reader has moved to aiConfig.maintenance.backup.retention.
Keeping the Memory Core leaf after its reader is removed creates a misleading operator config surface: an operator can set memoryCore.backupRetention and reasonably expect it to affect bundle retention, but the maintenance resolver will no longer consult it.
Architectural Reality
The maintenance backup policy now belongs to the top-level AI maintenance subtree. Memory Core still owns storage paths, Chroma coordinates, graph paths, and service-specific config. It should not retain a dead backup policy leaf after bundle retention is governed by the maintenance subtree.
This ticket is dependent on #12542. Before #12542 merges, dev still contains the old fallback reader, so implementation must wait for the approved PR to land or else branch from a post-merge dev.
Fix
After #12542 is merged to dev:
- Remove the
backupRetention leaf from:
ai/mcp/server/memory-core/config.mjs
ai/mcp/server/memory-core/config.template.mjs
- Update touched test/commentary surfaces so they no longer describe deployments without
backupRetention as a live Memory Core config mode.
- Verify no tracked runtime/source docs still imply
memoryCoreConfig.backupRetention controls bundle retention.
Do not add a new fallback, alias, or migration shim. The top-level maintenance subtree is the source of truth.
Contract Ledger
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs / Commentary |
Evidence |
aiConfig.maintenance.backup.retention |
Top-level AI config maintenance subtree |
Remains the bundle retention policy consumed by backup.mjs |
None |
Existing maintenance config JSDoc |
#12542 direct-read diff + tests |
memoryCoreConfig.backupRetention |
Memory Core config/template |
Removed after its reader disappears |
None |
Remove stale mentions from touched runtime/test commentary |
rg shows no remaining runtime reader after #12542 |
| Operator local config expectation |
Config template + source comments |
No dead leaf that appears configurable but is ignored |
None |
Template no longer advertises the leaf |
Focused source grep after removal |
Decision Record Impact
Aligned with ADR 0019: consumed config must have a single source of truth, and missing config should fail loudly at the direct resolved-leaf read site. This ticket removes a dead secondary config source rather than preserving a dual-source fallback.
Acceptance Criteria
Out of Scope
- Changing retention defaults.
- Changing backup bundle semantics or atomic-bundle behavior.
- Reworking historical issue/PR archive content under
resources/content/**.
- Implementing before #12542 lands.
Related
- Parent: #12461
- Prerequisite PR: #12542
- Source ticket: #12541
- Historical origin: #11663
- ADR:
learn/agentos/decisions/0019-aiconfig-reactive-provider-ssot.md
Origin Session ID
dcdaac0b-9ae0-45b5-b4da-da39541af497
Retrieval Hint
backupRetention Memory Core maintenance orphan AiConfig #12542 f0223ce60
Context
PR #12542 completes #12541 by moving the maintenance backup/defrag retention resolvers to direct ADR-0019-aligned reads from the top-level maintenance subtree:
aiConfig.maintenance.backup.retention aiConfig.maintenance.defrag.snapshotRetentionThat resolves the B3 optional-chain / fallback cleanup, but it leaves a non-blocking follow-up: after #12542 merges, the Memory Core
backupRetentionconfig leaf is no longer consumed bybackup.mjs.V-B-A before filing:
APPROVED,CLEAN, and all checks green atf0223ce60.rg -n "backupRetention|memoryCoreConfig\.backupRetention|resolveBackupRetention" ai/scripts/maintenance/backup.mjs ai/mcp/server/memory-core/config.mjs ai/mcp/server/memory-core/config.template.mjs test/playwright/unit/ai/scripts/maintenance/backup-retention.spec.mjs learnshows the runtime resolver now readsresolveBackupRetention()from top-level maintenance config; remainingbackupRetentionreferences are Memory Core config/template declarations and stale test commentary.gh issue list --state all --search "backupRetention orphan Memory Core config leaf"returned no equivalent issue.gh pr list --state open --search "backupRetention Memory Core maintenance AiConfig"returned only #12542, not a cleanup PR.ask_knowledge_base(type='ticket', query='backupRetention Memory Core maintenance orphan AiConfig ticket')surfaced historical #11663 context, not an active duplicate.Problem
Once #12542 lands,
ai/mcp/server/memory-core/config.mjsandconfig.template.mjsstill advertisebackupRetention, but the only live backup retention reader has moved toaiConfig.maintenance.backup.retention.Keeping the Memory Core leaf after its reader is removed creates a misleading operator config surface: an operator can set
memoryCore.backupRetentionand reasonably expect it to affect bundle retention, but the maintenance resolver will no longer consult it.Architectural Reality
The maintenance backup policy now belongs to the top-level AI maintenance subtree. Memory Core still owns storage paths, Chroma coordinates, graph paths, and service-specific config. It should not retain a dead backup policy leaf after bundle retention is governed by the maintenance subtree.
This ticket is dependent on #12542. Before #12542 merges,
devstill contains the old fallback reader, so implementation must wait for the approved PR to land or else branch from a post-mergedev.Fix
After #12542 is merged to
dev:backupRetentionleaf from:ai/mcp/server/memory-core/config.mjsai/mcp/server/memory-core/config.template.mjsbackupRetentionas a live Memory Core config mode.memoryCoreConfig.backupRetentioncontrols bundle retention.Do not add a new fallback, alias, or migration shim. The top-level maintenance subtree is the source of truth.
Contract Ledger
aiConfig.maintenance.backup.retentionbackup.mjsmemoryCoreConfig.backupRetentionrgshows no remaining runtime reader after #12542Decision Record Impact
Aligned with ADR 0019: consumed config must have a single source of truth, and missing config should fail loudly at the direct resolved-leaf read site. This ticket removes a dead secondary config source rather than preserving a dual-source fallback.
Acceptance Criteria
dev.backupRetentionis removed fromai/mcp/server/memory-core/config.mjsandai/mcp/server/memory-core/config.template.mjs.memoryCoreConfig.backupRetentionas a bundle retention control. Historicalresources/content/**archives may remain unchanged.aiConfig.maintenance.backup.retention.npm run ai:lint-config-template-ssotstill passes.Out of Scope
resources/content/**.Related
learn/agentos/decisions/0019-aiconfig-reactive-provider-ssot.mdOrigin Session ID
dcdaac0b-9ae0-45b5-b4da-da39541af497Retrieval Hint
backupRetention Memory Core maintenance orphan AiConfig #12542 f0223ce60