Skip to content

docs: rewrite history-voice comments and ADR prose into present-tense canon - #1687

Merged
alpergundogdu merged 1 commit into
mainfrom
claude/audit-history-voice-prose-3ee1bb
Aug 14, 2026
Merged

alpergundogdu merged 1 commit into
mainfrom
claude/audit-history-voice-prose-3ee1bb

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

What

Audits the repo for history-voice prose — comments/docstrings/ADRs that describe a transition instead of current state ("used to…", "no longer…", "replaced the old X", "re-homed from…", phase/milestone labels, dead-symbol references) — and rewrites each into self-contained present-tense canon. This is the "read as canon, not changelog" standard: every line must be accurate read cold, with no memory of the change that produced it.

Prose only. Zero behavior change — no code, identifier, or logic edits, no reordering. Verified mechanically: 0 non-comment lines changed in any .rs/.sol.

Scope

  • Rust /// / //! / // comments across all 12 crates
  • Solidity NatSpec + comments in contracts/ (src, script, test)
  • ADRs in adr/ — de-historicized and made self-contained: stripped all issue/PR references (69 sites) plus one internal-doc pointer, per the ADR conventions; heading anchors and inbound links updated so nothing breaks. adr/_history/ left untouched (the deliberate archive).

Approach

Built a read-only inventory first (grouped by crate/area), reviewed it, then applied rewrites in prose-only batches. Each rewrite was verified against current code — several flagged phrases turned out to be load-bearing and were kept (e.g. legacy-empty is a live voucher-signer render variant; PullTimeout is a live sibling type, not defunct; Leg 1/2/3 are real swap steps). Genuinely load-bearing rationale-by-contrast blocks (test regression guards, invariant narratives) were recast to present-tense counterfactuals rather than deleted, preserving the technical claim.

Accuracy fixes found in passing

Two comments were not just history-voice but stale/wrong, now corrected:

  • cache/src/serve_store.rs — "No routing calls this yet" was false; serve_encoder.rs consumes ServeStore via observe().
  • node/src/node_origin/mod.rs (×3) — "gossips the candidate list as unreachable" corrected to a local Unreachable EWMA hit; ADR 008 reputation is local-only, no gossip tier.

Also removed all references to the deleted fetch_blob_streaming symbol (the CLI fetch core is now drive).

Verification

  • cargo fmt -- --check ✅
  • forge fmt --check ✅
  • cargo doc --no-deps --workspace -D warnings ✅ (intra-doc links intact)
  • prose-only guard: 0 code lines changed ✅
  • all pre-commit hooks pass (incl. ADR reference-hygiene)

Follow-ups (not in this PR)

  • Two metrics.rs assert-message string literals still read "retired … must not be exported" — left as-is to honor comment-only scope.
  • driver.rs's "ADR 003 credit window" wording may be stale post shared-payment-pool (credit window → minimum-remaining-deposit M) — a design-accuracy question, deliberately not guessed.

🤖 Generated with Claude Code

… canon

Sweep docstrings, inline comments, Solidity NatSpec, and ADRs for
changelog/transition voice ("used to", "no longer", "replaced the old X",
"re-homed from", phase/milestone labels, dead-symbol references) and
restate each as a self-contained present-tense fact. Prose only: no code,
identifier, or logic changes.

- Rust `///`/`//!`/`//` comments across all crates
- Solidity NatSpec + comments in contracts/
- ADRs in adr/: de-historicized to present-tense canon and stripped of
  issue/PR references and one internal-doc pointer (self-contained per the
  ADR conventions); heading anchors and inbound links updated to match

Fixes two stale accuracy claims found in passing: serve_store.rs (the node
serve-miss driver now consumes ServeStore) and node_origin/mod.rs (an
Unreachable verdict is a local EWMA hit, not a gossip broadcast; ADR 008
reputation is local-only).

Verified: cargo fmt --check, forge fmt --check, and
cargo doc --no-deps --workspace -D warnings all pass.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copilot AI lite review requested due to automatic review settings August 14, 2026 11:01
@alpergundogdu
alpergundogdu merged commit 16beb08 into main Aug 14, 2026
28 checks passed
@github-actions

Copy link
Copy Markdown

Contracts coverage

Line coverage: 89.61% (2528/2821 lines)
▲ +0.00pp vs base (89.61% → 89.61%)
Run: 31794561483

@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

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 standardizes repository prose so comments, docstrings, and ADRs read as present-tense canon rather than history-voice change narratives, while keeping behavior unchanged across Rust, Solidity, and documentation.

Changes:

  • Rewrites Rust/Solidity comments and docstrings to be self-contained, present-tense statements.
  • Updates ADR prose to remove changelog-style phrasing and eliminate issue/PR references while preserving technical intent.
  • Applies a small number of “prose-only accuracy fixes” where comments previously described behavior that is no longer true.

Reviewed changes

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

Show a summary per file
File Description
crates/reputation/src/local.rs Present-tense clarification of outcome semantics.
crates/reputation/src/lib.rs Present-tense crate-level documentation.
crates/reputation/src/interaction.rs Present-tense scoring documentation.
crates/protocol/src/region.rs Tightened security-focused test prose.
crates/protocol/src/message.rs Present-tense test comment wording.
crates/protocol/src/client.rs Present-tense validation and invariant commentary.
crates/node/src/slash_watcher.rs Present-tense field documentation.
crates/node/src/selection.rs Present-tense rationale for deadline constants.
crates/node/src/runtime/mod.rs Present-tense runtime/watcher commentary.
crates/node/src/receipt_log.rs Present-tense receipt logging commentary.
crates/node/src/node_origin/resume.rs Present-tense error-shape commentary.
crates/node/src/node_origin/pull_leg.rs Present-tense test explanation.
crates/node/src/node_origin/backend_source.rs Present-tense module/type docs.
crates/node/src/node_origin/admit_store.rs Present-tense module/type docs.
crates/node/src/metrics.rs Present-tense metrics documentation.
crates/node/src/lib.rs Present-tense re-export rationale.
crates/node/src/leech_governor.rs Present-tense API rationale.
crates/node/src/handlers/probe_rate_limit.rs Present-tense observability rationale.
crates/node/src/handlers/client/wire.rs Present-tense handler documentation.
crates/node/src/handlers/client/voucher.rs Present-tense module docs.
crates/node/src/handlers/client/mod.rs Present-tense serve-path rationale and tests.
crates/node/src/handlers/client/fill.rs Present-tense serve-miss tier commentary.
crates/node/src/handlers/client/dispatch.rs Present-tense dispatch/validation rationale.
crates/node/src/handlers/client/delivery.rs Present-tense streaming/credit-window commentary.
crates/node/src/dht/staker_set.rs Present-tense trait docs and implementation notes.
crates/node/src/dht/records.rs Present-tense error-path/test commentary.
crates/node/src/dht/rate_limit.rs Present-tense observability rationale.
crates/node/src/dht/client.rs Present-tense fallback/error classification docs.
crates/node/src/dht/chain_staker_set.rs Present-tense internal enum/docs.
crates/node/src/dht/chain_origin_directory.rs Present-tense cursor/bootstrap commentary.
crates/node/src/dht/capacity_bond_registry.rs Present-tense projection/loop commentary.
crates/node/src/dht/batch_fallback.rs Present-tense module docs.
crates/node/src/chain_events/resumable_watcher.rs Present-tense watcher architecture docs.
crates/node/src/chain_events/mod.rs Present-tense watcher module docs.
crates/node/src/chain_events/backfill.rs Present-tense backfill module docs.
crates/node/src/buyer_channel.rs Present-tense deposit semantics docs.
crates/node/src/announce_gate.rs Present-tense gating invariants commentary.
crates/node/src/admin.rs Present-tense concurrency/race documentation.
crates/incentive/src/tx.rs Present-tense API docs for outcomes.
crates/incentive/src/swap_uniswap.rs Present-tense arithmetic/test commentary.
crates/incentive/src/swap_balancer.rs Present-tense test commentary.
crates/incentive/src/eth_identity.rs Present-tense module docs.
crates/incentive/src/content_blacklist.rs Present-tense contract-surface commentary.
crates/incentive/src/capacity_bond.rs Present-tense contract view docs.
crates/incentive/src/buyer_pool_table.rs Present-tense storage-format rationale.
crates/gossip/src/validation.rs Present-tense gating invariant explanation.
crates/gossip/src/service.rs Present-tense helper extraction rationale.
crates/e2e/tests/origin_blacklist_compliance.rs Present-tense test module docs.
crates/e2e/tests/node_to_node_coalesce.rs Present-tense test module docs.
crates/e2e/tests/g_node_07_rotate_key.rs Present-tense test commentary.
crates/e2e/tests/coalesce_two_clients.rs Present-tense test module docs.
crates/e2e/tests/cli_publish.rs Present-tense helper extraction rationale.
crates/e2e/tests/cli_fetch_topup.rs Present-tense test narrative and symbol updates.
crates/e2e/tests/cli_fetch_resume.rs Present-tense test narrative.
crates/e2e/src/node.rs Present-tense fixture helper docs.
crates/e2e/src/chain.rs Present-tense fixture docs and error-path narrative.
crates/common/src/config/types.rs Present-tense config field docs.
crates/common/src/config/mod.rs Present-tense config validation/docs.
crates/common/src/cli/run.rs Present-tense CLI docs.
crates/common/src/cli/fetch.rs Present-tense CLI flag/deadline docs.
crates/client-pull/src/source.rs Present-tense module docs and test commentary.
crates/client-pull/src/ranged_store.rs Present-tense module/type docs.
crates/client-pull/src/pacer.rs Present-tense pacing-policy docs.
crates/client-pull/src/lib.rs Present-tense invariants and API docs.
crates/client-pull/src/driver.rs Present-tense driver overview and responsibilities.
crates/client-pull/src/discovery.rs Present-tense selection logic docs.
crates/client-pull/src/buyer_pool.rs Present-tense test section heading.
crates/cli/src/commands/unbond.rs Present-tense helper extraction docs.
crates/cli/src/commands/setup.rs Present-tense onboarding wizard docs/phase headings.
crates/cli/src/commands/rotate_key/iroh.rs Present-tense helper extraction docs.
crates/cli/src/commands/rotate_key/eth.rs Present-tense guard rationale.
crates/cli/src/commands/register.rs Present-tense command docs.
crates/cli/src/commands/publish.rs Present-tense enum/invariant docs.
crates/cli/src/commands/fetch.rs Present-tense helper extraction docs.
crates/cli/src/commands/chain_ctx.rs Present-tense test fixture docs.
crates/cache/tests/serve_store.rs Present-tense test module docs.
crates/cache/tests/ranged_store_conformance.rs Present-tense conformance test docs.
crates/cache/tests/range_pull.rs Present-tense test docs.
crates/cache/tests/pull_through.rs Present-tense test docs and rationale.
crates/cache/tests/admit_bao.rs Present-tense test module docs.
crates/cache/src/serve_store.rs Present-tense module docs; corrected usage narrative.
crates/cache/src/retry.rs Present-tense metric/rationale wording.
crates/cache/src/ranged_store.rs Present-tense module docs and test commentary.
crates/cache/src/probe_hold.rs Present-tense semantics and re-export docs.
crates/cache/src/origin/s3.rs Present-tense streaming memory note.
crates/cache/src/origin/http.rs Present-tense decode/retry note.
crates/cache/src/fill_session.rs Present-tense module docs.
crates/cache/src/engine.rs Present-tense docs across streaming/metrics/test commentary.
crates/cache/Cargo.toml Present-tense dependency comments.
contracts/test/SlashJudge.t.sol Present-tense NatSpec comment.
contracts/test/GenesisBuybackActivation.t.sol Present-tense NatSpec comment.
contracts/test/DeployProtocolScript.t.sol Present-tense test comment.
contracts/test/DecdnGovernor.t.sol Present-tense boundary test comment.
contracts/test/ContentBlacklist.t.sol Present-tense NatSpec comment.
contracts/test/CapacityBond.t.sol Present-tense test commentary.
contracts/test/BuybackBurnerBalancerV3.t.sol Present-tense guard/boundary commentary.
contracts/src/SlashJudge.sol Present-tense NatSpec wording.
contracts/src/SlashEscrowLib.sol Present-tense NatSpec wording.
contracts/src/SlashAppeal.sol Present-tense NatSpec wording.
contracts/src/DecdnGovernor.sol Present-tense NatSpec wording.
contracts/src/ContentBlacklist.sol Present-tense NatSpec wording.
contracts/src/CapacityBond.sol Present-tense NatSpec wording.
contracts/src/BuybackBurnerBalancerV3.sol Present-tense static-analysis note.
contracts/src/BondMath.sol Present-tense NatSpec wording.
contracts/script/lib/BuybackVenueLib.sol Present-tense library purpose/guard docs.
contracts/script/BaseProtocolDeploy.s.sol Present-tense comment.
contracts/script/ActivateBuyback.s.sol Present-tense script comment.
adr/appendix-poc-production-seams.md Present-tense appendix heading/prose.
adr/appendix-peer-table-eviction.md Present-tense metrics table/prose.
adr/appendix-operator-upgrade-path.md Present-tense procedure prose.
adr/appendix-local-admin-http.md Present-tense rationale prose.
adr/appendix-l2-deployment.md Present-tense appendix prose.
adr/appendix-blob-cache-eviction.md Present-tense appendix prose/metrics tables.
adr/039-multi-source-parallel-fetch.md Present-tense ADR prose.
adr/030-node-region-self-attestation.md Present-tense amendment prose; removes PR ref.
adr/028-slashing-appeals.md Present-tense retired-ADR note.
adr/022-content-discovery.md Present-tense observability/prose.
adr/019-node-onboarding.md Present-tense “Positive” section prose.
adr/016-contract-interactions.md Present-tense contract table prose.
adr/014-on-chain-verification.md Present-tense section prose and tables.
adr/013-schema-evolution.md Present-tense “Positive” section prose.
adr/012-client.md Present-tense design rationale prose.
adr/011-content-takedown.md Present-tense enumeration/polling prose.
adr/009-governance.md Present-tense section heading/prose; removes internal pointer.
adr/008-reputation.md Present-tense normalization prose.
adr/005-protocol.md Present-tense protocol/metrics prose.
adr/003-payments.md Present-tense model/prose and references.
adr/001-network.md Present-tense formula prose.
adr/000-language.md Present-tense versioning prose.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown

Coverage report

Total: 80.79% (was 80.79%, ● 0.00%) — 59397/73520 lines

File Coverage Lines Δ
crates/cache/src/engine.rs 91.82% 3536/3851 ● 0.00%
crates/cache/src/fill_session.rs 93.58% 773/826 ● 0.00%
crates/cache/src/origin/http.rs 84.76% 395/466 ● 0.00%
crates/cache/src/origin/s3.rs 89.36% 546/611 ● 0.00%
crates/cache/src/probe_hold.rs 0.00% 0/6 ● 0.00%
crates/cache/src/ranged_store.rs 100.00% 137/137 ● 0.00%
crates/cache/src/retry.rs 80.26% 187/233 ● 0.00%
crates/cli/src/commands/chain_ctx.rs 91.50% 560/612 ● 0.00%
crates/cli/src/commands/fetch.rs 31.00% 323/1042 ● 0.00%
crates/cli/src/commands/publish.rs 77.17% 916/1187 ● 0.00%
crates/cli/src/commands/register.rs 27.66% 52/188 ● 0.00%
crates/cli/src/commands/rotate_key/eth.rs 47.09% 356/756 ● 0.00%
crates/cli/src/commands/rotate_key/iroh.rs 62.91% 485/771 ● 0.00%
crates/cli/src/commands/setup.rs 48.20% 537/1114 ● 0.00%
crates/cli/src/commands/unbond.rs 73.53% 564/767 ● 0.00%
crates/client-pull/src/buyer_pool.rs 53.68% 153/285 ● 0.00%
crates/client-pull/src/discovery.rs 96.18% 755/785 ● 0.00%
crates/client-pull/src/driver.rs 95.78% 771/805 ● 0.00%
crates/client-pull/src/lib.rs 89.76% 1473/1641 ▼ 0.06%
crates/client-pull/src/pacer.rs 98.77% 160/162 ● 0.00%
crates/client-pull/src/ranged_store.rs 90.10% 974/1081 ● 0.00%
crates/client-pull/src/source.rs 90.34% 262/290 ● 0.00%
crates/common/src/cli/fetch.rs 97.67% 168/172 ● 0.00%
crates/common/src/config/mod.rs 97.11% 6857/7061 ● 0.00%
crates/e2e/src/chain.rs 1.51% 21/1391 ● 0.00%
crates/e2e/src/node.rs 24.79% 120/484 ● 0.00%
crates/gossip/src/service.rs 87.67% 455/519 ● 0.00%
crates/gossip/src/validation.rs 100.00% 343/343 ● 0.00%
crates/incentive/src/buyer_pool_table.rs 90.18% 817/906 ● 0.00%
crates/incentive/src/eth_identity.rs 87.78% 316/360 ● 0.00%
crates/incentive/src/swap_balancer.rs 66.05% 142/215 ● 0.00%
crates/incentive/src/swap_uniswap.rs 65.57% 139/212 ● 0.00%
crates/incentive/src/tx.rs 91.04% 183/201 ● 0.00%
crates/node/src/admin.rs 95.51% 1169/1224 ● 0.00%
crates/node/src/announce_gate.rs 95.83% 92/96 ● 0.00%
crates/node/src/buyer_channel.rs 24.79% 147/593 ● 0.00%
crates/node/src/chain_events/backfill.rs 97.56% 40/41 ● 0.00%
crates/node/src/chain_events/mod.rs 97.70% 85/87 ● 0.00%
crates/node/src/chain_events/resumable_watcher.rs 90.01% 748/831 ● 0.00%
crates/node/src/dht/batch_fallback.rs 94.12% 112/119 ● 0.00%
crates/node/src/dht/capacity_bond_registry.rs 72.80% 364/500 ● 0.00%
crates/node/src/dht/chain_origin_directory.rs 70.43% 555/788 ● 0.00%
crates/node/src/dht/chain_staker_set.rs 84.03% 100/119 ● 0.00%
crates/node/src/dht/client.rs 76.95% 197/256 ● 0.00%
crates/node/src/dht/rate_limit.rs 98.77% 483/489 ● 0.00%
crates/node/src/dht/records.rs 98.83% 421/426 ● 0.00%
crates/node/src/dht/staker_set.rs 94.00% 47/50 ● 0.00%
crates/node/src/handlers/client/delivery.rs 95.39% 207/217 ● 0.00%
crates/node/src/handlers/client/dispatch.rs 83.76% 356/425 ● 0.00%
crates/node/src/handlers/client/fill.rs 65.83% 79/120 ● 0.00%

Showing top 50 of 70 changed files — see the workflow Step Summary for the full table.

History
Commit Total Δ vs base
530281d (HEAD) 80.79% ● 0.00%

alpergundogdu added a commit that referenced this pull request Aug 14, 2026
Reconcile the node-origin pull port with main's credit-slow-start ramped
credit window (#1691) and fixed voucher cadence (#1676), and the
present-tense comment rewrite (#1687).

- Delete resume.rs (the buffered loop this branch already replaced); main
  only rewrote its comments.
- Keep the collapsed SettleOnDrop (no SettleDeps enum / lifetime), our
  driver delivered_frontier completion clamp, and the AlreadyAdmitted +
  typed-fault-recovery ingest changes, alongside main's RampPacer rework.
- Restore the AtomicBool import dropped with main's LeechPacer removal.
- Resize the concurrent-resume fixture to span several VOUCHER_INTERVAL_BYTES
  so it still exercises mid-pull exhaustion under the ramped credit window.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@alpergundogdu
alpergundogdu deleted the claude/audit-history-voice-prose-3ee1bb branch August 17, 2026 17:47
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.

2 participants