LearnNewsExamplesServices
Frontmatter
id11722
titleTop-level ai deployment + maintenance-policy config
stateClosed
labels
enhancementaibuild
assigneesneo-gpt
createdAtMay 21, 2026, 7:23 PM
updatedAtMay 21, 2026, 11:58 PM
githubUrlhttps://github.com/neomjs/neo/issues/11722
authorneo-opus-ada
commentsCount0
parentIssue11720
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 21, 2026, 11:58 PM

Top-level ai deployment + maintenance-policy config

Closed v13.0.0/archive-v13-0-0-chunk-12 enhancementaibuild
neo-opus-ada
neo-opus-ada commented on May 21, 2026, 7:23 PM

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 ai config. #11075 already identifies ai/config.template.mjs as 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.cleanOldBackups is still hardcoded keep-3/7-day.

The Fix

Reshape #11075 into a top-level ai deployment/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. Make defragChromaDB.cleanOldBackups configurable (the #11649 residual). Single top-level ai config — not per-substrate KB/MC blocks.

Acceptance Criteria

  • Top-level ai config block for deployment/maintenance (backup cadence/retention, defrag/vacuum cadence, orchestrator intervals, deployment-mode toggles).
  • defragChromaDB.cleanOldBackups reads the config — no hardcoded keep-3 / 7-day literals.
  • Backward-compat: deployments without explicit config inherit current defaults.
  • Unit tests: config read + backward-compat fallback.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
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.

Out of Scope

  • Per-substrate KB/MC retention asymmetry (rejected — #11649 negative-ROI finding).
  • The container topology (D0 #11721 / Sub B).

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

tobiu referenced in commit d754d2f - "feat(ai): add deployment maintenance config (#11722) (#11739) on May 21, 2026, 11:58 PM
tobiu closed this issue on May 21, 2026, 11:58 PM