Skip to content

roundup: small untracked follow-ups from the deferred-work sweep #1565

Closed

Description

@thiras

Roundup of small, verified, untracked follow-ups from the deferred-work sweep. Each can be promoted to its own issue when picked up.

  • cache retry amplification (crates/cache/src/retry.rs:41): N concurrent waiters on one missing hash can each become owner in turn and run a full retry budget sequentially — up to N budgets against a down origin. The comment calls the shared retry-budget "not implemented"; decide whether the accepted trade-off needs a bound.
  • DHT BatchStore handler (crates/protocol/src/dht.rs:28,179,308): ADR 022 discriminants 4/5 exist as wire types only; inbound BatchStore is closed with APP_ERR_UNSUPPORTED_MESSAGE and senders fall back to per-hash Store. Correct but chatty; the deferred handler (admission + two-stage rate-limit accounting) is untracked.
  • Multicall3 batching for bond-registry bootstrap (crates/node/src/dht/capacity_bond_registry.rs:352): bootstrap_registry does an isActive call per entry on each paginated getActiveNodes read, repeated every 15-minute resync.
  • S3 body-phase error context (crates/cache/src/origin/s3.rs:636): body-phase stream errors lose the s3://bucket/key prefix that header-phase errors carry; deferred out of cache: FilesystemOrigin.fetch reads the entire blob into memory before returning Bytes, preventing streaming delivery to the client for large blobs #271 (closed), untracked since.

Activity

  1. added
    rust
    prio:low
    on Aug 1, 2026
  2. github-actions commented on Aug 1, 2026

    @github-actions

    🎯 Triage report

    This is a roundup issue tracking four small, verified follow-ups surfaced during a deferred-work sweep. Each item is self-contained with an exact code location and a brief description of the accepted trade-off or deferral reason. The issue is well-structured and actionable as-is; individual items can be split into their own issues when picked up.

    📊 Assessment

    Dimension Value Reasoning
    Type Task A tracked work-item list, not a bug report or feature request
    Labels technical, rust, low (existing — unchanged) Accurate; all four items are low-priority Rust implementation gaps
    Coding agent Suitable (per item) Each sub-item has a precise file:line reference and a clear acceptance criterion; they can be independently assigned

    🔗 Similar issues

    💡 Notes and suggestions

    Per-item breakdown for maintainer routing:

    1. Cache retry amplification (crates/cache/src/retry.rs:41)
      N concurrent waiters can each become retry owner sequentially, multiplying origin load up to N×budget. Decide whether to bound N (e.g. single-owner-with-waiters) or document the trade-off explicitly. A coding agent can implement the single-owner pattern with a tokio::sync::watch or semaphore guard.

    2. DHT BatchStore handler (crates/protocol/src/dht.rs:28,179,308)
      Wire types exist; inbound is rejected with APP_ERR_UNSUPPORTED_MESSAGE and senders fall back to per-hash Store. The chattiness is a known cost. The deferred handler needs admission logic and two-stage rate-limit accounting per ADR 022. This is the highest-complexity item — probably not a good first coding-agent task without an ADR amendment scoping the admission rules.

    3. Multicall3 batching for bond-registry bootstrap (crates/node/src/dht/capacity_bond_registry.rs:352)
      Current code: one isActive RPC call per entry per 15-minute resync cycle. Fix: batch via Multicall3. Well-scoped; a coding agent can implement this with the existing alloy stack.

    4. S3 body-phase error context (crates/cache/src/origin/s3.rs:636)
      Body-phase stream errors lose the (bucket/redacted) prefix. Fix: propagate the key into the body-phase error context (likely a map_err` closure). The simplest item here; good candidate for a first pick-up.

    Suggested split order (easiest → hardest): S3 error context → Multicall3 batching → cache retry amplification → DHT BatchStore.

    Generated by Agentic Triage for #1565 · sonnet46 · 14.9 AIC · ⌖ 5.62 AIC · ⊞ 6K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  3. alpergundogdu commented on Aug 5, 2026

    @alpergundogdu
    Contributor

    Item 3 (Multicall3 / bond-registry bootstrap N+1) shipped in #1613. The three remaining items are split into their own issues:

    Closing this roundup; follow-up tracked in the issues above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:lowrust

    Type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions