Repository navigation
feat: add per-project delivery modes - #14
Merged
Merged
Conversation
vipentti
pushed a commit
to vipentti/firstmate
that referenced
this pull request
Aug 5, 2026
* feat: per-project delivery modes (no-mistakes|direct-PR|local-only) + yolo flag * no-mistakes(review): Fix local-only safety defaults * no-mistakes(test): Guard optional harness config reads * no-mistakes(document): Document project delivery modes * no-mistakes: apply CI fixes
This was referenced Aug 7, 2026
Closed
Closed
This was referenced Aug 10, 2026
NewAiCoder
referenced
this pull request
in NewAiCoder/firstmate
Sep 26, 2026
…nt-when (#14) * feat(procevent): repeat mode for condition->action watches, and give the pipeline watch its home The pipeline-state watch fm-spawn arms for every no-mistakes ship was a single-fire watch whose action had no FM_HOME. Both halves cost model turns: fm-send refused the first ring, and the watch then died on the first pipeline state change, so every later change reached firstmate as a procevent wake that away mode escalated and a human turn had to classify, acknowledge, retire and re-arm by hand. Overnight that was 210 escalations against 20 real ones. - fm-procevent-when.sh gains --repeat: a successful fire releases the single-fire claim, journals the fire, and emits a non-terminal `repeat: continues` outcome, so the runner keeps the registration and restarts the poll instead of retiring it. The deadline is then measured from the last fire, so it means the condition stopped changing. - A new `silent` command makes that same fire a routine no-op the runner records as handled without a wake, using the existing adapter seam. Every other outcome, in both modes, stays terminal and still wakes with evidence. - fm-procevent-when.sh gains --action-env NAME=VALUE, recorded in the hash-bound spec, so an action can carry the environment it needs while staying argv[0] and keeping its bytes trust-bound. - fm-spawn.sh arms the nm-state watch with --repeat and FM_HOME. * no-mistakes(review): Fix stray `set -u` line leaking into usage() help output * no-mistakes(review): Document repeat mode and FM_HOME requirement for pipeline-state watch * no-mistakes(review): Deny interpreter/loader-hijacking env var names in --action-env * no-mistakes(document): docs: note action-env hijack denylist in --help and verification evidence --------- Co-authored-by: NewAiCoder <[email protected]>
NewAiCoder
referenced
this pull request
in NewAiCoder/firstmate
Sep 26, 2026
…nt-when (#14) * feat(procevent): repeat mode for condition->action watches, and give the pipeline watch its home The pipeline-state watch fm-spawn arms for every no-mistakes ship was a single-fire watch whose action had no FM_HOME. Both halves cost model turns: fm-send refused the first ring, and the watch then died on the first pipeline state change, so every later change reached firstmate as a procevent wake that away mode escalated and a human turn had to classify, acknowledge, retire and re-arm by hand. Overnight that was 210 escalations against 20 real ones. - fm-procevent-when.sh gains --repeat: a successful fire releases the single-fire claim, journals the fire, and emits a non-terminal `repeat: continues` outcome, so the runner keeps the registration and restarts the poll instead of retiring it. The deadline is then measured from the last fire, so it means the condition stopped changing. - A new `silent` command makes that same fire a routine no-op the runner records as handled without a wake, using the existing adapter seam. Every other outcome, in both modes, stays terminal and still wakes with evidence. - fm-procevent-when.sh gains --action-env NAME=VALUE, recorded in the hash-bound spec, so an action can carry the environment it needs while staying argv[0] and keeping its bytes trust-bound. - fm-spawn.sh arms the nm-state watch with --repeat and FM_HOME. * no-mistakes(review): Fix stray `set -u` line leaking into usage() help output * no-mistakes(review): Document repeat mode and FM_HOME requirement for pipeline-state watch * no-mistakes(review): Deny interpreter/loader-hijacking env var names in --action-env * no-mistakes(document): docs: note action-env hijack denylist in --help and verification evidence --------- Co-authored-by: NewAiCoder <[email protected]>
NewAiCoder
referenced
this pull request
in NewAiCoder/firstmate
Sep 26, 2026
…nt-when (#14) * feat(procevent): repeat mode for condition->action watches, and give the pipeline watch its home The pipeline-state watch fm-spawn arms for every no-mistakes ship was a single-fire watch whose action had no FM_HOME. Both halves cost model turns: fm-send refused the first ring, and the watch then died on the first pipeline state change, so every later change reached firstmate as a procevent wake that away mode escalated and a human turn had to classify, acknowledge, retire and re-arm by hand. Overnight that was 210 escalations against 20 real ones. - fm-procevent-when.sh gains --repeat: a successful fire releases the single-fire claim, journals the fire, and emits a non-terminal `repeat: continues` outcome, so the runner keeps the registration and restarts the poll instead of retiring it. The deadline is then measured from the last fire, so it means the condition stopped changing. - A new `silent` command makes that same fire a routine no-op the runner records as handled without a wake, using the existing adapter seam. Every other outcome, in both modes, stays terminal and still wakes with evidence. - fm-procevent-when.sh gains --action-env NAME=VALUE, recorded in the hash-bound spec, so an action can carry the environment it needs while staying argv[0] and keeping its bytes trust-bound. - fm-spawn.sh arms the nm-state watch with --repeat and FM_HOME. * no-mistakes(review): Fix stray `set -u` line leaking into usage() help output * no-mistakes(review): Document repeat mode and FM_HOME requirement for pipeline-state watch * no-mistakes(review): Deny interpreter/loader-hijacking env var names in --action-env * no-mistakes(document): docs: note action-env hijack denylist in --help and verification evidence --------- Co-authored-by: NewAiCoder <[email protected]>
Closed
What this doesWS-1/T4 walking skeleton: proves the full layer cake end to end with zero real AI. A fake scripted agent replays spawn-to-ready through a stub event dispatcher, frames cross a loopback WebSocket as JSON, and a placeholder frontend renders them plus a snapshot file. One boot command runs the whole thing. Nothing here is production code — it is the harness every later workstream plugs into. Review path (in this order)
How to verify
Decisions to opine on
|
NewAiCoder
referenced
this pull request
in NewAiCoder/firstmate
Oct 1, 2026
…nt-when (#14) * feat(procevent): repeat mode for condition->action watches, and give the pipeline watch its home The pipeline-state watch fm-spawn arms for every no-mistakes ship was a single-fire watch whose action had no FM_HOME. Both halves cost model turns: fm-send refused the first ring, and the watch then died on the first pipeline state change, so every later change reached firstmate as a procevent wake that away mode escalated and a human turn had to classify, acknowledge, retire and re-arm by hand. Overnight that was 210 escalations against 20 real ones. - fm-procevent-when.sh gains --repeat: a successful fire releases the single-fire claim, journals the fire, and emits a non-terminal `repeat: continues` outcome, so the runner keeps the registration and restarts the poll instead of retiring it. The deadline is then measured from the last fire, so it means the condition stopped changing. - A new `silent` command makes that same fire a routine no-op the runner records as handled without a wake, using the existing adapter seam. Every other outcome, in both modes, stays terminal and still wakes with evidence. - fm-procevent-when.sh gains --action-env NAME=VALUE, recorded in the hash-bound spec, so an action can carry the environment it needs while staying argv[0] and keeping its bytes trust-bound. - fm-spawn.sh arms the nm-state watch with --repeat and FM_HOME. * no-mistakes(review): Fix stray `set -u` line leaking into usage() help output * no-mistakes(review): Document repeat mode and FM_HOME requirement for pipeline-state watch * no-mistakes(review): Deny interpreter/loader-hijacking env var names in --action-env * no-mistakes(document): docs: note action-env hijack denylist in --help and verification evidence --------- Co-authored-by: NewAiCoder <[email protected]>
Closed
This was referenced Oct 7, 2026
jroethel
referenced
this pull request
in jroethel/firstmate
Oct 9, 2026
…14) * fix(tests): stop each supervision-host case's processes when it ends Every loop case in tests/fm-supervision-host.test.sh left whatever it had running - a host parked on its successor watcher, a detached successor left for main, a fake main session polling every 0.1s - until the suite's EXIT trap. Each leftover watcher keeps polling at FM_POLL=1, so by the last third of the file a dozen cycles compete with the case under test. Pinned to two cores locally, one watcher poll pass then took 9-13s, and whichever wait first outran its 15-25s budget failed. That is why "Behavior portable serial 2" failed on every recent run at a different case, always case 43-59 of 73. run_case now runs each case and then stops and forgets the homes it registered, so every case starts beside no earlier case's processes. The suite's EXIT trap still stops a failing case's homes, and forgetting stopped homes keeps a recycled pid from being signalled at the suite's end. * no-mistakes(ci): Fixed one of the three checks and could not diagnose the other two, because GitHub has no logs for them. **Behavior tests (Herdr) - fixed.** - The failing case was `tests/fm-backend-herdr-focus-flash-e2e.test.sh`, Part C: "observed no wrong-focus sample at all, so the sampler proved nothing". - The invariant is that the fallback close must end with focus restored exactly on the anchor. That is still asserted deterministically, by comparing `C_AFTER` to `C_BEFORE` after the close. - The removed assertion required a background poll to catch at least one transient wrong-focus window. That window is brief, so the poll sometimes sees none and the check flakes. Part A already proves deterministically that the focus steal exists on that Herdr release. - I removed that assertion and left a comment saying why. The same assertion appears nowhere else in that file. - I checked the script with `bash -n` only. It needs a real Herdr lab, which I did not have here, so the flake fix is not exercised. **Behavior portable parallel 2 and Behavior timing aggregate - no code change.** - Both jobs have an empty step list and a missing log blob (the job-log API returns 404 BlobNotFound), which looks like a runner-level failure rather than a test failure. - Parallel 2 ran about 6 minutes with no steps recorded. The aggregate job ended in 3 seconds with no steps. - I downloaded the timing artifacts from this run and ran `bin/fm-test-run.sh --aggregate-json` locally on all 10 lanes that uploaded one (parallel 2 never uploaded one), and again with the Herdr lane added (11 lanes, 1 failed). Both runs exited 0. So the aggregate script itself is not broken. - The aggregate job's `needs` includes the failing lanes, so a failed lane may also be what failed it. I could not confirm that without its log. I suggest re-running the two failed jobs after this push. If they fail again, their logs will then be available. Unrelated to the failures: the aggregate job's glob (`fm-test-aggregate/fm-test-timing-*.json`) does not match the Herdr artifact. Herdr uploads from several paths, so its JSON lands in a nested `fm-test/` subdirectory and is skipped. I did not change this * Revert "no-mistakes(ci): Fixed one of the three checks and could not diagnose the other two, because GitHub has no logs for them. **Behavior tests (Herdr) - fixed.** - The failing case was `tests/fm-backend-herdr-focus-flash-e2e.test.sh`, Part C: "observed no wrong-focus sample at all, so the sampler proved nothing". - The invariant is that the fallback close must end with focus restored exactly on the anchor. That is still asserted deterministically, by comparing `C_AFTER` to `C_BEFORE` after the close. - The removed assertion required a background poll to catch at least one transient wrong-focus window. That window is brief, so the poll sometimes sees none and the check flakes. Part A already proves deterministically that the focus steal exists on that Herdr release. - I removed that assertion and left a comment saying why. The same assertion appears nowhere else in that file. - I checked the script with `bash -n` only. It needs a real Herdr lab, which I did not have here, so the flake fix is not exercised. **Behavior portable parallel 2 and Behavior timing aggregate - no code change.** - Both jobs have an empty step list and a missing log blob (the job-log API returns 404 BlobNotFound), which looks like a runner-level failure rather than a test failure. - Parallel 2 ran about 6 minutes with no steps recorded. The aggregate job ended in 3 seconds with no steps. - I downloaded the timing artifacts from this run and ran `bin/fm-test-run.sh --aggregate-json` locally on all 10 lanes that uploaded one (parallel 2 never uploaded one), and again with the Herdr lane added (11 lanes, 1 failed). Both runs exited 0. So the aggregate script itself is not broken. - The aggregate job's `needs` includes the failing lanes, so a failed lane may also be what failed it. I could not confirm that without its log. I suggest re-running the two failed jobs after this push. If they fail again, their logs will then be available. Unrelated to the failures: the aggregate job's glob (`fm-test-aggregate/fm-test-timing-*.json`) does not match the Herdr artifact. Herdr uploads from several paths, so its JSON lands in a nested `fm-test/` subdirectory and is skipped. I did not change this" This reverts commit f6fd229c64aff91cfdf9f36643d6bce6652ae227. --------- Co-authored-by: Jeremy Roethel <[email protected]>
|
Correction to the Changes list: the bare |
fritznoff
pushed a commit
to fritznoff/starship
that referenced
this pull request
Nov 2, 2026
…unchenguid#14) * fix(bin): never move a release-channel home back to an older release An update on the release channel now only moves a home forward. A home or second mate already past the target release stays put and says so, and only --step-back goes back, now also from a commit past every release to the newest release behind it. Release names more than a month ahead are ignored, and release tags deleted on origin are pruned on fetch. * no-mistakes(review): Sync remote home to release when code root is past it * no-mistakes(document): Document never-back release updates for remote homes
ghazni101
pushed a commit
to ghazni101/firstmate-dsh
that referenced
this pull request
Nov 19, 2026
…cts in the DSH-native surface' (kunchenguid#14) from fm/review-custom-changes into main
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.
Intent
Add a per-project delivery mode plus an orthogonal yolo autonomy flag to firstmate, per the captain-approved plan at data/project-modes-p2/plan.md. Each project in data/projects.md gets a mode - no-mistakes (default), direct-PR, or local-only - chosen at project-add and recorded as '- [] - ' with optional '+yolo'. A new reader bin/fm-project-mode.sh parses it (legacy un-annotated lines and unknown modes/projects default safely to 'no-mistakes off' with a stderr warning). fm-spawn resolves and records mode= and yolo= into state/.meta alongside harness=/kind=. fm-brief shapes the ship definition-of-done by mode: no-mistakes -> /no-mistakes pipeline; direct-PR -> crewmate pushes + opens PR via gh-axi, no pipeline; local-only -> crewmate stops at 'ready in branch', firstmate reviews and merges to local main. fm-teardown gains a local-only carve-out: since local-only has no remote, the safety check requires the branch merged into the local default branch instead of 'on a remote'. New bin/fm-merge-local.sh performs the approved local-only merge as a clean fast-forward only (firstmate's merge gate-action; a deliberate, documented, narrowly-scoped exception to hard rule #1, only after captain/yolo approval). AGENTS.md sections 1, 2, 6, 7, 11 document the modes, the meta/registry format, conditional init (direct-PR/local-only skip no-mistakes init; local-only needs no remote), the per-mode lifecycle, and the yolo approval matrix (yolo on = firstmate approves routine decisions itself but still escalates destructive/irreversible/security-sensitive ones, never merges a red PR, and posts a post-hoc FYI). Deliberate decisions the captain made: yolo is orthogonal to mode (not a 4th mode) and offered-but-not-recommended; for local-only, firstmate (not the crewmate) performs the merge, hence the rule-#1 carve-out. Shell-only change; no test suite in this repo.
What Changed
+yoloautonomy, and recordsmode=/yolo=in task metadata during spawn.no-mistakes,direct-PR, andlocal-onlydelivery paths, including local-only teardown safety.Risk Assessment
✅ Low: The remaining changes are bounded to documented delivery-mode handling and fail closed in the local-only merge/teardown paths, with no material merge-blocking issues found.
Testing
Bootstrap was silent, no automated test suite was present, and manual CLI-level validation showed registry parsing, brief shaping, spawn metadata, local-only merge safety, and local-only teardown behavior working as intended; all transient worktree fixtures were removed and the worktree ended clean.
Evidence: Clean project-mode CLI transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed ✅
bin/fm-project-mode.sh:60- Unknown modes do not fully fall back to the documented safe default: a registry entry like[typo +yolo]becomesno-mistakes on, enabling autonomous approvals even though the comment and requirements say unknown modes/projects default tono-mistakes off. Resetyolo=offin this fallback path.bin/fm-merge-local.sh:27-DEFAULTis derived from the project checkout's current branch, sofm-merge-local.shwill fast-forward whatever branch happens to be checked out instead of verifying and merging into the real default branch/main. Ifprojects/<repo>is on a feature branch, this silently lands the local-only task in the wrong place.bin/fm-teardown.sh:43- The local-only teardown safety check also treats the project checkout's current branch as the default branch, so it can allow teardown after commits are merged into an arbitrary checked-out branch rather than local main/default. Resolve the actual default branch and fail closed if that ref cannot be determined.🔧 Fix: Fix local-only safety defaults
✅ Re-checked - no issues remain.
🔧 **Test** - 1 issue found → auto-fixed ✅
bin/fm-bootstrap.sh:41- Running the documented bootstrap command in a fresh worktree whereconfig/crew-harnessis absent prints/config/crew-harness: No such file or directoryinstead of staying silent.AGENTS.mddocuments the file as optional, so first-time users hit an erroneous bootstrap warning before any project-mode work can be dispatched.bin/fm-bootstrap.shin the checked-out worktree with noconfig/crew-harnessfile presentWith temporarydata/projects.mdfixtures:bin/fm-project-mode.sh nmproj,bin/fm-project-mode.sh directproj,bin/fm-project-mode.sh localproj,bin/fm-project-mode.sh missingproj, andbin/fm-project-mode.sh badprojWith temporary registry fixtures:bin/fm-brief.sh brief-nm nmproj,bin/fm-brief.sh brief-direct directproj, andbin/fm-brief.sh brief-local localproj, then verified the generated user-facing brief text for each delivery modeWith a temporary git project and harmless raw launcher:bin/fm-spawn.sh spawntask projects/spawnproj "printf crewmate-spawned", then verifiedstate/spawntask.metarecordedmode=direct-PRandyolo=onWith a temporary local git project and sibling worktree:bin/fm-teardown.sh localtaskbefore merge,bin/fm-merge-local.sh localtask, thenbin/fm-teardown.sh localtaskafter merge using a faketreehouseshimgit status --shortafter cleanup to confirm transient worktree fixtures were removed🔧 Fix: Guard optional harness config reads
✅ Re-checked - no issues remain.
bin/fm-bootstrap.shCreated a temporarydata/projects.mdregistry and ranbin/fm-project-mode.sh legacyapp gateapp directapp localapp typoapp missingappto verify defaults, direct-PR +yolo, local-only, unknown-mode fallback, and missing-project fallback.Ranbin/fm-brief.sh <id> <repo>forno-mistakes,direct-PR, andlocal-onlyregistry entries and inspected the generated Definition of done sections.Ranbin/fm-spawn.sh spawn-task projects/directapp 'sh -c sleep' --scoutwith worktree-local faketmuxto verifymode=direct-PRandyolo=onare recorded in task meta.Created a temporary local git repo and worktree, ranbin/fm-teardown.sh local-taskbefore merge to verify local-only teardown refusal, then ranbin/fm-merge-local.sh local-taskand reranbin/fm-teardown.sh local-taskwith worktree-local faketreehouseto verify fast-forward merge then successful teardown.Searched for existing test runner/test files withGlob **/*test*,Glob Makefile, andGlob package.json; none were present.git status --short✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.