Context
Phase-0 leaf of epic #15798 (Local Runtime Parity), graduated from Discussion #15595. The §5.2 sweep's confirmed blocker (point 3, path determinism): the data-root election cannot be decided because "the plane" is not a declared object — it is ≥7 path strings agreeing on a prefix, held together only by the symlink layer. This leaf mints the missing subject. Everything else in the epic sequences behind it (Ada's enabler inversion: this leaf makes the pilot-posture and port-band ACs expressible and the wake-latency envelope priceable).
The Problem
ai/configBase.mjs:10: const projectRoot = process.cwd() === '/' ? neoRootDir : process.cwd(); — the root is ambient, per-process.
- ≥7 plane-member leaves each re-resolve their own root with their own env escape (
NEO_MEMORY_DB_PATH, NEO_MEMORY_WAL_DIR, NEO_MESSAGE_WAL_DIR, daemon dirs, log path; e.g. ai/mcp/server/memory-core/configBase.mjs:346 resolves path.resolve(cwd, '.neo-ai-data/memory-wal')).
- 33 modules open the plane directly; 22 are C1 non-entrypoints (17 host CLI scripts + per-harness-family hook writers + host daemons) that per ADR 0019 C1 (zero tolerance) must NOT import
AiConfig.
NEO_AI_CANONICAL_ROOT exists but is provisioning-only (read solely by ai/scripts/migrations/bootstrapWorktree.mjs) — and it names a checkout, which is identity on only one placement branch.
The Architectural Reality
ADR 0019 governs (read gate: §critical_gates 10 — mandatory full read before authoring or reviewing; its §3 catalog bans exactly the current shape: A1 re-derivation, hidden defaults). §5.5 defines the sanctioned non-entrypoint shape: a pure-defaults module (literals + env-var names, no Neo import) — ai/mcp/server/memory-core/helpers/TurnPresenceConfig.mjs is the in-tree precedent ("without importing Neo singletons"). The assertion precedent for pairing/boot checks: bootstrapWorktree.mjs:189-196 (module-load invariant throw).
The Fix (one PR)
- The leaf (entrypoint side): a declared plane-identity subtree in
ai/configBase.mjs — a stable opaque planeId (never a path, never checkout-shaped — the corrected refinement: a checkout-shaped identity pre-decides the OQ10b election) + per-deployment-profile dataRoot derivation from which the ≥7 plane-member leaves derive. Env binding via leaf(default, env, type) only.
- The twin (non-entrypoint side): a pure-defaults module carrying the same defaults + env names (no Neo import), consumed by the 22 C1 sites (migration of those call sites is follow-up work per site owner; this leaf ships the twin + migrates the memory-core helper as the exemplar).
- The pairing-consistency assertion: a unit test + module-load check asserting the twin's literals match the leaf's declarations — the twin must never drift into a second source of truth.
- The F-invariant boot assertion: at server boot, a declared plane's resolved paths are internally consistent; an isolated overlay fails closed if it can resolve the durable root.
- The ADR 0019 amendment text documenting the plane-identity leaf pattern + the pairing discipline (this leaf owns the amendment;
Decision Record: amends ADR 0019).
Contract Ledger
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
AiConfig plane-identity subtree (new leaf group) |
ADR 0019 + this ticket |
opaque planeId + per-profile dataRoot; plane-member leaves derive |
absent leaf = boot fails loud (no ?., B3 banned) |
ADR 0019 amendment |
unit + boot assertion |
| pure-defaults twin module (new, no Neo import) |
ADR 0019 §5.5 |
literals + env names mirroring the leaf |
n/a (pure module) |
ADR 0019 amendment |
pairing-consistency test |
NEO_AI_CANONICAL_ROOT (existing env, provisioning) |
bootstrapWorktree.mjs |
unchanged for hydration; explicitly NOT the plane identity |
n/a |
amendment notes the distinction |
grep witness |
kb + mc healthcheck payload plane (observed identity) |
this ticket + ADR 0019 §10.6 (consumer requirement, Lane-2 owner) |
tool-layer spread reading the SAME per-server config the boot assertion verified |
always present (wrapper spreads unconditionally) |
OpenAPI HealthCheckResponse.plane on both servers |
schema declaration specs + same-source wrapper reads |
Acceptance Criteria
Out of Scope
- The placement election itself (the OQ10b leaf, blocked by this one).
- Migrating all 22 non-entrypoint call sites (exemplar migration only; the rest follow per-site).
- Any mount/volume/compose change.
Related
Epic #15798 · source Discussion #15595 (folds 6/6.1) · ground truth #15791 / PR #15794 · ADR 0019 · bootstrapWorktree.mjs · borrowed-authority note: discharge "under borrowed authority pending author ratification" until the source's ratification window closes.
Implementation: PR #15811 (5 commits, 086cb28e08 → 5a6e3afcc3). Consumer requirements folded pre-implementation from the Lane-2 owner's comment: observed-identity emission (mc + kb healthcheck payloads) + the provisioning disposition (declared by the deployment layer; never persisted in-plane; never path-derived).
Origin Session ID: 758f110e-a429-4597-beb0-5fd3ec7d1bfc
Retrieval Hint: query_raw_memories("opaque planeId paired artifact pure-defaults twin ADR-0019 C1")
Context
Phase-0 leaf of epic #15798 (Local Runtime Parity), graduated from Discussion #15595. The §5.2 sweep's confirmed blocker (point 3, path determinism): the data-root election cannot be decided because "the plane" is not a declared object — it is ≥7 path strings agreeing on a prefix, held together only by the symlink layer. This leaf mints the missing subject. Everything else in the epic sequences behind it (Ada's enabler inversion: this leaf makes the pilot-posture and port-band ACs expressible and the wake-latency envelope priceable).
The Problem
ai/configBase.mjs:10:const projectRoot = process.cwd() === '/' ? neoRootDir : process.cwd();— the root is ambient, per-process.NEO_MEMORY_DB_PATH,NEO_MEMORY_WAL_DIR,NEO_MESSAGE_WAL_DIR, daemon dirs, log path; e.g.ai/mcp/server/memory-core/configBase.mjs:346resolvespath.resolve(cwd, '.neo-ai-data/memory-wal')).AiConfig.NEO_AI_CANONICAL_ROOTexists but is provisioning-only (read solely byai/scripts/migrations/bootstrapWorktree.mjs) — and it names a checkout, which is identity on only one placement branch.The Architectural Reality
ADR 0019 governs (read gate:
§critical_gates 10— mandatory full read before authoring or reviewing; its §3 catalog bans exactly the current shape: A1 re-derivation, hidden defaults). §5.5 defines the sanctioned non-entrypoint shape: a pure-defaults module (literals + env-var names, no Neo import) —ai/mcp/server/memory-core/helpers/TurnPresenceConfig.mjsis the in-tree precedent ("without importing Neo singletons"). The assertion precedent for pairing/boot checks:bootstrapWorktree.mjs:189-196(module-load invariant throw).The Fix (one PR)
ai/configBase.mjs— a stable opaqueplaneId(never a path, never checkout-shaped — the corrected refinement: a checkout-shaped identity pre-decides the OQ10b election) + per-deployment-profiledataRootderivation from which the ≥7 plane-member leaves derive. Env binding vialeaf(default, env, type)only.Decision Record: amends ADR 0019).Contract Ledger
AiConfigplane-identity subtree (new leaf group)planeId+ per-profiledataRoot; plane-member leaves derive?., B3 banned)NEO_AI_CANONICAL_ROOT(existing env, provisioning)bootstrapWorktree.mjsplane(observed identity)HealthCheckResponse.planeon both serversAcceptance Criteria
planeIdis opaque (no path content);dataRootderives per deployment profile; the three concepts (identity / resolved evidence / checkout root) are never conflated in the API. (Landed: opacity enforced on RESOLVED values — one predicate behind the load guard, resolver, leaf env-parse, and the boot assertion; three-concept separation in the twin JSDoc + ADR §10.3.)assertPlaneCoherenceat theBaseServer.runHealthcheckAndLogStatushead — every boot order; symlink-transparent realpath check, spec'd with a real symlink fixture.)Out of Scope
Related
Epic #15798 · source Discussion #15595 (folds 6/6.1) · ground truth #15791 / PR #15794 · ADR 0019 ·
bootstrapWorktree.mjs· borrowed-authority note: discharge "under borrowed authority pending author ratification" until the source's ratification window closes.Implementation: PR #15811 (5 commits,
086cb28e08→5a6e3afcc3). Consumer requirements folded pre-implementation from the Lane-2 owner's comment: observed-identity emission (mc + kb healthcheck payloads) + the provisioning disposition (declared by the deployment layer; never persisted in-plane; never path-derived).Origin Session ID: 758f110e-a429-4597-beb0-5fd3ec7d1bfc Retrieval Hint:
query_raw_memories("opaque planeId paired artifact pure-defaults twin ADR-0019 C1")