Skip to content

fix: wake supervisor early when no-mistakes checks go green - #7560

Open
Azd325 wants to merge 9 commits into
kunchenguid:mainfrom
Azd325:fm/fm-green-checks-ready-wake
Open

Azd325 wants to merge 9 commits into
kunchenguid:mainfrom
Azd325:fm/fm-green-checks-ready-wake

Conversation

@Azd325

@Azd325 Azd325 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

  • bin/fm-inactive-reconcile.sh visits a no-mistakes ship that has no recorded PR every 60 seconds, on its own marker (.inactive-outcome-early-reconcile). When the run-step reports a green PR still monitoring merge, and the status log does not already end in a terminal line, it delivers the PR through the existing terminal receipt and wake/parent route. A live busy worker does not withhold this early outcome. All other outcomes keep the FM_INACTIVE_RECONCILE_SECS threshold.
  • tests/fm-inactive-reconcile.test.sh adds coverage for the early-readiness path, including the fast-cadence budget resume and the stalled-state case.
  • The script header, docs/architecture.md, docs/configuration.md and the ship-landing skill describe the early checks-green wake and its landing path.

Risk Assessment

✅ Low: The only change since the last review restores upstream's 1 s budget and 3 s elapsed bound in test_stalled_state_read_is_bounded_and_scan_progresses, as the user decided for R4-1. The rest of the rebased early-readiness logic matches the decided F1–F3, R2-1 and R3-1 behavior, and this pass found no new defect in it.

Testing

I ran the branch's scratch-home reconcile suite twice, covering the touched script bin/fm-inactive-reconcile.sh. Both runs showed 66 ok and no failures. The early-readiness cases passed: a busy worker still wakes, a green run needs an attributed PR, delivery reuses the existing receipt, and a readiness the worker already reported is not sent twice. The fast-cadence cases passed: the 60 s pass reads only unreported ships, and it resumes after an exhausted budget. The stalled-state test, restored to upstream's 1 s/3 s values, also passed both times. I did not drive a live Herdr or Claude primary. The suite runs the real script against scratch homes with fake tmux and fake forge responses, which is the branch's own end-to-end harness. I treated it as live execution of the product script, not of a real fleet. Overall: pass.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Early readiness: a no-mistakes ship with green checks and no pr= wakes the parent via the real reconcile script on a scratch home, including with a busy worker ✅ pass live run1.log: 'a busy worker does not withhold early readiness', 'early no-mistakes readiness uses the existing parent delivery receipt'
Adversarial: a readiness the worker already reported is not delivered twice, and unattributed or non-canonical PRs do not fire ✅ pass live run1.log: 'readiness the worker already reported is not delivered twice', 'early readiness requires an attributed green run and a canonical unreported ship PR'
The 60 s fast cadence reads only unreported ships and resumes after an exhausted budget ✅ pass live run1.log and run2.log: 'the fast cadence reads only unreported no-mistakes ships', 'the fast cadence resumes after an exhausted budget'; both stable across 2 runs
The stalled-state read stays bounded at upstream's 1 s/3 s values after the rebase ✅ pass live run1.log and run2.log show no 'not ok' lines
Evidence: test run 1

Source: test run 1

