Skip to content

fix: unblock claude-teams (PATH shim + master→evy import rename leftovers) - #38

Merged
webdevtodayjason merged 2 commits into
mainfrom
fix/claude-teams-shim-and-imports
May 28, 2026
Merged

fix: unblock claude-teams (PATH shim + master→evy import rename leftovers)#38
webdevtodayjason merged 2 commits into
mainfrom
fix/claude-teams-shim-and-imports

Conversation

@webdevtodayjason

@webdevtodayjason webdevtodayjason commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

Restores claude-teams (and its 5 sibling claude-* shims) by fixing two layered breakages discovered when running claude-teams -o -y -a claude-jason.

1. PATH collision — shims caught by v4 chat root

The v4 entry point at ~/.local/bin/subctl (chat TUI) beats the v3 dispatcher at ~/bin/subctl in the operator's interactive shell. All 6 bin/claude-* convenience shims do exec subctl <verb>, so v4 caught the call, didn't recognize the v3 verb, and printed its own usage instead of dispatching.

Fix (commit 0ae23a3): each shim resolves its own location through symlinks and execs the sibling subctl in the same bin/ directory — always the v3 dispatcher in the install tree, independent of $PATH ordering.

Files: bin/claude-{dash,deck,kill,radar,resume,teams}

2. Stale components/master/... imports after v3 rename

After the shim fix, the spawn flow reached providers/claude/_write_snapshot.ts which died at module-load with Cannot find module '../../components/master/tools/policy/audit'. Two files in providers/claude/ were missed by the v3 master→evy rename sweep (03f8f0b).

Fix (commit 66ecbe7):

  • providers/claude/_write_snapshot.tscomponents/master/tools/policy/{audit,snapshot}components/evy/tools/policy/{audit,snapshot}
  • providers/claude/_apply_team_template.tscomponents/master/team-templatescomponents/evy/team-templates

Other repo mentions of components/master were confirmed to be comments referencing the rename history, not live imports.

Test plan

  • claude-teams -o -y -a claude-jason --dry-run runs end-to-end to "(dry run — not launching tmux)" with allowlist_sha 812559ee on both ~/code/subctl (dev tree) and ~/.local/lib/subctl-install (install tree).
  • All 5 sibling shims (claude-dash, claude-deck, claude-kill, claude-radar, claude-resume) reach v3 dispatcher and emit proper v3 behavior.
  • bun -e 'await import("./providers/claude/_apply_team_template.ts")' resolves cleanly on both trees (proves module-load works; script then exits with usage error after parsing argv).
  • Reviewer to verify on a separate machine where the install tree was set up by subctl install rather than manually.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Updated CLI tool dependency resolution to ensure consistent lookup of internal components across the codebase.
    • Reorganized internal module imports for team template and policy management functionality.

Review Change Stack

webdevtodayjason and others added 2 commits May 28, 2026 12:45
The v4 chat entry point now occupies the bare `subctl` name on PATH and
doesn't dispatch v3 verbs (teams, dashboard, radar, deck, session-resume,
session-kill). The six claude-* convenience shims still call `exec subctl
<verb>`, so on any box where v4 wins the PATH race they print v4 usage
and exit 2 instead of doing their job.

Resolve each shim's own location through any symlinks, then exec the
sibling `subctl` in the same bin/ directory. That's always the v3 bash
dispatcher in the install tree, regardless of what `subctl` resolves to
on PATH.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
`providers/claude/_write_snapshot.ts` and `_apply_team_template.ts`
still imported `components/master/tools/policy/*` and
`components/master/team-templates` after the v3 rename moved those
modules under `components/evy/`. The result was every `subctl teams
claude` spawn failing at spawn time with `Cannot find module
'../../components/master/tools/policy/audit'`.

These two are the last import sites — the other repo references to
`components/master` are comments explaining the rename history, not
live imports.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Six CLI wrapper scripts (claude-dash, claude-deck, claude-kill, claude-radar, claude-resume, claude-teams) and two TypeScript provider files are updated to use the local v3 dispatcher and evy components. The bin/* scripts now resolve symlinks and execute the sibling subctl binary from their own directory instead of relying on PATH. The TypeScript files migrate their imports from master to evy component paths.

Changes

v3 Dispatcher and Component Migration

Layer / File(s) Summary
CLI wrapper symlink resolution pattern
bin/claude-dash, bin/claude-deck, bin/claude-kill, bin/claude-radar, bin/claude-resume, bin/claude-teams
All six CLI wrapper scripts replace direct exec subctl <command> "$@" with symlink-safe path resolution that locates and executes the local sibling subctl binary from the same bin/ directory, bypassing PATH lookup.
Component module migration to evy
providers/claude/_apply_team_template.ts, providers/claude/_write_snapshot.ts
Two TypeScript provider scripts update import sources: _apply_team_template.ts loads templates from evy/team-templates instead of master/team-templates, and _write_snapshot.ts imports snapshot utilities from evy/tools/policy/* instead of master/tools/policy/*.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Six shims now dance with symlink grace,
Finding subctl in their rightful place,
And templates trade their master's name,
For evy's path and v3 fame!
twitch 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the two main changes: fixing PATH shim issues and updating stale imports from master→evy, which directly correspond to the changes in the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/claude-teams-shim-and-imports

Comment @coderabbitai help to get the list of available commands and usage tips.

@webdevtodayjason
webdevtodayjason merged commit 837a808 into main May 28, 2026
0 of 2 checks passed
@webdevtodayjason
webdevtodayjason deleted the fix/claude-teams-shim-and-imports branch May 28, 2026 18:13
webdevtodayjason added a commit that referenced this pull request May 28, 2026
…g + Hermes docs (#40)

Cuts v3.3.4 bundling the three commits since v3.3.3:
- #38 fix(claude-teams): PATH-shim collision + master→evy import leftovers
- #37 fix(chat): voice toggle first-paint race + SSE reconnect drift
- #39 chore: Hermes research docs + ORCHESTRATION log + .codegraph gitignore

Per the version-cap doctrine, stays on the v3.3.x patch line — no v3.4 / v4
bump until operator decides.

Supersedes the stale `fix/policy-snapshot-evy-rename` branch (commit
557b19f), which documented only the `_write_snapshot.ts` half of the
broken-imports breakage. The shipped v3.3.4 fix covers both `.ts`
import sites plus the six `bin/claude-*` shims.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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