Repository navigation
docs: sweep stale not-yet-wired comments orphaned by landed work - #1572
Conversation
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]>
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (17)
WalkthroughThis PR updates documentation across observability, runtime, protocol, test, harness, and operations areas to reflect implemented behavior, current diagnostics, test boundaries, and remaining coverage gaps. ChangesDocumentation accuracy
Estimated code review effort: 2 (Simple) | ~15 minutes Note 🎁 Summarized by CodeRabbit FreeYour 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 |
Gas snapshotNo gas changes vs base. |
Contracts coverageLine coverage: 89.80% (2597/2892 lines) |
Coverage reportTotal: 80.16% (was 80.15%, ▲ +0.01%) — 56274/70202 lines
History
|
There was a problem hiding this comment.
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/v1delivery, 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.
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]>
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.
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
crates/node/tests/channel_state_store.rsTODO(#317)is gone fromruntime/mod.rs; point at the per-channel mutex thecdn/client/v1handler actually holds — thechannelsmap inhandlers/client/mod.rs, whose inner lock is held across verify to durable commit.crates/node/src/runtime/mod.rsClientHandler::newis 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.rsNodeOriginexists,runtime/mod.rsconstructs it behindcache.node_to_node_pull_through_enabled, and no_buyer_channel_servicebinding exists. Also corrected the carried-forward claim thatCacheEngineonly ingests via origins:open_tee_sinkis 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 plaintextstream_fetchreturns.crates/node/src/node_origin.rsOriginimpl — not because the trait is the only ingest path. (The window path bypasses the chain entirely viaopen_progressive_pull.)crates/cache/src/engine.rsopen_tee_sinkdocumented an 8-byte LE content-size header thatTeeReservation::begindocuments away and the code never parses. Corrected to the header-less interleaved bao (ADR 038), matchingbegin.crates/cache/src/lib.rsOriginbackend thenodecrate supplies; this crate stays free of the paid path.crates/node/src/dht/client.rsdht/lookup.rsimplements the iterativeFindValuelookup; linked it.crates/node/src/dht/bootstrap.rs+crates/node/src/handlers/dht.rsChainStakerSetis what the runtime wires viacapacity_bond_registry::bootstrap;ConfigStakerSetsurvives only in tests.crates/incentive/src/lib.rsNodeOrigin→open_or_reuse_channel). Stale-close defense restated fromadr/appendix-fraud-detection.md: no watchtower role, no escrow contract, no ALPN, anddisputeChannelis permissionless — but the in-process monitor is still deferred (#324) and the runtime observesChannelCloseInitiatedwithout ever disputing, which is why these bindings omitdisputeChannel.crates/protocol/src/message.rscrates/node/src/selection.rscontracts/test/GovernanceLifecycle.t.solPaymentChannelis deployed — the deploy script grants itROUTER_CALLER_ROLEand asserts it on the real deploy path, so the harness grant is an extra holder, not a substitute. Notes that the role admin isDEFAULT_ADMIN_ROLE, which the Timelock holds after handoff, so the holder set is current-state, not frozen.crates/e2e/tests/smoke.rscrates/cache/src/origin/s3.rsadr/appendix-observability.mddecdn_blacklist_sync_lag_secondsthreshold 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:
*WatcherStalledrules a dead endpoint actually trips, plus the caveat that a watcher which never established is caught bydecdn_*_watcher_down_secondsand the readiness gate, not by a staleness rule.DecdnBlacklistWatcherStalledandDecdnBlacklistEnforcementFailing.crates/". Both false:crates/node/src/blacklist_watcher.rsis spawned unconditionally andContentBlacklist.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 —NetworkConfigexposesbind_port,relay_urls, anddiscovery, so the sentence names all three and explains why thediscovery.peersaddress book does not bridge a key rotation.Verification
Closes #1564