feat: harden crew account routing and Claude model enforcement - #48
Open
ruby-dlee wants to merge 10 commits into
Open
feat: harden crew account routing and Claude model enforcement#48ruby-dlee wants to merge 10 commits into
ruby-dlee wants to merge 10 commits into
Conversation
… and Opus enforcement
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.
What Changed
claude-opus-5model anchor for Claude crews and scouts, propagate its configuration to secondmates, and expand routing/model regression coverage and documentation.Risk Assessment
✅ Low: The cumulative change is well-bounded, and the descendant fixes now enforce trusted executable resolution, descriptor-bound marker ancestry, and explicit portable openat setup failure without introducing another material source risk.
Testing
Completed 1 recorded test check.
Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed (3) ✅
bin/fm-account-directory.sh:168- The new production selector executes~/.local/bin/agent-fleetafter checking only that it is a regular executable. Unlike the existing account-routing path, it does not resolve and validate the executable's ownership or writable path ancestors. A group/world-writable ancestor could therefore allow another local user to replace this control-plane binary and gain code execution during account selection. Reusefm_account_fleet_binor apply its physical-path, ownership, and ancestor-permission validation before execution.🔧 Fix: Harden Agent Fleet and approval marker path trust
1 error still open:
bin/fm-account-directory.sh:412- The Firstmate-directed parent-component contract is not fully enforced: each directory is opened independently by absolute pathname, its descriptor is closed, and the child is then reopened by pathname. A parent can be replaced between those operations, so the validated descriptors do not prove that the marker belongs to the validated account-home chain. Walk the hierarchy withopenat/directory-relative opens while retaining parent descriptors, and open the marker relative to the validatedquota-axidescriptor.🔧 Fix: Bind approval validation to retained parent descriptors
1 warning still open:
bin/fm-account-directory.sh:408- The descriptor traversal hard-codesopenatsyscall numbers for only Darwin, Linux x86_64, and Linux arm64. The project advertises Linux generally, so routed Claude selection now silently rejects every account on other Linux architectures (for example ppc64le or riscv64) atdefined($openat_number). Resolve the syscall through a platform-supported binding/header or explicitly gate and diagnose unsupported platforms instead of making accounts appear invalid.🔧 Fix: Resolve openat portably with explicit unsupported diagnostics
✅ Re-checked - no issues remain.
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"🔧 Fix: Align Claude dispatch tests with Opus enforcement
1 error still open:
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.