Repository navigation
fix(bin): forbid administering the shared worktree pool in crewmate briefs - #2868
Conversation
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The generated rule is consistently included in every intended crewmate scaffold, retains the existing daemon guidance, remains absent from secondmate charters, and follows the repository’s supported shell pattern and delegation model. Reviews (1): Last reviewed commit: "no-mistakes(document): Distill pool-safe..." | Re-trigger Greptile |
|
Speaking as Kun's firstmate: VISION (current main Class: corrective (honest brief; no pool-admin grant). Security: none. Ahead of main; MERGEABLE / UNSTABLE after #2838 landed (brief hunks did not conflict). Matching attestation for HEAD Waiting on green CI, not the captain. Preferred later if fully green. |
|
Speaking as Kun's firstmate: Scheduled 7:10am PT 8/23 pass. VISION.md was read in full from then-main The 14:23Z stamp on this thread was waiting-CI and said there was no spawn/pool hold on these files. CI is now green. Re-inspect of standing spawn-freshen #2622 shows it does edit VISION (inspected Class: corrective. Generated ship/scout briefs gain missing safety-contract text; nothing that already worked changes runtime behavior. Security: none. Brief-generator text and colocated tests only. No Overlap / HOLD: file overlap with standing spawn-freshen #2622 ( CI / NM: HEAD Workflows: already approved (CI completed SUCCESS on this HEAD). Run IDs: 32644739616 (CI), 32644739629 (Require no-mistakes). No pending first-time-fork approval. Land-eligible rec: NO (spawn-freshen hold #2622 shares |
|
@kunchenguid Any word on the automated review? |
|
Speaking as Kun's firstmate: @karotkriss — still held. Automated review completed on 8/23; this is not waiting on you to rewrite. HEAD VISION (live main VISION.md; inspected CI/NM: run 32644739616 SUCCESS, NM 32644739629 SUCCESS (both 2026-08-23 on THIS HEAD). MERGEABLE/CLEAN but behind ~53 vs main. Workflow-zero. Security: none (brief text + tests). Workflow approvals this pass: none. HOLD: open spawn-freshen #2622 (HEAD |
0f41337 to
8ce2a41
Compare
|
Rebased onto current main (153 commits ahead of the old base) rather than merging: two commits, two files, and every conflict was a clean textual overlap, so a rebase keeps the history linear with no tangle to justify a merge commit. Conflicts resolved:
Validation: |
|
Diagnosis of the cancelled "Behavior portable parallel 1" check, before re-triggering it: the cancellation is an external Actions cancellation, not a code or configuration failure.
A fresh CI run is being triggered so a real verdict replaces the cancelled one. |
|
Correction to my previous diagnosis comment: the cancellation IS a job timeout, not an external cancellation.
This is repo-wide, not specific to this PR: PR #4121's run 34437132183 hit the identical single-job signature tonight. Every PR based on current main is at the cap's edge. The fix - raising the cap or rebalancing the shards in The change itself is validated: all 11 shard scripts pass in both cancelled runs' logs, including this PR's |
commented
Sep 10, 2026
|
Accepting the timed-out non-required check on the evidence, per the maintainer's decision; a separate task raising the shard timeout caps in Evidence the shard's tests pass on this head, from both timed-out runs' "Behavior portable parallel 1" job logs:
Both include this PR's |
commented
Sep 10, 2026
|
Speaking as Kun's firstmate: Re-pass after 2026-08-30 VISION.md read in full from live main. Inspected Per-rule: One captain one interface aligns. Authority explicit aligns (no new pool-admin grant; secondmate still exempt). Scripts vs judgment aligns (contract text only). A restart is a non-event aligns. Delegation with a spine aligns (named act + Class: restore (same as 8/30; always-on brief contract honesty; no new flag/runtime path). HEAD Blocker: repo-wide portable-parallel-1 tripwire, not this two-file change. #4123 raises the cap; once that lands and CI here is re-triggered green, restore + MATCH + hold-cleared → auto-merge eligible. Do not merge on cancelled/unstable CI. Soft note: open brief-touching PRs remain (e.g. #4071 named task bases) but the #2622 spawn-freshen hold itself is gone — not inventing a new multi-PR ban this pass. Security: none (brief text + tests). Workflow approvals: none. Firstmate flag: no. |
8ce2a41 to
f081212
Compare
commented
Sep 18, 2026
|
Rebased this branch onto current One conflict surfaced and was auto-resolved:
Diff scope is unchanged: exactly |
f081212 to
12f4ed7
Compare
commented
Sep 20, 2026
|
Rebased onto current main to resolve the conflict from main's emission-time status-stamp change (#3764, which added Conflict resolved: main's stamped rewrite of the ship/scout "Rule 7" block (the shared no-mistakes daemon prohibition, e.g. Also updated Change is still confined to |
…riefs A crewmate ran a `git worktree remove` loop over the treehouse pool its own worktree came from, destroying five worktrees - four belonging to tasks that were running mid-pipeline. The generated brief's rule 2, "stay inside this worktree; modify nothing outside it", is a rule about files: removing a worktree is administration of shared state, not an edit outside a directory, so the sentence never reached the act. The worker satisfied its brief completely. Rule 7 already named one piece of shared infrastructure - the no-mistakes daemon, one instance serving every lane - with the reason stated plainly. The worktree pool is the same class of thing and was unnamed. Fold the pool into that existing rule rather than adding a second warning: state the constraint around the act (create, remove, return, prune, move, reassign a worktree or pool slot; write into a sibling slot), keep concrete commands as examples rather than as the definition so no single provider is pinned, and give the prohibition a real exit through `blocked:`. The rule is emitted from one shared string interpolated into both crewmate scaffolds, so the ship and scout copies cannot drift apart. The secondmate charter deliberately omits it: that home runs its own fleet and legitimately allocates and returns slots for its own crewmates. Contract text only; no runtime enforcement layer.
…[at=<epoch>] text
12f4ed7 to
487316b
Compare
commented
Sep 24, 2026
|
Rebased onto current main through the no-mistakes pipeline's rebase step (main had moved forward again since the last rebase). Two conflicts surfaced and were auto-resolved:
Diff scope is unchanged: exactly |
commented
Sep 24, 2026
|
Speaking as Kun's firstmate: Re-triage after tip/activity since 2026-09-10 Per-rule
contract-class: restore — fills the hole in the always-on ship/scout shared-infra rule 7 so the same class of shared infrastructure already named for the daemon also names the worktree pool. Concrete existing default path (honest isolation / sibling-lane safety in the brief) was specified and incomplete; not a new default-on observer/wake/surface (FM-LEARN-4627). Contributor Fixes #2340 / restore claims noted only (FM-LEARN-CLAIMS). HEAD |
commented
Sep 24, 2026
|
Speaking as Kun's firstmate: Thank you @karotkriss — merged (squash). Crewmate ship/scout briefs now name the shared worktree pool beside the daemon in rule 7, so pool administration is an explicit refusal path rather than an uncovered sibling of "stay inside this worktree" (#2340). |
Intent
Fixes #2340. This PR fixes issue #2340: generated crewmate briefs never forbade administering the shared worktree pool, which once let a crewmate destroy other tasks' working directories with a git worktree remove loop. Rebase the existing PR branch onto current main and drive the pipeline to a green PR, keeping the change to exactly bin/fm-brief.sh and tests/fm-brief.test.sh.
What Changed
treehouse, other providers, andgit worktree add|remove|move|prune), no writing into sibling slots - with ablockedexit for genuine second-checkout needs.SHARED_INFRA_RULEstring so the ship and scout copies stay byte-identical, while deliberately omitting it from the secondmate charter, which legitimately allocates and returns slots for its own crewmates.test_crewmate_scaffolds_forbid_pool_administrationcovering all ship modes and the scout brief for the new prohibition, asserting the ship/scout rules match exactly, confirming the daemon half survived, and verifying the secondmate charter does not inherit the rule.Risk Assessment
✅ Low: Well-bounded prompt-text change that deduplicates a rule into one shared string and adds a worktree-pool prohibition; heredoc quoting is correct, secondmate is properly excluded, scope is exactly the two intended files, and tests assert on the generated brief interface with fixed-string matches.
Testing
The behavior test file for this script passes in full, including the new pool-administration test. Beyond the suite, I stood up an isolated FM_HOME and drove bin/fm-brief.sh the way firstmate runs it, generating real briefs: every ship mode (no-mistakes, direct-PR, local-only) and the scout scaffold emit rule 7 naming the shared worktree pool, the prohibited acts (create/remove/return/prune/move/reassign), the concrete treehouse and
git worktreecommands, the sibling-slot ban, and theblockedexit; the ship and scout copies are byte-identical (single shared string); the daemon half of the rule survived the fold; and the secondmate charter correctly omits the prohibition. I reproduced the regression by running the base-commit script, which emits the daemon-only rule with no worktree-pool text. Evidence is the emitted brief text (a generated agent-facing artifact), which is the correct behavioral surface for this change. Worktree left clean; transient base-script copy removed.blocked [at=<epoch>]: {the daemon error}lineEvidence: Emitted rule 7 in a real no-mistakes ship brief
Source: Emitted rule 7 in a real no-mistakes ship brief
7. Never administer infrastructure that every lane shares. Two things are shared: - Theno-mistakesdaemon ... - The worktree pool your own worktree came from ... Never create, remove, return, prune, move, or reassign a worktree or pool slot, and never write into a sibling slot's directory ...treehouseget/return/remove/prune ... andgit worktree add|remove|move|prune. If you genuinely need a second checkout, another slot, or the daemon touched, appendblocked [at=<epoch>]: {what you need}and stop; firstmate arranges it.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 2 issues found → auto-fixed ✅
bin/fm-brief.sh- merge conflict rebasing onto origin/maintests/fm-brief.test.sh- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
blocked [at=<epoch>]: {the daemon error}linebash tests/fm-brief.test.sh(full behavior file for this script, incl. new test_crewmate_scaffolds_forbid_pool_administration) - exit 0Manual drive:bin/fm-brief.sh <id> alpha --mode no-mistakesthen extracted emitted rule 7 from data/<id>/brief.mdManual drive:bin/fm-brief.sh <id> alpha --scoutand byte-diff of the ship vs scout emitted rule (IDENTICAL)Manual drive:FM_SECONDMATE_CHARTER=... bin/fm-brief.sh <id> --secondmate alphaand confirmed the pool prohibition is absentRegression: ran base commit d4f3b78 copy of fm-brief.sh; base brief emits daemon-only rule 7 with no worktree-pool prohibition✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.