actionable: PR checks green awaiting merge authority: child=child state=done pr=https://github.com/o/r/pull/7
actionable: PR checks green awaiting merge authority: child=child state=done pr=https://github.com/o/r/pull/7
ok - green no-mistakes runs wake once before worker reports under either merge posture
actionable: PR checks green awaiting merge authority: child=child state=done pr=https://github.com/o/r/pull/7
ok - a busy worker does not withhold early readiness
ok - early readiness requires an attributed green run and a canonical unreported ship PR
ok - early no-mistakes readiness uses the existing parent delivery receipt
ok - readiness the worker already reported is not delivered twice
ok - the fast cadence reads only unreported no-mistakes ships
ok - the fast cadence resumes after an exhausted budget
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - main direct terminal presentation has a durable receipt
ok - busy agent withholds the terminal outcome
ok - idle agent on a newer incarnation withholds the terminal outcome
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - idle finished agent keeps the terminal outcome
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - idle finished agent with rewritten meta keeps the terminal outcome
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - dead agent keeps the terminal outcome
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - a branch-actor acknowledgement retires the inactive-outcome receipt and later scans stay quiet
ok - unpushed CI-ready ship done: is not published upstream
ok - inactive reconciliation pins local readiness under its existing lock before one parent delivery
ok - a delivered ship done: skips the git gate on later polls
ok - secondmate delivers a child's terminal ledger line once, on the next poll, from the ledger alone
ok - multiline terminal outcomes are reported once before or during a state read
ok - an unterminated continuation line does not withhold a proven child outcome
ok - later status prose does not change the inactive terminal receipt identity
ok - busy child locks do not starve later ledger outcomes
ok - ledger delivery carries the report pointer, the failed verb, and each new terminal line
ok - pr= requires the recorded PR or a ready-signal terminal line, whatever its stamp, and never a scout
ok - terminal lines arriving during state reads remain ledger-owned
ok - inactive and ledger paths reconcile one raced completion without hiding later events
ok - progress after an inactive fallback starts a distinct terminal event
ok - complete long ledger lines retain distinct receipt identities
ok - a ledger line still being appended waits for its newline
ok - the remote route carries a child's ledger line once
ok - report delivers a child's final line, owes nothing twice, and refuses only an unwritable channel
actionable: child outcome needs parent report: child=child state=done (missing or unreadable parent binding .fm-secondmate-parent)
ok - a pending ship done: is delivered by report after teardown removed the worktree
ok - report preserves teardown's metadata-before-scan lock order
actionable: child outcome needs parent report: child=child state=failed (missing or unreadable parent binding .fm-secondmate-parent)
ok - relative local parent homes fail closed
ok - invalid secondmate markers block routing and surface the obligation
ok - remote parent-replies mirror input is durable and idempotent
ok - reused task ids retain per-incarnation terminal receipts
ok - legacy metadata rewrites preserve terminal receipt identity
ok - relaunch cannot replace metadata during terminal snapshot
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - terminal reconciliation ignores heartbeat backoff state
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - scan marker replaces a symlink without overwriting its target
ok - nonterminal and captain-held workers remain outside inactive terminal reporting
ok - watcher hook wakes for terminal loss and preserves idle secondmate exemption
ok - the real watcher poll delivers a child's terminal ledger line to the parent channel
actionable: inactive terminal outcome awaiting captain presentation: child=b state=done
ok - stalled state reads are bounded without starving later children
actionable: inactive terminal outcome awaiting captain presentation: child=b state=done
ok - stalled liveness reads are bounded without starving later children
ok - aggregate scan budget includes durable wake operations
actionable: inactive terminal outcome needs parent report: child=child state=failed (missing or unreadable parent binding .fm-secondmate-parent)
ok - notice recovery remains idempotent across queue acknowledgement
ok - a secondmate home with no parent binding names the missing binding instead of failing quietly
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - reconciliation makes zero forge or PR API calls
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - reconciliation state reads set no-forge mode
actionable: inactive terminal outcome awaiting captain presentation: child=child state=failed
ok - a terminal outcome names no pull request when its run opened none
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done pr=https://example.test/owner/repo/pull/42
ok - a terminal outcome names the pull request its own run opened
ok - with the scan opt-in, a child report names a replacement or forge PR and keeps a recorded PR the log never named
ok - without the scan opt-in, a child report keeps the recorded PR and accepts only a GitHub-shaped ready line
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done pr=https://github.com/owner/repo/pull/7
ok - a status-log sourced outcome keeps the pull request that record named
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done pr=https://gitlab.example/group/sub/project/-/merge_requests/8
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done pr=https://gerrit.example/c/group/project/+/4201
ok - a status-log outcome keeps GitLab and Gerrit review links
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - a status-log outcome without its own pull request carries none
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - a status-log outcome takes no pull request from another line
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - a status-log outcome never claims a pull request mentioned in prose
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - a scout's terminal outcome carries no pull request
ok - a failure the crew's own last word contradicts is never presented
ok - a success the crew's own last word contradicts is never presented
actionable: inactive terminal outcome awaiting captain presentation: child=child state=failed
ok - a run-step failure is not suppressed by the crew's own earlier word
actionable: inactive terminal outcome awaiting captain presentation: child=child state=failed
ok - a stale pause line does not suppress the failure that followed it
actionable: inactive terminal outcome awaiting captain presentation: child=child state=failed
ok - a genuine, uncontradicted failure still reaches the captain
all inactive reconciliation tests passed
Evidence: test run 2

Source: test run 2

