Repository navigation
Description
Follow-up from the review of #1291 (merged). Refs #1181.
#1291 landed in two commits: the first bumped _blacklistVersion only on hash add/remove and documented it that way; the second (responding to review) made the appeal-driven suspended toggle bump it too, via a new _setEntrySuspended choke point. The second commit updated only some of the prose the first wrote.
No behavior is wrong — this is purely doc accuracy.
Contract
-
contracts/src/ContentBlacklist.sol:207-220— the_blacklistVersionstorage NatSpec still says"Bumped once per hash add and once per hash removal, across every path"and names"the two internal choke points \_addHash and \_removeHashRegional". There are now three choke points, and suspend/resume also bumps. It directly contradicts thegetBlacklistVersion()NatSpec at:493, which is correct. This is the highest-value fix: the stated rationale — "so no call site has to remember to increment it" — is exactly what a maintainer adding a new appeal path will rely on, and following it as written would produce a missed bump. -
:501and:909-910, pluscontracts/test/ContentBlacklist.t.sol:236— these citeADR 011 § 248and§ 325, which are line numbers, not section names. The substance checks out (both lines do say operators detect resumption via thegetBlacklistVersion()poll cycle), but the pointers rot on the next ADR edit. Verified replacements: § Authority and flow (heading at line 210) and § Compliance Window (heading at line 313). -
:498and:908, plusContentBlacklist.t.sol:178— sayisBlacklisted, which is the ADR's name for the view. The contract's actual externals areisHashBlacklisted/isHashBlacklistedInRegion/isHashBlacklistedForOperator(:449/:453/:467). A maintainer grepping the contract forisBlacklistedfinds nothing. Reserve that spelling for explicit ADR quotations.
Tests
-
contracts/test/ContentBlacklist.t.sol:146— the docblock claimstest_getBlacklistVersion_bumpsOnEveryAddAndRemovecovers"the appeal-ratification path (which removes via the same choke point)". It does not: the test only callsaddHashGlobal/addHashRegional/removeHashGlobal/removeHashRegionaland never touches an appeal. Ratification is covered by the test at:210. Risk: someone trusting this docblock deletes the real ratification assertion as redundant. -
contracts/test/ContentBlacklist.t.sol:206—// Ratification removes the entry, so that one bumps.sits immediately above thefastTrackBlacklistAppealcall, which is a different bump; the ratify call is two lines below. The fast-track's own bump — the reasonversionAfterSuspendmust be captured rather than compared againstversionAfterAdd— is left unexplained, and that is the one thing a reader needs there.
ADR
adr/011-content-takedown.md:143(§ Blacklist version) still reads "incremented on every add/remove operation across all paths". The contract now exceeds this — it also bumps on appeal-driven suspend/resume, justified by § Authority and flow and § Compliance Window, which both have operators detect appeal resumption off this poll cycle. Three contract comments cite § Blacklist version as authority for behavior it does not describe. Amend it to include suspend/resume so the citations are fully supported.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
fix(contracts): correct overstated comments and cover the ratify path (…
docs(contracts): replace rotted line-number ADR citations with sectio…