Skip to content

docs: sweep stale not-yet-wired comments orphaned by landed work - #1572

Merged
alpergundogdu merged 2 commits into
mainfrom
docs/1564-stale-not-yet-wired-comments
Aug 3, 2026
Merged

alpergundogdu merged 2 commits into
mainfrom
docs/1564-stale-not-yet-wired-comments

Conversation

@yigitdot

@yigitdot yigitdot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Doc-only sweep of comments that described shipped behaviour as future work, or cited ADRs and issue numbers that no longer resolve. Every claim was re-verified against HEAD — against implementing code, not against neighbouring comments — before editing.

Zero behaviour changes. The diff is //! / /// doc comments, one Solidity NatSpec block, one ADR appendix table cell, and runbook prose.

Per item

File Change
crates/node/tests/channel_state_store.rs TODO(#317) is gone from runtime/mod.rs; point at the per-channel mutex the cdn/client/v1 handler actually holds — the channels map in handlers/client/mod.rs, whose inner lock is held across verify to durable commit.
crates/node/src/runtime/mod.rs The handler is no longer "future … still unwritten" — ClientHandler::new is built further down the bring-up and consumes the store. Reworded the boot smoke-test rationale: infra bring-up hands over the store, not a snapshot, to avoid coupling to the internal channel representation of the handler.
crates/node/tests/node_to_node_pull_through.rs All three Boundary claims were false. NodeOrigin exists, runtime/mod.rs constructs it behind cache.node_to_node_pull_through_enabled, and no _buyer_channel_service binding exists. Also corrected the carried-forward claim that CacheEngine only ingests via origins: open_tee_sink is a second public ingest door, and the real reason this test stands up a throwaway origin is that the tee takes bao-framed bytes, not the plaintext stream_fetch returns.
crates/node/src/node_origin.rs Same correction at the source. A whole-blob miss reaches the network through the origin chain, which is why this is an Origin impl — not because the trait is the only ingest path. (The window path bypasses the chain entirely via open_progressive_pull.)
crates/cache/src/engine.rs open_tee_sink documented an 8-byte LE content-size header that TeeReservation::begin documents away and the code never parses. Corrected to the header-less interleaved bao (ADR 038), matching begin.
crates/cache/src/lib.rs Node-to-node pull-through is an Origin backend the node crate supplies; this crate stays free of the paid path.
crates/node/src/dht/client.rs dht/lookup.rs implements the iterative FindValue lookup; linked it.
crates/node/src/dht/bootstrap.rs + crates/node/src/handlers/dht.rs ChainStakerSet is what the runtime wires via capacity_bond_registry::bootstrap; ConfigStakerSet survives only in tests.
crates/incentive/src/lib.rs The buyer cache-miss hook is wired (NodeOrigin → open_or_reuse_channel). Stale-close defense restated from adr/appendix-fraud-detection.md: no watchtower role, no escrow contract, no ALPN, and disputeChannel is permissionless — but the in-process monitor is still deferred (#324) and the runtime observes ChannelCloseInitiated without ever disputing, which is why these bindings omit disputeChannel.
crates/protocol/src/message.rs Retired ADR 010 citation and the implied multi-token model replaced with the real posture: USDC, fixed at contract deployment (ADR 003).
crates/node/src/selection.rs Dropped the retired-ADR-015 citation. The 250-300 ms figure and the drop-slow-candidates trade both live in ADR 001 § Probe response collection, so the comment anchors there instead.
contracts/test/GovernanceLifecycle.t.sol PaymentChannel is deployed — the deploy script grants it ROUTER_CALLER_ROLE and asserts it on the real deploy path, so the harness grant is an extra holder, not a substitute. Notes that the role admin is DEFAULT_ADMIN_ROLE, which the Timelock holds after handoff, so the holder set is current-state, not frozen.
crates/e2e/tests/smoke.rs Enumerated the journeys that ship as sibling files, named the feature-scoped suites beside them, and named the one real gap (G-NODE-08).
crates/cache/src/origin/s3.rs Closed-issue citation replaced with a description of the deferral itself and why the cost is not worth paying.
adr/appendix-observability.md The decdn_blacklist_sync_lag_seconds threshold row reserved itself "for whoever implements the watcher". The watcher shipped; what is missing is the version-poll gauge. Reworded, and pointed at the live tick-gauge coverage.

docs/runbook.md

Three separate Detect lists in this file named blacklist alerts that #1513 deleted. All three are fixed:

  • § RPC unreachable — two nonexistent alerts replaced with the five *WatcherStalled rules a dead endpoint actually trips, plus the caveat that a watcher which never established is caught by decdn_*_watcher_down_seconds and the readiness gate, not by a staleness rule.
  • § Slashing risk — the two live blacklist alerts, DecdnBlacklistWatcherStalled and DecdnBlacklistEnforcementFailing.
  • § ContentBlacklist compliance — the same three phantom alerts, plus a body claiming "None of this is implemented at PoC, on either side" and that the node "has no blacklist watcher in crates/". Both false: crates/node/src/blacklist_watcher.rs is spawned unconditionally and ContentBlacklist.getBlacklistVersion() exists. Rewritten from what the watcher does — pinned-block enumeration, event tail, periodic re-scope, deny-then-evict ordering, fail-closed readiness gate — which is what ADR 011 § Node Behavior specifies. The operator-level paragraph also credited only the staker-set watcher; it now includes the delivery-gate refusal of channels funded by a blacklisted address.

Network triage: path corrected to crates/common/src/config/types.rs, and the field list corrected — NetworkConfig exposes bind_port, relay_urls, and discovery, so the sentence names all three and explains why the discovery.peers address book does not bridge a key rotation.

Verification

cargo fmt -- --check                                          # clean
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps     # clean
cargo clippy --workspace --all-targets -- -D warnings          # clean
cargo nextest run --no-fail-fast                               # 2726 passed, 0 failed
pre-commit run markdownlint --files docs/runbook.md adr/appendix-observability.md   # Passed
cd contracts && forge fmt --check                              # clean
cd contracts && FOUNDRY_PROFILE=ci forge build --deny warnings  # successful
cd contracts && forge test                                     # 856 passed, 0 failed, 12 skipped

Closes #1564

Module docs and comments described shipped behaviour as future work, or
cited ADRs and issue numbers that no longer resolve. Rewritten to state
what is true today. No behaviour changes.

- channel_state_store / runtime: the cdn/client/v1 handler exists and holds
  the per-channel mutex; the load_all snapshot has a real consumer.
- node_to_node_pull_through: runtime auto-wiring is NodeOrigin, gated on
  cache.node_to_node_pull_through_enabled and covered by node_origin_pull.
- cache: node-to-node pull-through is an Origin backend supplied by node.
- dht client/bootstrap/handler: lookup.rs implements iterative FindValue;
  the daemon injects the chain-backed StakerSet, ConfigStakerSet is the
  in-memory test implementation.
- incentive: the buyer cache-miss path is wired; stale-close defense has no
  watchtower role, only a permissionless disputeChannel plus a runtime
  monitor.
- protocol: the payment token is USDC, fixed at deployment (ADR 003).
- selection: drop the citation of a retired ADR, keep the RTT figure.
- GovernanceLifecycle: PaymentChannel is deployed and holds
  ROUTER_CALLER_ROLE; the harness grant is an extra holder.
- runbook: name the blacklist alerts that exist, and fix the config-types
  path plus the network keys it lists.
- e2e smoke: enumerate the journeys that ship and the one that does not.
- s3: describe the deferred body-phase wrapper instead of citing an issue.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Free

Run ID: 7abf5ae7-5078-4d28-9db2-ed64cb2aa5f3

📥 Commits

Reviewing files that changed from the base of the PR and between b2a9651 and de1cd85.

📒 Files selected for processing (17)
  • adr/appendix-observability.md
  • contracts/test/GovernanceLifecycle.t.sol
  • crates/cache/src/engine.rs
  • crates/cache/src/lib.rs
  • crates/cache/src/origin/s3.rs
  • crates/e2e/tests/smoke.rs
  • crates/incentive/src/lib.rs
  • crates/node/src/dht/bootstrap.rs
  • crates/node/src/dht/client.rs
  • crates/node/src/handlers/dht.rs
  • crates/node/src/node_origin.rs
  • crates/node/src/runtime/mod.rs
  • crates/node/src/selection.rs
  • crates/node/tests/channel_state_store.rs
  • crates/node/tests/node_to_node_pull_through.rs
  • crates/protocol/src/message.rs
  • docs/runbook.md

Walkthrough

This PR updates documentation across observability, runtime, protocol, test, harness, and operations areas to reflect implemented behavior, current diagnostics, test boundaries, and remaining coverage gaps.

Changes

Documentation accuracy

Layer / File(s) Summary
Blacklist operations documentation
adr/appendix-observability.md, docs/runbook.md
The documentation describes watcher metrics, enforcement failures, deny-set processing, fail-closed behavior, and current network settings.
Runtime and protocol behavior documentation
crates/cache/..., crates/incentive/src/lib.rs, crates/node/..., crates/protocol/src/message.rs
The documentation describes current pull-through, tee framing, payment-channel handling, DHT sources, probe timing, channel loading, and payment units.
Test and harness coverage documentation
contracts/test/GovernanceLifecycle.t.sol, crates/e2e/tests/smoke.rs, crates/node/tests/*
Comments identify role setup, coverage boundaries, mutex behavior, manual pull-through setup, and the remaining end-to-end scenario.

Estimated code review effort: 2 (Simple) | ~15 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.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

@github-actions

github-actions Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Contracts coverage

Line coverage: 89.80% (2597/2892 lines)
▲ +0.00pp vs base (89.80% → 89.80%)
Run: 30724580351

@github-actions

github-actions Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Coverage report

Total: 80.16% (was 80.15%, ▲ +0.01%) — 56274/70202 lines

File Coverage Lines Δ
crates/cache/src/engine.rs 91.38% 3233/3538 ▲ +0.06%
crates/cache/src/lib.rs 100.00% 28/28 ● 0.00%
crates/cache/src/origin/s3.rs 88.67% 493/556 ● 0.00%
crates/node/src/dht/bootstrap.rs 82.35% 84/102 ● 0.00%
crates/node/src/dht/client.rs 76.95% 197/256 ● 0.00%
crates/node/src/handlers/dht.rs 77.47% 282/364 ● 0.00%
crates/node/src/node_origin.rs 93.14% 1032/1108 ● 0.00%
crates/node/src/runtime/mod.rs 46.50% 1091/2346 ● 0.00%
crates/node/src/selection.rs 97.29% 430/442 ● 0.00%
crates/protocol/src/message.rs 100.00% 230/230 ● 0.00%
History
Commit Total Δ vs base
a91bf0b 80.10% ▼ 0.01%
de1cd85 (HEAD) 80.16% ▲ +0.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.

Pull request overview

This PR performs a documentation-only sweep to remove or rewrite stale “future work” comments and retired references across the Rust crates, Solidity tests, and operator runbook so that docs reflect shipped behavior on HEAD.

Changes:

  • Rewords module/test documentation to describe current wiring (paid cdn/client/v1 delivery, node-to-node pull-through, DHT lookup/bootstrap, channel-store usage).
  • Updates operator runbook alert names and network-config field references to match the current monitoring/config surfaces.
  • Cleans up stale/incorrect cross-references in Solidity NatSpec and various crate docs (retired ADRs, outdated “not yet deployed” claims).

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/runbook.md Replaces nonexistent blacklist alert names with the live alerts and corrects NetworkConfig path/field descriptions.
crates/protocol/src/message.rs Updates rate_per_mb doc comment to reflect USDC-at-deploy posture (no token identifier on wire).
crates/node/tests/node_to_node_pull_through.rs Rewrites test boundary docs to point at NodeOrigin/node_origin_pull.rs as the orchestration coverage.
crates/node/tests/channel_state_store.rs Updates concurrency-scoping docs to reference the actual per-channel mutex in the client handler’s channels map.
crates/node/src/selection.rs Removes retired ADR citation while keeping the probe-timeout sizing rationale.
crates/node/src/runtime/mod.rs Rewords boot-time “load_all” rationale to match current handler wiring and avoid “future handler” language.
crates/node/src/handlers/dht.rs Updates StakerSet source wording to reflect current chain-backed injection vs test in-memory injection.
crates/node/src/dht/client.rs Updates module docs to link to the existing iterative FindValue lookup implementation.
crates/node/src/dht/bootstrap.rs Updates bootstrap docs to reflect the daemon’s chain-backed ChainStakerSet and test-only ConfigStakerSet.
crates/incentive/src/lib.rs Updates crate-level docs to reflect that buyer-side miss path is wired via node-to-node pull-through and clarifies stale-close defense posture.
crates/e2e/tests/smoke.rs Replaces “follow-up issues” phrasing with an explicit list of existing CUJ journey files and the remaining gap.
crates/cache/src/origin/s3.rs Replaces closed-issue citation with a self-contained explanation for deferring body-phase context wrapping.
crates/cache/src/lib.rs Clarifies node-to-node pull-through as an Origin supplied by the node crate, keeping cache free of paid-path knowledge.
contracts/test/GovernanceLifecycle.t.sol Updates NatSpec to reflect that PaymentChannel is deployed and holds ROUTER_CALLER_ROLE, with the test harness as an additional holder.

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

@yigitdot
yigitdot requested a review from thiras August 1, 2026 23:45
Follow-up review of a91bf0b found the sweep had introduced or carried
forward claims of the same class it set out to remove.

- incentive: the stale-close rewrite deleted the only statement that the
  dispute monitor is unbuilt and replaced it with present-tense prose. No
  disputeChannel call site exists; the runtime observes the close event and
  never disputes. Restored the deferred (#324) status, kept the ADR posture.
- runbook: three Detect lists named blacklist alerts #1513 deleted. The
  ContentBlacklist section also claimed hash-level enforcement was
  unimplemented and that no watcher existed in crates/ - both false. It is
  rewritten from what blacklist_watcher.rs does, which is what ADR 011
  Node Behavior specifies, and the operator-level paragraph now includes the
  delivery-gate refusal it omitted.
- node_origin / node_to_node_pull_through / cache engine: CacheEngine does
  not ingest only through Origin. open_tee_sink is a second public door; the
  test uses a throwaway origin because the tee takes bao-framed bytes, not
  plaintext. Also dropped the 8-byte size header open_tee_sink documented but
  never parsed.
- smoke, selection, GovernanceLifecycle, observability appendix: enumeration
  completeness, ADR 001 anchor for the RTT figure, the Timelock retains
  DEFAULT_ADMIN so the role set is not frozen, and the sync-lag planned row
  no longer waits on a watcher that shipped.

Doc-only; no behaviour change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@alpergundogdu
alpergundogdu merged commit ab79190 into main Aug 3, 2026
25 checks passed
@alpergundogdu
alpergundogdu deleted the docs/1564-stale-not-yet-wired-comments branch August 3, 2026 11:44
alpergundogdu added a commit that referenced this pull request Aug 3, 2026
Resolve cache doc-comment conflicts from #1572: keep the streaming
entry-point enumeration and fold in the 'one such backend / no
knowledge of the paid path' framing.
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.

docs: sweep stale not-yet-wired comments orphaned by landed work

3 participants