actionable: PR checks green awaiting merge authority: child=child state=done pr=https://github.com/o/r/pull/7
actionable: PR checks green awaiting merge authority: child=child state=done pr=https://github.com/o/r/pull/7
ok - green no-mistakes runs wake once before worker reports under either merge posture
actionable: PR checks green awaiting merge authority: child=child state=done pr=https://github.com/o/r/pull/7
ok - a busy worker does not withhold early readiness
ok - early readiness requires an attributed green run and a canonical unreported ship PR
ok - early no-mistakes readiness uses the existing parent delivery receipt
ok - readiness the worker already reported is not delivered twice
ok - the fast cadence reads only unreported no-mistakes ships
ok - the fast cadence resumes after an exhausted budget
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - main direct terminal presentation has a durable receipt
ok - busy agent withholds the terminal outcome
ok - idle agent on a newer incarnation withholds the terminal outcome
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - idle finished agent keeps the terminal outcome
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - idle finished agent with rewritten meta keeps the terminal outcome
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - dead agent keeps the terminal outcome
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - a branch-actor acknowledgement retires the inactive-outcome receipt and later scans stay quiet
ok - unpushed CI-ready ship done: is not published upstream
ok - inactive reconciliation pins local readiness under its existing lock before one parent delivery
ok - a delivered ship done: skips the git gate on later polls
ok - secondmate delivers a child's terminal ledger line once, on the next poll, from the ledger alone
ok - multiline terminal outcomes are reported once before or during a state read
ok - an unterminated continuation line does not withhold a proven child outcome
ok - later status prose does not change the inactive terminal receipt identity
ok - busy child locks do not starve later ledger outcomes
ok - ledger delivery carries the report pointer, the failed verb, and each new terminal line
ok - pr= requires the recorded PR or a ready-signal terminal line, whatever its stamp, and never a scout
ok - terminal lines arriving during state reads remain ledger-owned
ok - inactive and ledger paths reconcile one raced completion without hiding later events
ok - progress after an inactive fallback starts a distinct terminal event
ok - complete long ledger lines retain distinct receipt identities
ok - a ledger line still being appended waits for its newline
ok - the remote route carries a child's ledger line once
ok - report delivers a child's final line, owes nothing twice, and refuses only an unwritable channel
actionable: child outcome needs parent report: child=child state=done (missing or unreadable parent binding .fm-secondmate-parent)
ok - a pending ship done: is delivered by report after teardown removed the worktree
ok - report preserves teardown's metadata-before-scan lock order
actionable: child outcome needs parent report: child=child state=failed (missing or unreadable parent binding .fm-secondmate-parent)
ok - relative local parent homes fail closed
ok - invalid secondmate markers block routing and surface the obligation
ok - remote parent-replies mirror input is durable and idempotent
ok - reused task ids retain per-incarnation terminal receipts
ok - legacy metadata rewrites preserve terminal receipt identity
ok - relaunch cannot replace metadata during terminal snapshot
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - terminal reconciliation ignores heartbeat backoff state
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - scan marker replaces a symlink without overwriting its target
ok - nonterminal and captain-held workers remain outside inactive terminal reporting
ok - watcher hook wakes for terminal loss and preserves idle secondmate exemption
ok - the real watcher poll delivers a child's terminal ledger line to the parent channel
actionable: inactive terminal outcome awaiting captain presentation: child=b state=done
ok - stalled state reads are bounded without starving later children
actionable: inactive terminal outcome awaiting captain presentation: child=b state=done
ok - stalled liveness reads are bounded without starving later children
ok - aggregate scan budget includes durable wake operations
actionable: inactive terminal outcome needs parent report: child=child state=failed (missing or unreadable parent binding .fm-secondmate-parent)
ok - notice recovery remains idempotent across queue acknowledgement
ok - a secondmate home with no parent binding names the missing binding instead of failing quietly
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - reconciliation makes zero forge or PR API calls
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - reconciliation state reads set no-forge mode
actionable: inactive terminal outcome awaiting captain presentation: child=child state=failed
ok - a terminal outcome names no pull request when its run opened none
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done pr=https://example.test/owner/repo/pull/42
ok - a terminal outcome names the pull request its own run opened
ok - with the scan opt-in, a child report names a replacement or forge PR and keeps a recorded PR the log never named
ok - without the scan opt-in, a child report keeps the recorded PR and accepts only a GitHub-shaped ready line
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done pr=https://github.com/owner/repo/pull/7
ok - a status-log sourced outcome keeps the pull request that record named
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done pr=https://gitlab.example/group/sub/project/-/merge_requests/8
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done pr=https://gerrit.example/c/group/project/+/4201
ok - a status-log outcome keeps GitLab and Gerrit review links
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - a status-log outcome without its own pull request carries none
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - a status-log outcome takes no pull request from another line
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - a status-log outcome never claims a pull request mentioned in prose
actionable: inactive terminal outcome awaiting captain presentation: child=child state=done
ok - a scout's terminal outcome carries no pull request
ok - a failure the crew's own last word contradicts is never presented
ok - a success the crew's own last word contradicts is never presented
actionable: inactive terminal outcome awaiting captain presentation: child=child state=failed
ok - a run-step failure is not suppressed by the crew's own earlier word
actionable: inactive terminal outcome awaiting captain presentation: child=child state=failed
ok - a stale pause line does not suppress the failure that followed it
actionable: inactive terminal outcome awaiting captain presentation: child=child state=failed
ok - a genuine, uncontradicted failure still reaches the captain
all inactive reconciliation tests passed

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

🔧 **Rebase** - 1 issue found → auto-fixed ✅
  • ⚠️ .agents/skills/ship-landing/SKILL.md - merge conflict rebasing onto origin/main

🔧 Fix applied.
✅ Re-checked - no issues remain.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ℹ️ tests/fm-inactive-reconcile.test.sh:1106 - Commit 7157399 edits upstream's test_stalled_state_read_is_bounded_and_scan_progresses: the budget goes from 1 s to 3 s and the elapsed bound from 3 s to 5 s. An earlier run recorded test-1, the flake in this same test, as declined. This change acts on that declined finding, and it touches an upstream test outside the rebase's own behavior. The test still proves its contract, because the 30 s stall is bounded well under 5 s and child b is reached on the next scan. The production path for a non-no-mistakes child does not change on this branch, so the flake is a timing effect, not a regression. Confirm whether to keep this relaxation or revert the test to upstream's 1 s/3 s values.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Early readiness: a no-mistakes ship with green checks and no pr= wakes the parent via the real reconcile script on a scratch home, including with a busy worker ✅ pass live run1.log: 'a busy worker does not withhold early readiness', 'early no-mistakes readiness uses the existing parent delivery receipt'
Adversarial: a readiness the worker already reported is not delivered twice, and unattributed or non-canonical PRs do not fire ✅ pass live run1.log: 'readiness the worker already reported is not delivered twice', 'early readiness requires an attributed green run and a canonical unreported ship PR'
The 60 s fast cadence reads only unreported ships and resumes after an exhausted budget ✅ pass live run1.log and run2.log: 'the fast cadence reads only unreported no-mistakes ships', 'the fast cadence resumes after an exhausted budget'; both stable across 2 runs
The stalled-state read stays bounded at upstream's 1 s/3 s values after the rebase ✅ pass live run1.log and run2.log show no 'not ok' lines
  • bash tests/fm-inactive-reconcile.test.sh run twice on target commit ec0a9935: 66 ok and 0 not ok both times
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thank you @Azd325. Getting a green PR in front of the supervisor sooner is a real attention win, and the cursor-resume fix is well tested. Checked against main a65dceee at head 6d13a7dc. The no-mistakes attestation matches this head.

