Skip to content

feat(node): route own-origin serve-miss through the two-leg driver; delete window_forward_loop - #1655

Merged
alpergundogdu merged 9 commits into
mainfrom
claude/upbeat-grothendieck-f24abe
Aug 11, 2026
Merged

alpergundogdu merged 9 commits into
mainfrom
claude/upbeat-grothendieck-f24abe

Conversation

@alpergundogdu

@alpergundogdu alpergundogdu commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Routes the node's own-origin (fs/http/s3) cache-miss serve path through the same
two-leg drive() + serve_leg machinery the node→node peer path already uses
(merged in #1651), then deletes the last fused window_forward_loop caller — so
there is now one serve spine for every source.

A cache miss the node can fill from its own configured origin now runs a
pull leg (run_local_pull_leg → decdn_client_pull::drive over a new
BackendSource, filling the cache) beside a serve leg (serve_leg, reused
verbatim — streams the filling cache to the paying client, gated on the PAID
frontier). The fused serve_via_local_outboard / window_forward_loop /
ProgressiveSource / LocalOutboardPull / TeeSink path is deleted.

What changed

  • BackendSource: BlobSource (in node, not client-pull — CLI binary-split regression: publisher links cache crate (iroh-blobs/AWS SDK) #578): presents
    own-origin content as header-less interleaved bao wire per AlignedRange, so the
    existing NodeAdmitStore / admit_bao_stream sink verifies-and-stores it against
    the blake3 root exactly as the peer path does. A corrupt/misconfigured origin
    fails the pull with VerifyFailed, scored as a local-origin fault (there is
    no upstream). New cache surface: origin_encode_range, origin_fetch_outboard_bytes.
  • run_local_pull_leg: the no-payment pull leg. No channel / discovery / ledger
    / Funder. Reuses the shared coordination (served_paid / pull_ended /
    pull_result / cancel + SharedOutboard capture) and the cancel/drain teardown.
    Keeps the downstream WindowPacer bound on served_paid (Remove speculative client-less background warm (unpaid-egress → paid-ingress deposit-drain surface) #1610 + storage/egress
    exposure) — the free upstream still never runs unboundedly ahead of the paying
    client.
  • serve_via_backend_origin: the own-origin serve orchestration, mirroring the
    peer twin serve_via_window_pull_through minus the paid-upstream axes. Reuses
    serve_leg verbatim; keeps the interior-hold shared-outboard seed, mid-stream
    takedown, and client-disconnect handling; holds an open_tee_sink reservation as
    the whole-blob same-hash coalescing guard (matching the peer path and the old path).
  • Deleted: serve_via_local_outboard, window_forward_loop,
    abandon_window_serve, ProgressiveSource (whole handlers/client/source.rs),
    open_local_outboard_pull / LocalOutboardPull / LocalOutboardHeader
    (cache/src/local_outboard_pull.rs), and the now-dead TeeSink /
    TeeReservation::begin plaintext-import machinery. Kept
    open_tee_sink / TeeOpen / TeeReservation (the coalescing guard the peer path
    still uses). Also removed the vestigial BaoVerifyMarker /
    StreamCommitOutcome::VerifyFailed (producer deleted with the tee).

The unpaid pull leg completes because drive's per-gap completion is paid-frontier
gated: BackendSource self-advances a local bookkeeping ledger on finish by
the leg's header-stripped wire bytes at rate 0 (no channel/voucher/chain — matches
the ScriptedSource::paying precedent). The real downstream payment path
(serve_leg, the client's own channel) is untouched.

Tests

  • Own-origin full-miss serves a coherent, hash-verifying whole blob (loopback).
  • Interior-hold: node holds an interior range; origin fills only the gaps;
    client gets the whole blob byte-exact (asserts the held range is read locally, not
    re-fetched — proves range-minimization + the shared-outboard held-range seed).
  • No-hang: an origin fetch failure fails the serve rather than hanging (unit at
    the pull-leg level + integration at the serve level, timeout-guarded).
  • Coalescing: two concurrent same-hash own-origin misses collapse to one origin
    pull.
  • Existing anvil-e2e origin_stream_while_store (3 journeys) now exercise
    serve_via_backend_origin end-to-end and pass.

Full workspace cargo build / clippy --all-targets -D warnings / nextest /
fmt green.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added verified range-based origin fetching and wire encoding.
    • Added stream-while-store support for complete and partially cached content.
    • Added concurrent request coalescing so simultaneous requests share an in-progress fill.
    • Added fallback handling when range requests or origin data are unavailable.
  • Bug Fixes

    • Origin verification failures now produce clear hard errors instead of serving corrupt content.
    • Improved cancellation, timeout, and completion handling during origin pulls.
  • Tests

    • Expanded coverage for partial ranges, origin failures, corrupt data, caching, and concurrent requests.

alpergundogdu and others added 8 commits August 11, 2026 15:32
…dSource

Add the unpaid own-origin serve-miss substrate (FA.1):

- cache: `CacheEngine::origin_encode_range` returns header-full verified bao
  wire for one `AlignedRange`, hard-faulting `VerifyFailed` on a corrupt own
  origin (no degrade — the node has committed to serving under H), plus
  `origin_fetch_outboard_bytes` as the serviceability probe. Both share a new
  `origin_fetch_range_bytes` fetch+meter helper factored out of
  `range_pull_attempt`.
- node: `BackendSource` implements `decdn_client_pull::BlobSource` over the
  cache's own origin, stripping the 8-byte size header and advancing a local
  `ChannelLedger` completion counter at rate 0 in `finish` so the driver's
  paid-frontier gap loop can terminate without any payment axis.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Add `run_local_pull_leg`, the unpaid own-origin twin of `run_pull_leg`. It
drives `decdn_client_pull::drive` over the FA.1 `BackendSource` instead of a
paid `PeerSource`, reusing the serve-leg coordination, shared-outboard capture,
`WindowPacer`+leech pacer, and cancel/`ABANDON_DRAIN` teardown verbatim. Every
paid-path axis (discovery, channel open, `NodeFunder`, provider scoring, region
accounting, `SettleOnDrop`) drops out — there is no counterparty; a `drive`
error is a LOCAL-origin fault, never scored upstream.

The driver's paid-frontier completion is satisfied by the LOCAL bookkeeping
ledger the `BackendSource` advances on `finish` (rate 0 wire bytes), plus a
benign `local_bookkeeping_ctx` (deposit U256::MAX) and a `NullFunder`, so a
`drive` over the unpaid source terminates instead of re-drawing forever (THE
CRUX). Adds `BackendSource::ledger()` so the source and driver share one ledger.

Tests: a full-miss local pull terminates under a hard timeout and fills the
cache byte-exact (the no-hang proof, 0.085s); an origin transport fault and a
corrupt origin each terminate with `Err` without hanging.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…fa.3a)

Add `serve_via_backend_origin`, the local twin of the peer window path
(`serve_via_window_pull_through`) with every paid-upstream axis stripped and
no tee: it fills the cache from this node's own fs/http/s3 origin via the
unpaid `run_local_pull_leg` (FA.2) beside `serve_leg` (reused verbatim),
streaming a coherent hash-verifying whole-blob delivery to the paying client.

Rewire dispatch: the whole-blob own-origin miss gate now confirms
serviceability with `origin_size` + `origin_fetch_outboard_bytes` and, when
serviceable, serves via `serve_via_backend_origin`; declines/faults degrade to
the buffered local populate exactly as before. The tee-based `TeeOpen::InFlight`
coalescing arm is dropped on this branch (the local pull fills via the cache,
not a tee; B3 owns range-aware coalescing).

Delete the node-side fused path now dead after the rewire:
`serve_via_local_outboard`, `window_forward_loop`, `abandon_window_serve`,
`handlers/client/source.rs` (`ProgressiveSource`), and the now-orphaned
`leech_record_pulled`. `TeeReservation`/`open_tee_sink` stay (peer path uses
them); the cache-crate `LocalOutboardPull`/`TeeSink` machinery is left for
FA.3b. Preserves mid-stream takedown, client-disconnect, the
`local_outboard_serve` metric, and the interior-hold shared-outboard seed.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…s (flow a fa.3b part a+c)

After FA.3a the node fused serve-miss path is gone, leaving
open_local_outboard_pull / LocalOutboardPull / LocalOutboardHeader with
only cache-test callers. Remove the whole local_outboard_pull module, the
engine accessor, the pub use, and the tests that exercised it
(local_outboard_pull_streams_full_wire, local_outboard_pull_none_without_outboard,
and the both_proof_sources_emit_identical_wire_bytes pull-through test
whose source-1 was the deleted pull). Drop the now-unused OriginFetch import.

Fix doc/inline comments that named deleted symbols: metrics counters now
point at serve_via_backend_origin; the surviving serve_via_window_pull_through
comments point at the two-leg serve_leg mechanism instead of the deleted
window_forward_loop; the stream-while-store e2e narrative no longer names
open_local_outboard_pull.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…fa.3b part b)

