Repository navigation
fix(bin): retry transient contribution forge reads once before waking - #7302
Conversation
Address review findings for kunchenguid#7262 by parsing only gh status forms, recognizing real DNS errors, refusing GraphQL not-found retries, clearing per-URL diagnostics, and restoring exit-137 handling.
Complete kunchenguid#7262 review fixes by accepting bodyless gh status lines and keeping all GraphQL errors out of transient network classification.
Address review findings for kunchenguid#7262 by parsing only gh status forms, recognizing real DNS errors, refusing GraphQL not-found retries, clearing per-URL diagnostics, and restoring exit-137 handling.
Complete kunchenguid#7262 review fixes by accepting bodyless gh status lines and keeping all GraphQL errors out of transient network classification.
|
Speaking as Kun's firstmate: reviewed tip Closes claim: author body Contract-class: restore. Contribution observation already promises wakes for lasting forge failure, not transient GitHub blips. Retry-once on classified transients restores that contract without a new default-on captain surface. VISION.md (each rule):
Security: diff is Fork CI: approved after diff review (run 38630094465 in progress). Blocker — no-mistakes: Require no-mistakes failed: @LiamSarsfield — when you have a moment, could you re-raise this head through Outcome: |
|
@kunchenguid thanks for the review. The missing signature was my mistake: when I shortened the PR description I dropped the "Updates from git push no-mistakes" line. I've restored it exactly as no-mistakes wrote it for this head (03c0cbb), which hasn't changed since your review. The live-validation evidence from that run is on my fork: https://github.com/LiamSarsfield/firstmate/tree/9325dedaa57f7bd6d808fb4fb0052913fabd9873/.no-mistakes/evidence/fix/contrib-retry-7262. The compliance check for the edit is waiting for workflow approval: https://github.com/kunchenguid/firstmate/actions/runs/38647969146. Could you approve it and re-check when you have a moment? |
|
Speaking as Kun's firstmate: this is merged. Thank you @LiamSarsfield — really appreciate you taking the time on this. Squash landed as |
* fix: require explicit authority for Firstmate upstream contributions (kunchenguid#7172) * feat(bin): gate firstmate-upstream publication behind a declared home role Users who clone firstmate and run it as-is got a surprise: when their agent hit a firstmate bug, it could drive a pull request at upstream because nothing distinguished the maintainer's home from an ordinary user's. Every home now resolves to user/operator unless the gitignored config/firstmate-role grants a maintainer scope, or a single task carries the captain's recorded --upstream-consent on the brief, spawn, and promotion. fm-brief, fm-spawn, and fm-promote apply one fail-closed gate in bin/fm-role-lib.sh; the role is never inferred from gh identity, remotes, permissions, or CI, and secondmates honor only receipt-proven inherited grants so a child cannot grant itself. Session start reports the resolved role with no network call. Ordinary project delivery and the clone-and-run setup flow are unchanged. * no-mistakes(review): Harden firstmate role parsing, normalization, and inheritance * no-mistakes(review): Detect firstmate by lineage; drop consent fallback;
Summary
Retry one failed GitHub forge read when
ghreports a transient HTTP 5xx, 429, secondary-rate-limit 403, connection, DNS, or TLS error.Both attempts share the existing per-read and overall deadlines.
Persistent and non-transient failures retain a sanitized read name and error category in the observation record, without response bodies or authentication details.
HTTP 401, 404, other 4xx, and timeouts still report immediately.
Fixes #7262
GraphQL errors, including GitHub's timeout response, are not retried.
A bare
EOFconnection drop is not yet treated as transient.Validation
The 54-case contributions suite passed, including recovery from one HTTP 500, a persistent HTTP 500 with one wake and a named read, and a non-retried HTTP 404.
The changed-file test selection passed five suites, and repository lint passed with ShellCheck 0.11.0 and actionlint 1.7.12.
Live fault-injection checks covered 5xx, rate limits, network and TLS failures, timeout bounds, watcher notifications, and multi-poll failure episodes.
Pipeline
Updates from git push no-mistakes