Repository navigation
docs(adr): finish the reputation-floor removal and drop a dead attack vector - #1452
Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe ADR updates multi-source admission to use a unified score incorporating rate, RTT, and reputation. Related eviction-policy documentation clarifies that reputation affects selection, not cache or peer-table eviction. ChangesReputation selection guidance
Estimated code review effort: 2 (Simple) | ~10 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 |
Coverage reportTotal: 81.09% (was 81.07%, ▲ +0.01%) — 52476/64715 lines
History
|
ReviewThe Rust removal is clean and matches the #1438 scope exactly — Verified locally on
Three things worth addressing before this leaves draft. 1. ADR 039 drops reputation from source selection entirely, not just the floor
Pre-PR, the floor was the only path by which reputation entered multi-source admission. Removing it leaves reputation with no role in choosing sources — which contradicts
This also undercuts the issue's core rationale — that poor nodes stay de-prioritized by
That converts the hard filter into the graded weight, which is exactly what #1438 argues we keep. (Alternative: strike "reputation" from line 110 — but that's a real design change, not a doc cleanup, and it should be called out as one.) 2. Stale CHANGELOG entry
The sibling removal (#1396/#1399) updated 3. Open question 3 from #1438 is unansweredThe issue asks whether ADR 001 should retain a one-line note that reputation acts only as a graded weight after removal, "so the design intent is explicit and the floor is not silently re-added later". The PR deletes the subsection without it. A sentence after the reputation table — e.g. "Reputation is a graded weight in the score, never a veto: no reputation value removes a candidate from the pool before scoring" — is cheap insurance and directly answers the question. Worth a line in the PR body either way, since the body doesn't record how questions 1–3 were resolved. Minor / confirm intent
Nothing here blocks the removal itself — the code change is right and shipped behavior is unchanged. Generated by Claude Code |
|
Pushed
Left as-is, deliberately: the ADR 037 proxy path stays RTT-only — that's an explicit design property there (region-spoof resistance), the code never enforced the floor on that pool, and warming is opt-in/default-off. And the Checks run locally on the doc changes: Generated by Claude Code |
7e22020 to
484ab68
Compare
… vector Rebased onto main after #1456 landed the min-reputation rejection-floor removal (#1438). The code removal, ADR 001's "graded weight, not a veto" paragraph, ADR 037's candidate-pool wording, and the CHANGELOG entry are all already on main and are dropped from this branch. What remains are the stale reference sites #1456 did not cover, plus one #1418 left behind. ADR 039 § Source set and selection. The floor was the only path by which reputation entered multi-source admission. #1456 removed the floor clause but left "preferring lower RTT and lower rate" in its place, so the admitted set ranked on RTT and rate alone — contradicting this ADR's own Cross-ADR Impact entry, which states selection uses the same RTT, price, reputation, and diversity inputs as ADR 001. Cite ADR 001's unified selection score instead (its own term, defined at ADR 001 § Node Selection Algorithm), which carries reputation as the graded weight the removal keeps. Citing the formula rather than paraphrasing it also removes a standing rot vector: the old wording was already a lossy restatement that silently dropped reputation, wrong against ADR 001 even before #1456. The collusive-reporting vector no longer exists. Two rejected-alternative entries in adr/_history/alternatives-pre-launch.md and one live paragraph in adr/appendix-blob-cache-eviction.md argued that coupling reputation to eviction "creates a collusive-reporting vector". That vector was a coalition sending negative ReputationReport messages to push a competitor below an eviction threshold — and #1418 deleted ReputationReport, the cdn/reputation/v1 topic, and all cross-node aggregation. Reputation is local-only; no peer can move another node's score, so the premise is gone. #1418 removed the argument from appendix-peer-table-eviction.md but missed its two archive compressions and the parallel claim in appendix-blob-cache-eviction.md, which it never touched. Drop the clause in all three places, leaving the two rationales the live appendix still states (conflates discovery with selection; reputation is noisy in the tail). The rejections themselves are unchanged. Docs only. Not fixed here: "admissible" at ADR 039 §§ 25/55/116 lost its definition when #1456 removed the floor it referred to, and the archive's bare section refs (§1, §3, §4, §6-§11) predate #610 dropping ADR section numbering — both pre-existing and wider than this change. Co-Authored-By: Claude Opus 5 <[email protected]>
484ab68 to
0c480f4
Compare
Follow-up to #1456 (min-reputation rejection floor, #1438) and #1418 (reputation network tier). This branch predated #1456 and originally carried the same floor removal; the rebase drops everything #1456 already landed — the
selection.rschanges, ADR 001's "graded weight, not a veto" paragraph, ADR 037's candidate-pool wording, and the CHANGELOG entry. What remains are the stale sites those two PRs left behind.ADR 039 § Source set and selection
The floor was the only path by which reputation entered multi-source admission. #1456 removed the floor clause but left
preferring lower RTT and lower ratein its place, so the admitted set ranked on RTT and rate alone — contradicting this ADR's own Cross-ADR Impact entry, which states selection uses the same RTT, price, reputation, and diversity inputs as ADR 001.Now cites ADR 001's unified selection score — its own verbatim term, defined at ADR 001 § Node Selection Algorithm as
rate_per_mb × rtt_ms × (1 / max(reputation, 0.1)²)and implemented incrates/node/src/selection.rs. Citing the formula rather than paraphrasing it also closes a standing rot vector: the old wording was already a lossy restatement that silently dropped reputation, wrong against ADR 001 even before #1456.The collusive-reporting vector no longer exists
Two rejected-alternative entries in
adr/_history/alternatives-pre-launch.mdand one live paragraph inadr/appendix-blob-cache-eviction.mdargued that coupling reputation to eviction "creates a collusive-reporting vector".That vector was a coalition sending negative
ReputationReportmessages to push a competitor below an eviction threshold. #1418 deletedReputationReport, thecdn/reputation/v1topic, and all cross-node aggregation — reputation is now local-only, so no peer can move another node's score and the premise is gone. #1418 removed the argument fromappendix-peer-table-eviction.mdbut missed its two archive compressions and the parallel claim inappendix-blob-cache-eviction.md, which that PR never touched.Dropped in all three places, leaving the two rationales the live appendix still states: conflates discovery with selection, and reputation is noisy in the tail. The rejections themselves are unchanged.
Notes
Docs only: 3 files, +4/-4. No code, no contract surface, no gas snapshot, no public-API snapshot change. Downstream repos unaffected —
finance/params.pycarries no selection parameters.Deliberately not fixed here, both pre-existing and wider than this change:
admissibleat ADR 039 §§ 25/55/116 lost its definition when refactor: drop two dead knobs — min-reputation floor and trusted-IP rate-limit exemption #1456 removed the floor it referred to.§1,§3,§4,§6–§11) predate docs(adr): drop all section numbering; reference sections by name only #610 dropping ADR section numbering; fixing one of nine would create inconsistency.#1438 is already closed by #1456; this PR intentionally uses no closing keyword.
Summary by CodeRabbit