Skip to content

fix: suppress stale contribution poll noise - #37

Merged
TastyTom13 merged 2 commits into
mainfrom
fm/fm-contributions-merged-pr-noise
Sep 21, 2026
Merged

TastyTom13 merged 2 commits into
mainfrom
fm/fm-contributions-merged-pr-noise

Conversation

@TastyTom13

@TastyTom13 TastyTom13 commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Intent

Stop the contributions poll from waking firstmate with 'observation unavailable' for pull requests that merged long ago. Over the last day the poll has woken firstmate a dozen times with that line for PRs 335, 341, 347, 350, 362, 367 to 380 on Scout, 48 and 50 on forge, and Doc-Creator 58, all merged or closed and all readable from GitHub at the time. Each wake is noise the supervisor must read and acknowledge; none led to an action.

What Changed

  • Retry failed forge observations once before reporting them as unavailable.
  • Stop polling merged contributions permanently and recheck closed-unmerged contributions only after 24 hours.
  • Add regression coverage for transient failures, terminal records, and reopened issues.

Risk Assessment

✅ Low: The change is bounded to contribution polling, correctly retries transient failures, permanently settles merged PRs, and schedules slow rechecks for closed-unmerged records.

Testing

Exercised retry recovery, terminal settlement, suppression of re-observation noise, and 24-hour reopened-issue handling; all targeted checks passed with no worktree artifacts.

Evidence: Contributions polling behavior test transcript

Source: Contributions polling behavior test transcript

ok - only required-captain contributions are rows; other actors are counted
ok - replaced-head verdict is stale and cannot create a captain requirement
ok - unchecked ownership is disclosed and cannot prove silence
ok - newest check with no verdict is distinct from passing and pending
ok - new maintainer comment wakes once and stays pending until acknowledged
ok - new maintainer review wakes once and stays pending until acknowledged
ok - new maintainer inline wakes once and stays pending until acknowledged
ok - ready-for-pr on a filed issue becomes a planning wake
ok - a fresh open issue remains measured maintainer triage
ok - an absent check lane remains missing across repeated observations
ok - mixed freshness retains measured captain work and discloses the gap
ok - malformed durable evidence cannot prove silence
ok - a transient ready-for-pr label wakes and its exact acknowledgement survives replay
ok - recorded judgment keeps its exact head and is stale immediately on a published replacement
ok - a current forge observation refreshes a verdict after a replacement
ok - an unavailable current head leaves verdict freshness unknown
ok - away yolo delivery is fleet work without granting merge authority
ok - cross-home away yolo delivery is fleet work
ok - retired ownership persists and unsupported forge remains visibly unmeasured
ok - unsupported forge coverage is disclosed without inventing fleet work
ok - held unsupported forge coverage remains unmeasured
ok - shared contribution signal wakes once while retaining both acknowledgements
ok - watcher keeps observer diagnostics separate from contribution wakes
ok - expired child unsupported-forge coverage remains unmeasured
ok - watcher surfaces one newly durable contribution signal without re-ringing it
ok - parent consumes measured child coverage and refuses expired child silence
ok - unreadable pending signals refuse an empty-inbox claim
ok - budget exhausted mid-observation (exhaust) keeps the prior record and stays silent
ok - budget exhausted mid-observation (hang) keeps the prior record and stays silent
ok - a genuine forge failure that persists through one retry still records the error and wakes
ok - a single transient forge failure recovers silently on the retry
ok - a URL owned by two tasks is observed once per attempt (retried at most once) and every owner receives the result
ok - a settled terminal record is excluded from the poll and never re-observed
ok - a closed issue is rechecked after a day and resumes polling when reopened
ok - a record that turns terminal settles after one confirming observation and is never polled again

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 2 issues found → auto-fixed ✅
  • ⚠️ bin/fm-contributions.sh:335 - The new settled flag permanently removes every closed record from future polling, including issues and PRs that GitHub later reopens. A reopened contribution will never be observed again, so its new maintainer signals and readiness can be missed. Confirm whether closed items are intentionally irreversible; otherwise restrict settlement or retain a recheck path.
  • ⚠️ bin/fm-contributions.sh:302 - The retry sleeps for the full configurable delay without checking the poll deadline. With a small budget or a large FM_CONTRIBUTIONS_RETRY_DELAY, one failed observation can block well beyond the advertised budget before the second attempt is skipped by observe. Bound the sleep by remaining budget or skip the retry when the deadline cannot accommodate it.

🔧 Fix: Fix terminal rechecks and budgeted retries
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-contributions.test.sh
  • Captured targeted retry, settlement, and reopened-issue evidence in the test log.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Built by: claude/sonnet at medium

A transient forge read failure had no retry, so merged and closed PRs kept
waking firstmate with an unavailable observation for readable-but-flaky
reads. Retry once after a short pause, and once a durable record confirms
a terminal merged or closed state, stop re-observing that URL every poll.
@TastyTom13
TastyTom13 merged commit f30d8d7 into main Sep 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant