Skip to content

feat: remove speculative prefetch mechanism (#1396) - #1399

Merged
thiras merged 4 commits into
mainfrom
claude/remove-prefetch-mechanism-be8ba2
Jul 22, 2026
Merged

thiras merged 4 commits into
mainfrom
claude/remove-prefetch-mechanism-be8ba2

Conversation

@alpergundogdu

@alpergundogdu alpergundogdu commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1396.

Deletes speculative prefetch entirely — nodes no longer pre-acquire blobs they don't hold off the DHT FIND_VALUE query-frequency signal. Content propagation now relies solely on the reactive, paid cache-miss pull-through path (plus explicit operator pinning). Cache-miss pull-through and ADR 037 proxy warming — both reactive — are unchanged.

No tombstones: there are zero remaining references to prefetch anywhere (grep -ri prefetch is empty), and no "we no longer prefetch" notes.

Breaking change: [prefetch] config sections are now rejected

FileConfig uses #[serde(deny_unknown_fields)], so removing the prefetch field means any existing config that still carries a [prefetch] section fails at startup with an "unknown field prefetch" error rather than being ignored. #1396 left accept-and-warn vs. hard rejection open; this PR ships hard rejection — operators upgrading must delete the [prefetch] block from their config. This is deliberate: a silently-ignored block would let stale prefetch tuning look effective when the feature is gone.

Removed

Rust (~2,900 net lines, 26 files):

  • The whole crates/node/src/prefetch/ module (PrefetchEngine, popularity tracker, decision engine, acquirer, acquired-set).
  • The [prefetch] config: PrefetchConfig, ResolvedPrefetch, DEFAULT_PREFETCH_*, resolver + validation.
  • The decdn_prefetch_* metric family and the prefetch-ledger-only decdn_node_pull_delta_overflow_total, plus setters.
  • The FIND_VALUE→prefetch feed (DhtHandler), the AcquisitionObserver trait + serve-path crediting (node_origin/voucher), and all runtime wiring (engine construction, provision_acquirer, prefetch_shutdown token, the armed_origin_gates helper).
  • The [prefetch] CLI config template + example config, and 3 dead tests.

ADRs: deleted ADR 022's prefetch sections and rewrote §Popularity Signals to reactive-only; removed appendix-observability §Prefetch Metrics; cleaned single refs in ADR 001/017/037/architecture.

Kept (shared surface)

Cache-miss pull-through, ADR 037 proxy warming, the pull_through_require_authorized_origin gate, OriginDirectory, and the FIND_VALUE fallback all survive. The gate's OriginAssignment / namespace-0 / fail-closed semantics — previously documented inside the deleted prefetch section — are de-duplicated to one canonical source: ADR 022 §FIND_VALUE Flow (the origin-discovery fallback), which ADR 037 §Seed-leech caps and the code now reference instead of re-describing.

Rebased on main (#1395)

This branch was rebased onto current main to resolve the conflict with #1395 (namespace-as-origin-addressing, drop … default-open allow-list). All surviving ADR text uses #1395's model — namespaceId == 0 has no authorized origins (no default-open allow-list, no on-chain hash→namespace lookup); the rebase applies only the prefetch removal on top of those semantics. grep -r default-open adr/ is empty.

Verification

  • cargo clippy --workspace --all-targets — 0 warnings; cargo fmt --check clean
  • cargo nextest: 798 (common + cli), 900 (node) — all pass
  • Repo-wide grep -i prefetch (excl. _history): 0 hits; no dangling ADR anchor links; default-open gone from adr/
  • All pre-commit hooks pass (markdownlint, ADR hygiene, cargo doc/deny)

Not run: anvil-e2e-gated tests (need a live anvil); nothing in that path referenced prefetch.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Configuration
    • Removed speculative prefetch settings from default config templates, validation output, and reload behavior.
    • Updated origin-directory/pull-through authorization guidance and the resulting deny-all behavior when unset.
  • Behavior
    • Content discovery is now reactive to real, paid delivery via cache-miss pull-through (no speculative prefetching).
    • Regional warming is bootstrapped at delivery time; latency probes no longer affect demand metrics.
  • Observability & Documentation
    • Removed prefetch-related acquisition/popularity/metrics and related documentation/alert wording; focused on probe metrics instead.
  • Privacy/Architecture
    • Updated network and privacy records to reflect the reactive model and revised interactions.

Copilot AI review requested due to automatic review settings July 22, 2026 18:19
@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 39 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: 8242a3a1-4607-4ac5-85bb-a4405f233b40

📥 Commits

Reviewing files that changed from the base of the PR and between ebc8526 and 8444f4c.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • adr/022-content-discovery.md
  • crates/common/src/config/types.rs
  • crates/node/src/handlers/client/mod.rs

Walkthrough

The PR removes speculative prefetch configuration and implementation, including acquisition, popularity tracking, runtime wiring, metrics, and tests. ADRs and operator-facing documentation now describe reactive cache-miss pull-through and authorized-origin gating.

Changes

Reactive demand model

Layer / File(s) Summary
Reactive demand ADR model
adr/*.md
ADR 022 and ADR 037 now describe paid reactive pull-through, FIND_VALUE-based discovery, authorized-origin warming, and demand metrics that do not drive acquisition.

Configuration surface removal

Layer / File(s) Summary
Configuration surface removal
crates/common/src/config/*, crates/cli/src/commands/config.rs, crates/cli/tests/config_validate.rs, examples/configs/*
Prefetch TOML types, resolved fields, defaults, validation, CLI output, template sections, and related tests are removed; origin-directory documentation now references pull-through behavior.

Node runtime integration removal

Layer / File(s) Summary
Node runtime integration removal
crates/node/src/{dht,handlers,node_origin,runtime}/*, crates/node/src/metrics.rs, crates/node/src/lib.rs
Prefetch handlers, engine wiring, acquisition observers, shutdown cancellation, metrics, and public exports are removed. Voucher settlement now credits seed-leech caps directly.

Reload and integration test alignment

Layer / File(s) Summary
Reload and integration test alignment
crates/node/src/runtime/reload.rs, crates/node/tests/*
Resolved-config fixtures, reload expectations, DHT prefetch coverage, and prefetch-specific node-origin tests are updated or removed.

Estimated code review effort: 4 (Complex) | ~60 minutes


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.

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 removes the node’s speculative prefetch feature (previously driven by DHT FIND_VALUE query-frequency signals) so that content propagation relies on the reactive, paid cache-miss pull-through path (plus explicit operator pinning). It also updates configuration surfaces, metrics, tests, and ADR documentation to eliminate the prefetch mechanism and re-home the remaining “authorized origin” semantics under ADR 022 for the pull-through gate and FIND_VALUE fallback.

Changes:

  • Deletes the speculative prefetch engine, wiring, config schema, metrics family, and related tests.
  • Removes prefetch-related hooks from DHT and client handlers, runtime wiring, and node-origin post-pull observation.
  • Updates ADRs and config examples to describe reactive-only propagation and to document the pull-through authorized-origin gate semantics in ADR 022.

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
examples/configs/arbitrum-sepolia.toml Updates origin-directory comment to reflect pull-through gate + FIND_VALUE fallback usage.
crates/node/tests/sighup_signal.rs Removes prefetch from resolved config seeding and reload-warning expectations.
crates/node/tests/node_origin_pull.rs Removes end-to-end prefetch tests and prefetch-only wiring fields.
crates/node/tests/dht_loopback.rs Removes DHT→prefetch integration test and related imports.
crates/node/tests/anvil_bringup_shutdown_e2e.rs Removes prefetch from resolved config fixture.
crates/node/src/runtime/reload.rs Removes prefetch section restart-required warnings and defaults in fixtures.
crates/node/src/runtime/mod.rs Removes prefetch engine construction/wiring/shutdown; clarifies origin-directory sharing for pull-through + fallback only.
crates/node/src/prefetch/popularity.rs Deletes prefetch popularity oracle implementation.
crates/node/src/prefetch/mod.rs Deletes prefetch engine + acquisition observer implementation.
crates/node/src/prefetch/decision.rs Deletes prefetch policy/ledger decision engine.
crates/node/src/prefetch/acquirer.rs Deletes background speculative acquisition machinery.
crates/node/src/prefetch/acquired.rs Deletes prefetch-acquired tagging set implementation.
crates/node/src/node_origin.rs Removes acquisition observer hook and prefetch-ledger delta narrowing.
crates/node/src/metrics.rs Removes prefetch metric family and the prefetch-ledger delta overflow counter.
crates/node/src/lib.rs Removes prefetch module export.
crates/node/src/handlers/dht.rs Removes prefetch feed from FIND_VALUE handling and engine attachment API.
crates/node/src/handlers/client/voucher.rs Removes serve-path crediting of served bytes to prefetch demand-quality ratio.
crates/node/src/handlers/client/mod.rs Removes prefetch engine dependency from ClientHandlerDeps/ClientHandler.
crates/node/src/handlers/client/dispatch.rs Updates pull-through authorized-origin gate comments to remove prefetch coupling.
crates/node/src/dht/origin.rs Updates docs to remove prefetch references; keeps origin-directory contract for gate/fallback.
crates/node/src/dht/chain_origin_directory.rs Updates docs to describe pull-through gate + fallback consumers (no prefetch).
crates/common/src/config/types.rs Removes [prefetch] config schema; updates blockchain/cache docs re: origin directory and pull-through gate.
crates/common/src/config/resolved.rs Removes ResolvedPrefetch; updates resolved blockchain docs for origin directory behavior.
crates/common/src/config/mod.rs Removes prefetch resolution/defaults/validation; updates origin-directory resolution docs.
crates/common/src/cli/run.rs Updates CLI arg docs for origin-directory addresses (no prefetch).
crates/cli/tests/config_validate.rs Removes prefetch validate-summary test and fixture field.
crates/cli/src/commands/config.rs Removes prefetch-related validate-summary output and template config block; updates origin-directory summary text.
adr/architecture.md Updates ADR 022 index description to remove prefetch demand-signal mention.
adr/appendix-observability.md Deletes the prefetch metrics subsection.
adr/037-regional-proxy-warming.md Updates narrative and references to remove prefetch; points gate semantics to ADR 022.
adr/022-content-discovery.md Rewrites popularity section to reactive-only; adds “Origin authorization for cache warming” section.
adr/017-privacy.md Removes prefetch-trigger mention in references.
adr/001-network.md Updates NodeAnnounce description to remove prefetch demand-signal language.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/cli/src/commands/config.rs Outdated
.origin_assignment_address
.as_deref()
.unwrap_or("(unset — origin directory empty: prefetch gate finds no origins)")
.unwrap_or("(unset — origin directory empty: pull-through gate finds no origins)")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed: the unset message now reads "pull-through gate and FIND_VALUE fallback find no origins" — the empty directory disables both consumers.

Comment thread crates/cli/src/commands/config.rs Outdated
.publisher_registry_address
.as_deref()
.unwrap_or("(unset — origin directory empty: prefetch gate finds no origins)")
.unwrap_or("(unset — origin directory empty: pull-through gate finds no origins)")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed alongside the origin_assignment_address line above — same "pull-through gate and FIND_VALUE fallback find no origins" wording.

Comment thread crates/common/src/cli/run.rs Outdated
Comment on lines +99 to +100
/// empty (deny-all): the pull-through authorized-origin gate finds no on-chain
/// origins.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed: the help text now notes an unset origin directory disables both the pull-through authorized-origin gate and the FIND_VALUE last-resort fallback.

Comment thread crates/common/src/config/resolved.rs Outdated
Comment on lines +95 to +96
/// `publisher_registry_address`); `None` => empty deny-all directory, so
/// the prefetch authorized-origin gate finds no origins (ADR 022).
/// the pull-through authorized-origin gate finds no origins (ADR 022).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed: the ResolvedBlockchain doc now names both the pull-through gate and the FIND_VALUE last-resort origin fallback.

@altanoruc altanoruc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The implementation-side removal is coherent, and I verified cargo fmt -- --check plus cargo check --workspace --all-targets locally at 5c135e1. I found two documentation/behavior inconsistencies that should be resolved before merge. The PR is also currently CONFLICTING with main, so the first item is especially important during the rebase.

One upgrade concern to confirm explicitly: deleting FileConfig::prefetch under deny_unknown_fields makes every existing config containing [prefetch] fail startup after upgrade. Issue #1396 left accept-and-warn vs hard rejection open; the PR body implies hard rejection is intentional, but this should be a deliberate compatibility/release-note decision.

- Many FIND_VALUE queries for H → H is in high demand.
- The node is already well-positioned to be a STORE target for H.
- Prefetching H and publishing a STORE record turns incoming routing queries into paid delivery opportunities.
The cache role is permissionless: any bonded operator may serve any hash it holds, and the cache-miss pull-through path used to fulfill an in-flight `cdn/client/v1` `StreamRequest` from a paying customer pulls and warm-caches unconditionally, driven by an active paid request rather than any speculative inference. An operator who does not want the reactive path to relay or warm *unclaimed* content MAY restrict it to authorized origins with the opt-in `pull_through_require_authorized_origin` gate ([ADR 037 § Seed-leech caps](037-regional-proxy-warming.md#seed-leech-caps)), which resolves authorization through the same on-chain origin directory as the FIND_VALUE fallback (§ [FIND_VALUE Flow](#find_value-flow-cache-miss--dht-lookup)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Preserve #1395's namespace-addressed model when rebasing. main now says the requester already knows namespaceId, there is no on-chain hash→namespace lookup, and namespaceId == 0 has no on-chain origin directory/default-open allow-list. This paragraph (and the following “truly-unclaimed hash” wording) reintroduces the superseded hash-derived/default-open model. Since this PR is currently merge-conflicting with #1395's ADR edits, please resolve those conflicts by retaining #1395's semantics and applying only the prefetch removal.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rebased onto current main. The branch predated #1395, which is why this paragraph still carried the superseded default-open / hash→namespace model. Conflicts resolved by keeping #1395's semantics and applying only the prefetch removal: namespaceId == 0 has no authorized origins throughout now, and grep -r default-open adr/ is empty.

Comment thread adr/022-content-discovery.md Outdated
18. A `BatchStoreRequest` consumes between 1 and `n` tokens from each rate-limit bucket: stage 1 charges 1 token before deserialization; stage 2 charges up to `n - 1` more after reading `n = hashes.len()`, bounded by remaining budget. The first `k` admitted hashes pass per-hash processing; the remaining `n - k` are marked `false` in the ack without further processing.
19. A `BatchStoreRequest` with `hashes.len() > 256` is rejected by closing the stream with `MALFORMED_MESSAGE` (`0x03`); the publisher MUST split larger publish sets across multiple batches.
20. A publisher whose `BatchStoreRequest` to a given receiver results in stream-close-without-ack MUST fall back to per-hash `StoreRequest` for subsequent publications to that receiver; the publisher SHOULD cache the negative result for some bounded duration to avoid repeated drop-and-fallback cycles.
7. FIND_VALUE-query frequency and per-hash cache-miss frequency are emitted as observability metrics in [Appendix: Observability](appendix-observability.md#appendix-observability-and-metrics); neither drives acquisition. Realized demand is served reactively per [ADR 037](037-regional-proxy-warming.md#adr-037-latency-driven-proxy-warming-for-regional-locality).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] This resolves issue #1396's observability question inconsistently. The patch removes the FIND_VALUE observation path (run_prefetch/the popularity tracker) and adds no pure-observability replacement; the remaining cache metrics are aggregate, not per-hash. Yet this acceptance criterion says FIND_VALUE-query frequency and per-hash cache-miss frequency are emitted. Please either retain and wire the telemetry (and name the concrete metrics), or remove this claim so the ADR matches the node.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Removed the claim. The node emits no per-hash cache-miss-frequency or FIND_VALUE-query-frequency metric — only aggregate counters — and appendix-observability has no such section. Rewrote acceptance-criterion #7 and the reactive-demand line to state that no such demand signal is collected, so the ADR matches the node.

@altanoruc altanoruc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR Review: feat: remove speculative prefetch mechanism (#1396)

Great work! This is a clean, thorough removal of speculative prefetch (~2,900 net lines) across crates and ADRs.

Highlights & Code Verification:

  • Clean Decoupling: The removal of , configuration structs, prefetch hooks, and prefetch metrics is complete and precise.
  • Reactive Surface Intact: Cache-miss pull-through, ADR 037 regional proxy warming, , and origin authorization gates are properly preserved and cleanly re-homed into ADR 022.
  • Formatting: passes cleanly with zero warnings.

🔍 Minor Finding / Cleanup:

In (line 259), under , the alert description still references prefetch:

      - alert: DecdnOriginDirectoryWatcherStalled
        expr: (decdn_origin_directory_watcher_last_tick_timestamp_seconds > 0) and (time() - decdn_origin_directory_watcher_last_tick_timestamp_seconds > 180)
        for: 5m
        labels:
          severity: warning
        annotations:
          summary: "Origin-directory watcher not ticking on {{ $labels.instance }}"
          description: |
            The cached namespace → operator directory is no longer refreshed; the
            prefetch authorized-origin gate reads that cache. Restart and check the
            RPC provider.

Suggested Fix: Update to .


LGTM overall! 🚀

@altanoruc altanoruc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR Review: feat: remove speculative prefetch mechanism (#1396)

Great work! This is a clean, thorough removal of speculative prefetch (~2,900 net lines) across crates and ADRs.

Highlights & Code Verification:

  • Clean Decoupling: The removal of crates/node/src/prefetch/, [prefetch] configuration structs, FIND_VALUE prefetch hooks, and prefetch metrics is complete and precise.
  • Reactive Surface Intact: Cache-miss pull-through, ADR 037 regional proxy warming, OriginDirectory, and origin authorization gates are properly preserved and cleanly re-homed into ADR 022.
  • Formatting: cargo fmt --check passes cleanly.

🔍 Minor Finding / Cleanup:

In monitoring/prometheus-alerts.yml (line 259), under DecdnOriginDirectoryWatcherStalled, the alert description still references prefetch:

      - alert: DecdnOriginDirectoryWatcherStalled
        expr: (decdn_origin_directory_watcher_last_tick_timestamp_seconds > 0) and (time() - decdn_origin_directory_watcher_last_tick_timestamp_seconds > 180)
        for: 5m
        labels:
          severity: warning
        annotations:
          summary: "Origin-directory watcher not ticking on {{ $labels.instance }}"
          description: |
            The cached namespace → operator directory is no longer refreshed; the
            prefetch authorized-origin gate reads that cache. Restart and check the
            RPC provider.

Suggested Fix: Update prefetch authorized-origin gate to pull-through authorized-origin gate.


LGTM overall! 🚀

alpergundogdu and others added 3 commits July 23, 2026 01:09
Delete speculative prefetch entirely: nodes no longer pre-acquire blobs
they don't hold off the DHT FIND_VALUE query-frequency signal. Content
propagation relies solely on the reactive, paid cache-miss pull-through
path (plus explicit operator pinning). Cache-miss pull-through and ADR 037
proxy warming — both reactive — are unchanged.

Rust:
- Delete crates/node/src/prefetch/ (PrefetchEngine, popularity tracker,
  decision engine, acquirer, acquired-set).
- Drop the [prefetch] config block: PrefetchConfig, ResolvedPrefetch, the
  DEFAULT_PREFETCH_* constants, and resolver/validation.
- Remove the decdn_prefetch_* metric family and the prefetch-ledger-only
  decdn_node_pull_delta_overflow_total, plus their setters.
- Remove the FIND_VALUE->prefetch feed (DhtHandler), the AcquisitionObserver
  trait + serve-path crediting (node_origin/voucher), and all runtime
  wiring (engine construction, provision_acquirer, prefetch_shutdown token,
  armed_origin_gates helper).
- Drop the [prefetch] CLI config template + example, and dead tests.

Kept (shared surface): cache-miss pull-through, ADR 037 proxy warming, the
pull_through_require_authorized_origin gate, OriginDirectory, and the
FIND_VALUE fallback. The gate's OriginAssignment / namespace-0 / fail-closed
semantics are re-homed from the deleted prefetch section into a new
self-contained ADR 022 "Origin authorization for cache warming".

ADRs: delete ADR 022's prefetch sections and rewrite Popularity Signals to
reactive-only; remove appendix-observability Prefetch Metrics; clean single
refs in ADR 001/017/037/architecture.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Fold the origin-authorization detail so nothing is stated twice:
- ADR 022 § FIND_VALUE Flow is the single home for origin-directory
  resolution (getOrigins / namespaceId==0 default-open / nodeIdOf-active)
  and now also the directory's event-subscription currency + fail-closed
  behavior.
- ADR 037 § Seed-leech caps is the single home for the gate policy
  (pull_through_require_authorized_origin: initiation-only, NotFound,
  ContentBlacklist boundary, ADR 019 compliance posture).

Collapse ADR 022's "Origin authorization for cache warming" subsection to
its unique content (permissionless cache role + unclaimed-content pinning)
with a one-line pointer to the gate; repoint ADR 037's gate references to
ADR 022 § FIND_VALUE Flow instead of the removed subsection.

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

Address PR #1399 review feedback that survives the #1395 rebase:

- config validate summary, `--origin-assignment-address` help, and the
  ResolvedBlockchain doc now state that an unset origin directory disables
  both the pull-through gate AND the FIND_VALUE last-resort fallback
  (Copilot: the directory backs both consumers, not only the gate).
- prometheus DecdnOriginDirectoryWatcherStalled alert: "prefetch
  authorized-origin gate" -> "pull-through authorized-origin gate".

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@thiras
thiras force-pushed the claude/remove-prefetch-mechanism-be8ba2 branch from 5c135e1 to ebc8526 Compare July 22, 2026 22:22
@thiras

thiras commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Pushed a rebase + review fixes (ebc85265). Addressing the two items from the review bodies that weren't inline threads:

  • Prometheus alert — DecdnOriginDirectoryWatcherStalled description updated: prefetch authorized-origin gate → pull-through authorized-origin gate (monitoring/prometheus-alerts.yml).
  • Upgrade compatibility ([prefetch] under deny_unknown_fields) — shipping hard rejection deliberately: a leftover [prefetch] section now fails startup rather than being silently ignored. Documented as a Breaking change section in the PR body so it's an explicit release-note decision, per your flag.

The CONFLICTING state is resolved — rebased onto current main retaining #1395's namespace-addressed semantics (no default-open allow-list anywhere in adr/), applying only the prefetch removal on top. Verification: clippy --workspace --all-targets clean, fmt/doc/deny/ADR-hygiene pass, 798 + 900 tests green.

@github-actions

github-actions Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Coverage report

Total: 81.14% (was 81.27%, ▼ 0.14%) — 54305/66929 lines

File Coverage Lines Δ
crates/cli/src/commands/config.rs 69.81% 185/265 ▲ +0.07%
crates/common/src/config/mod.rs 96.96% 6792/7005 ▼ 0.04%
crates/common/src/config/resolved.rs 100.00% 35/35 ● 0.00%
crates/node/src/dht/chain_origin_directory.rs 72.22% 811/1123 ● 0.00%
crates/node/src/dht/origin.rs 94.74% 54/57 ● 0.00%
crates/node/src/handlers/client/dispatch.rs 86.19% 231/268 ● 0.00%
crates/node/src/handlers/client/mod.rs 88.89% 640/720 ▼ 0.03%
crates/node/src/handlers/client/voucher.rs 79.25% 126/159 ▼ 0.88%
crates/node/src/handlers/dht.rs 77.47% 282/364 ▼ 1.57%
crates/node/src/metrics.rs 95.31% 976/1024 ▲ +0.90%
crates/node/src/node_origin.rs 90.44% 937/1036 ▲ +0.12%
crates/node/src/prefetch/acquired.rs — — deleted
crates/node/src/prefetch/acquirer.rs — — deleted
crates/node/src/prefetch/decision.rs — — deleted
crates/node/src/prefetch/mod.rs — — deleted
crates/node/src/prefetch/popularity.rs — — deleted
crates/node/src/runtime/mod.rs 45.12% 1086/2407 ▼ 0.10%
crates/node/src/runtime/reload.rs 96.64% 1666/1724 ▼ 0.02%
History
Commit Total Δ vs base
ebc8526 81.14% ▼ 0.14%
8444f4c (HEAD) 81.14% ▼ 0.14%

…ADR cites

Follow-up to the prefetch-removal review (PR #1399):

- adr/022: document the fail-closed-on-RPC-loss / empty-directory
  behavior in the FIND_VALUE Flow section, so ADR 037's delegation
  points at text that actually exists (it was left homeless when the
  Scope-and-limits subsection was deleted).
- Repoint two doc-comments (config/types.rs, handlers/client/mod.rs)
  from the deleted "ADR 022 Scope and limits" section to FIND_VALUE
  Flow, matching the dispatch.rs fix already in this branch.
- CHANGELOG: add a BREAKING config entry -- a leftover [prefetch]
  section now fails at startup/reload under deny_unknown_fields.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@thiras
thiras merged commit 8bf4d47 into main Jul 22, 2026
23 checks passed
@thiras
thiras deleted the claude/remove-prefetch-mechanism-be8ba2 branch July 22, 2026 22:55
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.

Proposal: remove speculative prefetch

4 participants