After FA.3a the whole-blob node tee is gone; TeeSink and
TeeReservation::begin had only cache-test callers. The compiler confirms
the separation from the alive stream-import machinery is clean: removing
TeeSink, begin, and the tee-exclusive bao_decoded_source leaves the
survivors (import_and_verify_stream, ChannelRecvStream, StreamCommitOutcome,
BaoVerifyMarker, admit_bao_stream) compiling under -D warnings with no
gutting — only tee-only imports fell out.

- Delete TeeSink (struct/impl/Drop), TeeReservation::begin, bao_decoded_source,
  and the five .begin()-driven tests plus their header_less helper.
- TeeReservation is now a pure coalescing guard: drop the begin-only `active`
  field; Drop always releases the in-flight claim. open_tee_sink / TeeOpen /
  TeeReservation / abandon stay for the peer serve-miss path.
- Keep the (now-vestigial-but-defensive) is_bao_verify_marker check and
  BaoVerifyMarker in import_and_verify_stream, per the survivor keep-list.
- Rename TEE_SINK_CHANNEL_CAP -> ADMIT_STREAM_CHANNEL_CAP (its sole remaining
  user is admit_bao_stream); drop orphaned bao-decoder imports.
- Reword doc/inline comments on the surviving tee machinery to describe the
  admit_bao_stream / two-leg reality instead of the deleted TeeSink.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…sts (flow a fa.4)

