ai/config.template.mjs Tier-1 deployment/maintenance config |
#11720 Sub A; #11075 Tier-1 config substrate; #11649 negative-ROI finding folded here |
Add a top-level deployment/maintenance policy surface that centralizes orchestrator cadence, backup cadence/retention, defrag/vacuum cadence, and deployment-mode toggles without moving policy into per-substrate KB/MC config blocks. |
Missing keys preserve current runtime defaults: orchestrator poll 3000ms, summary 600000ms, KB sync 1800000ms, backup 86400000ms, primary-dev-sync 600000ms, dream/golden-path 3600000ms, backup retention keepMinimum 3 / maxDays 30, defrag snapshot retention keepMinimum 3 / maxDays 7. |
Inline JSDoc in ai/config.template.mjs; PR body must name any key-shape deviations. |
L2 unit coverage for default config shape + fallback behavior. |
Orchestrator cadence consumers (ai/daemons/Orchestrator.mjs, ai/daemons/TaskDefinitions.mjs, coordinator seams as touched) |
#11722 AC1; #11075 magic-number audit |
Orchestrator-owned intervals are read from the Tier-1 config surface or existing env overrides, not only from in-file constants. Env vars remain override inputs where they already exist. |
Existing env vars retain precedence where current code supports them; absent config/env uses current defaults. Implementation may split schema PR and consumer-wiring PR per the #11720 sub→PR-chain map, but must keep backward compatibility in each PR. |
JSDoc on resolver/helper functions if introduced. |
L2 unit tests for config read, env precedence, and no-config fallback. |
| Deployment-mode local/cloud feature toggles |
#11720 lost-item audit; #11722 Fix section; D0 #11721 taxonomy boundary |
Expose config that lets a cloud profile disable, no-op, or tenant-bind local-only behavior such as primary dev sync, local worktree discovery, local wake/bridge dispatch, and local-checkout KB-sync cascades, while keeping remote graph-backed A2A semantics cloud-relevant. |
Default deployment remains local-compatible: current local maintainer behavior is unchanged unless a cloud/deployment-mode toggle opts out. D0 #11721 may refine which lanes are local-only vs cloud-deployable; this ticket supplies the config surface, not the final taxonomy. |
Inline config docs plus PR body notes; downstream D0/Sub D docs/tests consume the final taxonomy. |
L2 unit coverage for toggle defaults and at least one cloud-mode negative behavior seam touched by this ticket. |
buildScripts/ai/backup.mjs#cleanOldBackups retention policy |
#11663 shipped bundle-level retention; #11722 folds retention policy into the top-level surface |
Backup retention reads the unified deployment/maintenance config while preserving the existing two-axis keepMinimum / maxDays behavior. |
Missing config remains byte-equivalent to current {keepMinimum: 3, maxDays: 30} behavior. Per-substrate retention remains rejected for this scope because backup bundles are atomic. |
Existing JSDoc updated only if the config source changes. |
Existing backup-retention.spec.mjs extended or preserved to prove fallback + configured values. |
buildScripts/ai/defragChromaDB.mjs#cleanOldBackups snapshot retention policy |
#11722 AC2; #8490 defrag snapshot cleanup precedent; #10129 backup/defrag peer architecture |
Defrag pre-nuke snapshot cleanup reads configurable retention values from the top-level deployment/maintenance config instead of hardcoded newest-3 / older-than-7-days literals. |
Missing config preserves current newest-3 and 7-day cleanup. Defrag remains peer to backup.mjs; it must not call the backup orchestrator. |
Update function JSDoc and any operator-facing note touched by the PR. |
L2 unit coverage for defrag cleanup configured values + fallback; peer-architecture guard remains green. |
Context
Sub A of Epic #11720 (Cloud Agent OS Deployment Readiness). MVP-critical; independently startable — no D0 dependency. Reshapes #11075.
The Problem
Backup cadence / retention, defrag-vacuum cadence, orchestrator intervals, and deployment-mode feature toggles are not unified in a top-level
aiconfig. #11075 already identifiesai/config.template.mjsas the Tier-1 config substrate but was lower-priority pending orchestrator end-to-end validation — mission-readiness re-prioritizes it. #11649's valid kernel (backup config belongs at the top level, not per-substrate KB/MC blocks — the per-substrate split is negative-ROI under the #10129 atomic-bundle constraint) folds here;defragChromaDB.cleanOldBackupsis still hardcoded keep-3/7-day.The Fix
Reshape #11075 into a top-level
aideployment/maintenance config: backup cadence + retention, defrag/vacuum cadence, orchestrator intervals, deployment-mode feature toggles (e.g. GitHub-sync / A2A messaging on/off per deployment — a cloud deployment disables local-only behaviors), env bindings. MakedefragChromaDB.cleanOldBackupsconfigurable (the #11649 residual). Single top-levelaiconfig — not per-substrate KB/MC blocks.Acceptance Criteria
aiconfig block for deployment/maintenance (backup cadence/retention, defrag/vacuum cadence, orchestrator intervals, deployment-mode toggles).defragChromaDB.cleanOldBackupsreads the config — no hardcoded keep-3 / 7-day literals.Contract Ledger
ai/config.template.mjsTier-1 deployment/maintenance configai/config.template.mjs; PR body must name any key-shape deviations.ai/daemons/Orchestrator.mjs,ai/daemons/TaskDefinitions.mjs, coordinator seams as touched)local-onlyvscloud-deployable; this ticket supplies the config surface, not the final taxonomy.buildScripts/ai/backup.mjs#cleanOldBackupsretention policykeepMinimum/maxDaysbehavior.{keepMinimum: 3, maxDays: 30}behavior. Per-substrate retention remains rejected for this scope because backup bundles are atomic.backup-retention.spec.mjsextended or preserved to prove fallback + configured values.buildScripts/ai/defragChromaDB.mjs#cleanOldBackupssnapshot retention policybackup.mjs; it must not call the backup orchestrator.Out of Scope
Related
Parent #11720 · reshapes #11075 · folds the #11649 backup-config kernel · Origin Discussion #11718 §5 Sub A.
Origin Session ID
8e1dc8ca-b5a5-4479-b3cf-31918eb4a5b2