Skip to content

test(contracts): add governance lifecycle suite (closes #693) - #695

Merged
thiras merged 2 commits into
mainfrom
test/governance-lifecycle-693
May 28, 2026
Merged

thiras merged 2 commits into
mainfrom
test/governance-lifecycle-693

Conversation

@thiras

@thiras thiras commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds contracts/test/GovernanceLifecycle.t.sol — 57 tests exercising the full propose → vote → queue → execute path against every GOVERNANCE_ROLE-gated setter (29 setters across 6 contracts).
  • Deploys the real FeeRouter, CapacityBond, DecdnGovernor, ContentBlacklist, SafetyReserve, PublisherRegistry, and TimelockController; performs the role hand-off in setUp() to mirror the production deploy ordering Production DeployProtocol.s.sol with atomic deployer→Timelock role handoff #694 will supply.
  • Three canary tests guard the assumptions every lifecycle test depends on: GOVERNANCE_ROLE actually held by Timelock on every target (with no deployer back door), Governor's executor IS the Timelock, and the served-bytes voting pipeline yields non-zero weight.

Test plan

  • forge fmt --check
  • FOUNDRY_PROFILE=ci forge build --deny warnings
  • forge test — 210/210 pass
  • slither — no medium-or-higher findings
  • aderyn — no high findings
  • solhint + forge-fmt pre-commit hooks

Coverage

  • FeeRouter.sol: 86.89% lines / 87.42% statements
  • DecdnGovernor.sol: 80.68% lines / 78.95% statements

Remaining gaps in CapacityBond/SafetyReserve/ContentBlacklist/PublisherRegistry are non-lifecycle branches (slashing, claims, appeals) that are out of scope for this issue.

Out of scope (follow-ups)

  • CapacityBond.setAlpha / setK / setMaxCapacityPerOperator / setAgeRampMonths — ADR 016 lists these as governable but they ship as immutables today. A separate issue should add the setters and amend this test file.
  • Mid-vote checkpoint-read tests (the I4 regression on voteCapBps/ageRampMonths/windowEpochs) — high-value follow-up but distinct from the lifecycle wiring this issue requires.
  • withdrawTo / payout / ratifyAppeal / reverseAppeal (governance-gated state actions, not parameter setters) — correctly excluded per issue text; worth tracking separately.

Closes #693.

🤖 Generated with Claude Code

Adds contracts/test/GovernanceLifecycle.t.sol — 57 tests exercising the
full propose → vote → queue → execute path against every
GOVERNANCE_ROLE-gated setter (29 setters across FeeRouter, CapacityBond,
DecdnGovernor, ContentBlacklist, SafetyReserve, PublisherRegistry).

Deploys real contracts (no mocks), hands GOVERNANCE_ROLE to the
Timelock in setUp() to mirror the production deploy ordering issue
#694 will supply, and seeds served-bytes via real routeSettlement so
the vote-weight / proposal-threshold / quorum pipeline is genuinely
exercised end-to-end. Each setter gets a happy-path + (where bounds
exist) an out-of-bounds revert test; three canaries guard the role
hand-off, executor identity, and vote-source wiring.

Closes #693.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 28, 2026 16:52
@github-actions

github-actions Bot commented May 28, 2026 •

Copy link
Copy Markdown

Gas snapshot

Gas changes vs base
Compiling 94 files with Solc 0.8.28
Solc 0.8.28 finished in 7.22s
Compiler run successful!

Ran 26 tests for test/CapacityBond.t.sol:CapacityBondTest
[PASS] test_claimVestedCredit_movesIntoActiveStake() (gas: 214330)
[PASS] test_claimVestedCredit_multiClaimFollowsLinearCurve() (gas: 218946)
[PASS] test_claimVestedCredit_revertsWhenNoActiveStake() (gas: 144394)
[PASS] test_claimVestedCredit_revertsWhenSlashedInWindow() (gas: 478976)
[PASS] test_claimVestedCredit_succeedsAfterSlashGateExpires() (gas: 482020)
[PASS] test_clearSlashedAtEpoch_clears() (gas: 389628)
[PASS] test_clearSlashedAtEpoch_requiresRole() (gas: 13524)
[PASS] test_creditSlash_routesThroughChallengerAndSafety() (gas: 475913)
[PASS] test_declaredMbps_storesValue() (gas: 37816)
[PASS] test_firstBondedAt_immutableAcrossReBonds() (gas: 111434)
[PASS] test_firstBondedAt_setsOnFirstStake() (gas: 102522)
[PASS] test_forfeitUnvestedCredit_burnsWhenNoTreasury() (gas: 246086)
[PASS] test_forfeitUnvestedCredit_doesNotClawBackVestedUnclaimed() (gas: 281790)
[PASS] test_forfeitUnvestedCredit_onUnbond() (gas: 290469)
[PASS] test_genesisCredit_fullVestAfterDuration() (gas: 141147)
[PASS] test_genesisCredit_grantWithinWindow() (gas: 139043)
[PASS] test_genesisCredit_revertsAfterWindow() (gas: 82695)
[PASS] test_genesisCredit_vestsLinearly() (gas: 141493)
[PASS] test_pendingCreditSlash_reducesOriginalGrant() (gas: 473127)
[PASS] test_slashHitsVestedAndUnvestedTogether() (gas: 516233)
[PASS] test_slashHitsVestedButUnclaimed() (gas: 483695)
[PASS] test_slashId_persistsRecord() (gas: 374509)
[PASS] test_slash_stampsSlashedAtEpoch() (gas: 374635)
[PASS] test_slash_succeedsEvenWhenInflowCallbackReverts() (gas: 335597)
[PASS] test_slashedAtEpoch_zeroBeforeSlash() (gas: 10130)
[PASS] test_updateRegion_cooldownAndPrevSnapshot() (gas: 506989)
Suite result: ok. 26 passed; 0 failed; 0 skipped; finished in 13.73ms (12.35ms CPU time)

Ran 13 tests for test/ContentBlacklist.t.sol:ContentBlacklistTest
[PASS] test_addHashGlobal_andQuery() (gas: 38191)
[PASS] test_addHashRegional_globalTakesPrecedence() (gas: 42002)
[PASS] test_addOperator_callsEjectOnCapacityBond() (gas: 91592)
[PASS] test_fullAppealFlow_ratifyRemovesHash() (gas: 275630)
[PASS] test_hasActiveAppeal_clearedOnLapseOpen() (gas: 242204)
[PASS] test_hasActiveAppeal_clearedOnReject() (gas: 433904)
[PASS] test_hasActiveAppeal_clearedOnReverse() (gas: 255003)
[PASS] test_openBlacklistAppeal_revertsDuplicatePerHash() (gas: 356697)
[PASS] test_openBlacklistAppeal_revertsOnEntryNotBlacklisted() (gas: 18678)
[PASS] test_openBlacklistAppeal_revertsOnZeroRegion() (gas: 16243)
[PASS] test_regionalCap_blocksMoreThanThreeActiveAppeals() (gas: 706600)
[PASS] test_rejectAppeal_burnsBond() (gas: 247916)
[PASS] test_reverseAppeal_clearsSuspendedAndBurnsBond() (gas: 261628)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 2.55ms (1.83ms CPU time)

Ran 11 tests for test/DecdnGovernor.t.sol:DecdnGovernorTest
[PASS] test_getVotes_halfRamp() (gas: 173099)
[PASS] test_getVotes_historicalSnapshotIgnoresFutureSlash() (gas: 221405)
[PASS] test_getVotes_ramp() (gas: 173019)
[PASS] test_getVotes_recoversAfterWindowSlidesPastSlash() (gas: 196807)
[PASS] test_getVotes_uncappedWhenBelowCap() (gas: 173050)
[PASS] test_getVotes_zeroIfNeverBonded() (gas: 93615)
[PASS] test_getVotes_zeroWhenSlashedInWindow() (gas: 119032)
[PASS] test_proposalThreshold_isPointOnePercent() (gas: 71784)
[PASS] test_quorum_isFourPercentOfTotalBytesInWindow() (gas: 71639)
[PASS] test_setVoteCapBps_enforcesBounds() (gas: 10766)
[PASS] test_voteCapBpsAt_preservesPriorReadAfterLaterPush() (gas: 4089459)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 4.26ms (2.96ms CPU time)

Ran 9 tests for test/FeeRouter.t.sol:FeeRouterTest
[PASS] test_bytesInWindow_sumsTrailingWindow() (gas: 540826)
[PASS] test_bytesInWindow_zeroWindowReturnsZero() (gas: 9304)
[PASS] test_routeSettlement_distributesFourLegs() (gas: 265962)
[PASS] test_routeSettlement_dustRoutesToOperatorWhenSafetyUnset() (gas: 157187)
[PASS] test_routeSettlement_incrementsBytesPerEpoch() (gas: 251733)
[PASS] test_routeSettlement_revertsWithoutRouterRole() (gas: 89206)
[PASS] test_setShares_rejectsNonZeroShareWithoutDestination() (gas: 15980)
[PASS] test_setShares_rejectsSumNot10000() (gas: 14436)
[PASS] test_setWindowEpochs_enforcesBounds() (gas: 32980)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 2.11ms (1.50ms CPU time)

Ran 14 tests for test/SafetyReserve.t.sol:SafetyReserveTest
[PASS] test_availableUsdc_subtractsEscrowLien() (gas: 334020)
[PASS] test_cleanupExpiredAppeal_openLapse() (gas: 247701)
[PASS] test_disbursePending_drainsAfterRefill() (gas: 448281)
[PASS] test_disbursePending_emitsSkippedWhenEmpty() (gas: 15301)
[PASS] test_fullAppealFlow_ratify() (gas: 459773)
[PASS] test_fullAppealFlow_reverseClearsSlashedAtEpoch() (gas: 329364)
[PASS] test_openSlashAppeal_revertsDuplicateSlashId() (gas: 339791)
[PASS] test_openSlashAppeal_revertsUnknownSlash() (gas: 28338)
[PASS] test_openSlashAppeal_validatesOperatorFromCapacityBond() (gas: 275621)
[PASS] test_payout_immediatePay() (gas: 202893)
[PASS] test_payout_queueOnInsufficientLiquidity() (gas: 124540)
[PASS] test_recordSlashInflow_attributesToOperator() (gas: 69520)
[PASS] test_rejectAppeal_burnsBond() (gas: 252406)
[PASS] test_swapAccumulatedTokens_revertsUntilImplemented() (gas: 75861)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 2.64ms (1.84ms CPU time)

Ran 57 tests for test/GovernanceLifecycle.t.sol:GovernanceLifecycleTest
[PASS] test_canary_executorIsTimelock() (gas: 9956)
[PASS] test_canary_governanceRoleHandoff() (gas: 99865)
[PASS] test_canary_governorVoteWeightWired() (gas: 130104)
[PASS] test_lifecycle_CapacityBond_setClaimSlashGateEpochs_happy() (gas: 589869)
[PASS] test_lifecycle_CapacityBond_setClaimSlashGateEpochs_outOfBounds() (gas: 595539)
[PASS] test_lifecycle_CapacityBond_setMaxMultiaddrSize_happy() (gas: 589811)
[PASS] test_lifecycle_CapacityBond_setMaxMultiaddrSize_outOfBounds() (gas: 595630)
[PASS] test_lifecycle_CapacityBond_setMinStake_happy() (gas: 589681)
[PASS] test_lifecycle_CapacityBond_setMinStake_outOfBounds() (gas: 595475)
[PASS] test_lifecycle_CapacityBond_setMultiaddrUpdateCooldown_happy() (gas: 606709)
[PASS] test_lifecycle_CapacityBond_setMultiaddrUpdateCooldown_outOfBounds() (gas: 595447)
[PASS] test_lifecycle_CapacityBond_setRegionStabilityWindow_happy() (gas: 589724)
[PASS] test_lifecycle_CapacityBond_setRegionStabilityWindow_outOfBounds() (gas: 595496)
[PASS] test_lifecycle_CapacityBond_setSafetyReserve_happy() (gas: 3049525)
[PASS] test_lifecycle_CapacityBond_setSafetyReserve_outOfBounds() (gas: 595306)
[PASS] test_lifecycle_CapacityBond_setTreasury_happy() (gas: 607159)
[PASS] test_lifecycle_CapacityBond_setUnbondingPeriod_happy() (gas: 589650)
[PASS] test_lifecycle_CapacityBond_setUnbondingPeriod_outOfBounds() (gas: 595523)
[PASS] test_lifecycle_ContentBlacklist_addHashGlobal_happy() (gas: 610068)
[PASS] test_lifecycle_ContentBlacklist_addHashGlobal_outOfBounds() (gas: 597655)
[PASS] test_lifecycle_ContentBlacklist_addOperator_happy() (gas: 638737)
[PASS] test_lifecycle_ContentBlacklist_addOperator_outOfBounds() (gas: 597792)
[PASS] test_lifecycle_ContentBlacklist_registerRegionalBody_happy() (gas: 611619)
[PASS] test_lifecycle_ContentBlacklist_removeHashGlobal_happy() (gas: 995859)
[PASS] test_lifecycle_ContentBlacklist_removeHashGlobal_outOfBounds() (gas: 600203)
[PASS] test_lifecycle_ContentBlacklist_removeOperator_happy() (gas: 1024308)
[PASS] test_lifecycle_ContentBlacklist_setAppealBond_happy() (gas: 592133)
[PASS] test_lifecycle_ContentBlacklist_setAppealBond_outOfBounds() (gas: 597976)
[PASS] test_lifecycle_ContentBlacklist_setOriginBlacklist_happy() (gas: 610775)
[PASS] test_lifecycle_ContentBlacklist_setOriginBlacklist_outOfBounds() (gas: 598541)
[PASS] test_lifecycle_DecdnGovernor_setAgeRampMonths_happy() (gas: 631479)
[PASS] test_lifecycle_DecdnGovernor_setAgeRampMonths_outOfBounds() (gas: 637131)
[PASS] test_lifecycle_DecdnGovernor_setVoteCapBps_happy() (gas: 631463)
[PASS] test_lifecycle_DecdnGovernor_setVoteCapBps_outOfBounds() (gas: 637194)
[PASS] test_lifecycle_FeeRouter_setBuybackBurner_happy() (gas: 590066)
[PASS] test_lifecycle_FeeRouter_setBuybackBurner_outOfBounds() (gas: 597524)
[PASS] test_lifecycle_FeeRouter_setSafetyReserve_happy() (gas: 590109)
[PASS] test_lifecycle_FeeRouter_setSafetyReserve_outOfBounds() (gas: 597546)
[PASS] test_lifecycle_FeeRouter_setSharesAndDestinations_happy() (gas: 639036)
[PASS] test_lifecycle_FeeRouter_setSharesAndDestinations_outOfBounds() (gas: 602359)
[PASS] test_lifecycle_FeeRouter_setShares_happy() (gas: 615394)
[PASS] test_lifecycle_FeeRouter_setShares_outOfBounds() (gas: 598320)
[PASS] test_lifecycle_FeeRouter_setTreasury_happy() (gas: 590071)
[PASS] test_lifecycle_FeeRouter_setTreasury_outOfBounds() (gas: 595290)
[PASS] test_lifecycle_FeeRouter_setWindowEpochs_happy() (gas: 611941)
[PASS] test_lifecycle_FeeRouter_setWindowEpochs_outOfBounds() (gas: 597946)
[PASS] test_lifecycle_PublisherRegistry_setMaxNamespacesPerPublisher_happy() (gas: 592437)
[PASS] test_lifecycle_PublisherRegistry_setMaxNamespacesPerPublisher_outOfBounds() (gas: 597948)
[PASS] test_lifecycle_PublisherRegistry_setNamespaceTransferTimelock_happy() (gas: 592245)
[PASS] test_lifecycle_PublisherRegistry_setNamespaceTransferTimelock_outOfBounds() (gas: 597971)
[PASS] test_lifecycle_SafetyReserve_setAppealBond_happy() (gas: 592529)
[PASS] test_lifecycle_SafetyReserve_setAppealBond_outOfBounds() (gas: 598015)
[PASS] test_lifecycle_SafetyReserve_setBalancerPool_happy() (gas: 610089)
[PASS] test_lifecycle_SafetyReserve_setBalancerPool_outOfBounds() (gas: 597846)
[PASS] test_lifecycle_SafetyReserve_setChallengerIncentivePool_happy() (gas: 592836)
[PASS] test_lifecycle_SafetyReserve_setChallengerIncentivePool_outOfBounds() (gas: 597891)
[PASS] test_lifecycle_SafetyReserve_setMaxAppealRestitution_happy() (gas: 592501)
Suite result: ok. 57 passed; 0 failed; 0 skipped; finished in 162.55ms (142.46ms CPU time)

Ran 44 tests for test/TestnetFaucet.t.sol:TestnetFaucetTest
[PASS] testFuzz_claim_atOrAboveCooldown(uint256) (runs: 1024, μ: 91487, ~: 91528)
[PASS] testFuzz_claim_belowCooldown(uint256) (runs: 1024, μ: 85156, ~: 85389)
[PASS] test_admin_canGrantAndRevokeRoles() (gas: 56401)
[PASS] test_claim_blocksReentrancy() (gas: 1550228)
[PASS] test_claim_happyPath() (gas: 82821)
[PASS] test_claim_perCallerCooldownIndependence() (gas: 133478)
[PASS] test_claim_revertsBeforeCooldown() (gas: 83092)
[PASS] test_claim_revertsOnInsufficientBalance() (gas: 50715)
[PASS] test_claim_revertsOneSecondBeforeCooldownBoundary() (gas: 82996)
[PASS] test_claim_revertsWhenPaused() (gas: 39998)
[PASS] test_claim_succeedsAfterCooldown() (gas: 90430)
[PASS] test_claim_succeedsAtExactCooldownBoundary() (gas: 87103)
[PASS] test_constructor_allowsZeroCooldown() (gas: 1810378)
[PASS] test_constructor_revertsOnCooldownExceedingMax() (gas: 1015061)
[PASS] test_constructor_revertsOnMainnetChainId() (gas: 988198)
[PASS] test_constructor_revertsOnZeroAdmin() (gas: 985898)
[PASS] test_constructor_revertsOnZeroClaimAmount() (gas: 988045)
[PASS] test_constructor_revertsOnZeroFunding() (gas: 988061)
[PASS] test_constructor_revertsOnZeroGovernance() (gas: 985864)
[PASS] test_constructor_revertsOnZeroPauser() (gas: 985954)
[PASS] test_constructor_revertsOnZeroTokenAddress() (gas: 70468)
[PASS] test_constructor_revertsOnZeroTreasury() (gas: 987830)
[PASS] test_constructor_revertsWhenTreasuryNotApproved() (gas: 1110690)
[PASS] test_constructor_setsStateAndRoles() (gas: 43070)
[PASS] test_nonAdmin_cannotGrantRoles() (gas: 17889)
[PASS] test_pause_blocksClaimUnpauseRestores() (gas: 91691)
[PASS] test_pause_revertsOnNonPauser() (gas: 14607)
[PASS] test_setClaimAmount_revertsOnNonGovernance() (gas: 14702)
[PASS] test_setClaimAmount_revertsOnZero() (gas: 13338)
[PASS] test_setClaimAmount_updatesAndEmits() (gas: 22083)
[PASS] test_setCooldown_acceptsMaxCooldown() (gas: 20228)
[PASS] test_setCooldown_allowsZero() (gas: 94920)
[PASS] test_setCooldown_revertsOnExceedingMax() (gas: 13790)
[PASS] test_setCooldown_revertsOnNonGovernance() (gas: 14705)
[PASS] test_setCooldown_updatesAndEmits() (gas: 22231)
[PASS] test_timeUntilNext_tracksCooldownWindow() (gas: 82615)
[PASS] test_timeUntilNext_zeroBeforeFirstClaim() (gas: 10099)
[PASS] test_unpause_revertsOnNonPauser() (gas: 43483)
[PASS] test_withdraw_revertsOnInsufficientBalance() (gas: 26877)
[PASS] test_withdraw_revertsOnNonGovernance() (gas: 17089)
[PASS] test_withdraw_revertsOnZeroAmount() (gas: 20838)
[PASS] test_withdraw_revertsOnZeroTo() (gas: 18662)
[PASS] test_withdraw_transfersAndEmits() (gas: 44129)
[PASS] test_withdraw_worksWhilePaused() (gas: 68286)
Suite result: ok. 44 passed; 0 failed; 0 skipped; finished in 244.99ms (243.43ms CPU time)

Ran 10 tests for test/Token.t.sol:TokenTest
[PASS] testFuzz_burn_reducesSupplyByExactAmount(uint256) (runs: 1024, μ: 27808, ~: 27700)
[PASS] test_burnFrom_consumesAllowance() (gas: 38534)
[PASS] test_burn_reducesTotalSupplyAndBalance() (gas: 26044)
[PASS] test_constructor_metadata() (gas: 17896)
[PASS] test_constructor_mintsFullSupplyToHolder() (gas: 12954)
[PASS] test_constructor_revertsOnZeroInitialHolder() (gas: 83264)
[PASS] test_constructor_totalSupplyConstantMatches() (gas: 9364)
[PASS] test_noMintFunctionExposed() (gas: 10765)
[PASS] test_noVotesSurfaceExposed() (gas: 11991)
[PASS] test_permit_setsAllowance() (gas: 67380)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 73.31ms (72.84ms CPU time)

Ran 26 tests for test/PublisherRegistry.t.sol:PublisherRegistryTest
[PASS] testFuzz_createNamespace_idsAreSequentialAndOwned(uint8) (runs: 1024, μ: 716358, ~: 427148)
[PASS] test_claimContent_multiClaimAcrossNamespaces() (gas: 233820)
[PASS] test_claimContent_recordsClaim() (gas: 134733)
[PASS] test_claimContent_revertsForDefaultOpenNamespace() (gas: 13756)
[PASS] test_claimContent_revertsIfNotOwner() (gas: 66829)
[PASS] test_claimContent_revertsOnDuplicateSameNamespace() (gas: 135341)
[PASS] test_constructor_revertsZeroAdmin() (gas: 36674)
[PASS] test_constructor_setsDefaultsAndRoles() (gas: 19037)
[PASS] test_createNamespace_assignsIdsFromOne() (gas: 92750)
[PASS] test_createNamespace_revertsAtCap() (gas: 98492)
[PASS] test_createNamespace_zeroIsNeverAssigned() (gas: 65471)
[PASS] test_namespaceOf_emptyForUnclaimed() (gas: 8273)
[PASS] test_setMaxNamespaces_revertsOutOfBounds() (gas: 17627)
[PASS] test_setMaxNamespaces_revertsWithoutRole() (gas: 13384)
[PASS] test_setMaxNamespaces_withinBounds() (gas: 20687)
[PASS] test_setTransferTimelock_revertsOutOfBounds() (gas: 17706)
[PASS] test_setTransferTimelock_withinBounds() (gas: 20560)
[PASS] test_transfer_cancelByOwner() (gas: 78690)
[PASS] test_transfer_cancelRevertsIfNotOwner() (gas: 93302)
[PASS] test_transfer_finalizeRevertsIfNotPendingOwner() (gas: 93817)
[PASS] test_transfer_finalizeRevertsNoPending() (gas: 68566)
[PASS] test_transfer_fullFlow() (gas: 98658)
[PASS] test_transfer_initiateRevertsIfNotOwner() (gas: 66923)
[PASS] test_transfer_initiateRevertsZeroNewOwner() (gas: 64330)
[PASS] test_transfer_revertsWhenRecipientAtCap() (gas: 150145)
[PASS] test_transfer_selfTransferExemptFromCap() (gas: 95404)
Suite result: ok. 26 passed; 0 failed; 0 skipped; finished in 551.39ms (551.93ms CPU time)

Ran 9 test suites in 723.18ms (1.06s CPU time): 210 tests passed, 0 failed, 0 skipped (210 total tests)
━ CapacityBondTest::test_claimVestedCredit_movesIntoActiveStake() (gas: 214330 → 214330 | 0 0.000%)
━ CapacityBondTest::test_claimVestedCredit_multiClaimFollowsLinearCurve() (gas: 218946 → 218946 | 0 0.000%)
━ CapacityBondTest::test_claimVestedCredit_revertsWhenNoActiveStake() (gas: 144394 → 144394 | 0 0.000%)
━ CapacityBondTest::test_claimVestedCredit_revertsWhenSlashedInWindow() (gas: 478976 → 478976 | 0 0.000%)
━ CapacityBondTest::test_claimVestedCredit_succeedsAfterSlashGateExpires() (gas: 482020 → 482020 | 0 0.000%)
━ CapacityBondTest::test_clearSlashedAtEpoch_clears() (gas: 389628 → 389628 | 0 0.000%)
━ CapacityBondTest::test_clearSlashedAtEpoch_requiresRole() (gas: 13524 → 13524 | 0 0.000%)
━ CapacityBondTest::test_creditSlash_routesThroughChallengerAndSafety() (gas: 475913 → 475913 | 0 0.000%)
━ CapacityBondTest::test_declaredMbps_storesValue() (gas: 37816 → 37816 | 0 0.000%)
━ CapacityBondTest::test_firstBondedAt_immutableAcrossReBonds() (gas: 111434 → 111434 | 0 0.000%)
━ CapacityBondTest::test_firstBondedAt_setsOnFirstStake() (gas: 102522 → 102522 | 0 0.000%)
━ CapacityBondTest::test_forfeitUnvestedCredit_burnsWhenNoTreasury() (gas: 246086 → 246086 | 0 0.000%)
━ CapacityBondTest::test_forfeitUnvestedCredit_doesNotClawBackVestedUnclaimed() (gas: 281790 → 281790 | 0 0.000%)
━ CapacityBondTest::test_forfeitUnvestedCredit_onUnbond() (gas: 290469 → 290469 | 0 0.000%)
━ CapacityBondTest::test_genesisCredit_fullVestAfterDuration() (gas: 141147 → 141147 | 0 0.000%)
━ CapacityBondTest::test_genesisCredit_grantWithinWindow() (gas: 139043 → 139043 | 0 0.000%)
━ CapacityBondTest::test_genesisCredit_revertsAfterWindow() (gas: 82695 → 82695 | 0 0.000%)
━ CapacityBondTest::test_genesisCredit_vestsLinearly() (gas: 141493 → 141493 | 0 0.000%)
━ CapacityBondTest::test_pendingCreditSlash_reducesOriginalGrant() (gas: 473127 → 473127 | 0 0.000%)
━ CapacityBondTest::test_slashHitsVestedAndUnvestedTogether() (gas: 516233 → 516233 | 0 0.000%)
━ CapacityBondTest::test_slashHitsVestedButUnclaimed() (gas: 483695 → 483695 | 0 0.000%)
━ CapacityBondTest::test_slashId_persistsRecord() (gas: 374509 → 374509 | 0 0.000%)
━ CapacityBondTest::test_slash_stampsSlashedAtEpoch() (gas: 374635 → 374635 | 0 0.000%)
━ CapacityBondTest::test_slash_succeedsEvenWhenInflowCallbackReverts() (gas: 335597 → 335597 | 0 0.000%)
━ CapacityBondTest::test_slashedAtEpoch_zeroBeforeSlash() (gas: 10130 → 10130 | 0 0.000%)
━ CapacityBondTest::test_updateRegion_cooldownAndPrevSnapshot() (gas: 506989 → 506989 | 0 0.000%)
━ ContentBlacklistTest::test_addHashGlobal_andQuery() (gas: 38191 → 38191 | 0 0.000%)
━ ContentBlacklistTest::test_addHashRegional_globalTakesPrecedence() (gas: 42002 → 42002 | 0 0.000%)
━ ContentBlacklistTest::test_addOperator_callsEjectOnCapacityBond() (gas: 91592 → 91592 | 0 0.000%)
━ ContentBlacklistTest::test_fullAppealFlow_ratifyRemovesHash() (gas: 275630 → 275630 | 0 0.000%)
━ ContentBlacklistTest::test_hasActiveAppeal_clearedOnLapseOpen() (gas: 242204 → 242204 | 0 0.000%)
━ ContentBlacklistTest::test_hasActiveAppeal_clearedOnReject() (gas: 433904 → 433904 | 0 0.000%)
━ ContentBlacklistTest::test_hasActiveAppeal_clearedOnReverse() (gas: 255003 → 255003 | 0 0.000%)
━ ContentBlacklistTest::test_openBlacklistAppeal_revertsDuplicatePerHash() (gas: 356697 → 356697 | 0 0.000%)
━ ContentBlacklistTest::test_openBlacklistAppeal_revertsOnEntryNotBlacklisted() (gas: 18678 → 18678 | 0 0.000%)
━ ContentBlacklistTest::test_openBlacklistAppeal_revertsOnZeroRegion() (gas: 16243 → 16243 | 0 0.000%)
━ ContentBlacklistTest::test_regionalCap_blocksMoreThanThreeActiveAppeals() (gas: 706600 → 706600 | 0 0.000%)
━ ContentBlacklistTest::test_rejectAppeal_burnsBond() (gas: 247916 → 247916 | 0 0.000%)
━ ContentBlacklistTest::test_reverseAppeal_clearsSuspendedAndBurnsBond() (gas: 261628 → 261628 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_halfRamp() (gas: 173099 → 173099 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_historicalSnapshotIgnoresFutureSlash() (gas: 221405 → 221405 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_ramp() (gas: 173019 → 173019 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_recoversAfterWindowSlidesPastSlash() (gas: 196807 → 196807 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_uncappedWhenBelowCap() (gas: 173050 → 173050 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_zeroIfNeverBonded() (gas: 93615 → 93615 | 0 0.000%)
━ DecdnGovernorTest::test_getVotes_zeroWhenSlashedInWindow() (gas: 119032 → 119032 | 0 0.000%)
━ DecdnGovernorTest::test_proposalThreshold_isPointOnePercent() (gas: 71784 → 71784 | 0 0.000%)
━ DecdnGovernorTest::test_quorum_isFourPercentOfTotalBytesInWindow() (gas: 71639 → 71639 | 0 0.000%)
━ DecdnGovernorTest::test_setVoteCapBps_enforcesBounds() (gas: 10766 → 10766 | 0 0.000%)
━ DecdnGovernorTest::test_voteCapBpsAt_preservesPriorReadAfterLaterPush() (gas: 4089459 → 4089459 | 0 0.000%)
━ FeeRouterTest::test_bytesInWindow_sumsTrailingWindow() (gas: 540826 → 540826 | 0 0.000%)
━ FeeRouterTest::test_bytesInWindow_zeroWindowReturnsZero() (gas: 9304 → 9304 | 0 0.000%)
━ FeeRouterTest::test_routeSettlement_distributesFourLegs() (gas: 265962 → 265962 | 0 0.000%)
━ FeeRouterTest::test_routeSettlement_dustRoutesToOperatorWhenSafetyUnset() (gas: 157187 → 157187 | 0 0.000%)
━ FeeRouterTest::test_routeSettlement_incrementsBytesPerEpoch() (gas: 251733 → 251733 | 0 0.000%)
━ FeeRouterTest::test_routeSettlement_revertsWithoutRouterRole() (gas: 89206 → 89206 | 0 0.000%)
━ FeeRouterTest::test_setShares_rejectsNonZeroShareWithoutDestination() (gas: 15980 → 15980 | 0 0.000%)
━ FeeRouterTest::test_setShares_rejectsSumNot10000() (gas: 14436 → 14436 | 0 0.000%)
━ FeeRouterTest::test_setWindowEpochs_enforcesBounds() (gas: 32980 → 32980 | 0 0.000%)
━ PublisherRegistryTest::test_claimContent_multiClaimAcrossNamespaces() (gas: 233820 → 233820 | 0 0.000%)
━ PublisherRegistryTest::test_claimContent_recordsClaim() (gas: 134733 → 134733 | 0 0.000%)
━ PublisherRegistryTest::test_claimContent_revertsForDefaultOpenNamespace() (gas: 13756 → 13756 | 0 0.000%)
━ PublisherRegistryTest::test_claimContent_revertsIfNotOwner() (gas: 66829 → 66829 | 0 0.000%)
━ PublisherRegistryTest::test_claimContent_revertsOnDuplicateSameNamespace() (gas: 135341 → 135341 | 0 0.000%)
━ PublisherRegistryTest::test_constructor_revertsZeroAdmin() (gas: 36674 → 36674 | 0 0.000%)
━ PublisherRegistryTest::test_constructor_setsDefaultsAndRoles() (gas: 19037 → 19037 | 0 0.000%)
━ PublisherRegistryTest::test_createNamespace_assignsIdsFromOne() (gas: 92750 → 92750 | 0 0.000%)
━ PublisherRegistryTest::test_createNamespace_revertsAtCap() (gas: 98492 → 98492 | 0 0.000%)
━ PublisherRegistryTest::test_createNamespace_zeroIsNeverAssigned() (gas: 65471 → 65471 | 0 0.000%)
━ PublisherRegistryTest::test_namespaceOf_emptyForUnclaimed() (gas: 8273 → 8273 | 0 0.000%)
━ PublisherRegistryTest::test_setMaxNamespaces_revertsOutOfBounds() (gas: 17627 → 17627 | 0 0.000%)
━ PublisherRegistryTest::test_setMaxNamespaces_revertsWithoutRole() (gas: 13384 → 13384 | 0 0.000%)
━ PublisherRegistryTest::test_setMaxNamespaces_withinBounds() (gas: 20687 → 20687 | 0 0.000%)
━ PublisherRegistryTest::test_setTransferTimelock_revertsOutOfBounds() (gas: 17706 → 17706 | 0 0.000%)
━ PublisherRegistryTest::test_setTransferTimelock_withinBounds() (gas: 20560 → 20560 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_cancelByOwner() (gas: 78690 → 78690 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_cancelRevertsIfNotOwner() (gas: 93302 → 93302 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_finalizeRevertsIfNotPendingOwner() (gas: 93817 → 93817 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_finalizeRevertsNoPending() (gas: 68566 → 68566 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_fullFlow() (gas: 98658 → 98658 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_initiateRevertsIfNotOwner() (gas: 66923 → 66923 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_initiateRevertsZeroNewOwner() (gas: 64330 → 64330 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_revertsWhenRecipientAtCap() (gas: 150145 → 150145 | 0 0.000%)
━ PublisherRegistryTest::test_transfer_selfTransferExemptFromCap() (gas: 95404 → 95404 | 0 0.000%)
━ SafetyReserveTest::test_availableUsdc_subtractsEscrowLien() (gas: 334020 → 334020 | 0 0.000%)
━ SafetyReserveTest::test_cleanupExpiredAppeal_openLapse() (gas: 247701 → 247701 | 0 0.000%)
━ SafetyReserveTest::test_disbursePending_drainsAfterRefill() (gas: 448281 → 448281 | 0 0.000%)
━ SafetyReserveTest::test_disbursePending_emitsSkippedWhenEmpty() (gas: 15301 → 15301 | 0 0.000%)
━ SafetyReserveTest::test_fullAppealFlow_ratify() (gas: 459773 → 459773 | 0 0.000%)
━ SafetyReserveTest::test_fullAppealFlow_reverseClearsSlashedAtEpoch() (gas: 329364 → 329364 | 0 0.000%)
━ SafetyReserveTest::test_openSlashAppeal_revertsDuplicateSlashId() (gas: 339791 → 339791 | 0 0.000%)
━ SafetyReserveTest::test_openSlashAppeal_revertsUnknownSlash() (gas: 28338 → 28338 | 0 0.000%)
━ SafetyReserveTest::test_openSlashAppeal_validatesOperatorFromCapacityBond() (gas: 275621 → 275621 | 0 0.000%)
━ SafetyReserveTest::test_payout_immediatePay() (gas: 202893 → 202893 | 0 0.000%)
━ SafetyReserveTest::test_payout_queueOnInsufficientLiquidity() (gas: 124540 → 124540 | 0 0.000%)
━ SafetyReserveTest::test_recordSlashInflow_attributesToOperator() (gas: 69520 → 69520 | 0 0.000%)
━ SafetyReserveTest::test_rejectAppeal_burnsBond() (gas: 252406 → 252406 | 0 0.000%)
━ TestnetFaucetTest::testFuzz_claim_atOrAboveCooldown(uint256) (gas: 91528 → 91528 | 0 0.000%)
━ TestnetFaucetTest::testFuzz_claim_belowCooldown(uint256) (gas: 85389 → 85389 | 0 0.000%)
━ TestnetFaucetTest::test_admin_canGrantAndRevokeRoles() (gas: 56401 → 56401 | 0 0.000%)
━ TestnetFaucetTest::test_claim_blocksReentrancy() (gas: 1550228 → 1550228 | 0 0.000%)
━ TestnetFaucetTest::test_claim_happyPath() (gas: 82821 → 82821 | 0 0.000%)
━ TestnetFaucetTest::test_claim_perCallerCooldownIndependence() (gas: 133478 → 133478 | 0 0.000%)
━ TestnetFaucetTest::test_claim_revertsBeforeCooldown() (gas: 83092 → 83092 | 0 0.000%)
━ TestnetFaucetTest::test_claim_revertsOnInsufficientBalance() (gas: 50715 → 50715 | 0 0.000%)
━ TestnetFaucetTest::test_claim_revertsOneSecondBeforeCooldownBoundary() (gas: 82996 → 82996 | 0 0.000%)
━ TestnetFaucetTest::test_claim_revertsWhenPaused() (gas: 39998 → 39998 | 0 0.000%)
━ TestnetFaucetTest::test_claim_succeedsAfterCooldown() (gas: 90430 → 90430 | 0 0.000%)
━ TestnetFaucetTest::test_claim_succeedsAtExactCooldownBoundary() (gas: 87103 → 87103 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_allowsZeroCooldown() (gas: 1810378 → 1810378 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnCooldownExceedingMax() (gas: 1015061 → 1015061 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnMainnetChainId() (gas: 988198 → 988198 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroAdmin() (gas: 985898 → 985898 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroClaimAmount() (gas: 988045 → 988045 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroFunding() (gas: 988061 → 988061 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroGovernance() (gas: 985864 → 985864 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroPauser() (gas: 985954 → 985954 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroTokenAddress() (gas: 70468 → 70468 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsOnZeroTreasury() (gas: 987830 → 987830 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_revertsWhenTreasuryNotApproved() (gas: 1110690 → 1110690 | 0 0.000%)
━ TestnetFaucetTest::test_constructor_setsStateAndRoles() (gas: 43070 → 43070 | 0 0.000%)
━ TestnetFaucetTest::test_nonAdmin_cannotGrantRoles() (gas: 17889 → 17889 | 0 0.000%)
━ TestnetFaucetTest::test_pause_blocksClaimUnpauseRestores() (gas: 91691 → 91691 | 0 0.000%)
━ TestnetFaucetTest::test_pause_revertsOnNonPauser() (gas: 14607 → 14607 | 0 0.000%)
━ TestnetFaucetTest::test_setClaimAmount_revertsOnNonGovernance() (gas: 14702 → 14702 | 0 0.000%)
━ TestnetFaucetTest::test_setClaimAmount_revertsOnZero() (gas: 13338 → 13338 | 0 0.000%)
━ TestnetFaucetTest::test_setClaimAmount_updatesAndEmits() (gas: 22083 → 22083 | 0 0.000%)
━ TestnetFaucetTest::test_setCooldown_acceptsMaxCooldown() (gas: 20228 → 20228 | 0 0.000%)
━ TestnetFaucetTest::test_setCooldown_allowsZero() (gas: 94920 → 94920 | 0 0.000%)
━ TestnetFaucetTest::test_setCooldown_revertsOnExceedingMax() (gas: 13790 → 13790 | 0 0.000%)
━ TestnetFaucetTest::test_setCooldown_revertsOnNonGovernance() (gas: 14705 → 14705 | 0 0.000%)
━ TestnetFaucetTest::test_setCooldown_updatesAndEmits() (gas: 22231 → 22231 | 0 0.000%)
━ TestnetFaucetTest::test_timeUntilNext_tracksCooldownWindow() (gas: 82615 → 82615 | 0 0.000%)
━ TestnetFaucetTest::test_timeUntilNext_zeroBeforeFirstClaim() (gas: 10099 → 10099 | 0 0.000%)
━ TestnetFaucetTest::test_unpause_revertsOnNonPauser() (gas: 43483 → 43483 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_revertsOnInsufficientBalance() (gas: 26877 → 26877 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_revertsOnNonGovernance() (gas: 17089 → 17089 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_revertsOnZeroAmount() (gas: 20838 → 20838 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_revertsOnZeroTo() (gas: 18662 → 18662 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_transfersAndEmits() (gas: 44129 → 44129 | 0 0.000%)
━ TestnetFaucetTest::test_withdraw_worksWhilePaused() (gas: 68286 → 68286 | 0 0.000%)
━ TokenTest::testFuzz_burn_reducesSupplyByExactAmount(uint256) (gas: 27700 → 27700 | 0 0.000%)
━ TokenTest::test_burnFrom_consumesAllowance() (gas: 38534 → 38534 | 0 0.000%)
━ TokenTest::test_burn_reducesTotalSupplyAndBalance() (gas: 26044 → 26044 | 0 0.000%)
━ TokenTest::test_constructor_metadata() (gas: 17896 → 17896 | 0 0.000%)
━ TokenTest::test_constructor_mintsFullSupplyToHolder() (gas: 12954 → 12954 | 0 0.000%)
━ TokenTest::test_constructor_revertsOnZeroInitialHolder() (gas: 83264 → 83264 | 0 0.000%)
━ TokenTest::test_constructor_totalSupplyConstantMatches() (gas: 9364 → 9364 | 0 0.000%)
━ TokenTest::test_noMintFunctionExposed() (gas: 10765 → 10765 | 0 0.000%)
━ TokenTest::test_noVotesSurfaceExposed() (gas: 11991 → 11991 | 0 0.000%)
━ TokenTest::test_permit_setsAllowance() (gas: 67380 → 67380 | 0 0.000%)
↑ SafetyReserveTest::test_swapAccumulatedTokens_revertsUntilImplemented() (gas: 75826 → 75861 | 35 0.046%)
↓ PublisherRegistryTest::testFuzz_createNamespace_idsAreSequentialAndOwned(uint8) (gas: 427490 → 427148 | -342 -0.080%)

New tests:
  + GovernanceLifecycleTest::test_canary_executorIsTimelock()
  + GovernanceLifecycleTest::test_canary_governanceRoleHandoff()
  + GovernanceLifecycleTest::test_canary_governorVoteWeightWired()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setClaimSlashGateEpochs_happy()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setClaimSlashGateEpochs_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMaxMultiaddrSize_happy()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMaxMultiaddrSize_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMinStake_happy()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMinStake_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMultiaddrUpdateCooldown_happy()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setMultiaddrUpdateCooldown_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setRegionStabilityWindow_happy()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setRegionStabilityWindow_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setSafetyReserve_happy()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setSafetyReserve_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setTreasury_happy()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setUnbondingPeriod_happy()
  + GovernanceLifecycleTest::test_lifecycle_CapacityBond_setUnbondingPeriod_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_addHashGlobal_happy()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_addHashGlobal_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_addOperator_happy()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_addOperator_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_registerRegionalBody_happy()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_removeHashGlobal_happy()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_removeHashGlobal_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_removeOperator_happy()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_setAppealBond_happy()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_setAppealBond_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_setOriginBlacklist_happy()
  + GovernanceLifecycleTest::test_lifecycle_ContentBlacklist_setOriginBlacklist_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_DecdnGovernor_setAgeRampMonths_happy()
  + GovernanceLifecycleTest::test_lifecycle_DecdnGovernor_setAgeRampMonths_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_DecdnGovernor_setVoteCapBps_happy()
  + GovernanceLifecycleTest::test_lifecycle_DecdnGovernor_setVoteCapBps_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setBuybackBurner_happy()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setBuybackBurner_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setSafetyReserve_happy()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setSafetyReserve_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setSharesAndDestinations_happy()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setSharesAndDestinations_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setShares_happy()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setShares_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setTreasury_happy()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setTreasury_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setWindowEpochs_happy()
  + GovernanceLifecycleTest::test_lifecycle_FeeRouter_setWindowEpochs_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_PublisherRegistry_setMaxNamespacesPerPublisher_happy()
  + GovernanceLifecycleTest::test_lifecycle_PublisherRegistry_setMaxNamespacesPerPublisher_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_PublisherRegistry_setNamespaceTransferTimelock_happy()
  + GovernanceLifecycleTest::test_lifecycle_PublisherRegistry_setNamespaceTransferTimelock_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_SafetyReserve_setAppealBond_happy()
  + GovernanceLifecycleTest::test_lifecycle_SafetyReserve_setAppealBond_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_SafetyReserve_setBalancerPool_happy()
  + GovernanceLifecycleTest::test_lifecycle_SafetyReserve_setBalancerPool_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_SafetyReserve_setChallengerIncentivePool_happy()
  + GovernanceLifecycleTest::test_lifecycle_SafetyReserve_setChallengerIncentivePool_outOfBounds()
  + GovernanceLifecycleTest::test_lifecycle_SafetyReserve_setMaxAppealRestitution_happy()

--------------------------------------------------------------------------------
Total tests: 153, ↑ 1, ↓ 1, ━ 151
Overall gas change: -307 (-0.001%)

Run: 26589452026

@github-actions

github-actions Bot commented May 28, 2026 •

Copy link
Copy Markdown

Contracts coverage

Line coverage: 76.92% (973/1265 lines)
▲ +9.03pp vs base (67.88% → 76.92%)
Run: 26589452026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces GovernanceLifecycle.t.sol to test the full governance lifecycle (propose, vote, queue, and execute) for all governable target contracts. The review identifies critical access control issues in the deployment setup: the deployer fails to renounce TIMELOCK_ADMIN_ROLE on the Timelock, and retains DEFAULT_ADMIN_ROLE on the target contracts, leaving potential backdoors. It is recommended to properly transfer and renounce these administrative roles, and update the canary tests to verify these security boundaries.

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

Adds an end-to-end Foundry test suite that exercises the real on-chain governance path (propose → vote → queue → execute) against all governable setters across the protocol’s core contracts, validating that parameter updates (and expected reverts) actually flow through DecdnGovernor and the TimelockController.

Changes:

  • Introduces GovernanceLifecycle.t.sol with table-style lifecycle tests for setter happy paths and out-of-bounds revert paths across FeeRouter, CapacityBond, ContentBlacklist, SafetyReserve, PublisherRegistry, plus Governor self-params.
  • Deploys production-shaped contract graph in setUp() and seeds served-bytes-based vote weight to satisfy proposal threshold + quorum requirements.
  • Adds canary tests to validate core assumptions (role wiring, timelock executor binding, non-zero voting pipeline).

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

Addresses review feedback on #695:

- Hand off DEFAULT_ADMIN_ROLE (OZ AccessControl meta-admin) to the
  Timelock in addition to GOVERNANCE_ROLE on every target. Without
  this, the deployer could re-grant itself GOVERNANCE_ROLE at any time
  via AccessControl.grantRole, bypassing the Timelock entirely.
- Extend the canary to assert GOVERNANCE_ROLE + DEFAULT_ADMIN_ROLE are
  held by Timelock and not by the deployer on all five targets (was
  only checking router + bond).
- Read votingDelay/votingPeriod/getMinDelay from the deployed contracts
  in lifecycle helpers instead of duplicating constants, so a future
  schedule change in DecdnGovernor doesn't silently desync the test.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@thiras
thiras merged commit 9822c05 into main May 28, 2026
19 checks passed
@thiras
thiras deleted the test/governance-lifecycle-693 branch May 28, 2026 17:01
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.

Governance lifecycle test suite: propose → vote → queue → execute for every governable parameter

2 participants