Repository navigation
Description
Context / classification
Maintenance leaf linked to #1339; related telemetry/calibration #868. This does not become a runtime authority or universal next-release blocker. It is required only for any selected release claim that depends on this scheduled quality dataset; otherwise retain it as non-blocking maintenance and do not claim fresh calibration from failed runs.
Observed on 2026-10-09, main@266260b454dbb7efd383bf1366162a204c4bdf72: Quality Backfill run 37906291833, job 113740447037, builds successfully, then Collect GitHub receipts fails with HTTP 502: 502 Bad Gateway (https://api.github.com/graphql). The compact backfill build is skipped, and publication-tree validation correctly refuses upload of an unbuilt result. Do not weaken that guard. The earlier October 8 run was also red, but this issue does not assert an identical root cause without its log.
Fresh open-issue search for 502/backfill found no dedicated owner. Recheck before implementation.
One-PR outcome
Add bounded retry/classification to the read-only GitHub collection boundary and preserve a small explicit collection-failure receipt when the upstream remains unavailable. Successful complete datasets and unavailable/partial collections cannot be confused.
Scope
- Inspect
.github/workflows/quality-backfill.ymland the current quality GitHub collector entry points; identify the actual failingghread operation instead of attributing every step failure to the Rust collector. - Retry only classified transient transport/5xx failures with an explicit attempt limit, bounded backoff and total deadline. Inject clock/transport for tests. Authentication/permission failures, semantic GraphQL errors, malformed successful payloads and exhausted rate limits retain distinct non-success reasons; do not retry indiscriminately.
- Validate each successful response before atomically replacing its staged file. Do not commit partial/malformed JSON as a complete source dataset or discard a prior complete snapshot without explicit provenance.
- Emit bounded metadata for command/operation ID, attempts, status category, source window, collection completeness and final reason; no tokens, authorization headers or unbounded response bodies.
- Keep prior valid backfill separate and explicitly stale. Never merge missing current sources as empty results, report zero findings or fabricate calibrated success.
- Retain a dedicated failure diagnostic artifact under its own schema/name when normal backfill creation is skipped. The success publication tree and its verification guard remain unchanged.
Acceptance
- 502 then valid success retries within budget and produces one validated complete source dataset.
- Repeated 5xx/timeouts exhaust deterministically, yielding
upstream_unavailableor equivalent explicit receipt, not code failure or successful empty calibration. - 401/403, rate-limit exhaustion, semantic GraphQL error and malformed JSON have distinct tests and do not enter an unbounded retry loop.
- Partial write or interruption does not publish a complete-source marker or overwrite valid prior bytes with malformed data.
- Prior data cannot masquerade as current; dates/window/source completeness are explicit.
- Failed collection leaves compact-success publication refused while preserving a bounded diagnostic artifact.
- Retry recovery creates no duplicate collected rows or side effects.
- Fake-clock/transport tests, workflow/actionlint/policy checks, relevant Rust tests and exact-head required checks pass.
Non-goals / rollback
No new learned policy, provider orchestration, GitHub credentials/permissions change, schedule expansion, package publication or CI-result authority change. Retain fail-closed collection and diagnostic receipts if retry is disabled. No automatic rerun of hosted workflows is authorized by filing this issue.
Activity
EffortlessSteven commentedon Oct 10, 2026
Taking the bounded bootstrap repair. The current quality-backfill workflow invokes
gh run listandgh pr listdirectly into final source files underset -e, so a transient GraphQL HTTP502 aborts the lane and can leave a truncated source. The existing publication-tree guard correctly refuses a failed backfill and will remain unchanged.Scope: a small owned helper around those two fixed read-only bootstrap queries, classified finite retries/deadline, validated staged JSON, a marker distinguishing complete query results from an unavailable bootstrap, and a separate bounded diagnostic receipt/artifact. Later Rust per-PR collection and gate-artifact downloads keep their current behavior; this will not claim all GitHub I/O is now resilient. Existing previous quality data is never presented as current after bootstrap failure. Local fake-transport/process tests and PR-only workflow validation will execute without tokens or network. No runtime writer, analyzer policy, publishing permission or protection setting changes.
fix(ci): preserve quality data through transient GitHub bootstrap fai…
EffortlessSteven commentedon Oct 10, 2026
Bounded bootstrap repair merged and verified
PR #1351 merged normally as 7453db0. A fresh main read confirms tree 1c547fc37bf76930755b10d2fdbecf7336850e52, identical to the exact reviewed/tested d8aac95 candidate.
The observed boundary is now repaired: both fixed bootstrap queries have bounded classified retries, validated complete source staging, previous-snapshot retention, distinct unavailable diagnostics, and process-group cleanup after timeout. The normal successful-backfill publication guard remains unchanged. Fresh artifact/trend inputs are cleared after bootstrap success so a reused checkout cannot accidentally combine old downloads with current sources.
Acceptance evidence:
Full proof and artifact digest: #1351 (comment) .
This closes the source repair for the observed bootstrap failure. It does not claim that a subsequent live scheduled backfill has succeeded, that every later per-PR/API/artifact download now retries, or that retained old data is current calibration. Those operational outcomes must be observed separately. Guarantees are trusted single-writer/handled-error guarantees, not crash-durable filesystem transactions. No schedule expansion, release publication, credential, protection or CI-result-authority change occurred.