You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
node: cover the window pull-through 'served-but-not-cached' path (node_pull_through_tee_finalize_failed) #896
kind:testTest coverage, flakes, fixtures or the e2e harnessprio:lowWhen convenientrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Follow-up from the #893 review (implements #856). Test-coverage gap.
Gap
crates/node/src/handlers/client.rs finalize meters node_pull_through_tee_finalize_failed for the case where bytes were served and paid but tee.finish() failed to promote the blob (warm-cache benefit forfeited, delivery still succeeded). This alertable "served but not cached" condition currently has zero test coverage — distinct from upstream_verify_failed, which is covered.
Note the #893 review also split this path: a tee HashMismatch (forwarded vs teed streams diverge) now logs at error while a store fault logs at warn. A test that forces a store-side promote failure on an otherwise-good delivery would pin both the metric and the served-anyway behavior.
Why deferred
Needs a store-side promote failure injected on an otherwise-successful delivery, which is non-trivial to trigger deterministically in the current harness.
A test-coverage gap filed from the #893 multi-agent review, as a follow-up to the #856 implementation. The node_pull_through_tee_finalize_failed metric path in crates/node/src/handlers/client.rs — covering the "bytes served and paid, but blob not promoted to cache" scenario — has zero coverage. The issue also calls out the #893-introduced log-level split (HashMismatch → error, store fault → warn) as a second invariant to pin.
📊 Assessment
Dimension
Value
Reasoning
Type
Task
Test-coverage gap, not a defect in shipped behavior
Labels
rust, testing, low (unchanged)
Already applied correctly; low is appropriate since delivery still succeeds on this path
Coding agent
Needs more info
Scope is clear, but the harness challenge (injecting a store-side finish() failure on an otherwise-successful delivery) may need a mock/trait shim that doesn't exist yet — agent would need to verify what testability seams are available
HashMismatch — forwarded and teed byte streams diverge → should log at error, metric fires.
Store fault — tee.finish() returns an Err (promote fails, e.g., I/O or internal store error) → should log at warn, metric fires, delivery still returns success to client.
Approach to unblock:
Check crates/cache/ for any existing finish() / promote test helpers or mock BlobStore traits. If a MockBlobStore or FakeStore exists, it may already support failure injection.
If not, the minimal lift is to introduce a thin TeeFinisher trait (or use a closure/Box<dyn FnOnce>), allow tests to swap in a failing impl without touching production paths.
Alternatively, if iroh-blobs exposes in-memory store implementations (likely under #[cfg(test)]), a pre-sabotaged store could be constructed directly.
Checklist:
Audit existing client.rs test harness for store injection points
Add test: store-fault path → node_pull_through_tee_finalize_failed incremented, no error returned to client, log at warn
Add test: HashMismatch path → metric fires, log at error
Confirm upstream_verify_failed test is not accidentally covering either new case (false green)
kind:testTest coverage, flakes, fixtures or the e2e harnessprio:lowWhen convenientrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Activity
fix(node): address PR #893 review round 2 (deposit-guard doc, error s…
github-actions commentedon Jun 13, 2026
🎯 Triage report
A test-coverage gap filed from the #893 multi-agent review, as a follow-up to the #856 implementation. The
node_pull_through_tee_finalize_failedmetric path incrates/node/src/handlers/client.rs— covering the "bytes served and paid, but blob not promoted to cache" scenario — has zero coverage. The issue also calls out the#893-introduced log-level split (HashMismatch → error, store fault → warn) as a second invariant to pin.📊 Assessment
rust,testing,low(unchanged)lowis appropriate since delivery still succeeds on this pathfinish()failure on an otherwise-successful delivery) may need a mock/trait shim that doesn't exist yet — agent would need to verify what testability seams are available🔗 Similar issues
#856fix introduced thetee.finish()path now needing coverage💡 Notes and suggestions
Two sub-cases to cover (from the #893 split):
error, metric fires.tee.finish()returns an Err (promote fails, e.g., I/O or internal store error) → should log atwarn, metric fires, delivery still returns success to client.Approach to unblock:
crates/cache/for any existingfinish()/ promote test helpers or mockBlobStoretraits. If aMockBlobStoreorFakeStoreexists, it may already support failure injection.TeeFinishertrait (or use a closure/Box<dyn FnOnce>), allow tests to swap in a failing impl without touching production paths.iroh-blobsexposes in-memory store implementations (likely under#[cfg(test)]), a pre-sabotaged store could be constructed directly.Checklist:
client.rstest harness for store injection pointsnode_pull_through_tee_finalize_failedincremented, no error returned to client, log atwarnHashMismatchpath → metric fires, log aterrorupstream_verify_failedtest is not accidentally covering either new case (false green)Add this agentic workflows to your repo
To install this agentic workflow, run
feat(node): window-paced pull-through for regional proxy warming (#856)…
test(node): cover window pull-through served-but-not-cached finalize …
test(node): retire fused-tee tee_finalize_failure from the decoupled …
feat(node): decoupled serve-miss pull+serve legs (#1651)