Skip to content

chore: knock off six low-LOC / doc-only issues (#1555, #1558, #1559, #1563, #1576, #1579) - #1581

Merged
alpergundogdu merged 6 commits into
mainfrom
claude/low-loc-github-issues-e30ff5
Aug 3, 2026
Merged

alpergundogdu merged 6 commits into
mainfrom
claude/low-loc-github-issues-e30ff5

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Batch of low-LOC / doc-only cleanups. Each commit is one issue; all land as pure documentation or dead-code removal — no behavioral change to shipped paths.

Documentation

Cleanup

Verification

  • cargo build && cargo clippy --all-targets clean; cargo fmt --check clean; cargo nextest run green across changed crates.
  • anvil-e2e compile gate: cargo test --no-run -p decdn-e2e --features anvil-e2e and the node variant both compile.
  • make -C adr check-refs passes (incl. the new check-no-history-links).
  • All commits passed the pre-commit suite (fmt, clippy, doc, deny, markdownlint, adr hygiene).

Closes #1555, #1558, #1559, #1563, #1576, #1579.

🤖 Generated with Claude Code

alpergundogdu and others added 6 commits August 3, 2026 13:22
)

The knob only ever existed in ADR 037 and one stale doc comment; range
pull-through is ungated in code and the whole-blob fallback already makes
every attempt correct, so the toggle bought nothing. Remove the ADR
Parameters row, the "MAY disable" sentence, and the dead clause in the
cache engine's `Unsupported` doc.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…#1559)

Canonical ADRs no longer reference the _history archive (it stays on disk
for audit): delink the retired-ADR mentions in 026/028/architecture to
inline-code names, drop the "Body archived verbatim" clauses, and add a
check-no-history-links guard so they cannot come back.

Widen check-anchor-targets to docs/ + root markdown (runbook, CONTRIBUTING,
CLAUDE, CHANGELOG, README) by resolving each link relative to its own
file's directory, and widen the CI adr changes filter to match.

Also drop the changelog-voice amendment note atop ADR 026 — the body
already carries the final 10% POL / 19% App Incentives / 15% combined
numbers.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…#1558)

#1491 replaced per-assignment DAO ratification with one-time publisher
vetting + instant assigns, but the glossary Publisher entry and ADR 019's
authorized-origins bullet still described the old model. Align both with
the vetted-publisher-seats-directly model already stated elsewhere in the
same files.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
… refactor (#1579)

The docs still described BuybackBurner as one flat contract. Add a
"Declared on" column to the ADR 003 member table and mark setVault
Balancer-only; document the Permit2 approvals footgun in the L2 deployment
appendix (with the canonical Permit2 address); and drop references to a
nonexistent IBuybackBurner interface across ADR 018 and a stale contract
comment — FeeRouter holds buybackBurner as a plain address and never calls
a typed method on it, so no interface is warranted.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Sweep zero-caller public items and out-of-date `#[allow]`s left behind by
landed work:

- protocol: delete `StreamRequest::requested_len()` (no callers; serving
  sites derive the `byte_len == 0` sentinel inline).
- gossip: drop `GossipService::spawn`'s `_endpoint` param and its
  `needless_pass_by_value` allow; the caller no longer clones an endpoint
  for nothing.
- node/admin: remove the never-read `AdminState::signer` field, its
  `dead_code` allow, and its construction sites (handlers use
  `voucher_signer`).
- node/handlers: drop the stale `dead_code` allow + comment on
  `ProgressiveSource::LocalOutboard`; it is constructed in the production
  serve path (`window.rs`) since #1528.
- common/config: remove the blanket `#![allow(dead_code)]` in
  `resolved.rs`; the fields are `pub` and genuinely read, so none is
  actually dead.
- cache: delete the `CacheEngine::stats()` zeros-stub and its `CacheStats`
  type (no callers; intended gossip consumer never materialized).
- node: collapse `probe_client` into the identical
  `decdn_client_pull::probe::probe_once` (re-exported as
  `client_requester`); delete the duplicate module.
- common/cli: `--publisher-registry-address` is validate-only on the
  daemon; document it as such (dropping it cascades into the resolver,
  `ResolvedConfig`, `config validate`, and ~60 test literals).
- gossip: verified `RESUBSCRIBE_FAILED_LABEL` is incremented on the
  resubscribe-failure path; left as-is.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…them (#1576)

`clippy::too_many_lines` / `clippy::cognitive_complexity` were suppressed
file-wide alongside the standard test allows. Narrow them to
function-scoped `#[allow(..., reason = "...")]` on only the long journey
functions, matching the #1569 idiom in `slash_appeal.rs` / `g_origin_01`.
The standard test allows (`unwrap_used`, `expect_used`, `panic`,
`indexing_slicing`, `duration_suboptimal_units`) stay file-level.

Narrowing surfaced functions that had quietly grown past the threshold
under the file-wide blanket:

- cli_fetch_topup.rs: `run_multi_interval_topup` (144) and
  `run_two_topup_fetch` (162), not just `run`.
- anvil_bringup_shutdown_e2e.rs: `build_config` (101, a flat
  resolved-config struct literal) alongside the drain journey test.

Each now carries its own reason. `coop_close_watermark_reconcile.rs`'s
`run` is under the threshold, so it needs no scoped allow at all.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copilot AI review requested due to automatic review settings August 3, 2026 12:56
@alpergundogdu alpergundogdu self-assigned this Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 15 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: bfa5fc21-a160-4c55-a213-a57bfde7d790

📥 Commits

Reviewing files that changed from the base of the PR and between 3ebab8d and b9c1a9e.

⛔ Files ignored due to path filters (1)
  • crates/protocol/tests/snapshots/public_api__public_api.snap is excluded by !**/*.snap, !**/*.snap
📒 Files selected for processing (38)
  • .github/workflows/ci.yml
  • adr/003-payments.md
  • adr/018-liquidity-strategy.md
  • adr/019-node-onboarding.md
  • adr/026-tokenomics.md
  • adr/028-slashing-appeals.md
  • adr/037-regional-proxy-warming.md
  • adr/Makefile
  • adr/_build/check-anchor-targets.awk
  • adr/appendix-l2-deployment.md
  • adr/architecture.md
  • adr/glossary.md
  • contracts/src/GuardedBuybackBurner.sol
  • crates/cache/src/engine.rs
  • crates/cache/src/lib.rs
  • crates/cli/tests/admin_peers.rs
  • crates/common/src/cli/run.rs
  • crates/common/src/config/resolved.rs
  • crates/e2e/tests/cli_bundle_pull_channel_id.rs
  • crates/e2e/tests/cli_fetch_resume.rs
  • crates/e2e/tests/cli_fetch_topup.rs
  • crates/e2e/tests/coop_close_watermark_reconcile.rs
  • crates/e2e/tests/g_gov_02_rate_bounds.rs
  • crates/e2e/tests/g_gov_03_real_evidence.rs
  • crates/e2e/tests/g_node_06_unbond.rs
  • crates/gossip/src/service.rs
  • crates/node/src/admin.rs
  • crates/node/src/handlers/client/source.rs
  • crates/node/src/lib.rs
  • crates/node/src/node_origin.rs
  • crates/node/src/probe_client.rs
  • crates/node/src/runtime/mod.rs
  • crates/node/tests/anvil_bringup_shutdown_e2e.rs
  • crates/node/tests/anvil_settlement_e2e.rs
  • crates/node/tests/node_origin_pull.rs
  • crates/node/tests/probe_warm_reconnect.rs
  • crates/node/tests/self_hosted_discovery.rs
  • crates/protocol/src/client.rs

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 3, 2026

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Contracts coverage

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Coverage report

Total: 80.19% (was 80.20%, ● 0.00%) — 56458/70404 lines

File Coverage Lines Δ
crates/cache/src/engine.rs 91.48% 3231/3532 ▲ +0.10%
crates/cache/src/lib.rs 100.00% 28/28 ● 0.00%
crates/common/src/config/resolved.rs 100.00% 33/33 ● 0.00%
crates/gossip/src/service.rs 87.67% 455/519 ▼ 0.05%
crates/node/src/admin.rs 95.86% 1182/1233 ▼ 0.06%
crates/node/src/handlers/client/source.rs 88.66% 86/97 ● 0.00%
crates/node/src/node_origin.rs 93.14% 1032/1108 ● 0.00%
crates/node/src/probe_client.rs — — deleted
crates/node/src/runtime/mod.rs 46.54% 1091/2344 ▲ +0.04%
crates/protocol/src/client.rs 98.64% 795/806 ▲ +0.37%
History
Commit Total Δ vs base
b9c1a9e (HEAD) 80.19% ● 0.00%

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 batches several low-LOC cleanups focused on removing dead code/public surface and bringing ADR/docs hygiene checks and contract/architecture documentation back into sync with current implementation.

Changes:

  • Removes unused/dead Rust APIs and plumbing (e.g., StreamRequest::requested_len, node-side probe_client, CacheEngine::stats/CacheStats, unused parameters/fields).
  • Tightens clippy lint suppressions in e2e/node journey tests from file-level to function-level #[allow(..., reason = ...)].
  • Updates ADRs and ADR tooling/CI to prevent canonical ADRs from linking into adr/_history/, and extends anchor checking coverage to docs/ and repo-root markdown.

Reviewed changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/protocol/tests/snapshots/public_api__public_api.snap Updates public API snapshot after removing unused protocol surface.
crates/protocol/src/client.rs Removes unused StreamRequest::requested_len() helper.
crates/node/tests/self_hosted_discovery.rs Updates test helper and GossipService::spawn call site for signature change.
crates/node/tests/probe_warm_reconnect.rs Switches probe usage to client_requester::probe::probe_once.
crates/node/tests/node_origin_pull.rs Updates imports to use client_requester probe path.
crates/node/tests/anvil_settlement_e2e.rs Narrows clippy allows to the long-journey function scope with reasons.
crates/node/tests/anvil_bringup_shutdown_e2e.rs Narrows clippy allows to specific long functions with reasons.
crates/node/src/runtime/mod.rs Updates runtime wiring for GossipService::spawn and AdminState::new signature changes.
crates/node/src/probe_client.rs Deletes redundant probe client implementation.
crates/node/src/node_origin.rs Uses re-exported client_requester::probe::probe_once instead of deleted module.
crates/node/src/lib.rs Removes probe_client module export.
crates/node/src/handlers/client/source.rs Drops stale dead_code allow on LocalOutboard variant.
crates/node/src/admin.rs Removes unused Ethereum signer field and adjusts AdminState::new signature + tests.
crates/gossip/src/service.rs Removes unused Endpoint param from GossipService::spawn and updates tests.
crates/e2e/tests/g_node_06_unbond.rs Moves clippy suppressions to the run() journey function.
crates/e2e/tests/g_gov_03_real_evidence.rs Moves clippy suppressions to the run() journey function.
crates/e2e/tests/g_gov_02_rate_bounds.rs Moves clippy suppressions to the run() journey function.
crates/e2e/tests/coop_close_watermark_reconcile.rs Removes file-level too_many_lines allow (no longer needed).
crates/e2e/tests/cli_fetch_topup.rs Adds function-scoped too_many_lines allows with reasons for long journeys.
crates/e2e/tests/cli_fetch_resume.rs Adds function-scoped too_many_lines allow with reason.
crates/e2e/tests/cli_bundle_pull_channel_id.rs Adds function-scoped too_many_lines allow with reason.
crates/common/src/config/resolved.rs Removes blanket file-level dead_code allow.
crates/common/src/cli/run.rs Documents publisher_registry_address as validate-only on the daemon.
crates/cli/tests/admin_peers.rs Removes now-unneeded signer helper and updates AdminState::new calls.
crates/cache/src/lib.rs Stops re-exporting removed CacheStats.
crates/cache/src/engine.rs Removes CacheStats stub + CacheEngine::stats() and updates stale doc comment.
contracts/src/GuardedBuybackBurner.sol Updates comment to remove nonexistent IBuybackBurner reference.
adr/Makefile Extends anchor-target checking scope; adds check-no-history-links guard.
adr/glossary.md Updates publisher/origin assignment terminology to vetted-publisher model.
adr/architecture.md Removes canonical links into _history/ while retaining retired-ADR references.
adr/appendix-l2-deployment.md Documents Permit2 and buyback approvals footgun in deployment appendix.
adr/037-regional-proxy-warming.md Removes never-implemented origin_range_pull_enabled knob from ADR text.
adr/028-slashing-appeals.md Removes links into _history/ in canonical ADR references.
adr/026-tokenomics.md Removes _history/ links and drops redundant amendment note.
adr/019-node-onboarding.md Updates origin onboarding language to governance-vetted publisher model.
adr/018-liquidity-strategy.md Removes nonexistent IBuybackBurner references and links to deployment appendix.
adr/003-payments.md Splits BuybackBurner surface by contract layer; documents Permit2 approvals.
adr/_build/check-anchor-targets.awk Resolves link targets relative to the linking file’s directory.
.github/workflows/ci.yml Expands ADR job path filters and runs new check-no-history-links guard.

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

Comment on lines +103 to 105
} else if (!((path "#" frag) in slugs)) {
print FILENAME ":" FNR ": " target " -> no heading in " file " slugs to #" frag;
bad = 1;
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.

cache/ADR 037: origin_range_pull_enabled is specified but was never implemented; range pull-through is ungated

2 participants