Repository navigation
Conversation
|
@kunchenguid This focused fix is ready for review. The relevant watcher, Claude Stop, Pi, and Codex checkpoint suites pass; lint and documentation checks are clean. The broader local changed-test run only reports failures reproduced on upstream/main or caused by local environment gaps, as detailed in the PR body. No CI, workflow, runner, or unrelated watcher behavior is changed. |
|
Speaking as Kun's firstmate: Scheduled firstmate-oss pass. Diff reviewed against main (head Classification: corrective. Terminal-stale path was re-waking the primary on cosmetic pane-hash changes after the lifecycle line was already in VISION:
Merge-eligible: YES. |
kunchenguid
left a comment
There was a problem hiding this comment.
Speaking as Kun's firstmate: reviewed the full diff. No security risk. Corrective watcher stale-wake dedupe. Approve pending first-time fork CI.
3a049f4 to
1d30efa
Compare
Absorb a terminal-stale pane whose status line already matches state/.hb-surfaced-<task> instead of resurfacing on every cosmetic footer redraw; pane hash stays liveness evidence only.
1d30efa to
27baeac
Compare
|
Hi @kunchenguid, this was approved on Aug 21 but has drifted into conflicts twice as main moved on. The fix is still needed: upstream main still re-wakes the primary for already-delivered terminal status on cosmetic pane changes. Would you be willing to merge it, or have your firstmate take it over and rebase? If you'd prefer I rebase once more, I'm happy to, if it can be merged soon after so it doesn't drift again. |
Intent
Fix issue https://github.com/peterOC26/firstmate/issues/2573 with the smallest upstream-compatible change: stop routine terminal footer redraws from repeatedly invoking the primary model after the current terminal lifecycle/status transition has already been durably delivered.
What changed
bin/fm-watch.sh- the terminal-stale branch now absorbs a new pane hash when the task's last status line is already byte-identical tostate/.hb-surfaced-<task>(the durable delivered-lifecycle markermark_surfacedalready writes at every enqueue-complete site). It advances the existing.stale-<key>bookkeeping and clears the existing stale/wedge timers instead of queuing a wake. Pane hashes remain liveness input only, never delivery identity. No new durable state and no new resurfacing cadence were added.Preserved exactly:
blocked,failed, keyed-decision, PR-ready, andmergedtransitions still wake.Out of scope (deliberately not touched): footer-text filtering, Claude/Pi/Codex supervision or delivery policy, the already-merged watcher re-arm fix, issue #2614's non-terminal wedge behavior, and teardown cleanup of the delivery/hash markers.
Tests
tests/fm-watch-triage.test.sh- added a changing-footer fixture proving a delivered terminal lifecycle absorbs repeated cosmetic pane-hash changes, plus coverage that the first undelivered terminal state still wakes once and a later genuine transition still delivers. Full suite passes.tests/fm-claude-stop-autoarm.test.sh- added coverage that Claude Stop stays quiet for a delivered changing-footer state and rewakes exactly once for the first undelivered state. Full suite passes.tests/fm-pi-watch-extension.test.sh- added coverage that Pi sends no follow-up for a delivered changing-footer state and sends exactly one for the first undelivered state. Full suite passes (one unrelated timing-sensitive assertion,Pi session transitions must rearm through an explicit generation owner, is flaky identically on unmodifiedupstream/main- confirmed by repeated runs on both trees, 2/3 pass either way).tests/fm-watch-checkpoint.test.sh- added coverage that a delivered changing-footer state stays quiet through the Codex checkpoint and the first undelivered state wakes it once. Full suite passes.bin/fm-lint.sh- clean (ShellCheck 0.11.0 and actionlint 1.7.12, both pinned versions).bin/fm-doc-audience-check.sh- clean (surfaces=69 local_links=255).bin/fm-test-run.sh --changed --base upstream/main-total=150 failed=12 duration_ms=3551569. None of the 12 failures touch any file this change modifies (bin/fm-watch.sh,tests/fm-claude-stop-autoarm.test.sh,tests/fm-pi-watch-extension.test.sh,tests/fm-watch-checkpoint.test.sh,tests/fm-watch-triage.test.sh,tests/lib.sh,tests/wake-helpers.sh,README.md,docs/architecture.md,docs/configuration.md). Each reproduces identically on an unmodifiedupstream/maincheckout (confirmed directly fortests/fm-wake-queue.test.sh) or is a local-environment gap unrelated to this change (actionlintnot onPATHforfm-lint.test.sh/fm-lint-workflows.test.sh, both green once installed; a stray leftover temp directory infm-gotmp.test.sh).Documentation
Updated
README.md,docs/architecture.md, anddocs/configuration.md(one sentence per line, plain dashes) to state that background watcher waiting is tokenless, while surfaced Claude Stop feedback, Pi follow-up, or a Codex checkpoint return that invokes the primary consumes an ordinary model turn, and that the pane hash is liveness evidence while the delivered status line is lifecycle delivery evidence.Measured impact (the task this fix was extracted from)
Caveat
This is a fork-maintained PR opened for upstream review. It makes no claim of upstream acceptance.