Repository navigation
feat(runtime-layout): migrate consumers to shared resolver (VC-011..VC-014) - #11
Merged
Merged
Conversation
Kucell
pushed a commit
that referenced
this pull request
Aug 18, 2026
The MS-003 R1 commit afba0ef landed lib/event-bus/clients/parent-resume.js with a wrong relative path (../../../runtime-layout) which resolves outside the lib/ tree and broke dashboard resume at load time. The other 15 lib/ consumers migrated in the same commit use ../../runtime-layout correctly because they live at lib/<scope>/<file>.js. Reduce the path depth to ../../runtime-layout so the require resolves to lib/runtime-layout. Manual smoke confirms node -e "require('./lib/event-bus/clients/parent-resume.js')" no longer throws MODULE_NOT_FOUND. Refs: .agent/missions/M-026/milestones/MS-004.md preflight §1 Refs: #11 (follow-up after merge)
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MS-003 of mission M-026 Runtime State Layout: migrate 16 lib/ consumers off hardcoded
.agent-runtime/<ns>onto the sharedlib/runtime-layoutresolver, with new-first read / legacy-fallback behaviour and post-activation new-only writes. Closes the VC-011..VC-014 contract assertions that MS-002 was waiting on.Scope (commit
afba0ef, 23 files, +814 / -64)16 lib/ consumers migrated to
resolveRuntimePaths(...).<ns>Dirlib/coordination/{consumer-registry, lease-cli, local-host-binding, notification-host}.jslib/cross-project/{bridge-sync, inbox-store, outbox, runtime-root, subscriptions}.jslib/agents/adapters/base.jslib/dispatch/{execute, plan}.jslib/event-bus/clients/parent-resume.jslib/governed/child-monitor.jsNew shared runtime-layout API surface
lib/runtime-layout/index.jsre-exportsisNewLayoutActivated,resolveRuntimePaths,readWithLegacyFallback,resolveWritePath, plus the newLAYOUT_ACTIVATION_MARKERconstant.lib/runtime-layout/resolver.jsadds 4 helper functions: activation detection, dual-path reader, dual-path writer, namespace path resolver.New coverage tests
tests/coverage/runtime-layout-consumers.test.js— 26 tests covering VC-011..VC-014 (consumer API composition, new-first/legacy-fallback, activation switch, template parity, no absolute paths in tracked templates).Updated cross-project tests for new-first/legacy-fallback semantics
tests/cross-project/{bridge-sync, bridge-sync-topology, inbox-store, outbox, runtime-root, subscriptions}.test.jsValidation Contract Results
_shared/zh/enexposed to same runtime layoutTest / static check summary
node --test tests/runtime-layout/runtime-layout.test.js tests/coverage/runtime-layout-consumers.test.js tests/update/runtime-layout-migration.test.jsnode .agent/skills/architecture-guard/scripts/index.jsgit diff --checkon commit contentIndependent Root validation evidence:
.agent/missions/M-026/evidence/ms-003-root-validation.md(Pi handoff overstated cleanliness; Root re-ran tests + git queries instead of trusting the JSON summary).Push & Coordination Lifecycle
codex/runtime-state-layout-ms003based on1a12043(post-MS-002 self-bootstrap fix).git push -u origin codex/runtime-state-layout-ms003toafba0ef(verified viagit ls-remote origin codex/runtime-state-layout-ms003).T-RSL-MS003-PIadvanced fromASSIGNED→READY_FOR_REVIEW(eventsCE-MS003-R1-accept,CE-MS003-R1-progress,CE-MS003-R1-readyemitted on the agent's behalf inproducer.actorId = pi-M026-MS003-R1;leaseId = LEASE-38was used during Pi execution but is no longer required for the merge itself).Current Stateupdated toMS_003_R1_PUSHED; F-003 and MS-003 status rows updated toR1 passed.Open Follow-ups (deferred to MS-004, NOT in this PR)
These do not block VC-011..VC-014 PASS and were intentionally left for MS-004 (real
.agent-runtime/self-bootstrap):_shared/.agent/runtime/README.mdplustemplates/{zh,en}/.agent/contracts/runtime-state/{5 schema files}— they are byte-identical to_shared/.agent/contracts/runtime-state/*. MS-004 will land them under achore(templates): sync runtime-state parity assetscommit.tests/runtime-state/runtime-state-projection-contract.test.jsfails on baseline1a12043already (missingtemplates/_shared/.agent/runtime/runtime-state-projection.schema.json); not an MS-003 regression. MS-004 will remediate the projection schema placement..agent-runtime/migration (F-006) still pending; MS-004 will runcortex-agent updateself-bootstrap after the untracked template assets land. The 3.bak.<ts>backups under.agent/contracts/runtime-state/from MS-002 self-bootstrap are scheduled to be cleaned up by the~/Library/LaunchAgents/com.cortex-agent.runtime-cleanup.plistlaunchd job on/after2026-08-22T14:25+08:00.Test Plan
cortex-agent updateself-bootstrap on a fresh.agent-runtime/fixture (MS-004 scope)..agent/contracts/runtime-state/*.bak.<ts>are gone.