Skip to content

fix(bin): forbid administering the shared worktree pool in crewmate briefs - #2868

Merged
kunchenguid merged 3 commits into
kunchenguid:mainfrom
karotkriss:fm/fm-2340-pool-prohibition
Sep 24, 2026
Merged

kunchenguid merged 3 commits into
kunchenguid:mainfrom
karotkriss:fm/fm-2340-pool-prohibition

Conversation

@karotkriss

@karotkriss karotkriss commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Expanded rule 7 in generated ship and scout briefs from a daemon-only prohibition into a shared-infrastructure rule that also forbids administering the worktree pool a slot came from - no creating, removing, returning, pruning, moving, or reassigning worktrees/slots (naming treehouse, other providers, and git worktree add|remove|move|prune), no writing into sibling slots - with a blocked exit for genuine second-checkout needs.
  • Emitted the rule from one shared SHARED_INFRA_RULE string 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.
  • Added test_crewmate_scaffolds_forbid_pool_administration covering 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 worktree commands, the sibling-slot ban, and the blocked exit; 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.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Every ship-mode brief forbids administering the shared worktree pool ✅ pass live bin/fm-brief.sh <id> alpha --mode {no-mistakes,direct-PR,local-only}; emitted rule 7 names the pool, the prohibited acts, treehouse + git worktree commands, sibling-slot ban, and blocked exit (see emi…
Scout brief carries the same prohibition, byte-identical to the ship copy ✅ pass live bin/fm-brief.sh <id> alpha --scout; diff of awk-extracted rule 7 against ship brief prints IDENTICAL
Daemon half of the shared rule survives the refactor into one string ✅ pass live Generated scout/ship briefs still contain the no-mistakes daemon-status guidance and blocked [at=&lt;epoch&gt;]: {the daemon error} line
Secondmate charter deliberately omits the crewmate pool prohibition ✅ pass live FM_SECONDMATE_CHARTER=... bin/fm-brief.sh <id> --secondmate alpha; brief.md does not contain 'create, remove, return, prune, move, or reassign'
Regression: pre-fix brief lacked the worktree-pool prohibition ✅ pass live Ran base commit d4f3b78 fm-brief.sh: emitted rule 7 is daemon-only, no worktree-pool text; fix adds it
Evidence: 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: - The no-mistakes daemon ... - 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 ... treehouse get/return/remove/prune ... and git worktree add|remove|move|prune. If you genuinely need a second checkout, another slot, or the daemon touched, append blocked [at=&lt;epoch&gt;]: {what you need} and stop; firstmate arranges it.

7. Never administer infrastructure that every lane shares. Two things are shared:
   - The `no-mistakes` daemon - one instance serving every lane/home, so stopping, restarting, or
     updating it kills other lanes' in-flight pipeline runs; only firstmate manages the daemon.
     Before you append `blocked:` about the pipeline, run `no-mistakes daemon status` and
     `no-mistakes axi status`. If the daemon socket refuses connections or is missing, append
     `blocked [at=<epoch>]: {the daemon error}` and stop even when the local run record still says running or
     fixing, because that record can be stale after the daemon exits. A run record failed with a
     daemon error is also a real block.
     Only after ruling out socket refusal, if the run is still running or fixing, reattach and keep
     going. A drive-call error, timeout, slow read, or generic unreachability is NOT a daemon error:
     the daemon accepts `respond` immediately and runs the round in the background, so a killed or
     timed-out call was only waiting for a read while the run kept working.
   - The worktree pool your own worktree came from, and the repository every lane's worktree
     shares. Never create, remove, return, prune, move, or reassign a worktree or pool slot, and
     never write into a sibling slot's directory. Rule 2 does not cover this: removing a worktree
     is administration rather than an edit outside your directory, and it lands on lanes that are
     running right now. The act is the rule and commands are only examples of it - `treehouse`
     get/return/remove/prune, the equivalent operations on any other worktree provider or runtime
     backend, and `git worktree add|remove|move|prune`. A slot that looks unused is not evidence
     that it is free, and returning your own worktree is firstmate's job at cleanup, not yours.
   If you genuinely need a second checkout, another slot, or the daemon touched, append
   `blocked [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/main
  • ⚠️ tests/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.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Every ship-mode brief forbids administering the shared worktree pool ✅ pass live bin/fm-brief.sh <id> alpha --mode {no-mistakes,direct-PR,local-only}; emitted rule 7 names the pool, the prohibited acts, treehouse + git worktree commands, sibling-slot ban, and blocked exit (see emi…
Scout brief carries the same prohibition, byte-identical to the ship copy ✅ pass live bin/fm-brief.sh <id> alpha --scout; diff of awk-extracted rule 7 against ship brief prints IDENTICAL
Daemon half of the shared rule survives the refactor into one string ✅ pass live Generated scout/ship briefs still contain the no-mistakes daemon-status guidance and blocked [at=&lt;epoch&gt;]: {the daemon error} line
Secondmate charter deliberately omits the crewmate pool prohibition ✅ pass live FM_SECONDMATE_CHARTER=... bin/fm-brief.sh <id> --secondmate alpha; brief.md does not contain 'create, remove, return, prune, move, or reassign'
Regression: pre-fix brief lacked the worktree-pool prohibition ✅ pass live Ran base commit d4f3b78 fm-brief.sh: emitted rule 7 is daemon-only, no worktree-pool text; fix adds it
  • bash tests/fm-brief.test.sh (full behavior file for this script, incl. new test_crewmate_scaffolds_forbid_pool_administration) - exit 0
  • Manual drive: bin/fm-brief.sh &lt;id&gt; alpha --mode no-mistakes then extracted emitted rule 7 from data/<id>/brief.md
  • Manual drive: bin/fm-brief.sh &lt;id&gt; alpha --scout and byte-diff of the ship vs scout emitted rule (IDENTICAL)
  • Manual drive: FM_SECONDMATE_CHARTER=... bin/fm-brief.sh &lt;id&gt; --secondmate alpha and confirmed the pool prohibition is absent
  • Regression: 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.

@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The 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

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

VISION (current main 266fdb9654d8). Inspected bin/fm-brief.sh + tests only. Per-rule: isolation / scripts own the brief contract aligns — rule 7 now names the shared worktree pool, not just the no-mistakes daemon. Unlanded work in other lanes aligns. File-scoped rule 2 is no longer the only sentence. Does not edit spawn/teardown/pool scripts.

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 0f41337ab106. NM SUCCESS. CI not green yet (serials pending). No spawn/pool hold on these files. Closes #2340.

Waiting on green CI, not the captain. Preferred later if fully green.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Scheduled 7:10am PT 8/23 pass. VISION.md was read in full from then-main 505c8195122b6d3e3a04fa48c13cd184df0321ba. Current main is 266fdb9654d8e19f5f17e21794e03dd48ad31ae6 (#2838 then #2837). Issue #2340 remains ready-for-pr; that is a queue label, not a merge vote. No captain comment authorizing a merge.

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 bin/fm-brief.sh and tests/fm-brief.test.sh (named --base-branch / --branch-name in the same header and scaffold surface). That overlap was missed at 14:23Z.

VISION (inspected bin/fm-brief.sh and tests/fm-brief.test.sh). Per-rule: delegation with a spine / explicit contract aligns (rule 2 is file-scoped and never reached pool administration); strengthens a refusal path aligns (named act, concrete examples, blocked: exit); unlanded work is never torn down aligns; scripts vs judgment aligns (contract text only; no runtime enforcement); simplicity aligns (one shared string, no new task shape); secondmate exclusion aligns. Inspected rule 7 fold preserves the daemon half including blocked: {the daemon error}.

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 .github files, no secrets, no workflow injection.

Overlap / HOLD: file overlap with standing spawn-freshen #2622 (bin/fm-brief.sh, tests/fm-brief.test.sh). Not overlapping #2637/#2692/#2693/#2154/#2804 on these files. #2827 is CLOSED. Just-landed #2838 also edited bin/fm-brief.sh; this PR stayed MERGEABLE / CLEAN against that landing. Issue #2340 already distinguished #2804 as a different layer. Do not treat this as auto-eligible beside open #2622.

CI / NM: HEAD 0f41337ab106e4c5ca46e3e75a3155064794b456. MERGEABLE / CLEAN, ahead 2 / behind 2 vs current main. Matching no-mistakes-pipeline-attestation:v1 for THIS HEAD. Require no-mistakes SUCCESS (run 32644739629). CI run 32644739616 SUCCESS. Greptile SUCCESS — not a gate. Pipeline lint warning in the body is not a CI failure.

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 bin/fm-brief.sh and tests/fm-brief.test.sh). Captain-flag NOW: no.

@karotkriss

Copy link
Copy Markdown
Contributor Author

@kunchenguid Any word on the automated review?

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

@karotkriss — still held. Automated review completed on 8/23; this is not waiting on you to rewrite.

HEAD 0f41337ab106e4c5ca46e3e75a3155064794b456 — attestation MATCH. Class: restore (fills the hole in always-on ship/scout rule 7 so the shared-infra contract names the pool act; no new flag/runtime path; secondmate unchanged). Fixes #2340 still honest vs current main d71f4b9cf1e6 (rule 7 still daemon-only).

VISION (live main VISION.md; inspected bin/fm-brief.sh + tests/fm-brief.test.sh): One captain one interface aligns; Authority explicit aligns; Scripts vs judgment aligns; A restart is a non-event aligns; Delegation with a spine aligns; Fleet outlives vendor aligns; Scope aligns. Closing: aligns — strengthens a refusal path and keeps sibling lanes intact; no workshop growth.

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 88615afc, updated 8/27) still edits bin/fm-brief.sh and tests/fm-brief.test.sh. Same overlap as 8/23. Do not merge / do not rebase beside it. Not waiting on the author; sequencing hold on #2622, not a captain product decision.

@karotkriss
karotkriss force-pushed the fm/fm-2340-pool-prohibition branch from 0f41337 to 8ce2a41 Compare September 10, 2026 03:54
@karotkriss

Copy link
Copy Markdown
Contributor Author

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:

  • bin/fm-brief.sh, shared-rule definition site: main added the TASK_SECTION heredoc where this branch defines SHARED_INFRA_RULE. Kept both, TASK_SECTION first.
  • bin/fm-brief.sh, ship and scout rule 7: main expanded the daemon rule with the diagnose-before-blocking guidance (no-mistakes daemon status / no-mistakes axi status, socket-refusal vs stale-record vs drive-call-timeout distinctions) and added $INBOX_SECTION after it. Folded main's full expanded daemon text into the daemon bullet of SHARED_INFRA_RULE so nothing from main's wording is lost, and kept $INBOX_SECTION after the shared rule in both scaffolds.
  • tests/fm-brief.test.sh: main added test_worker_role_scope at the same insertion point as the new test_crewmate_scaffolds_forbid_pool_administration. Kept both functions and both calls.

Validation: bin/fm-lint.sh clean (ShellCheck 0.11.0, actionlint 1.7.12), bin/fm-test-run.sh tests/fm-brief.test.sh all 21 tests pass including the new pool-administration test.

@karotkriss karotkriss changed the title fix(bin): forbid crewmates from administering shared worktrees fix(bin): forbid administering the shared worktree pool in crewmate briefs Sep 10, 2026
@karotkriss karotkriss closed this Sep 10, 2026
@karotkriss karotkriss reopened this Sep 10, 2026
@karotkriss

Copy link
Copy Markdown
Contributor Author

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.

  • It hit this PR twice (runs 34435134027 and 34437474615) with an identical signature: all 11 test scripts in the shard pass (FM_TEST_SUMMARY total=11 failed=0 in both job logs), every other job succeeds, then The operation was canceled lands the moment the shard finishes.
  • Not a concurrency group: ci.yml declares none.
  • Not a timeout: the job runs ~10 minutes and GitHub reports timeouts as failures with an explicit message, not cancellations.
  • Not a test failure: both logs end with a fully passing summary.
  • Both runs are run_attempt: 1, conclusion cancelled; the cancellation requester is not visible to this account's API access.
  • The same single-job signature hit PR feat(skills): add installable paper-templates skill and skills-lock tooling #4121's run 34437132183 tonight in an overlapping window (04:25-04:47 UTC vs 04:30-04:54 UTC here). Both affected PRs are karotkriss-authored; kunchenguid-authored PR runs in the same hour completed normally, which points at something cancelling runs on karotkriss-authored PRs rather than at this change.

A fresh CI run is being triggered so a real verdict replaces the cancelled one.

@karotkriss

Copy link
Copy Markdown
Contributor Author

Correction to my previous diagnosis comment: the cancellation IS a job timeout, not an external cancellation.

ci.yml:52 sets timeout-minutes: 10 on the "Behavior portable parallel 1" job, with a comment describing the cap as "a hang tripwire with margin" from when the shard's measured wall was ~1 minute. The shard's test wall is now ~9.8 minutes (FM_TEST_SUMMARY duration_ms=597898 and 587861 in the two runs here, dominated by fm-captain-hold-lifecycle ~4.8 min and fm-lint ~2.5 min), and with checkout plus ShellCheck install the job crosses the cap: the last run went job-start 04:30:52Z to cancel 04:40:58Z, 10:06 elapsed. GitHub reports a timeout-minutes breach as cancelled, which is why the log shows a fully passing test summary immediately followed by "The operation was canceled".

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 bin/fm-test-run.sh/ci.yml - is outside this PR's two-file scope, so it is being escalated separately rather than smuggled in here.

The change itself is validated: all 11 shard scripts pass in both cancelled runs' logs, including this PR's fm-brief.test.sh.

@karotkriss

ghost commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Accepting the timed-out non-required check on the evidence, per the maintainer's decision; a separate task raising the shard timeout caps in ci.yml is in flight, and CI here will be re-triggered once it lands.

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 tests/fm-brief.test.sh at exit=0. The check is not required for merge; the required "PR must be raised via no-mistakes" check is green on the current head.

@kunchenguid

ghost commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Re-pass after 2026-08-30 outcome=ineligible-hold-overlap (why=newer-activity). Tip moved: prior HEAD 0f41337ab106e4c5ca46e3e75a3155064794b456 → current 8ce2a41da829b3e61ad8b4433dec66c47a08cf5e (author rebase onto main 2026-09-10; attestation rebound). Prior hold #2622 is CLOSED — sequencing hold cleared.

VISION.md read in full from live main. Inspected bin/fm-brief.sh + tests/fm-brief.test.sh.

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 + blocked: exit). Fleet outlives vendor aligns (provider-agnostic examples). Scope aligns. Closing: aligns — fills the hole in always-on ship/scout rule 7 so shared-infra names the pool act; strengthens a refusal path; unlanded sibling lanes stay intact.

Class: restore (same as 8/30; always-on brief contract honesty; no new flag/runtime path).

HEAD 8ce2a41da829b3e61ad8b4433dec66c47a08cf5e. Attestation MATCH. NM SUCCESS run 34437474599. CI run 34437474615: all required-looking jobs green except Behavior portable parallel 1 CANCELLED at ~10m06s (timeout-minutes: 10); job logs show FM_TEST_SUMMARY total=11 failed=0 including tests/fm-brief.test.sh (same signature on 34435134027). MERGEABLE / UNSTABLE. Author active today (not 14-day stale).

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.

@karotkriss
karotkriss force-pushed the fm/fm-2340-pool-prohibition branch from 8ce2a41 to f081212 Compare September 18, 2026 19:31
@karotkriss

ghost commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Rebased this branch onto current origin/main (was 72 commits behind; main had moved from e0d269e07 to daaffdb51) through the no-mistakes pipeline's rebase step rather than a manual rebase.

One conflict surfaced and was auto-resolved:

  • tests/fm-brief.test.sh - main had added several new tests after test_worker_role_scope (e.g. test_scout_lavish_line_follows_presentation_floor) since this branch's base, so the new test_crewmate_scaffolds_forbid_pool_administration function and its call needed repositioning against that new context. Resolved by keeping the new test function and its call site immediately after test_worker_role_scope/before the other appended test calls, preserving every test main had added in between.

bin/fm-brief.sh applied cleanly with no conflicts - the change stays confined to the shared SHARED_INFRA_RULE definition and its two call sites.

Diff scope is unchanged: exactly bin/fm-brief.sh and tests/fm-brief.test.sh. All 19 CI checks are green and mergeable_state is clean.

@karotkriss
karotkriss force-pushed the fm/fm-2340-pool-prohibition branch from f081212 to 12f4ed7 Compare September 20, 2026 23:10
@karotkriss

ghost commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main to resolve the conflict from main's emission-time status-stamp change (#3764, which added [at=<epoch>] tags to every scaffold status-line example in bin/fm-brief.sh).

Conflict resolved: main's stamped rewrite of the ship/scout "Rule 7" block (the shared no-mistakes daemon prohibition, e.g. blocked: {the daemon error} -> blocked [at=<epoch>]: {the daemon error}) landed on the same lines this PR replaces with SHARED_INFRA_RULE (which folds the daemon rule and adds the new worktree-pool prohibition). Kept this PR's SHARED_INFRA_RULE structure and content, and re-applied main's [at=<epoch>] stamping to the blocked: example lines inside it so the rendered rule matches main's current status-line convention.

Also updated tests/fm-brief.test.sh's test_crewmate_scaffolds_forbid_pool_administration assertions to match the stamped blocked [at=<epoch>]: ... text now emitted, since the prior exact-string greps predated the stamping change.

Change is still confined to bin/fm-brief.sh and tests/fm-brief.test.sh. All 19 checks green, mergeable_state: clean.

Christopher McKay added 3 commits September 24, 2026 08:55
…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.
@karotkriss
karotkriss force-pushed the fm/fm-2340-pool-prohibition branch from 12f4ed7 to 487316b Compare September 24, 2026 13:03
@karotkriss

ghost commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

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:

  • bin/fm-brief.sh, top-of-file usage comment: main had independently added a sentence noting that --mode, --forge, and --shape are refused on scout and secondmate scaffolds (from the Gerrit-publishing feature landing after this branch's prior base), while this branch's own sentence in the same spot only mentioned --mode and additionally explained the shared-rule rationale (daemon + worktree pool). Kept both: the shared-rule explanation first, followed by main's more complete --mode, --forge, and --shape are refused... sentence.
  • tests/fm-brief.test.sh: main had added a run of new branch-prefix test calls (test_ship_branch_prefix_defaults_to_legacy_fm through test_branch_prefix_command_is_shell_safe) at the same tail position where this branch appends test_crewmate_scaffolds_forbid_pool_administration. Kept both, with this branch's test call last.

Diff scope is unchanged: exactly bin/fm-brief.sh and tests/fm-brief.test.sh, 103 insertions / 24 deletions vs main. All 19 checks are green and mergeable_state is clean.

@kunchenguid

ghost commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Re-triage after tip/activity since 2026-09-10 outcome=waiting-ci stamp (HEAD was 8ce2a41da829; now 487316be85e2 after author rebases through 2026-09-24). VISION.md read in full from live main 474c6ee2d5e8 (post-#5526). Inspected tip vs main: bin/fm-brief.sh + tests/fm-brief.test.sh. Issue #2340 still open; main rule 7 still daemon-only (no SHARED_INFRA_RULE / worktree-pool prohibition). Prior hold #2622 remains CLOSED. Soft note: other open briefs touch fm-brief.sh (#4168 test-discipline, #5367 temp-HOME rule 8) but none implement #2340's pool-admin prohibition — not a competing PR.

Per-rule

  • One captain, one interface: aligns.
  • Authority is explicit and never inferred: aligns (no new pool-admin grant; secondmate still omits the crewmate prohibition).
  • Scripts own the mechanics / agents own judgment: aligns (contract text only; no runtime adjudication).
  • A restart is a non-event: aligns.
  • Delegation with a spine: aligns (named act + blocked [at=<epoch>]: exit).
  • Unlanded work is never torn down: aligns (sibling slots protected by the named admin ban).
  • The fleet outlives any vendor: aligns (provider-agnostic examples).
  • Scope: aligns (brief contract honesty; no workshop growth).

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 487316be85e29727861d74eb07010f02ef5566cb. Attestation MATCH. CI/NM all SUCCESS on this HEAD. MERGEABLE/CLEAN. Security: none. Workflow-approved: yes. Author rebased today (not 14-day stale). Auto-merge eligible → squash-merging.

@kunchenguid
kunchenguid merged commit 0d983d2 into kunchenguid:main Sep 24, 2026
@kunchenguid

ghost commented Sep 24, 2026

Copy link
Copy Markdown
Owner

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).

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.

Crewmate briefs do not forbid administering the shared worktree pool, and "stay inside this worktree" does not reach it

2 participants