Add two `cdn/client/v1` loopback integration tests for the own-origin two-leg
serve path, mirroring the FA.3a full-miss test and reusing its harness:

- interior_hold_own_origin_miss_pulls_only_the_gaps: the node already holds an
  aligned interior range; the whole-blob serve pulls ONLY the surrounding gaps
  from origin (asserts zero ranged GETs overlap the held span, both gaps are
  drawn), the client gets the whole blob byte-exact, and the own-origin tier
  fires once. Proves range-minimized pull + the shared-outboard held-range seed.
- own_origin_serve_fails_not_hangs_on_origin_fetch_error: serviceability passes
  and ok:true is signed, but the ranged data GET returns 500; wrapped in a
  timeout so a hang is a failure. Asserts the client sees a delivery error, not
  a clean blob — the integration twin of FA.2's run_local_pull_leg no-hang unit.

Own-origin cold-serve anvil-e2e is already covered by origin_stream_while_store
journey 1 (same serve_via_backend_origin tier), so no duplicate e2e was added.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…anch

serve_via_backend_origin dropped the in-flight double-pull claim its peer
twin serve_via_window_pull_through keeps, so two concurrent same-hash
whole-blob own-origin misses each spawned a local pull leg and admitted the
same hash concurrently (double origin egress). Mirror the peer path exactly:
dispatch wraps the serve in an open_tee_sink match (Owner serves passing the
reservation; InFlight awaits the coalesced fill then serves from store), and
serve_via_backend_origin holds the TeeReservation as the guard, abandoning it
on every early return and at teardown. Serviceability is probed before the
claim so a non-serviceable origin degrades without taking a slot.

