Skip to content

fix(w6): tier1 path unification (row ④) + spawn-role stamp scoping (row ⑦)#55

Merged
webdevtodayjason merged 2 commits into
mainfrom
fix/w6-tier1-launcher
Jun 11, 2026
Merged

fix(w6): tier1 path unification (row ④) + spawn-role stamp scoping (row ⑦)#55
webdevtodayjason merged 2 commits into
mainfrom
fix/w6-tier1-launcher

Conversation

@webdevtodayjason

Copy link
Copy Markdown
Owner

W6-C slice (worker w6-v3, orchestrator-verified). Two rows, one commit each:

  • Row ④ (812365b): tier1 memory unified on $SUBCTL_CONFIG_DIR/evy/ — tier1-memory.ts no longer reads the legacy master/ path (worked only via hand-made symlink), dashboard tier1 block drops its $HOME hardcode, and install.sh gains subctl_ensure_evy_layout() on every migrate branch so fresh installs are coherent. Matches v4 memory_http.rs resolution; per-turn re-read contract intact.
  • Row ⑦ (2d4dc93): SUBCTL_AGENT_ROLE stamp scoped per spawn type — -o → orchestrator, prompt/template → worker, bare interactive → none — plus a set-environment -gu scrub of the tmux-server-global leak vector. Root cause: the single shared launcher hardcoded worker into every session, including the operator's own (reproduced live in claude-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.ts timeouts — 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

webdevtodayjason and others added 2 commits June 11, 2026 16:39
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>
@webdevtodayjason
webdevtodayjason merged commit 606358c into main Jun 11, 2026
@webdevtodayjason
webdevtodayjason deleted the fix/w6-tier1-launcher branch June 11, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant