Skip to content

fix(pipeline): stop silently truncating aggregated docs on transient GitHub errors#45

Merged
vbreuss merged 2 commits into
mainfrom
fix/aggregation-partial-content-silent-failure
Jul 10, 2026
Merged

fix(pipeline): stop silently truncating aggregated docs on transient GitHub errors#45
vbreuss merged 2 commits into
mainfrom
fix/aggregation-partial-content-silent-failure

Conversation

@vbreuss

@vbreuss vbreuss commented Jul 10, 2026

Copy link
Copy Markdown
Member

The docs aggregator fetched each file/directory with one unchecked HTTP request and wrapped the per-source loop in a catch(JsonException) that merely logged and continued. A single transient GitHub response mid-burst (a 5xx page, a truncated body, or a secondary-rate-limit throttle) threw while parsing, got swallowed, and abandoned every remaining file in that section - all with a passing build. This is why aweXpect stopped after "events", Mockolate after "benchmarks", and aweXpect.Json disappeared entirely, without CI ever failing.

Route every GitHub request through GetGithubJsonAsync, which:

  • checks the status code before parsing,
  • retries transient failures (5xx, 429, 403 secondary-rate-limit, and malformed 2xx bodies) with backoff honouring Retry-After,
  • returns null only on a genuine 404 so a legitimately absent source or README is still skipped cleanly,
  • throws on any other non-success status or exhausted retries, so a transient hiccup fails the build loudly instead of deploying a half-empty documentation set.

…GitHub errors

The docs aggregator fetched each file/directory with one unchecked HTTP
request and wrapped the per-source loop in a catch(JsonException) that
merely logged and continued. A single transient GitHub response mid-burst
(a 5xx page, a truncated body, or a secondary-rate-limit throttle) threw
while parsing, got swallowed, and abandoned every remaining file in that
section - all with a passing build. This is why aweXpect stopped after
"events", Mockolate after "benchmarks", and aweXpect.Json disappeared
entirely, without CI ever failing.

Route every GitHub request through GetGithubJsonAsync, which:
- checks the status code before parsing,
- retries transient failures (5xx, 429, 403 secondary-rate-limit, and
  malformed 2xx bodies) with backoff honouring Retry-After,
- returns null only on a genuine 404 so a legitimately absent source or
  README is still skipped cleanly,
- throws on any other non-success status or exhausted retries, so a
  transient hiccup fails the build loudly instead of deploying a
  half-empty documentation set.
@vbreuss vbreuss self-assigned this Jul 10, 2026
@vbreuss vbreuss added the bug Something isn't working label Jul 10, 2026
A listing-level 404 previously logged a warning and skipped the whole
slice, silently dropping an entire documentation section. Since every
aggregated source is a hardcoded, non-optional slice, a 404 means the
configured repo/path is wrong -- fail loudly instead, matching the
child-level 404 handling.
@vbreuss
vbreuss force-pushed the fix/aggregation-partial-content-silent-failure branch from c3a0292 to 3603889 Compare July 10, 2026 19:39
@vbreuss
vbreuss enabled auto-merge (squash) July 10, 2026 19:40
@vbreuss
vbreuss merged commit 5d2b27e into main Jul 10, 2026
3 checks passed
@vbreuss
vbreuss deleted the fix/aggregation-partial-content-silent-failure branch July 10, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant