Repository navigation
Conversation
|
Speaking as Kun's firstmate: Thank you @zestysoft. This is a real defect, and the reproduction you described (7 announcements for one unhandled result) is a convincing regression to pin it with. What I checked on Overlap: #7764 from @niks0501 fixes the same thing. Both PRs change the same
Which one goes in is Kun's call. I'm not closing either. Contract class: new-default (my read). The reconcile header on main spells out the current behavior: republish every unhandled result "on every call regardless of any earlier publication." Both PRs replace that specified default with "publish once while queued." It's a sensible fix that aligns with VISION (less noise, and a queued wake is still retired only by its answering record), but it changes a documented default path, so it goes to Kun rather than auto-merge. VISION: one-captain aligns (less recovery noise), authority aligns (no new autonomy), scripts aligns (exact lock-held check), restart aligns (retry after the row is consumed, handled ack still the only stop), spine/vendor/scope align. What this needs from you:
So this is waiting on you for the no-mistakes re-raise. Once a head is green with the attestation bound to it, it goes to Kun alongside #7764 as a pick-one decision. |
b89306c to
0543dd2
Compare
|
Re-raised through no-mistakes as asked: this PR now carries The product change is unchanged: dedupe on exact key + payload under the wake-queue lock. What I compared. CI run 40285140146 on this head, against CI run 40280579086 on main
Regression proof on this head. With main's One note on the pipeline record: its test step hit its 30-minute agent budget and was approved past, so the outcome reads passed-with-override, not a clean test pass. |
|
Closing and immediately reopening this PR to get a fresh CI run on the unchanged head Why: the red shards on run Also for context: #7764, the alternative fix, was closed by its author on 2026-10-28 without merging, and main has no |
[Medium impact] The changes appear safe to merge; no actionable defects were found. Reviews (1) · Last reviewed commit: "no-mistakes(document): Document queued-r..." · Reviewed by Greptile |
|
Speaking as Kun's firstmate: thank you @zestysoft, and sorry for the slow follow-up. Your 10-26 and 10-29 replies answer both of my asks. What I checked on head Gates: the no-mistakes attestation binds this head with every step completed. You disclosed that the test step was approved past its 30-minute budget. The "PR must be raised via no-mistakes" check passes. The 10-29 CI run on this head was green on every lane. Greptile is 5/5 with no open threads. Your regression proof covers it (main's file gives 5 announcements, the fix passes 5/5 through the real Pi host fixture). Contract class (my read): new-default. It replaces main's documented "republish every unhandled result on every call" with "publish once while queued". I've queued the full suite. If it's green, this goes to Kun for a merge-or-leave call. Nothing more is needed from you right now. |
|
Speaking as Kun's firstmate: thanks @zestysoft. The full suite is green on Status: with the captain for a decision. This isn't waiting on you. Contract class (my own read): new-default. |
Closes #8410
Intent
The fix that stops one captured notification from being re-announced on every monitoring pass - the flood that filled the captain's screen and falsely reported nine jobs in flight - is open as a pull request and has now been reviewed by the upstream maintainers, who accept the diagnosis: they confirmed that on the current release every pass re-publishes the downtime marker, that our fix closes that under the queue lock and still retries once the row is answered, and that the change touches no workflow, network, or credential surface. They also flagged a competing pull request from another contributor fixing the same block, and said which one lands is their captain's decision, so ours is one of two candidates.
Two things are asked of us before it can be considered at all. The submission must go through the validation pipeline, because it was submitted with the pipeline skipped and that check blocks the merge; and six serial test jobs went red on the current head - most look like timing or runner trouble outside the changed file, but several are wake-queue tests, which is exactly the area we touched, so they need a real look rather than a shrug.
Deliverable: the same pull request, carrying a head that has been through the pipeline, with those jobs reported honestly.
What Changed
bin/fm-procevent.sh:reconcileno longer re-appends a captured but unhandled result on every pass. Under the wake-queue lock, it checks for a queuedcheckrow with the sameprocevent:<id>:<seq>key and payload. If that row is there, it does nothing, so the downtime marker is not touched either. If the row is gone, it appends the result again, so a result is still retried until it gets ahandledacknowledgement.tests/fm-procevent.test.sh: added tests for:tests/fm-watch-recovery-loop.test.sh: added tests for repeated re-arms through the real Pi host. One re-arms a captured but unhandled result; the other is an empty-queue control using an idle long-poll source. Comments inbin/fm-procevent.shand the docs indocs/configuration.md,docs/verification/process-event-sources.mdanddocs/watcher-continuity.mdnow describe the queued-row check.🤖 Generated with Claude Code
Risk Assessment
✅ Low: The fix only changes procevent result publication. It checks for an existing row and appends under the same wake-queue lock that drain acknowledgement uses, and it keeps the existing source-lock-then-queue-lock order. A missing row is still retried, and the success and "published" count meaning does not change for callers (capture autohandle, the reconcile output, and remote-reply and extension tests). The round-1 fix that isolates the claim root is correctly applied: the claim root is passed to register, to the node command() calls through process.env, and to the sweep registry.
Testing
The Test agent exceeded its invocation budget before live validation completed; no evidence was gathered for this head.
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
tests/fm-watch-recovery-loop.test.sh:178- The new run_repeated_rearm_case never sets FM_PROCEVENT_CLAIM_ROOT. So itsregister, itsreconcilecalls and the nodecommand()calls all use the default claim root${XDG_STATE_HOME:-$HOME/.local/state}/firstmate/procevent-claims(bin/fm-procevent-lib.sh:35). Claim and lock files are keyed only by source id (fm-procevent-lib.sh:330-336). Both cases use the same ids,idleandreview. Here is what goes wrong: thecapturedcase starts anidlerunner that lives up to 180s. That runner is reaped only by the file's EXIT cleanup (tests/lib.sh:345), so it still holdsidle.claimwhen theemptycase registersidlein a different home. Theemptycase's reconcile cannot claim it, because a live owner from another home holds it. Thenfm-procevent.sh listreportslivefrom the pid state alone (cmd_list -> fm_procevent_claim_state_locked, fm-procevent.sh:2431). So the T5 assertion that the idle long-poll source is live (line 256) passes off the T4 runner, not its own. The test also writes claim and lock files into the developer's real~/.local/state, and generic ids likereview/idlecan contend with a live install's sources. Fix: in run_repeated_rearm_case, exportFM_PROCEVENT_CLAIM_ROOT="$dir/claims"before the register and node steps (process.env already carries it intocommand()). Also callfm_test_track_procevent_home "$home" "$dir/claims"so the sweep uses the same root, the way tests/fm-procevent.test.sh:21 and the bearings tests do.bin/fm-procevent.sh:898- The inline awk presence check (lines 898-901) re-implements fm_wake_queued_carries_locked (bin/fm-wake-lib.sh:2423). That helper already exists to check, under the held queue lock, whether a queued row of <kind> for exactly <key> carries <payload>. Callingfm_wake_queued_carries_locked check "$key" "$payload" || fm_wake_append_locked check "$key" "$payload"would drop the second copy of the queue-row matching rule and add the helper's NF>=5 guard. The helper matches by substring rather than exact payload. That makes no difference here, because the key already pins source id and sequence, and the payload is built from the validatedprocevent <adapter> <id> <seq>line.🔧 Fix applied.
1 info still open:
bin/fm-procevent.sh:898- The inline awk presence check (lines 898-901) re-implements fm_wake_queued_carries_locked (bin/fm-wake-lib.sh:2423). That helper already exists to check, under the held queue lock, whether a queued row of <kind> for exactly <key> carries <payload>. Callingfm_wake_queued_carries_locked check "$key" "$payload" || fm_wake_append_locked check "$key" "$payload"would drop the second copy of the queue-row matching rule and add the helper's NF>=5 guard. The helper matches by substring rather than exact payload. That makes no difference here, because the key already pins source id and sequence, and the payload is built from the validatedprocevent <adapter> <id> <seq>line.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.