Repository navigation
Conversation
There was a problem hiding this comment.
Sorry @twilwa, your pull request is larger than the review limit of 150,000 diff characters
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad226249fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| url:([$reviewer_comments[] | .url] | first // $url), | ||
| author:([$reviewer_comments[] | .author.login] | unique | join(",")), |
There was a problem hiding this comment.
Preserve inline reply URLs for final dispositions
When the final-disposition post is a reply in an existing inline thread—a form explicitly accepted by final-disposition via a #discussion_r... URL—this normalization retains only the thread's first reviewer-comment URL and joins every participant into one author string. Consequently, checkpoint_apply cannot find the exact evidence URL authored by the collector, observed_in_latest_snapshot remains false, and the ready/merge gate stays blocked despite a valid post. Preserve individual inline comments or separately expose the matching disposition reply.
Useful? React with 👍 / 👎.
… avoid jq argv overflow (#10) * fix: bound startup reconciliation and large fleet input * no-mistakes(review): Drop redundant contribution-input EXIT trap in fleet snapshot * no-mistakes(test): Widen cleanup deadline test budget to avoid load flakes * no-mistakes(document): Document startup summary deferral and herdr cleanup deadline * no-mistakes(ci): Lint 1 failed because ShellCheck SC2329 ("function never invoked") fired at tests/fm-herdr-session-cleanup.test.sh:356. That line is a subshell copy of fixture_workspaces that replaces the file's main version. The fake herdr command calls fixture_workspaces indirectly when it answers `workspace list` and `api snapshot`, and ShellCheck can't see that call. The fix is one comment line above the replacement: `# shellcheck disable=SC2329 # invoked indirectly by the fake herdr workspace list.` The same file already does this for its other indirectly-called replacements (lines 43 and 49), as do tests/fm-daemon.test.sh and tests/fm-bootstrap.test.sh. No behavior changed. Checked locally: `bin/fm-lint.sh tests/fm-herdr-session-cleanup.test.sh` passes with pinned ShellCheck 0.11.0 and full extended analysis, and `bash tests/fm-herdr-session-cleanup.test.sh` passes every test, including the journal-read-count, deadline, lock and identity tests. The change is not committed
) * Fix dispatch resolver model and receipts * no-mistakes(review): Drop model-drift branch, harden receipt lock and brief join * no-mistakes(review): Scope receipt recording to clear, report failed joins, measure latency * no-mistakes(review): Narrow dispatch clause and concurrency test, shrink lock budget * no-mistakes(review): Accept --project on the join, assert drop-or-append concurrency * no-mistakes(review): Split lock budgets by path, drop receipt size bound * no-mistakes(review): Record brief_path as spelled, drop abs_path normalization * no-mistakes(review): Pin model in contract, bound receipt latency, record reason * no-mistakes(review): Report dropped resolution receipts, project profile agreement, drop dispatch_id * no-mistakes(review): Enforce append-only cmp, complete join example, govern latency bound * no-mistakes(review): Keep no-rules exit 0 without jq, dedupe error default * no-mistakes(review): Refuse symlinked receipts path, drop dead no_rules jq argument * no-mistakes(document): Document receipt identity, symlink refusal, jq exit narrowing
* fix(bin): refuse an unrecognised fm-send flag instead of sending it as text fm-send's option loop ended in an unconditional `*) break ;;`, so any token it did not recognise - including one obviously shaped as a flag - fell out of the loop and became the positional message body. A steer invoked with a flag that does not exist was durably written into a live worker's steering inbox as the literal flag string while fm-send exited 0, so the worker was mis-steered and the caller got a success code and no diagnostic. The accepted set is now an allowlist rather than a pattern. --key is a real, supported flag parsed after this loop and must keep falling through it untouched, so a blanket "starts with -- and matched no case arm, therefore refuse" rule would have broken it. A bare -- ends flag parsing, which is how a message whose text starts with -- is sent. That separator is threaded to the two --key dispatch points so text after it is text everywhere rather than being re-parsed as a flag. A single-dash word was never a flag here and still needs no separator. The refusal exits before anything is marked, recorded, rung, or typed, the same discipline the header already applies to an empty message. * no-mistakes(review): drop -- end-of-flags separator, keep pure flag allowlist * no-mistakes(document): document fm-send's flag allowlist and leading-`--` message limit * docs(bin): drop the flag-allowlist commentary from fm-send's source The header block in bin/fm-send.sh is that script's documented contract. Recording the no-end-of-flags-separator limitation there amends that contract and turns a deliberate, narrow behaviour change into a documented guarantee the project would then owe. The rationale comment above the option loop goes for the same reason: the limitation describes a decision, which belongs in the pull request, not in the source, where it reads as a promise. Removes only those thirteen comment lines. The refusal itself is unchanged: the option loop remains a pure allowlist, --key still falls through to its own plane untouched, there is no end-of-flags handling, the usage line is unmodified, and the tests are untouched. * fix(bin): refuse trailing arguments after fm-send's --key The option loop breaks at --key without consuming what follows it, and the key path reads only the key itself, so every remaining argument was discarded in silence while the key was still delivered and the command still exited 0. `fm-send.sh lane --key Enter --not-a-real-flag` sent Enter and reported success. That is the same silent-delivery shape the unknown-flag refusal in this change exists to remove, so the key path contradicted the contract on that one path. The same ordering bypassed the --fire-and-forget incompatibility: FIRE_AND_FORGET_ID is only set when the flag precedes --key, so `--key Enter --fire-and-forget x` passed both existing guards. The key path now refuses any trailing argument before delivering the key, naming the offending token in the wording already used for an unknown flag in flag position, and names --fire-and-forget specifically so that incompatibility holds on either ordering. Adds regression coverage for both orderings and for a trailing plain word; both new tests fail before this commit and pass after it.
* Add head-keyed PR review policy ledger * Add post-merge browser QA gate * Fix PR review and post-merge gates * Close remaining PR review gate gaps * Harden migration risk and QA evidence parsing * Close PR review guard bypasses * Tighten review evidence boundaries * Bind final review authorization * Invalidate stale review dispositions * Harden review evidence validation
* Add keyed decision defer mode * no-mistakes(review): Fix defer date identity, hold age, parent channel, reporting * no-mistakes(review): Derive board defer from the option's until alone * no-mistakes(review): Show the defer date on the board card * Fix deferred decision lifecycle edges * no-mistakes(review): Drop fabricated defer hold reason fallback * no-mistakes(document): Correct stale captain-defer docs for the recorded answer path * Fix defer intake failure edges * Require future dates for decision defers * no-mistakes(review): Narrow UTC day parsing; fix elapsed-defer recovery guidance * no-mistakes(review): Refuse duplicate board option values; fix defer recovery wording * Stabilize chat defer hold assertion * Keep chat defer date stable across midnight * Refactor defer validation for bounded lint
* fix(brief): forbid validation auto-accept * no-mistakes(review): restore fleet-wide --yes ban, add ask-user routing sentence * no-mistakes(ci): Fixed a flaky test that failed the "Behavior portable serial 4" shard. Failure: tests/fm-pi-branch-extension.test.sh -> test_captain_outcome_processing_turn_is_sequence_keyed_and_re_presented, with "Error: supervision branch prompt settled but produced no durable outcome for its claimed wake rows" (thrown at .pi/extensions/fm-branch-supervision.ts:1548). Nothing in this PR's diff (the --yes DoD line, the harness-adapters sentence, three brief assertions) touches that extension or test; the other two check runs on the same head commit (99a0187) passed. It is a pre-existing race that surfaces on a slow/loaded runner. Root cause: in fm-branch-supervision.ts a wake builds the branch session (ensureBranch), then runs several awaited subprocesses (flushMirror, actingAsOwner, scopeForUnreadWake, writeEligibleRowsSnapshot, away-posture read-back) and only then snapshots reportRevisionBeforePrompt immediately before session.prompt(...); after the prompt settles it requires that revision to have advanced. The test synchronized on the wrong point: `settle(() => __fmSessions.length === 2, "replacement branch session")`. Session creation precedes that snapshot, so when the extension's pre-prompt work is slower than the test's report append, report2's durable append lands before the snapshot and the wake rejects its own settled prompt as outcome-less. The routine wake earlier in the same test already waits on __fmPrompts.length === 1 and is unaffected. Fix (tests/fm-pi-branch-extension.test.sh:1377, 9 insertions / 1 deletion): wait for the wake prompt as well as the replacement session, matching the routine wake's own idiom, with a comment naming why the built session is not the synchronization point. No production code changed; no new machinery. Verification: reproduced the exact CI error deterministically by temporarily injecting a delay ahead of reportRevisionBeforePrompt (delays 100/200/300/400/500/700 ms all failed with the identical message); that injection was reverted (git status shows only the test file modified). With the fix the test passes under injected delays of 100, 400 and 1500 ms. Full file run: exit 0, 45 tests passing. 24 parallel runs of the target test: 24/24 pass. shellcheck -x on the changed file is clean, and this PR's own tests (tests/fm-brief.test.sh, tests/fm-ask-user-authority.test.sh) still pass. The change is left uncommitted in the worktree, since prior rounds' commits on this branch were made by the executor rather than this phase
* docs: audit AGENTS.md size and ownership * docs: slim always-loaded Firstmate contract * no-mistakes(review): drop audit doc, dedupe skill triggers, fix stale pointers * no-mistakes(review): fix yolo brief split, state guard, and stale pointers * no-mistakes(review): restore backstop wake duty, dedupe trigger, repoint pointers * no-mistakes(document): Repoint stale brief guidance comment
render_call omitted LAVISH_AXI_STATE_DIR, so the stub lavish-axi wrote /state.json (permission denied), the board listener never resolved its session, and the build's liveness check failed whenever it sampled after the listener exited. Mirror render_board: pin the per-home lavish state and require the listener to reach its poll. Co-Authored-By: Claude Opus 5.5 <[email protected]>
a405202 to
5e8c2af
Compare
|
Superseded by #16 (merged). |
Intent
Sync the fork changes onto upstream base
9284978f, replay the six dropped PRs in order (#1, #3, #4, #2, #5, #6), apply the PR #9 follow-up, preserve upstream behavior, and ensure the resolver receipt hash identifies the exact brief content used in the request. Keep local-only commits930a653aandf9e0f137off this branch. Do not push tomain, close PR #9, alter the shared~/.no-mistakes/config.yaml, or merge any PR. The task is already committed onfm/fm-upstream-syncat27c941f14705c4cb249293b994a79dcfda833e2a.The PR description must state that adoption requires host
tasks-axi0.2.6 or later, include the 231-test/10-failure/39-skip accounting and each failure's clean-base versus branch disposition, note thattscwas unavailable, and include a section titledDispatch resolver conflict resolution. That section must explain that upstream brief-heading parsing and the branch's newer branch-prefix/harness behavior were preserved;BRIEF_SNAPSHOTis now the sole source forbrief_kind,task_sections, whole-brief fallback, request construction, andbrief_sha256; and the mutation regression test proves the request and receipt identify the same captured bytes. Specifically scrutinize this conflict resolution and its regression test during review.Test evidence:
fm-watch-triagetimed out at 1,800 seconds on both base and branch;fm-backend-herdr-presentation-e2efailed its concurrent-recovery assertion on both;fm-test-run,fm-nm-test-contract, andfm-ci-workflowfailed on both because Ruby is unavailable;fm-supervision-host,fm-turnend-guard, andfm-watcher-lockfailed the same fixture/assertion on both;fm-afk-launchfailed the same pinned-Herdr lifecycle assertions on both.fm-bearings-board-renderpassed on base, failed once in the branch shard, and passed its immediate isolated branch rerun. The Pi extension typecheck was skipped becausetscis unavailable. Separate live Pi/Herdr agent-exit and stale-registration comparisons also failed on both base and branch; the bearings snapshot test passed on both.The test-only
tasks-axi0.2.6 installation must stay in its temporary prefix. Run the isolated Opus 5.5 validation from a separate ordinary clone with a privateNM_HOME; never initialize no-mistakes from the existing worktree or alter the shared no-mistakes configuration. Do not pass--yes. Stop at anyask-userfinding and report it for a decision without approving, fixing, or skipping it. Do not merge. Report the PR only when checks are green.What Changed
fm-dispatch-resolve.shpins the resolver model tojev-1.13.0and appends resolution receipts tostate/dispatch-receipts.jsonl. A new--record-dispatchmode joins those receipts to the profile that was actually dispatched.fm-send.shrefuses unknown flags and stray--keyarguments.fm-pr-review.sh,fm-pr-review-snapshot.sh,fm-pr-risk.sh,.github/firstmate-review-policy.json, and a merge guard infm-pr-merge.sh.fm-captain-hold.sh answer --defer-untiland the keyeddefermode record captain deferrals as dated answers, with date validation in the newfm-calendar-lib.sh.ask-usergates route back to firstmate asneeds-decision.AGENTS.mdinto the newtask-intake,task-delivery,backlog-management, andpr-review-policyskills.BRIEF_SNAPSHOT, so the request sent to the model and the receipt'sbrief_sha256both come from the same captured bytes.docs/verification/dispatch-resolve.mdrecords this contract.LAVISH_AXI_STATE_DIRfor Bearings Captain's Call renders intests/fm-bearings-board-render.test.sh. This stops the stub listener from writing outside its test home.Adoption requirement
Adopting this branch requires host
tasks-axi0.2.6 or later.Dispatch resolver conflict resolution
The replay kept upstream's brief-heading parsing through
fm-brief-heading-lib.sh(fm_brief_task_heading_present/fm_brief_task_heading_body). It also kept the branch's newer branch-prefix and harness behavior.BRIEF_SNAPSHOTis now the only source forbrief_kind,task_sections, the whole-brief fallback, request construction, andbrief_sha256. After the snapshot is taken, the resolver never reads the original brief path again.The mutation regression test in
tests/fm-dispatch-resolve.test.shchanges the original brief after the snapshot is taken. It covers two cases:## Captain's intent/## Firstmate specsectionsIn both cases it checks that the request sent to the model holds the original snapshot content, not the edited file. It also checks that the receipt's
brief_sha256matches an independent hash of that content. This proves the request and the receipt identify the same captured bytes.Reviewers: please check this conflict resolution and its regression test closely.
Validation notes
Full-suite accounting: 231 tests, 10 failures, 39 skips. Each failure compared against the clean base:
fm-watch-triagefm-backend-herdr-presentation-e2efm-test-runfm-nm-test-contractfm-ci-workflowfm-supervision-hostfm-turnend-guardfm-watcher-lockfm-afk-launchfm-bearings-board-rendertscis not available.Risk Assessment
Testing
I ran the real CLIs in private FM_HOMEs. Four resolver scenarios passed live: section request, whole-brief fallback, dispatch join with edit refusal, and an adversarial mid-resolve brief swap. The swap shows the target keeps the request and the receipt hash on the same captured bytes while the pre-fix parent lets them disagree. The resolver used real curl and real quota-axi, with the third-party Typesafe endpoint routed to a local stand-in because no key is available. The captain deferral path passed live with the temp-prefix tasks-axi 0.2.6. The bearings board's dated defer option was built, rendered in headless Chromium, screenshotted, submitted and checked against invalid payloads. A no-mistakes brief was scaffolded and carries the ask-user routing line. fm-send and PR review stayed untested: the gate guard blocks fm-send, and PR review needs forge authority. The targeted tests pass on the target except one fm-pr-merge case, which fails identically on the base. The worktree is clean and the temp labs were removed.
fm-brief.sh live-nm-task sample --mode no-mistakescarries the --yes ban and 'Ask-user gates must return t…Evidence: Resolver: section brief request and receipt
Source: Resolver: section brief request and receipt
Evidence: Resolver: whole-brief byte hash and dispatch join/refusal
Source: Resolver: whole-brief byte hash and dispatch join/refusal
Evidence: Resolver: adversarial brief swap, target vs pre-fix
Source: Resolver: adversarial brief swap, target vs pre-fix
Evidence: fm-send refused by the gate guard
Source: fm-send refused by the gate guard
Evidence: Captain dated deferral transcript
Source: Captain dated deferral transcript
Evidence: Ask-user routing lines in the generated brief
Source: Ask-user routing lines in the generated brief
Evidence: Generated no-mistakes brief
Source: Generated no-mistakes brief
Evidence: Queued dated defer answer context
Source: Queued dated defer answer context
Evidence: Board payload guard refusals
Source: Board payload guard refusals
Evidence: Targeted test results, including the fm-pr-merge base comparison
Source: Targeted test results, including the fm-pr-merge base comparison
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ No issues found.
✅ No issues found.
✅ No issues found.
drive-resolver-snapshot.sh bin(evidence dir): real resolver CLI on branch 27c941f, brief rewritten mid-run through a rules FIFO, section/scout and whole-brief fallback, request body vs receipt brief_sha256, --record-dispatch join/refuse, key-absent gatedrive-resolver-snapshot.sh <git archive 2671085>/bin: same driver on the pre-fix parent, to confirm the scenario detects the bugbash tests/fm-dispatch-resolve.test.shon the branchbash tests/fm-dispatch-resolve.test.shcopied into agit archive 2671085tree, to confirm the regression test fails before the fixbash tests/fm-arm-pretool-check.test.shtests/fm-pr-merge.test.sh:1172- The case github-zero-exit-queue-required fails ('refusal did not name the concrete observed state') on the target, in an isolated rerun, with NO_MISTAKES_GATE unset, and on the base 3377aa6 tree, so this branch did not introduce it. It is missing from the PR description's 231-test/10-failure accounting, which lists a clean-base vs. branch outcome for each failure. The author should add it as a failure present on both base and branch, or confirm what makes it pass in their environment.tmux kill-serverin a new shell that no longer had that setting. It targeted the default socket /tmp/tmux-1001/default, which exists (last modified 2026-09-25 00:37 +0200);tmux lsnow reports 'no server running'. I could not tell whether a default tmux server was running before, so one may have been killed. Named -L tmux servers and the Herdr fleet were not touched. Please check whether anything depended on the default tmux server and restart it if needed.Live validation: ✅ go - 7 of 10 scenarios driven live against the product
fm-brief.sh live-nm-task sample --mode no-mistakescarries the --yes ban and 'Ask-user gates must return t…FM_HOME=<private> TYPESAFE_API_KEY=<test> bin/fm-dispatch-resolve.sh scout-brief.md --project pager(real curl + quota-axi, local Typesafe stand-in)bin/fm-dispatch-resolve.sh whole-brief.mdand a jq -j byte-hash comparison with receipt brief_sha256bin/fm-dispatch-resolve.sh --record-dispatch whole-brief.md --harness claude --model sonnet --effort high, then again after editing the briefFIFO brief swap run against target bin/ and pre-fixgit archive 2a50958^ binfm-captain-hold.sh hold sample-route ...andanswers --source live-testwith defer dates today, 2026-01-01, 2026-13-40 and 2026-11-02, plus an exact redeliverybin/fm-brief.sh live-nm-task sample --mode no-mistakesin a private FM_HOMEbin/fm-bearings-board.sh build payload.json, then chrome-devtools-axi open/click/fill/screenshot/submit in headless Chromium; duplicate-option and invalid-date payloads refusedbin/fm-send.sh lane-live --bogus helloand others (refused by the gate guard)bash tests/fm-dispatch-resolve.test.sh,tests/fm-send-strict.test.sh,tests/fm-send-resolve-key.test.sh,tests/fm-pr-review.test.sh,tests/fm-bearings-board-render.test.shbash tests/fm-pr-merge.test.shon the target, an isolated target rerun, the base 3377aa61 tree, and with NO_MISTAKES_GATE unset✅ **Document** - passed
✅ No issues found.
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
✅ No issues found.