Repository navigation
feat(bin): merge upstream firstmate main bf05a4fc into the fork - #377
Merged
Merged
Conversation
…henguid#8191) * Refresh owner presence before detached process-event startup * no-mistakes(review): Correct lease documentation and CI evidence claims
…d#8104) (kunchenguid#8187) * fix: recover remote inheritance generations after counter loss * no-mistakes(review): Restore inheritance pushes to older receivers * no-mistakes(document): Document inheritance counter recovery * test: cover inheritance selection and mutation kill boundary * no-mistakes(document): Clarify receiver generation query documentation
…uid#6330) * fix: update green behind PR before merge * no-mistakes(review): Update behind PRs for any method; await UNKNOWN * no-mistakes(review): Cap update-branch wait under merge locks * no-mistakes(review): Fix stale update-wait header comment * docs: clarify branch update authority * fix(merge): require branch-update consent and stop on failure * no-mistakes(review): Await UNKNOWN after waivers; report unreadable post-update state * fix(merge): pin branch update to checked head Send expected_head_sha with the REST update so a concurrent push cannot advance an unchecked replacement head. Refuse a head mismatch without retrying against the new head. * no-mistakes(document): Clarify branch-update consent, head pinning, and polling guidance * fix(bin): stop waits on non-check refusals Pending or missing checks must not mask draft, state, conflict, or required-check read refusals after a branch update. * no-mistakes(review): Refuse blockers while awaiting updated pull request heads * no-mistakes(document): Document immediate refusals during branch update polling
* fix: reap Perl timeout groups when callers are interrupted * no-mistakes(review): Preserve caller signal handlers after timeout runner cleanup * no-mistakes(review): Prevent startup interrupt loss and remove parent-death cancellation * no-mistakes(document): Correct timeout fallback comments and remove stale duplication * fix: preserve interruption status and use monotonic timeout clocks * no-mistakes(document): Correct timeout contract references and document monotonic timing * no-mistakes(review): Preserve active traps in Perl timeout cleanup * no-mistakes(document): Clarify Perl timeout trap restoration
…#7923) * Preserve independent watcher history for distinct endpoints * no-mistakes(review): Complete shared watcher-marker key migration * no-mistakes(document): Document shared watcher marker identity * no-mistakes(ci): Fixed SC1091 by adding the daemon’s missing ShellCheck source annotation. Focused full-analysis lint, bash syntax validation, and git diff --check passed. Tier 2: the existing lint gate enforces this correction; no runtime redesign was needed * no-mistakes(ci): Implemented bounded SHA-256 endpoint keys and a failing-first long-endpoint regression, which now passes. ci-1 remains unchanged as unrelated. Incomplete: focused lint reports SC2030/SC2031 in fixture setup. The command guard rejected focused testing as indirect execution. Stopped without bypassing or retrying. Pipeline must resolve lint and finish verification * test: scope watcher fixture environment to child commands * docs: explain watcher key upgrade reset and cache cleanup * no-mistakes(test): Confirm six required scenarios pass; exclude optional Codex probe * chore: remove accidental validation scratch * no-mistakes(document): Replace obsolete watcher-key comment with owner pointer * no-mistakes(review): Use shared keys in Pi-stream fixtures * no-mistakes(document): Deduplicate watcher marker cleanup guidance
* test: wait for recovered orphan-readiness runners instead of a fixed marker poll The lifecycle-orphan-readiness section polled each recovered source's handled marker for a fixed 10s after reconcile. Reconcile only confirms each launch; each runner then polls, captures, takes a silent verdict and a terminal verdict, and the two runners take their verdicts in turn under the home's extension lifecycle lock. On a CPU-starved host that chain of short host and fixture processes can exceed 10s, so the section flaked. Wait for the recorded runner process groups to exit, bounded by the coordinator's section-lane deadline, then assert the handled markers, retirement and claim release. On timeout, kill the recorded runner groups and sweep the home before failing, and track the home so any exit sweeps it. * no-mistakes(review): Bound recovered-runner wait to coordinator deadline
… (kunchenguid#8192) * test: cover TypeSafe dispatch base URL configuration * test: compare the recorded TypeSafe endpoint argument * feat: allow an explicit TypeSafe dispatch base URL * no-mistakes(review): Use literal TypeSafe endpoint test expectations * no-mistakes(document): Correct TypeSafe base URL documentation * no-mistakes(ci): Implemented ci-2 and ci-3: malformed TypeSafe addresses fail before credential lookup, and both curl paths disable URL globbing. Added focused regressions. Tier 1 fixes address the shared boundaries. Configured local lint passed. Required ci-box tests and the documentation audience check remain unverified. The command guard rejected the inspection/preflight command as “Privilege escalation in chained command.” No retry or bypass was attempted * fix: reject brackets in TypeSafe base paths * no-mistakes(review): Narrow TypeSafe host validation * no-mistakes(document): Clarify TypeSafe base URL documentation * test: isolate dispatch base from exported settings
…rk (kunchenguid#8030) * fix(teardown): refresh remote refs before refusing work as unlanded Teardown read landed work from the task copy's remote-tracking refs, so work pushed from another checkout was refused until someone fetched by hand. Refresh each remote, bounded and without pruning, when the refs do not show the work. A failed refresh leaves the refs as they were, still refuses, and names the remote in the refusal. * no-mistakes(review): Use fixed 30-second fetch bound, removing timeout override * no-mistakes(ci): Final state, replacing the earlier reports: the fix is in the worktree, uncommitted. The full run of tests/fm-teardown.test.sh did NOT complete: it was stopped at the 20-minute background limit after about 126 of 156 tests. All 126 passed with no failures, including the new test. The remaining ~30 did not run, so the outer test phase must run the full file. Change: validate_worktree_teardown_safety re-runs the dirty check through read_worktree_dirt right after refresh_remote_refs and refuses the same way if it fails or finds work. Added one test, test_edit_saved_during_refresh_refuses, covering local-only, direct-PR and no-mistakes modes. Kept the timed-out agent's code change; removed its extra second test and fake-git hook, per the one-test instruction. Verified: the new test failed with the recheck removed and passed with it restored. bash -n on bin/fm-teardown.sh passed. Not verified: shellcheck is not on PATH, so it did not run. The path where the recheck itself cannot read the copy has no test, per the one-test instruction. Partial log: /tmp/fm-teardown-full.log
…0261107 # Conflicts: # bin/fm-pr-merge.sh # docs/pi-supervision-branch.md
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
… change. The Full suite check failed only because those shards failed, so it should clear with them. No production code changed. **Root cause:** upstream commit 10b7163 (kunchenguid#7923) moved the watcher's marker key to a hashed `v3.` format, built by `window_key` in the new `bin/fm-watch-key-lib.sh`. Upstream updated its own tests to use the `watch_window_key` helper. Five fork-only test fixtures still built the key the old way (`tr ':/.' '___'`). Their `.hash-`/`.stale-`/`.count-` setup files therefore landed under names the watcher no longer reads: - **Shard 2** (`fm-watch-triage`): "current done worker did not advance the stale suppressor". - **Shard 3** (`fm-watch-triage-wedge-defer`): "the counter did not reach the bound". - **Shard 8** (`fm-watch-wedge-cap`): "round 2 escalated a finished worker as a wedge". **Invariant:** every test fixture that sets up or checks a per-window watcher marker must get its key from the one shared derivation, not a copy of it. I checked every place a fixture computes a watcher window key: - The five stale sites: `tests/fm-watch-triage.test.sh` lines 2266, 2293 and 2321, `tests/fm-watch-triage-wedge-defer.test.sh:762` and `tests/fm-watch-wedge-cap.test.sh:1945`. Each now uses `watch_window_key "$window"`. - The other old-format keys left in the repo are also in upstream. They are task-keyed or backend-keyed families outside the window-key change, or upstream's deliberate legacy-key test (`.count-s_a_b`). - `bin/fm-wake-decision-lib.sh` builds the old key too, but only for its own `.wake-decision-surfaced-` file, which it both writes and reads that way. It's consistent and outside this failure, so I left it alone. **Verification (local, macOS):** - `fm-watch-triage-wedge-defer.test.sh` passes in full (14 tests). - On macOS the watcher harness gets reaped before it polls the window, because file timestamps are only accurate to the second. Some cases in these files fail locally even without my change, including the first wedge-cap case. To get past that I ran the target cases from scratch copies that add a few seconds of sleep, then deleted the copies. - With that padding, the done-worker triage case fails without the fix and passes with it. - The wedge-cap cases (finished worker not escalated, and a truly wedged worker still escalates) pass with the fix. The unfixed version also passes locally, because the old-key marker is simply ignored there. So only Linux CI showed that failure. - The stale-wake provenance cases pass. - shellcheck is clean on all three files. I couldn't run Linux: Docker is installed but its daemon isn't running. Shard 12 (cancelled) was left for a decision and I didn't touch it
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
Resolve the nightly firstmate upstream reconcile conflict under the captain's runbook (runbooks-0et, 2026-11-04): firstmate owns the conflict-resolution PR (yolo, merged on green, never parked on the captain), and every conflict outcome gets a creature review.
Context: the mini0 nightly job tried at 2026-11-07T11:45Z to merge upstream kunchenguid/firstmate main bf05a4f (9 commits) into the fork trillium/firstmate main 50dbd42 and hit conflicts in: bin/fm-pr-merge.sh docs/pi-supervision-branch.md. Nothing was pushed.
What Changed
bf05a4fc(9 commits) into the fork. Upstream changes brought in:fm-dispatch-resolve.shaccepts an optional, validatedTYPESAFE_BASEthat sets a different TypeSafe endpoint. An invalid value exits 2 before any credential lookup. Curl now runs with--globoff.fm-teardown.shfetches from each remote (theno-mistakesgate is skipped). If the fetch fails, the refusal says so.fm-timeout-lib.sh: when the caller is interrupted, the Perl timeout fallback now cleans up its command group.bin/fm-watch-key-lib.shgives every per-endpoint watcher marker the same boundedv3.<sha256>key, so markers from different endpoints no longer collide. On upgrade, these caches reset once;docs/configuration.mddocuments this.bin/fm-pr-merge.shanddocs/pi-supervision-branch.mdwere both resolved by keeping the fork's version. The fork already has upstream's update-branch and settled-check logic (inbin/fm-pr-github-ready-lib.sh), and itsfm-spawndoc row is the newer wording. The reasoning is in.pr-evidence/upstream-merge-20261107/resolution.md.docs/configuration.md,docs/architecture.mdanddocs/scripts.md.Risk Assessment
✅ Low: The merge brings in upstream's non-conflicting changes unaltered. In both conflicted files the fork's version was kept, and the source backs that choice: the fork already has upstream's update-branch and settled-check logic, and upstream's github_update_behind_branch function is identical in the fork's ready-lib. The fork's pi-supervision doc row describes the live-workers count that fm-spawn.sh actually implements.
Testing
I ran the merged fm-pr-merge.sh directly against a scratch FM_HOME, ran its full stubbed-forge test, and ran the targeted tests for each area the 9 upstream commits change. fm-pr-merge, teardown, timeout-lib, dispatch-resolve, extension-binding and wake-queue all pass. Four watch/daemon test cases fail, and each fails the same way on both parent commits, so they were already failing before this merge (here or on this host) and the merge did not add them. No Herdr or primary-lab run was needed because the change touches no pane lifecycle. Scratch directories were removed and the worktree is clean.
fm-afk-contract.sh live-workersfm-afk-contract.sh live-workerson a scratch state prints 0; fm-spawn.sh:2308 calls itEvidence: fm-pr-merge --update-branch CLI guards
Source: fm-pr-merge --update-branch CLI guards
$ fm-pr-merge.sh t1 <gitlab MR> --update-branch error: --update-branch applies only to GitHub exit=2 $ fm-pr-merge.sh t1 <github PR> --update-branch=x error: --update-branch takes no value exit=2Evidence: fm-pr-merge test transcript
Source: fm-pr-merge test transcript
Evidence: fm-teardown test transcript
Source: fm-teardown test transcript
Evidence: fm-extension-binding serial transcript
Source: fm-extension-binding serial transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
date: <epoch>: No such file or directory, which suggests a BSD/GNU date difference). These were not compared on CI, so CI may report them.fm-afk-contract.sh live-workersfm-afk-contract.sh live-workerson a scratch state prints 0; fm-spawn.sh:2308 calls itbash tests/fm-pr-merge.test.sh(merge resolution; 137 ok, exit 0)bash tests/fm-teardown.test.sh(upstream #8030 remote-ref refresh; exit 0)bash tests/fm-timeout-lib.test.sh(upstream #7922 Perl timeout cleanup; exit 0)bash tests/fm-dispatch-resolve.test.sh(upstream #7957 TypeSafe base URLs; exit 0)bash tests/fm-extension-binding.test.sh(upstream #8210; exit 0 when run serially)bash tests/fm-wake-queue.test.sh(exit 0)bash tests/fm-watch-triage.test.sh,fm-watch-triage-pause,fm-watch-wedge-cap,fm-daemonon the merge, then the same four ongit archivecopies of 50dbd428 and bf05a4fc to compareFM_HOME=<scratch> bin/fm-pr-merge.sh t1 <gitlab MR> --update-branchand--update-branch=xargument guardsbin/fm-afk-contract.sh live-workerson a scratch state dir (this is the command the kept docs row names)git diff 50dbd428 dee3c3dc -- bin/fm-pr-merge.sh docs/pi-supervision-branch.md(empty, so the fork version was kept) and a grep for upstream's update-branch logic in the fork✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.