Skip to content

feat: add scout task lifecycle - #7

Merged
kunchenguid merged 3 commits into
mainfrom
feat/scout-tasks
Jun 12, 2026
Merged

kunchenguid merged 3 commits into
mainfrom
feat/scout-tasks

Conversation

@kunchenguid

Copy link
Copy Markdown
Owner

Intent

Extend firstmate so crewmates handle ALL project-specific work, not just coding that ends in a PR. The captain asked for this and approved the proposed design including the rule-3 carve-out and promotion. New task shape 'scout' (investigations, planning, bug reproductions, audits): deliverable is a standalone report at data//report.md instead of a PR; the worktree is declared scratch from the start. Changes: (1) AGENTS.md - identity broadened from coding tasks to all project work, intake now classifies shape (ship vs scout) before readiness, scout flow documented (no validate/PR/merge stages; report -> relay to captain -> immediate teardown), promotion documented, hard rule 3 gets the deliberate scout carve-out, backlog format gains a report-link Done variant, brief section mentions --scout; (2) bin/fm-brief.sh - --scout flag writes a scout contract scaffold (never push, report definition of done, worktree-is-scratch framing); (3) bin/fm-spawn.sh - --scout flag records kind=scout in the task meta, default kind=ship for backward compatibility (absent kind in old meta files is treated as ship by teardown); (4) bin/fm-teardown.sh - scout tasks skip the unpushed-work refusal once data//report.md exists, refuse with a clear message when the report is missing, ship tasks keep the full protection unchanged; (5) new bin/fm-promote.sh - flips kind=scout to ship in meta so a scout crewmate can be promoted in place (keeping worktree and context) when its findings reveal shippable work, restoring full teardown protection. Deliberate decisions: --scout flags are parsed positionally-tolerant (filtered from args) on both fm-brief and fm-spawn; scout briefs forbid pushing to ANY remote (stronger than ship's never-push-to-default) because nothing from a scout worktree should ever leave the machine; the report-missing teardown refusal deliberately mirrors the existing refusal wording style; all scripts were smoke-tested locally (both scaffolds, promote happy/error paths, teardown refusal and carve-out paths).

What Changed

  • Added a scout task shape for investigations, plans, reproductions, and audits, with report-based completion at data/<id>/report.md instead of PR validation.
  • Extended task scaffolding and spawning with --scout, persisted task kind metadata, and documented scout intake, supervision, teardown, and Done backlog entries.
  • Added in-place scout promotion via bin/fm-promote.sh and updated teardown protections so scout scratch work can only be discarded after a report exists while ship tasks retain unpushed-work safeguards.

Risk Assessment

✅ Low: The change is well-bounded to firstmate task orchestration scripts and documentation, and the previously flagged promotion handoff risk is addressed with explicit cleanup-before-branch guidance.

Testing

Exercised the scout flow through the actual firstmate shell scripts and treehouse-backed spawn/teardown path, captured reviewer-visible CLI transcripts, verified documented edge cases, and confirmed no transient test files remained in the working tree; all tested behavior passed.

Evidence: Scout lifecycle transcript

Shows scout brief scaffolding, fm-spawn recording kind=scout, teardown refusing before data/e2e-scout/report.md, teardown succeeding after the report despite an unpushed scratch commit, and fm-promote changing meta to kind=ship with ship teardown protection restored.

## Scout lifecycle end-to-end transcript
workspace=/Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP

### Scaffold scout brief
scaffolded: /Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP/data/e2e-scout/brief.md (scout; replace {TASK})
brief contains scout contract: yes

### Spawn scout with raw inert crewmate command
spawned e2e-scout harness=sh kind=scout window=firstmate:fm-e2e-scout worktree=/Users/kunchen/.treehouse/project-9d4b21/1/project

meta after spawn:
window=firstmate:fm-e2e-scout
worktree=/Users/kunchen/.treehouse/project-9d4b21/1/project
project=/Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP/.tmp-scout-lifecycle/project
harness=sh
kind=scout

worktree path=/Users/kunchen/.treehouse/project-9d4b21/1/project

### Add scratch work that would block ship teardown
scratch status after commit:
unpushed commit visible: f97b47b scratch scout work