Adds concurrent_whole_blob_own_origin_misses_coalesce_to_one_pull: two staggered
same-hash whole-blob requests coalesce to one origin ranged GET, both clients
get the blob byte-exact.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Flow A deleted bao_decoded_source, the sole constructor of the private
BaoVerifyMarker type. With no constructor, is_bao_verify_marker could
never return true, so its branch in import_and_verify_stream was
unreachable and StreamCommitOutcome::VerifyFailed had no producer.

Delete the marker struct and its impls, the predicate fn, the unreachable
branch, and the now-producerless VerifyFailed variant (plus its sole
defensive consumer arm in the pull-through outcome mapping). Corruption is
still caught by the whole-blob actual != hash check (HashMismatch) on the
origin path and by classify_import_bao_reader_error (CacheError::VerifyFailed)
on the admit_bao_stream path.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copilot AI lite review requested due to automatic review settings August 11, 2026 17:09
@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@alpergundogdu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 32 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Free

Run ID: 006568d2-a8da-46ed-b308-5bba21161a31

📥 Commits

Reviewing files that changed from the base of the PR and between f16ff3d and c2640a8.

📒 Files selected for processing (2)
  • crates/cache/src/engine.rs
  • crates/node/src/handlers/client/window.rs

Walkthrough

The cache now uses verified origin range fetching and direct Bao admission. Node requests use backend-origin filling with separate pull and serve legs, shared coalescing, explicit cancellation, and hard verification failures. New tests cover full misses, partial gaps, failures, outboard lookup, and concurrent requests.

Changes

Backend-origin streaming

