Repository navigation
docs: rewrite history-voice comments and ADR prose into present-tense canon - #1687
Merged
Merged
Conversation
… 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]>
Contracts coverageLine coverage: 89.61% (2528/2821 lines) |
Gas snapshotNo gas changes vs base. |
There was a problem hiding this comment.
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.
Coverage reportTotal: 80.79% (was 80.79%, ● 0.00%) — 59397/73520 lines
Showing top 50 of 70 changed files — see the workflow Step Summary for the full table. History
|
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
0non-comment lines changed in any.rs/.sol.Scope
//////!///comments across all 12 cratescontracts/(src, script, test)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-emptyis a live voucher-signer render variant;PullTimeoutis a live sibling type, not defunct;Leg 1/2/3are 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.rsconsumesServeStoreviaobserve().node/src/node_origin/mod.rs(×3) — "gossips the candidate list as unreachable" corrected to a localUnreachableEWMA hit; ADR 008 reputation is local-only, no gossip tier.Also removed all references to the deleted
fetch_blob_streamingsymbol (the CLI fetch core is nowdrive).Verification
cargo fmt -- --check✅forge fmt --check✅cargo doc --no-deps --workspace -D warnings✅ (intra-doc links intact)Follow-ups (not in this PR)
metrics.rsassert-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