### Teardown refuses when report is missing
REFUSED: scout task e2e-scout has no report at /Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP/data/e2e-scout/report.md.
The report is the work product. Have the crewmate write it (or get the captain's explicit OK to discard, then --force).
missing-report refusal observed

### Report unlocks scout teardown despite unpushed scratch commit
🌳 Terminated lingering processes: zsh (19087), sleep (19317)
🌳 Worktree returned to pool.
teardown e2e-scout complete (window firstmate:fm-e2e-scout, worktree /Users/kunchen/.treehouse/project-9d4b21/1/project)
meta removed after teardown: yes
report preserved after teardown: yes

### Promotion restores ship protection
promoted e2e-promote to ship (teardown protection restored)
next: bin/fm-send.sh fm-e2e-promote '<ship instructions: review scratch state with git status and git log; reset to a clean default-branch base; carry over only intended fix changes; create branch fm/e2e-promote; implement; report done>'
meta after promote:
window=firstmate:fm-e2e-promote
worktree=/Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP/.tmp-scout-lifecycle/promote-wt
project=/Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP/.tmp-scout-lifecycle/promote-project
harness=raw
kind=ship
ship teardown now refuses unpushed local commit: REFUSED: worktree /Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP/.tmp-scout-lifecycle/promote-wt has work not on any remote.
unpushed commits:
996cb0f base
Push the branch (or get the captain's explicit OK to discard, then --force).
yes

cleanup complete
Evidence: Scout edge-case transcript

Shows fm-brief.sh accepting --scout before positional args and fm-teardown.sh treating legacy meta without kind= as ship-protected.

## Scout edge cases transcript

### fm-brief parses --scout before positional args
scaffolded: /Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP/data/e2e-edge-brief/brief.md (scout; replace {TASK})
scout brief created with front-position flag: yes

### legacy meta without kind= defaults to ship protection
legacy meta contents:
window=firstmate:fm-e2e-legacy
worktree=/Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP/.tmp-scout-edge-cases/project
project=/Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP/.tmp-scout-edge-cases/project
harness=raw
legacy teardown refuses unpushed commit: REFUSED: worktree /Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KTYK46X0ZFACSPFS8HBDMCKP/.tmp-scout-edge-cases/project has work not on any remote.
unpushed commits:
4d07e57 base
Push the branch (or get the captain's explicit OK to discard, then --force).
yes

cleanup complete

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ bin/fm-promote.sh:22 - The promoted task instructions tell firstmate to have the crewmate create fm/&lt;id&gt; from the current scout worktree state. Scout briefs explicitly allow arbitrary scratch edits and commits, so this can put exploratory work on the shipping branch unless promotion first requires an inventory/cleanup step or a reset/cherry-pick of only intended changes.

🔧 Fix: Require clean promotion handoff
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Inspected changed files with git diff --name-only 8b6f11ad5518e345fd84e022d4caa0dbbabcbdee..45d4b1666643557641983374db58d046cad1c248 and read AGENTS.md, bin/fm-brief.sh, bin/fm-spawn.sh, bin/fm-teardown.sh, and bin/fm-promote.sh.
  • Ran an end-to-end scout lifecycle smoke using ./bin/fm-brief.sh e2e-scout .tmp-scout-lifecycle/project --scout, ./bin/fm-spawn.sh e2e-scout .tmp-scout-lifecycle/project &#34;sh -c &#39;sleep 300&#39;&#34; --scout, scratch commit creation in the treehouse worktree, missing-report teardown refusal, report creation, successful scout teardown, and ./bin/fm-promote.sh e2e-promote.
  • Ran edge-case smoke checks for ./bin/fm-brief.sh --scout e2e-edge-brief .tmp-scout-edge-cases/project and ./bin/fm-teardown.sh e2e-legacy with a legacy meta file lacking kind=.
  • Checked for leftover working-tree artifacts with git status --short plus glob checks for .tmp-scout-*, data/e2e-*, and state/e2e-*.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid
kunchenguid merged commit d3f8a1c into main Jun 12, 2026
3 checks passed
@kunchenguid
kunchenguid deleted the feat/scout-tasks branch June 12, 2026 19:34
vipentti pushed a commit to vipentti/firstmate that referenced this pull request Aug 5, 2026
* feat: scout tasks - delegate investigations and repros with report deliverables

* no-mistakes(review): Require clean promotion handoff

* no-mistakes(document): Sync scout task documentation
@kyokosawada

Copy link
Copy Markdown

Resolved. The middleman's surface settled as its four calls - greet, send, sendImage, press - plus the held /updates WebSocket stream carrying the fleet and a watched pane, with every failure surfaced as a typed Trouble. That shape was specced in #12 and is built and running on main. Closing as answered and superseded by #12.

This was referenced Oct 2, 2026
VasanthAmana added a commit to VasanthAmana/firstmate that referenced this pull request Oct 4, 2026
…unchenguid#7)

* fix(pi): match Pi 1.0 stock tool-call header and export renderer deps in Calm tests

Pi 1.0 shows call arguments in the stock fallback tool-call header and renamed the export renderer's getToolDefinition dependency to getToolRenderers. The outcomes tool now probes the installed stock row and mirrors the header, and the Calm export fixtures pass both dependency names so they run on old and new Pi.

* no-mistakes(document): Document probed Pi 1.0 call header in Calm docs

* no-mistakes(ci): Shard 2 failure was a real test incompatibility with Pi 1.0.x, which CI installs from npm latest. I reproduced it locally against Pi 1.0.2 and fixed it in tests/fm-calm-pi-extension.test.sh. The Pi-1.0 tests in the file now pass, along with the rendered-export-DOM guard. Two causes: 1. Pi 1.0 runs the TUI fullscreen by default. The tmux `capture-pane` only saw the visible viewport, so earlier tool rows were missing and "calm mode was not off by default (missing CALM_E2E_OUTPUT)" fired. I added `"tuiMode":"regular"` to the three tmux Pi `settings.json` fixtures. Older Pi ignores the key. 2. Pi 1.0 now keeps `display:false` custom messages in the exported HTML as `hook-message hook-message-hidden`, hidden by CSS and shown only by the H toggle. The DOM assertion rejected any hook-message text. It now requires every hook-message element to carry the hidden class. Older Pi, which emits none, still passes. Lint 1 isn't caused by this PR. Its ShellCheck run was killed with exit 143 after about 7.5 minutes, with no diagnostics, so it looks like a runner cancellation or timeout. I ran the pinned `bin/fm-lint.sh --fast` on the changed file locally and it is clean. I did not run the full-rigor lint that CI uses. Not run: the other test scripts in the shard, or the full CI shard. The earlier 'Calm-off ToolExecutionComponent' (shard 4) failure was already handled by the preceding commits

* no-mistakes(ci): Changed only tests/fm-calm-pi-extension.test.sh. No production code, secondmate tests or Lint 1 were touched. I could not verify the fix against Pi 1.0.2. Locally the installed Pi is 0.83.0 and the global npm Pi package isn't found, so most Pi-dependent tests skip. Changes: (a) New `wait_for_all_text` helper re-captures the pane on every poll and succeeds only when every token is in the same snapshot. The first startup wait (restored transcript) now waits for all six tokens that the Calm-off assertions check: the completion line, `CALM_E2E_OUTPUT`, `fm_watch_arm_pi`, the probe wake row, `Thinking...` and `fm-calm.ts`. The restart wait waits for both the prompt and response tokens. The second `/calm` restore wait waits for the output, watcher tool, wake row and active-probe tokens together. I only added tokens to waits; every assertion is unchanged. The negative assertions can't be waited on. (b) `wait_for_text` now delegates to the helper with a bounded 30 s budget (600 × 0.05 s, up from 6 s). The commit message should state the measured local restore times of about 1.6-2.5 s. (c) New `kill_session_and_wait` kills the session and polls `list-sessions` (bounded 10 s) until the old tmux server has exited. It replaces every `kill-session` in the file, so each kill-then-new-session pair on the same socket is covered. Verification: - `bash -n` passes. - `bin/fm-lint.sh --fast` ran on the file with no diagnostics shown in the tail I viewed. I did not run the full-rigor lint. - A full local run printed `not ok - Pi Calm hidden-block geometry E2E did not complete the /reload viewport transition`. That wait is `wait_for_geometry_transition`, which I did not change, but my `kill_session_and_wait` is used in that geometry path. I tried to run the original file as a baseline to see whether it also fails. I killed that run to restore my edited file, so I don't know whether the failure predates my change. Treat it as an open question and check it against CI on Pi 1.0.2
@JCambras

JCambras commented Oct 7, 2026

Copy link
Copy Markdown

What and why

Slice 01 (docs/build/01-core.md): packages/core now implements domain model §4–§7b as pure TypeScript and reproduces every vector in docs/vectors/*.json. That covers report aggregation and the rotating question, change classification and timing, Send now, GSM-7 composition of all four message kinds, schedule diff and import flags, and Next up with overlaps and breaks between games. There is no I/O, no database and no routes.

Acceptance

  • pnpm test runs the vector suite: 104 vectors, all passing (reports 10, rotation 7, changes 47, diff 15, flags 11, family 14). The counts on main match the prompt. One Vitest suite loads each JSON file and asserts deep equality per vector, including units, segments and truncated. It also asserts the per-file and total counts, and that every file's params equal core's PARAMS.

  • node docs/vectors/generate.mjs passes its 114 hand checks, and git diff --exit-code docs/vectors/*.json is clean: the JSON is byte-identical. reference-v1.mjs itself changed on purpose, so git diff docs/vectors shows that file (see "Spec changes").

  • 100% branch coverage on packages/core: 362/362 branches, 420/420 statements, 117/117 functions, 331/331 lines, from core's own tests. pnpm test enforces it (vitest run --coverage with a 100% threshold on packages/core/src).

  • The dependency lint enforces core's package boundary. The existing core-is-independent rule stays, and a new core-has-no-io rule forbids Node I/O built-ins in packages/core/src (only node:crypto, used for share tokens, is allowed). tests/dependencies.test.ts covers both.

  • Time zones use Intl only, no library. This passes every vector, including the DST case meal_change_daytime_dst, plus unit tests for both DST nights and Phoenix.

  • fast-check property tests cover the three invariants:

    • aggregation only produces counts (n equals the sum of the counts, at most one answer per adult per season);
    • notBefore never lands in quiet hours for a non-game change with no pending window (2,000 runs across 10 zones, 2020–2040);
    • composeChangeMessage never returns more than 2 segments or a non-GSM-7 character, and always keeps the first line; the same holds for Tomorrow, after-game and correction texts (a correction may be refused, never cut).

    Each property was checked to fail under a deliberate mutation.

  • A committed differential property test (packages/core/test/reference.test.ts) runs core against reference-v1.mjs on generated inputs for every function, so the two can't drift apart while the vectors pin only some behavior.

  • Domain types for reports, changes, events and proposals are exported from @coldstart/core. They are camelCase internally (CLAUDE.md conventions) and match the contract's shapes; question ids, choices, field names and flag codes keep their wire spelling. The vector suite maps wire snake_case to camelCase at the boundary.

  • Share-token derivation (4b) was already in core from slice 00. It moved under links/.

Spec changes for the owner to confirm

The slice asks the reviewer "whether any behavior in the code isn't stated in the domain model". Two fresh-context reviews ran: the first found about 35 such behaviors, the second checked the fixes.

The domain model is now v2.3. It states every rule below, and reference-v1.mjs follows it. The vector JSON is unchanged.

Followed the reference where the model is silent (the slice makes the reference the tiebreaker):

  • label and opponent normalization
  • AM/PM detection, settled by an ampm convention
  • overlap takes precedence over distant_back_to_back
  • the reports horizon runs to the end of as_of
  • an empty tip is no tip
  • deterministic tie-breaks
  • names bounded in GSM-7 units
  • the hotel line is folded first, and the first line is never folded
  • a required eventKind for notBefore (null for a trip field)

Rules the model and reference now state (docs/domain-model.md §5–§7b and reference-v1.mjs updated together, vector JSON unchanged):

  1. The STOP footer goes on a follower's first message of a season of any kind (ADR-0009 §7), not only change texts.
  2. A tentative game with no time reads Final: time TBD. Only if 12U Blue makes it. (§3: every text shows a tentative game with "Only if").
  3. Tomorrow leaves out cancelled events. The reference used to list a cancelled game with a be-there-by.
  4. An event with no venue yet omits , Venue (the reference printed null).
  5. The diff matches only events of the same kind, so a re-imported game can no longer turn a hand-added meal into a game. Each rule runs over every proposal before the next. A TBD or TBA opponent never matches.
  6. An import moves status from tentative to set only when the event then has a time. Without that, publishing would violate the events check constraint.
  7. At most one flag per code per proposal, because the contract's clear_flags clears by index.
  8. Corrections lose their http(s):// and www. links and go on one line. Core refuses (RangeError) a text that is empty, longer than 200 characters, or too long for two segments, and never cuts it. Slice 04's route should answer 400.
  9. GSM-7: any Unicode space becomes a space and a bullet a dash, which handles non-breaking spaces from pasted schedules. Each emoji becomes one ?. Segment counting never splits an escaped character across parts.
  10. jersey and sheet_as_scheduled edits are quiet even on a meal, as the field vocabulary already says.
  11. The composition bounds the vectors pin are now stated accurately. The old "trimmed to 30 units" became: names bounded in GSM-7 units, with a cut name keeping its first 29 (or 39) units and ending in ....
  12. Every composer requires firstMessageOfSeason, so a caller can't drop the footer by forgetting the flag.
  13. Core puts message lines in schedule order itself (by day, then start, an event with no time last), because non-negotiable 6 keeps composition policy in core.
  14. Every name goes on one line, and the team name loses its links (ADR-0009 decision 5).
  15. Matching folds accents ("Montréal" matches "Montreal"). Placeholders "T.B.D."/"t.b.a." never match. A label with nothing left after normalizing never matches. A change still compares exact values, so "BEARS" for "Bears" counts as a change.
  16. An undefined AM/PM convention no longer suppresses ampm_ambiguous.
  17. The domain model also states:
    • the horizon edge
    • the tie-breaks (team id, event id)
    • two unknown venues count as the same venue for duplicate
    • the Tomorrow formats
    • units are counted with the real link, never {link}
    • the distant_back_to_back window is [75, 165) minutes
    • texts show each event's time in the event's zone
  18. The correction contract's description says core refuses, never cuts, a text that can't fit with the link and footer (400). Only the description changed, regenerated into packages/contract.

A scratch differential fuzz of core against the updated reference agrees across thousands of random inputs for every function. The one difference is a starts_at "change" from null to null, which can't exist.

Product questions for the owner

Implemented as described above; each is easy to change if the answer is different.

  1. Un-cancelling a game (cancelled to set) is a quiet change under §6 as written, so parents aren't texted that a cancelled game is back on. Is that intended?
  2. Corrections are refused, never cut. The real limit depends on the team name and on whether a follower gets the STOP footer. A 29-character team name plus 200 plain characters fits without the footer and is refused with it. Options:
    • the route validates with the footer on (the worst case);
    • lower the 200 cap;
    • cut with an ellipsis instead.
  3. Sheet before venue: when venue plus sheet exceed 40 units, the sheet is dropped before the venue name is cut (compose_bounded_inputs pins this). So an important sheet change can go out without the sheet. Keeping the sheet would need vectors v4.
  4. Tomorrow:
    • Cancelled events are left out rather than shown as "Game 3 cancelled".
    • It fires on "each day with a set event", but the ADR-0009 opt-in copy and the PRD say "each game day". On a meal-only arrival day, that would send a text the disclosure doesn't name.
  5. Link stripping covers only http(s):// and www. links, and only in team names and corrections. Bare domains and shorteners pass, and event labels, hotel names and unlisted venue names (also organizer text) are not stripped.
  6. Cut names before punctuation read "Comple...." (four dots), as the vectors pin.
  7. Hotel removed: quiet for now; should it text? Clearing hotel_name, hotel_address or hotel_book_by is a quiet change under an interim rule, so no text goes out and core never has to compose an empty message.
  8. Matching and import rules this slice wrote into §7. Please confirm them; vectors v4 would pin them:
    • only events of the same kind match, rule by rule;
    • TBD and TBA opponents never match;
    • an import moves a status from tentative to set only when the event then has a time.
  9. VECTORS_VERSION stays 3 until vectors v4, because bumping it rewrites every JSON file, which this slice's acceptance forbids.

Vectors v4 (follow-up)

The README asks for a VECTORS_VERSION bump when behavior changes. Bumping would rewrite every JSON file, which this slice's acceptance forbids. A follow-up vectors v4 should pin the new rules: footers on every kind, "Only if" on TBD games, Tomorrow without cancelled events, kind-aware matching, placeholder opponents, status needing a time, flag de-duplication, correction refusal, and Unicode spaces. Until then, the differential test keeps core and the reference together.

Notes for later slices

  • Slice 04:
    • Compose with the real trip link, never the {link} placeholder. { and } are GSM-7 extension characters (2 units each), so units and segments would be wrong.
    • composeChangeMessage returns null ("nothing to send") when a batch's current rows yield no event line and no hotel line. For example, a hotel change held for quiet hours and cleared before the claim, or a hotel address set with no hotel name. The batch job then closes those outbox rows without a text (domain model §6).
    • Core still throws a RangeError for a message that can't fit two segments, and for a correction it refuses; treat those as errors (400 for a correction).
    • The 19:00 Tomorrow and +150-minute after-game send times are not in core yet.
  • Slice 05: unmatched_venue fires for a row that names no venue at all (a "rink TBD" bracket slot), as §7 reads literally. hourInSource must be the hour as the snippet writes it, not the model's 24-hour time.
  • A tip's month is its UTC month, because core gets no rink zone.

Test evidence

pnpm test            Test Files 24 passed, Tests 364 passed; core coverage 100% (statements, branches, functions, lines)
pnpm typecheck       ok
pnpm lint            ok (eslint + dependency-cruiser: no violations)
pnpm contract:check  ok
node docs/vectors/generate.mjs   all 114 hand checks passed; docs/vectors/*.json unchanged

There is no UI in this slice, so there are no screenshots or preview e2e.

Risks

  • pnpm test now always collects coverage with the 100% gate on packages/core. A filtered run such as pnpm test some.test.ts fails the gate, so run single files with pnpm exec vitest run <file> (documented in vitest.config.ts).
  • Outside nix develop, with pnpm not on PATH (corepack pnpm … without corepack enable), the root lint and typecheck scripts and the contract-check tests fail, because they call pnpm themselves. This predates this slice. Inside nix develop everything passes.

fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
)

* fix(spawn): refuse missing harness binaries before launch

Resolve and probe verified launch executables before creating task endpoints, preventing absent CLIs from leaving dead worker shells.

Co-authored-by: Cursor <[email protected]>

* no-mistakes(review): add stdin-closed timeout-bounded version probe with override knob

* no-mistakes(review): escalate timed-out version probe to SIGKILL after grace

* no-mistakes(review): kill probe process group so timed-out wrapper descendants die

---------

Co-authored-by: Cursor <[email protected]>
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
…colliding with fork-side code or test fixtures. I made one small fix per check, all in the working tree on top of the merge commit fd2aaaf, which stays as it is. The changes are not committed yet; the outer pipeline commits them as new commits. Fixes, one per finding: - **Serial 1 (explicit-target send).** Rule: an explicit `sess:<window>` target must be a live window. Upstream fm-send now checks that, but the fake tmux in `tests/fm-send-steer-count.test.sh` listed no windows. Its `list-windows` now prints `fm-build` and `win`. `tests/fm-send-inbox.test.sh` already listed its target. - **Serial 11 (push-skip).** Rule: every CI job skips on push when `FM_CI_SKIP_PUSH=1`. The fork's `fork-surface` and `leak-guard` jobs in `.github/workflows/ci.yml` now have the same `if:` as upstream's jobs. `tests/fm-ci-workflow.test.sh` passes. - **Leak guard.** Rule: vendor bot noreply addresses are allowlisted, people's addresses are not. `[email protected]` now sits next to the other bot addresses in `bin/fm-leak-lib.sh`. The new `test_vendor_bot_emails_pass` in `tests/fm-leak-guard.test.sh` checks that all four bot addresses pass and that a person's address still fails and is named. `bin/fm-leak-guard.sh` passes on the whole repo. - **Serial 8 and 12 (cursor).** Rule: any fake cursor-agent a test expects to be accepted must answer upstream's `--help` probe with Cursor's identity. Fixed the stubs in `tests/fm-home-port.test.sh` and `tests/fm-control-relaunch.test.sh`. Both suites pass with an empty HOME, so the real cursor-agent on this Mac cannot hide a failure. - **Serial 2 (unconfigured --secondmate spawn).** The fork's own spawn check (kunchenguid#7) refuses a missing harness binary, and it runs before upstream's home check. Upstream's test in `tests/fm-backend-paseo.test.sh` pins `claude` as the harness but had no `claude` on its fake PATH, and the CI runner has none either. The test now provides a fake `claude` in its fakebin, so the spawn gets past the fork's check and reaches the home check. I reproduced the CI failure first: the old test fails with `claude` off PATH. The fixed test passes under that same restricted PATH. **Call-companion race left alone.** The previous timed-out round had also edited `bin/fm-call-companion.sh` and its test for the "a call whose notes failed was archived" stamp race. It was not the only red left (cursor also failed in serial 12), so per your instruction I reverted both files. If it is still the only red after this push, the fix goes in the stamp-minting helper as you described. **Verification:** - **Pass:** `fm-ci-workflow`, `fm-leak-guard`, `fm-send-steer-count`, `fm-home-port`, `fm-control-relaunch` (empty HOME), `fm-fork-surface`, `bin/fm-fork-surface.sh check`, `bin/fm-lint.sh` (ShellCheck, actionlint, leak guard), and the paseo secondmate case run on its own. - **Still failing on macOS:** the full `fm-backend-paseo` suite fails one earlier, unrelated case: "kill should archive the emptied firstmate workspace". It runs before the function I edited. That suite's other failure on CI was the secondmate case fixed above
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
…ING required checks (kunchenguid#7)

* docs: add one contribution page for teams, add-ons and homes; correct CONTRIBUTING branch protection and questions

* no-mistakes(review): Match the contribution page's leak-check wording to the configuration docs
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 18, 2026
… and "Full suite" only fails because those lanes did. I reproduced each failure locally and fixed it with a test-only change. No production code changed. 1. Serial 16, tests/fm-lane-capacity-integration.test.sh (new from upstream). Invariant: a spawn fixture must give the harness it configures a launch binary, because this fork's fm-spawn.sh refuses a missing harness binary before launch (kunchenguid#7). The test sets crew-harness=codex but had no fake codex. Fixed by adding codex to the fake bin directory, and to the copied subset the live-load case uses (the second place the same rule applies). Reproduced first, then passes locally. 2. Serial 13, tests/fm-spawn-account.test.sh (fork-only). Invariant: a launch line normalized for comparison must not contain a case-specific path. Upstream now adds `export FM_HOME='<case home>'` to every ship/scout launch line, and the fork's helper that compares launch lines across two different case homes did not replace the bare home path. Fixed by replacing the bare home with `<HOME>` after the more specific state and config replacements. Reproduced first, then passes locally. 3. Serial 11, tests/fm-calm-pi-extension.test.sh. Not caused by this PR: CI installs Pi without pinning, and Pi 1.5.1/1.5.2 came out after main's last green run, which used Pi 1.5.0. Pi 1.5.x reads a new `pendingBashComponents` field in `updatePendingMessagesDisplay`. Real Pi sets that field when it builds the object, so the extension itself works; only the test's `Object.create(InteractiveMode.prototype)` host lacked it, and that is the only fixture built this way that calls this method. Fixed by adding `pendingBashComponents: []` to that host. Reproduced with Pi 1.5.2 on Node 22.23.4, the same as CI. The whole file now passes on both Pi 1.5.2 and 1.5.0 (16 ok, run under a UTF-8 locale; without one, an unrelated resize check fails on this Mac because the shell counts bytes, not characters). 4. Serial 10, tests/fm-extension-binding.test.sh (identical to upstream). Invariant: every lane in the aggregate run must finish within the coordinator's 34-second limit. The `lifecycle-flow` lane ran its own block and then the self-contained ownerless-readiness block one after the other, about 34 s in total. CI timings for this test were 24.6 s, 27 s and 33.5 s on earlier green runs, and 37.3 s here, when the lane was killed. Locally, the base commit and this branch take about the same (35 s vs 34 s), so the catch-up did not slow it down; the lane was simply at its limit. Fixed by running the existing `lifecycle-orphan-readiness` segment as its own concurrent lane in the aggregate and taking it out of `lifecycle-flow`. Coverage is unchanged, and docs/verification/process-event-sources.md already names that segment. The `lifecycle-flow` lane now takes about 14 s, orphan-readiness about 21 s, and the full test about 25 s, all passing. shellcheck is clean on all four changed test files
ghazni101 pushed a commit to ghazni101/firstmate-dsh that referenced this pull request Nov 18, 2026
…uling and module splits' (kunchenguid#7) from fm/lint-memory-bound into main
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.

3 participants