Layer / File(s) Summary
Range fetching and admission
crates/cache/src/engine.rs, crates/cache/src/lib.rs, crates/cache/src/local_outboard_pull.rs, crates/cache/tests/*
CacheEngine now provides raw range fetching, outboard retrieval, and verified range encoding. The local outboard pull API and TeeSink export were removed. Tee reservations now own coalescing claims directly.
Dispatch and coordinated serving
crates/node/src/handlers/client/*, crates/node/src/metrics.rs, crates/e2e/tests/origin_stream_while_store.rs
Client dispatch probes origin size and outboard availability before selecting serve_via_backend_origin. The serving path uses separate serve and local-pull legs with cancellation and coalescing.
Own-origin pull source and driver
crates/node/src/node_origin/backend_source.rs, crates/node/src/node_origin/pull_leg.rs, crates/node/src/node_origin/mod.rs
BackendSource verifies origin ranges and reports zero-rate completion metadata. run_local_pull_leg fills the cache, handles cancellation and local faults, and records terminal results.
Origin integration validation
crates/node/tests/origin_range_pull.rs
Integration tests cover whole-blob fills, interior cache gaps, origin failures, exact delivery, and concurrent same-hash coalescing.

Estimated code review effort: 5 (Critical) | ~90+ minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Dispatch
  participant CacheEngine
  participant BackendSource
  participant ServeLeg
  participant PullLeg
  Client->>Dispatch: request blob
  Dispatch->>CacheEngine: probe origin size and outboard
  CacheEngine-->>Dispatch: serviceability result
  Dispatch->>ServeLeg: start backend-origin response
  Dispatch->>PullLeg: start local cache fill
  PullLeg->>BackendSource: fetch and verify Bao ranges
  BackendSource->>CacheEngine: commit verified ranges
  ServeLeg-->>Client: stream verified blob
  PullLeg-->>ServeLeg: publish completion or fault
Loading

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Coverage report

Total: 80.46% (was 80.17%, ▲ +0.29%) — 62443/77608 lines

File Coverage Lines Δ
crates/cache/src/engine.rs 91.64% 3498/3817 ▲ +0.31%
crates/cache/src/lib.rs 100.00% 28/28 ● 0.00%
crates/cache/src/local_outboard_pull.rs — — deleted
crates/node/src/handlers/client/dispatch.rs 86.10% 384/446 ▲ +4.20%
crates/node/src/handlers/client/fill.rs 65.00% 91/140 ▲ +2.24%
crates/node/src/handlers/client/mod.rs 89.08% 522/586 ● 0.00%
crates/node/src/handlers/client/source.rs — — deleted
crates/node/src/handlers/client/window.rs 77.39% 332/429 ▲ +42.46%
crates/node/src/metrics.rs 95.67% 1105/1155 ● 0.00%
crates/node/src/node_origin/backend_source.rs 74.90% 197/263 new
crates/node/src/node_origin/mod.rs 90.09% 1000/1110 ● 0.00%
crates/node/src/node_origin/pull_leg.rs 85.15% 579/680 ▼ 3.36%
History
Commit Total Δ vs base
f16ff3d 80.46% ▲ +0.29%
c2640a8 (HEAD) 80.46% ▲ +0.29%

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.

Pull request overview

This PR unifies the node’s own-origin (fs/http/s3) cache-miss serve path with the existing two-leg serve-miss spine (pull leg + serve leg), and removes the last remaining fused window_forward_loop-based local-outboard implementation. It introduces an unpaid own-origin BlobSource (BackendSource) that feeds verified header-less bao wire into the same cache-admit + coherent serve machinery used for peer pulls.

Changes:

  • Add Flow A unpaid own-origin pull leg (run_local_pull_leg) and BackendSource: BlobSource, routing own-origin miss serves through drive() + serve_leg.
  • Remove the fused local-outboard streaming path and associated types (window_forward_loop, ProgressiveSource, LocalOutboardPull, TeeSink, etc.).
  • Add/adjust integration + unit coverage for own-origin full miss, interior-hold gap minimization, no-hang on origin failure, and coalescing.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/node/tests/origin_range_pull.rs Adds Flow A integration tests (full miss, interior-hold gap minimization, no-hang, coalescing).
crates/node/src/node_origin/pull_leg.rs Adds unpaid own-origin pull leg (run_local_pull_leg) and bookkeeping funder/context.
crates/node/src/node_origin/mod.rs Exposes BackendSource + run_local_pull_leg for Flow A orchestration.
crates/node/src/node_origin/backend_source.rs Implements unpaid BlobSource over CacheEngine::origin_encode_range with local ledger completion.
crates/node/src/metrics.rs Updates tier naming/documentation for serve_via_backend_origin.
crates/node/src/handlers/client/window.rs Replaces serve_via_local_outboard + window_forward_loop with serve_via_backend_origin two-leg orchestration.
crates/node/src/handlers/client/dispatch.rs Updates dispatch routing and serviceability probe logic for own-origin two-leg serves.
crates/node/src/handlers/client/mod.rs Removes now-dead client handler source module wiring (source.rs / TeeSink usage).
crates/node/src/handlers/client/fill.rs Removes leech_record_pulled helper (accounting moved into pull-leg pacer).
crates/node/src/handlers/client/source.rs Deletes ProgressiveSource (no longer needed after fused loop removal).
crates/e2e/tests/origin_stream_while_store.rs Updates e2e test docs to reflect serve_via_backend_origin.
crates/cache/tests/serve_store.rs Updates test comment to reflect new reference-encoding pattern.
crates/cache/tests/pull_through.rs Removes wire-equivalence test that depended on open_local_outboard_pull.
crates/cache/src/local_outboard_pull.rs Deletes LocalOutboardPull implementation (fused path removed).
crates/cache/src/lib.rs Removes local_outboard_pull exports and updates crate-level docs.
crates/cache/src/engine.rs Adds Flow A origin fetch/encode helpers (origin_encode_range, origin_fetch_outboard_bytes) and removes tee-sink machinery.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +702 to 711
Err(e) => {
// The pull could not start: record a terminal error and
// wake the serve leg so it fails a gap rather than hanging.
if let Ok(mut guard) = pull_result.lock() {
*guard = Some(Err(anyhow::anyhow!(
"serve-miss local pull runtime build failed: {e}"
)));
}
pull_ended.notify_waiters();
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. The runtime-build-failure arm now writes pull_result through unwrap_or_else(std::sync::PoisonError::into_inner) instead of if let Ok(..), so pull_result is always Some(..) before pull_ended fires (a poisoned lock no longer leaves it None while the serve encoder waits on a permit-less notify_waiters). Applied to both this local twin and the identical peer twin (serve_via_window_pull_through), which shared the same latent hang.

Comment on lines +2346 to +2367
pub async fn origin_fetch_outboard_bytes(
&self,
hash: Hash,
total_bytes: u64,
) -> CacheResult<Option<Bytes>> {
let outboard_max = expected_outboard_len(total_bytes).saturating_add(64);
for origin in &self.inner.origins {
match origin.fetch_outboard(hash, outboard_max).await {
Ok(OutboardFetch::Found(ob)) => return Ok(Some(ob)),
Ok(OutboardFetch::NotFound | OutboardFetch::Unsupported) => {}
Err(e) => {
tracing::debug!(
%hash,
kind = ?origin.kind(),
error = %e,
"origin outboard fetch failed; trying next origin",
);
}
}
}
Ok(None)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. origin_fetch_outboard_bytes now remembers a genuine per-origin transport Err and returns it (as CacheError::OriginError) when NO origin serves the outboard, so the dispatch.rs Err(e) arm that latches fault_seen (#1129) is now reachable — an outboard-probe transport fault terminates a resulting own-origin miss as InternalError, not a bare NotFound. A clean decline (all NotFound/Unsupported) still returns Ok(None) and degrades silently. Added a cache unit test (origin_fetch_outboard_bytes_surfaces_a_transport_fault). (Note: the pre-existing origin_size probe still swallows per-origin faults by the same best-effort convention; a genuine fault there is re-latched downstream by try_local_populate — left unchanged as out of scope for this PR.)

…e-build failure; surface outboard-probe transport faults

Two Copilot review findings on the Flow A two-leg serve path:

- The pull-thread runtime-build-failure arm wrote `pull_result` via
  `if let Ok(guard)`, so a poisoned lock left it `None` while still firing
  `pull_ended` — and `notify_waiters` stores no permit, so a late-waking serve
  encoder would hang. Write through `unwrap_or_else(PoisonError::into_inner)` so
  `pull_result` is ALWAYS `Some(..)` before `pull_ended`, matching the
  recover-poison the pull legs already use. Applied to both the own-origin twin
  (`serve_via_backend_origin`) and the identical peer twin
  (`serve_via_window_pull_through`).

- `CacheEngine::origin_fetch_outboard_bytes` swallowed every per-origin transport
  `Err` and returned `Ok(None)`, making the `dispatch.rs` `Err` arm that latches
  `fault_seen` (#1129) unreachable — an outboard-probe transport fault was
  misclassified as a clean degrade (a resulting own-origin miss would report
  `NotFound` instead of `InternalError`). Remember the last transport fault and
  return it when NO origin serves the outboard; a clean `NotFound`/`Unsupported`
  decline still degrades via `Ok(None)`. Adds
  `origin_fetch_outboard_bytes_surfaces_a_transport_fault`.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.

2 participants