Skip to content

fix(cache): classify retriable http outboard GET statuses as transient faults - #2853

Merged
thiras merged 3 commits into
mainfrom
claude/jovial-jones-593137
Nov 6, 2026
Merged

thiras merged 3 commits into
mainfrom
claude/jovial-jones-593137

Conversation

@yigitdot

@yigitdot yigitdot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

HttpOrigin::get_outboard_bounded mapped every non-success, non-404 status — 500/503 included — to a silent OutboardFetch::Unsupported, indistinguishable from an origin that publishes no outboards. While the origin erred, every range pull degraded to the buffered whole-blob path with no log at any level. The s3 adapter already classifies its GetObject errors. get_range_bytes had the same defect on the ranged data GET: a 503 read as "origin cannot serve ranges", logged at debug only.

  • Retriable statuses (5xx/408/429, via is_transient_status) on the outboard GET and the ranged data GET now surface as OriginPullError::Transient. The serve-miss probe latches the fault, counts it in node_pull_through_errors_total, and still degrades the pull to a whole-blob populate; with no fill tier the refusal is InternalError, not NotFound.
  • Other outboard declines (401/403/3xx and other 4xx such as 400/405/410) stay Unsupported and warn once per origin per status class, then log at debug — an origin that answers 403 for a missing key would otherwise warn on every cold miss. Known limit: the warn-once lasts until node restart; a decline counter is tracked in cache: add a counter metric for outboard declines #2855.
  • The Origin::fetch_outboard contract now says an adapter may degrade a deterministic non-404 decline (HTTP does; S3 faults it Permanent).
  • Tests: is_transient_status table, outboard/range 503 → Transient, range 404 → Unsupported, warn-once per class (bit logic and the WARN-then-DEBUG log level, via a shared test-only LogBuffer), and node tests for whole-blob fallback and the InternalError refusal on an outboard 503.

Closes #2826
Closes #2856

🤖 Generated with Claude Code

…t faults

HttpOrigin::get_outboard_bounded mapped every non-success, non-404
status — 500/503 included — to a silent OutboardFetch::Unsupported,
indistinguishable from an origin that publishes no outboards. While the
origin erred, every range pull degraded to the buffered whole-blob path
with no log at any level.

Retriable statuses (5xx/408/429, via is_transient_status) now surface
as OriginPullError::Transient; other declines (401/403/3xx) stay
Unsupported but warn.

Closes #2826

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 14:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-code-quality

github-code-quality Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Rust

Rust / code-coverage/cargo-llvm-cov

main b5e29ae claude/jovial-jones-... a0c138c +/-
77% 77% 0%
View coverage of the 7 most impacted files.
File main b5e29ae claude/jovial-jones-... a0c138c +/-
crates/node/src...ckend_source.rs 92% 90% -2%
crates/node/src/dht/publish.rs 78% 77% -1%
crates/node/src...s/client/mod.rs 95% 95% 0%
crates/client/src/lib.rs 89% 90% +1%
crates/cache/sr.../origin/http.rs 94% 95% +1%
crates/protocol/src/framing.rs 92% 93% +1%
crates/cache/sr.../log_capture.rs 0% 82% +82%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 06, 2026 16:23 UTC

…cline class

get_range_bytes mapped a 5xx/408/429 on a ranged data GET to a silent
decline, the same defect as the outboard GET: the serve-miss probe read
an outage as an origin that cannot serve ranges, logged it at debug and
recorded no fault. Retriable statuses now surface as
OriginPullError::Transient.

A deterministic outboard decline (401/403/3xx) warns once per origin
per status class and logs at debug after that, so an origin that
answers 403 for a missing key does not warn on every cold miss.

The Origin::fetch_outboard contract now says an adapter may degrade a
deterministic non-404 decline to Unsupported. Adds an is_transient_status
table test, range GET 503/404 tests, and node tests that an outboard 503
still delivers via whole-blob fallback and refuses as InternalError when
no fill tier serves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
outboard_decline_warns_once_per_status_class checks only the bit logic,
so it passes with the warn!/debug! arms of log_outboard_decline swapped.
The new test captures formatted output and pins one WARN line, then one
DEBUG line, for two 403 declines. LogBuffer moves from fs/tests.rs to a
shared test-only origin::log_capture module so both adapters use it.

Closes #2856

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@yigitdot
yigitdot requested a review from thiras November 6, 2026 16:20
@thiras
thiras requested a balanced review from Copilot November 6, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the HTTP origin error-handling and fallback changes.

No open issues 🎉

Review effort: Balanced

@thiras
thiras merged commit a9fb9c7 into main Nov 6, 2026
39 checks passed
@thiras
thiras deleted the claude/jovial-jones-593137 branch November 6, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants