Repository navigation
Description
Phase 2 of design #1531 (filed by the design architect, 2026-10-27). Design doc: files/designs/code-mcpx-stdio-exec-identity.md in the keep-the-four-repos-healthy goal workspace.
Dependency: gated on Phase 1 (the internal/config identity core) being merged. Without it, this phase's cross-directory tests cannot pass — do not start implementation before Phase 1 lands; triage may still verify scope.
Decision in force (from #1531): a hashed script (#!) is identified by content + resolved directory, so a byte-identical script re-pointed into a different directory is a different program and its pool restarts; a re-point within one directory keeps its child. This phase proves that decision end-to-end on both paths that consume identity, and closes the originating records.
Scope
- Reload path —
pkgs/mcpx/internal/daemon/reload_identity_test.go: add the cross-directory case besideTestReloadFollowsAForRePointedCommandByWhatItRuns(line 162): a link re-pointed at a byte-identical script in a different directory replaces the pool (new pool, new child pid, old child gone). Rewrite that test's comment: the caveat it carries ("a program that finds its own files relative to its real location… is kept when the link points at an identical copy in another directory") is the behaviour design(mcpx): what a stdio server's identity is — a script's identity includes its directory #1531 removes; the same-directory keep case in the test must still pass as written in behaviour. - Watch path —
pkgs/mcpx/internal/daemon/exec_watch_test.go: the same cross-directory re-point while a pool is live (thesetExecWatch/recordLifecycleharness already there) restarts the pool within the watch ticks, with exactly oneserver.restartevent for that server with reason "executable changed"; the neighbour pool is untouched, and the existing same-directory case inTestExecWatchFollowsARepointedLinkByWhatItRunskeeps its child. - Closure records:
pkgs/mcpx/TODO.mditem 4 (the stdio-identity decision item) removed — resolved by design(mcpx): what a stdio server's identity is — a script's identity includes its directory #1531;planning/roadmaps/mcpx.mdrow "Decide what a stdio server's identity is" updated to link design issue design(mcpx): what a stdio server's identity is — a script's identity includes its directory #1531 and moved/annotated per the roadmap file's own conventions;- a completion note posted on design(mcpx): what a stdio server's identity is — a script's identity includes its directory #1531 summarising the as-built behaviour.
Acceptance
- New cross-directory tests pass on both the reload path and the live watch path; all pre-existing identity tests in
internal/daemonandinternal/poolpass without behaviour changes (comment updates on the re-pointed test are expected and called out in the PR). - Exactly one
server.restartlifecycle event for the re-pointed server in the watch test; no restart for its neighbour. - TODO item 4 gone, roadmap row updated, completion note on design(mcpx): what a stdio server's identity is — a script's identity includes its directory #1531 — all in the same PR or a linked docs PR referenced on this issue.
- Verification via CI per fleet policy:
cd pkgs/mcpx && go test ./internal/daemon/... ./internal/pool/....
Out of scope: any change to internal/config identity semantics (Phase 1 — if this phase's tests expose a core defect, file it against Phase 1's issue rather than patching semantics here); interpreter-as-command servers; sibling-loading native binaries (open questions on #1531).
Acceptance criteria
- Phase 1 (mcpx: Phase 1 of #1531 — exec identity core: a script's identity folds in its resolved directory (internal/config) #1532) is merged before implementation starts (triage may verify scope earlier).
- Reload path: a new cross-directory case beside
TestReloadFollowsAForRePointedCommandByWhatItRunsshows a byte-identical script re-pointed into a different directory replaces the pool (new child pid, old child gone); the same-directory keep case still passes; the test's stale caveat comment is rewritten. - Watch path: the same cross-directory re-point on a live pool restarts it within the watch ticks with exactly one
server.restartevent (reason "executable changed"); the neighbour pool is untouched and the same-directory case keeps its child. - Closure records done:
pkgs/mcpx/TODO.mditem 4 removed, theplanning/roadmaps/mcpx.mdidentity row updated to link design(mcpx): what a stdio server's identity is — a script's identity includes its directory #1531, and a completion note posted on design(mcpx): what a stdio server's identity is — a script's identity includes its directory #1531. - CI green on the PR (fleet CI-first policy).
Activity
developing-today commentedon Oct 28, 2026
CODE-589
dezren39 commentedon Oct 28, 2026
🤖 Agent note · filed
files/designs/code-mcpx-stdio-exec-identity.md(goal workspace); queue task 1575 (repo-health-code-pilot)dezren39 commentedon Oct 28, 2026
Intake review
Fleet-monitor intake pass (2026-10-28): verified still live — Phase 2 of design #1531, queued; its daemon-level tests do not exist yet and Phase 1 (#1532) has not merged, so the gate in the body is real.
pkgs/mcpx/TODO.mditem 4,planning/roadmaps/mcpx.mdidentity row.## Acceptance criteriachecklist distilled from the body's Scope section has been appended (original body preserved verbatim above it). Labels were already normalized (kind/feature, priority/normal, effort/m, app/mcpx).server.restart-event assertion is the flake-prone spot; the existing watch harness is the right base.setExecWatch/recordLifecycleharness; closure records in the same PR.81 remaining items
dezren39 commentedon Oct 28, 2026
{"schema":"agent-note:v1","event":"parked","task_id":1679,"worker":"repo-worker-code","lane":"A","note":"Parked 20m: PR #1591 all checks green except conformance compare-with-records job 122689074704, queued since 07:29Z (infra queue stall, not a failure). Resume: if job completes green, merge PR and complete task fixed_merged."}
test(mcpx): prove cross-directory script re-point restarts on reload …
dezren39 commentedon Oct 28, 2026
{"schema":"agent-note:v1","event":"done","task_id":1679,"worker":"repo-worker-code","lane":"A","note":"PR #1591 merged (squash, be7cf62). Final CI: 17 pass / 2 skipping / 0 fail — the conformance compare-with-records job that stalled queued since 07:29Z completed successfully 08:24Z. TODO item 4 + roadmap identity row closed in the PR; completion note is on #1531. Task completed fixed_merged."}