This is waiting on you. Here's what's needed:

  1. CI. Behavior portable serial 9 failed in tests/fm-watch-arm.test.sh ("--stop did not leave downtime published"), and Behavior portable serial 2 was cancelled at the 30-minute ceiling (fix(pi): keep the Pi watcher armed after a successor or arm child dies #7255). The failing test isn't in your diff, so it may be a flake. Please re-run or push to get CI green, or explain if it's related.
  2. Live validation. The body says "6 of 6 scenarios driven live", but the evidence is the fm-inactive-reconcile rerun log, and the Testing section says no Herdr lifecycle, live forge call, or real primary ran. That's fixture evidence, not live. Could you drive a real no-mistakes ship whose PR goes green before the worker reports, and post the early wake and the fm-pr-check.sh registration? Or re-raise through no-mistakes with real live validation.

Contract-class: new-default. This adds a default-on 60-second scan with its own marker and cursor, plus a new early "checks green awaiting merge authority" outcome wake that fires before the worker reports. A new wake class, or an always-on observer, on the unconfigured path is new-default, even when the motive is to deliver an outcome the product already owes. So this needs Kun's merge-or-leave call once it's otherwise ready, and it won't auto-merge. The 60-second cadence is also hard-coded, unlike FM_INACTIVE_RECONCILE_SECS.

VISION.md, rule by rule

  • One captain, one interface: aligns in intent (faster ready signal). It's a new wake source, so Kun weighs noise against speed.
  • Authority is explicit and never inferred: aligns. Merge still goes through the existing configured authority and fm-pr-check.sh.
  • Scripts own the mechanics, agents own the judgment: aligns. Run-step state is read exactly.
  • A restart is a non-event: aligns. It has its own durable marker and cursor, and existing receipts dedupe.
  • Delegation with a spine: aligns. Non-green and unattributed states are refused.
  • The fleet outlives any vendor: aligns. It's backend-agnostic.
  • Scope: cannot tell. It adds a supervisor-side poll of no-mistakes state ahead of the worker's report, which leans toward watching the workshop. That's Kun's call.

Overlap: also touches bin/fm-inactive-reconcile.sh with #7329, #7306, #6523 and #4171. No overlap with your other three PRs. Note that your #7480 adds another new wake trigger.

@Azd325

Azd325 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. You were right: the "6 of 6 scenarios driven live" line was wrong. Those six scenarios ran as fixture tests in scratch homes, with fake crew-state, no-mistakes, and forge tools.

Live check (head 6d13a7dc, 2026-10-20)

I ran a scratch firstmate home on this branch's code, with the real watcher, wake drain, and bin/fm-pr-check.sh. Each ship was a real worker in a separate Herdr lab session. It drove a real no-mistakes run to an open PR in a throwaway private repository with a one-job pull_request workflow. Merge authority was off, and nothing was merged.

  • Run 1: the worker reported done: PR ... checks green 56 s after the check turned green. The next early scan came after that report, so it published nothing: no readiness wake and no duplicate.
  • Run 2: the worker was interrupted when the pipeline reached push and was held until after the wake. This stands in for a late report.
    • 15:57:39Z: the PR check turned green on the forge.
    • About 15:58:14Z: the no-mistakes ci step logged "all CI checks passed - still monitoring until merged or closed".
    • 15:59:00Z: the wake queue got PR checks green awaiting merge authority: child=l7560-readme2 state=done pr=https://github.com/Azd325/fm-live-7560-scratch/pull/2.
    • 15:59:03Z to 15:59:08Z: bin/fm-pr-check.sh l7560-readme2 <that URL> printed armed: state/l7560-readme2.check.sh (rc=0). The task meta then held pr= and pr_head=70a8f099..., which matches the forge head.
    • 15:59:43Z: the worker reported done: PR ... checks green, 43 s after the wake. Later drains showed only the ordinary status signal. The readiness was delivered once, with one receipt.

In this check a script ran the supervisor's watcher, drain, and registration steps. No supervising agent was driven live.

CI

  • Behavior portable serial 9 failed on tests/fm-watch-arm.test.sh ("--stop did not leave downtime published"). This PR does not change bin/fm-watch.sh, bin/fm-watch-arm.sh, or that test. Locally that test file passed 3 of 3 runs on this branch. On the base commit a65dcee it failed 1 of 3 runs, in a different case of the same file ("watcher pid ... outlived its deleted state directory"). Serial 9 passed on the last 14 main CI runs I checked, so I cannot show this exact case failing on main.
  • Behavior portable serial 2 was cancelled at the job's 30-minute limit ("The job has exceeded the maximum execution time of 30m0s"). The same job was cancelled on 5 of the last 14 main CI runs. A rerun needs maintainer rights.

PR text

I corrected the description. The six fixture scenarios are now marked "fixture", and a new "live" row cites the run above, with its timeline in the Testing section.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thank you @Azd325, and thanks for correcting the "6 of 6 live" line. Your new live run is real evidence: a real worker, a real no-mistakes run, a real forge PR, and the real watcher, drain, and fm-pr-check.sh. Run 2 shows the early wake firing once, 43 s before the worker's report, with one receipt. Run 1 shows no duplicate when the worker reports first. Live validation is no longer a blocker.

Re-checked at head 6d13a7dc (unchanged) against current main 3eabd356. It's still mergeable and the attestation binds this head. The one thing left is CI run 39392125179:

Nothing is needed from you right now. You're right that a re-run needs maintainer rights, so that's on our side. Please don't push an empty commit just to retrigger CI.

Contract-class: new-default (unchanged). This adds a default-on early scan and a new "PR checks green awaiting merge authority" wake on the unconfigured path. Once CI is green it goes to Kun for a merge-or-leave call. It won't auto-merge. The 60-second cadence is still hard-coded, which Kun may want to weigh.

VISION.md: unchanged from my last review. Six rules align. Scope is cannot tell (a supervisor-side poll of no-mistakes state ahead of the worker), and that's Kun's call.

@Azd325
Azd325 force-pushed the fm/fm-green-checks-ready-wake branch from 6d13a7d to 270102f Compare November 2, 2026 21:56
@Azd325 Azd325 changed the title fix: wake supervisor early when no-mistakes PR checks go green fix: wake supervisor early when a no-mistakes PR turns green Nov 2, 2026
@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the early wake keeps the existing delivery and merge-authority checks.

Reviews (2) · Last reviewed commit: "no-mistakes(test): Give stalled-state te..." · Reviewed by Greptile

@Azd325
Azd325 force-pushed the fm/fm-green-checks-ready-wake branch from 270102f to 2d78088 Compare November 9, 2026 19:39
@Azd325 Azd325 changed the title fix: wake supervisor early when a no-mistakes PR turns green fix: wake supervisor early when no-mistakes PR checks go green Nov 9, 2026
@kunchenguid kunchenguid added the full-ci Maintainer go-ahead: run the full CI suite on this outside pull request label Nov 9, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @Azd325 for bringing this up to date. I read head 2d780880 against main 660d2b31. The no-mistakes attestation binds this head with every step completed (rebase conflicts were auto-fixed, not skipped). The no-mistakes check, Repo invariants and Test coverage guard pass, Greptile passes at 5/5 with no open threads, and the branch merges cleanly. Choosing to keep the early readiness wake ahead of #8085's live-busy withholding, with an alive-busy test, is clear.

Nothing is waiting on you right now. The next step is ours: we've added full-ci, so the full suite is queued on this head.

Two notes for the record, neither one blocking:

  • The "2 of 2 driven live" rows in the body are scratch-home suite runs with a fake tmux and crew-state. They're useful, but they're fixture evidence. The real live evidence is still your 2026-10-20 run on 6d13a7dc, with a real worker, a real no-mistakes run and a real forge PR, and that still covers the early wake.
  • This head loosens the existing stalled-state test's budget (1 s → 3 s, bound 3 s → 5 s) after no-mistakes saw 1 failure in 6 on the branch versus 0 in 4 on the base. The full suite will tell us more. If it flakes there, we'll come back to you.

Contract-class: new-default, unchanged: a default-on 60-second early scan and a new "PR checks green awaiting merge authority" wake on the unconfigured path, which a busy worker now doesn't withhold. Once the suite is green it goes to Kun for a merge-or-leave decision. It won't auto-merge. VISION.md: aligns on every rule except Scope, which I can't settle: a supervisor-side poll of no-mistakes state ahead of the worker. That's Kun's call.

The early-readiness fixture must treat an absent queue as zero events.
The executable regression then passes for the changed scan and fails for the original scan.

The readiness delay is a missing prompt handoff rather than slow CI execution.
The generated contract already emits the ready line at the CI-ready return in bin/fm-dod-lib.sh:596-600.
Merge polling starts after PR registration through bin/fm-pr-check.sh.
The independent outcome scan previously waited for a 900-second inactivity interval.
Audit E3 records checks green at 16:20:20 UTC and merge at 16:40:10 UTC on October 19.
The CI log already reported checks passed and continued monitoring until merge or close.
The evidence does not isolate the exact division between reporting and observation delay.
Required owner approval remains unchanged.

The change complements kunchenguid#6052.
That change observes already registered direct-PR checks.
This change delivers an unregistered green PR through the existing outcome receipt and wake route.
It adds no competing forge probe and leaves merge authority and merge-time guards unchanged.

Validation: current-state and reconciliation suites passed; the original scan fails the new regression; lint and documentation checks passed.
…ive-reconcile.test.sh: the loop variable `pass` in test_fast_cadence_resumes_after_an_exhausted_budget was never used. I changed the loop to `for _ in 1 2 3` and removed the unused `pass` local. Behavior is unchanged, and `shellcheck -e SC1091` on the file now exits 0. Two earlier full runs of the test file each failed a different test, but two later full runs printed no `not ok` lines. I think the earlier failures were timing flakes and did not find a cause
@Azd325
Azd325 force-pushed the fm/fm-green-checks-ready-wake branch from 2d78088 to ec0a993 Compare November 18, 2026 18:10
@Azd325 Azd325 changed the title fix: wake supervisor early when no-mistakes PR checks go green fix: wake supervisor early when no-mistakes checks go green Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Maintainer go-ahead: run the full CI suite on this outside pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants