fix(w6): tier1 path unification (row ④) + spawn-role stamp scoping (row ⑦)#55
Merged
Conversation
tier1-memory.ts hardcoded ~/.config/subctl/master/{memory,user}.md while
its own header, the dashboard /api/memory/tier1 endpoint, and v4's
memory_http.rs all use <config>/evy/. Coherent only on hosts where the
hand-made master→evy symlink exists; a fresh install silently split the
files (dashboard tier1 edits never reached the agent prompt).
- tier1-memory.ts: paths resolve per call under $SUBCTL_CONFIG_DIR/evy/
(matches v4 memory_http.rs resolution; daemon re-reads tier1 per turn)
- dashboard tier1 GET/POST: SUBCTL_CONFIG_DIR const instead of $HOME
hardcode, like the rest of server.ts
- install.sh: subctl_ensure_evy_layout guarantees evy/ + master→evy
compat symlink on EVERY branch of the migration — fresh installs
previously no-op'd, leaving modules that still resolve master/
(e.g. tier1-candidates.ts) to split state on first write
- regression tests: tier1 path contract + per-branch install layout
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
provider_claude_teams stamped SUBCTL_AGENT_ROLE=worker into EVERY tmux session it created — including -o orchestrator spawns and the operator's own interactive sessions — tripping orchestrator-mode's anti-self- promotion guard in sessions that are supposed to orchestrate (reproduced 2026-06-11: operator session claude-samsung-phones carried the stamp). Role now resolves per spawn: -o / --orchestrator → orchestrator worker mandate present (-p / -f / -t / -T) → worker bare interactive, -c, --resume → no stamp at all Mandate-bearing spawns are how Evy/orch dispatch launches workers (always with a prompt or template), so the anti-stuck guard still covers every real worker. The stamp stays session-scoped (-e on new-session); a set-environment -gu scrub on every spawn also clears any stamp a worker-context process leaked into the tmux server's GLOBAL env when it first started the server. Resolved role is printed in the spawn banner (visible under --dry-run); spawn-role.test.ts proves (a) worker spawns carry the stamp, (b) orchestrator/interactive spawns and the spawning process do not. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
W6-C slice (worker w6-v3, orchestrator-verified). Two rows, one commit each:
$SUBCTL_CONFIG_DIR/evy/— tier1-memory.ts no longer reads the legacymaster/path (worked only via hand-made symlink), dashboard tier1 block drops its$HOMEhardcode, andinstall.shgainssubctl_ensure_evy_layout()on every migrate branch so fresh installs are coherent. Matches v4memory_http.rsresolution; per-turn re-read contract intact.SUBCTL_AGENT_ROLEstamp scoped per spawn type —-o→ orchestrator, prompt/template → worker, bare interactive → none — plus aset-environment -guscrub of the tmux-server-global leak vector. Root cause: the single shared launcher hardcodedworkerinto every session, including the operator's own (reproduced live inclaude-samsung-phones, 2026-06-11).Verification (orchestrator-run): 24 new tests green; full dashboard/providers/lib = 15 fails, byte-identical to pristine-main baseline (environmental
cli.test.tstimeouts — closet-owned); dry-run proof:-o→orchestrator,-p→worker, bare→none. 4 leftovers closet-logged.Release stamping (VERSION/CHANGELOG) follows at W6 wave close.
🤖 Generated with Claude Code