Skip to content

fix(bin): stop claiming check coverage on merged contributions - #4

Merged
keethburu merged 8 commits into
mainfrom
fm/contribution-observer-terminal-pr
Sep 18, 2026
Merged

keethburu merged 8 commits into
mainfrom
fm/contribution-observer-terminal-pr

Conversation

@keethburu

@keethburu keethburu commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Intent

Supervision must not be repeatedly interrupted by contribution checks that cannot complete for already-merged Firstmate pull requests.

In bin/fm-contributions.sh poll, merged pull requests repeatedly failed forge reads and were marked with "error": "forge observation unavailable or changed during read", causing bin/fm-watch.sh to wake and exit every 300 seconds. This change ensures merged pull requests are observed efficiently for post-merge maintainer comments without spurious errors, repeated unavailable-observation wakes, or false operational gaps.

What Changed

  • Timeout classification (bin/fm-contributions.sh): Separated individual forge call timeouts (5-second bound) from overall poll budget exhaustion (20-second bound). A single URL timing out is treated as an isolated failure and rotates to the back of the queue without exhausting the remaining budget.
  • Merged PR observation streamlining (bin/fm-contributions.sh): For a verified merged PR, redundant check-runs, statuses, repo push permissions, and pr view calls are skipped during observation. Comments and reviews continue to be queried to capture post-merge maintainer feedback.
  • Terminal observation preservation (bin/fm-contributions.sh): A merged PR re-check failure preserves the prior merged observation, advances checked_at, and records the error for queue rotation while suppressing repetitive observation unavailable stdout lines.
  • Zero current lane reporting for merged PRs (bin/fm-contributions.jq): Gated distinct_checks, missing_verdicts, pending_checks, and failed_checks via $current so merged rows report 0 current lanes and 0 operational gaps in Bearings and snapshot --all, while pre-merge check history is preserved verbatim in the record file. Closed-unmerged behavior is unchanged.
  • Documentation (bin/fm-contributions.sh): Updated header contract to accurately document observed vs historical fields and that merged work claims no active check coverage.

Verification

  • Automated Tests: Added regression tests in tests/fm-contributions.test.sh covering per-call timeouts, merged re-check error recording and silence, post-merge comment wakes, URL queue rotation, absent-lane retirement, and zero current lane reporting on merged rows. All 40 test cases pass cleanly.
  • Linting: Passed bin/fm-lint.sh (ShellCheck and actionlint clean).
  • Pipeline Validation: Validated via no-mistakes through 6 review fix rounds, 8 live validation scenarios against real GitHub endpoints, document review, and lint.

…eouts as budget exhaustion

Treat individual forge call timeouts as budget exhaustion under the default 20s budget, avoiding misclassifying bounded call expiration as forge failures.

For merged pull requests, skip redundant check-runs, statuses, repo, and pr view calls while continuing to capture post-merge maintainer comments and reviews.

Preserve stable terminal states (merged, closed) and stay silent when subsequent re-checks fail, preventing check intervals from triggering false wakes.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-18T00:07:27.263080Z 37aa258 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@keethburu
keethburu merged commit 0fa266d into main Sep 18, 2026
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