Skip to content

feat(dashboard): anvil fork test for the full governance lifecycle - #2133

Draft
brunod-e wants to merge 5 commits into
devfrom
feat/governance-fork-test
Draft

feat(dashboard): anvil fork test for the full governance lifecycle#2133
brunod-e wants to merge 5 commits into
devfrom
feat/governance-fork-test

Conversation

@brunod-e

Copy link
Copy Markdown
Collaborator

What

An automated end-to-end test of the full governance lifecycle (create proposal, vote, queue, execute) against an anvil fork of mainnet, exercising the exact code the dashboard uses to send transactions: submitProposalRequest, voteOnProposal, queueProposal and executeProposal.

pnpm --filter @anticapture/dashboard test:governance uni comp gtc torn ens

Proposers and voters are the DAO's real top delegates, fetched live from the Anticapture API and impersonated on the fork, so thresholds and quorums are met with genuine delegated voting power. Every step asserts the on-chain proposal state and that tallies match the cast power exactly.

Real voting windows span days of blocks, so the harness shrinks them on the throwaway fork (governor timing slots for Bravo-style governors, the proposal's vote window in _proposals storage for OZ governors, ERC-7201 namespaces discovered automatically), always verified against the governor's own getters. GOV_REAL_TIMING=1 keeps real timing.

Validation on this branch

  • ENS: full lifecycle PASS (propose, Pending, Active, for/against/abstain, exact tallies, Succeeded, Queued, Executed through the 2-day timelock)
  • COMP and GTC: full lifecycle PASS (validated with this same harness; re-validated in their whitelabel PRs)
  • UNI: fails at propose on dev, as expected, since the GovernorBravo propose path lives in feat/uniswap-whitelabel (full lifecycle PASSES there)
  • TORN: voting for accounts without delegators reverts on-chain (castDelegatedVote requires a non-empty list); the fix ships with the Tornado whitelabel PR

A failing DAO is the harness doing its job: it means that branch's dashboard cannot run that DAO's governance on-chain.

🤖 Generated with Claude Code

…ycle

Adds scripts/governance-fork-test, run with
pnpm --filter @anticapture/dashboard test:governance <dao...|all>.

It spawns an anvil fork of mainnet, fetches each DAO's top delegates from
the Anticapture API, impersonates them, and drives propose, vote, queue
and execute through the dashboard's own transaction code
(submitProposalRequest, voteOnProposal, queueProposal, executeProposal),
asserting proposal state and exact vote tallies at every step.

Because real voting windows span days of blocks, the harness shrinks them
on the throwaway fork (governor timing slots for Bravo-style governors,
the proposal's vote window in _proposals storage for OZ governors, with
ERC-7201 namespaces discovered automatically), always verified against
the governor's own getters. GOV_REAL_TIMING=1 keeps real timing.

Supported DAOs: uni, comp, gtc, torn, ens.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
anticapture-storybook Ready Ready Preview Aug 19, 2026 12:44am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
anticapture Ignored Ignored Aug 19, 2026 12:44am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94fafd9a5b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/dashboard/scripts/governance-fork-test/fork.ts Outdated
@railway-app

railway-app Bot commented Aug 18, 2026

Copy link
Copy Markdown

🚅 Deployed to the anticapture-pr-2133 environment in anticapture-infra

Service Status Web Updated (UTC)
shutter-indexer-offchain ✅ Success (View Logs) Aug 19, 2026 at 12:10 pm
nouns-indexer ✅ Success (View Logs) Aug 19, 2026 at 2:27 am
mcp ✅ Success (View Logs) Web Aug 19, 2026 at 2:19 am
gitcoin-indexer ✅ Success (View Logs) Aug 19, 2026 at 2:18 am
aave-indexer ✅ Success (View Logs) Aug 19, 2026 at 2:17 am
scroll-indexer ✅ Success (View Logs) Aug 19, 2026 at 2:16 am
obol-indexer ✅ Success (View Logs) Aug 19, 2026 at 2:15 am
prometheus ✅ Success (View Logs) Aug 19, 2026 at 2:13 am
grafana ✅ Success (View Logs) Web Aug 19, 2026 at 2:12 am
alertmanager ✅ Success (View Logs) Web Aug 19, 2026 at 1:58 am
lil-nouns-indexer ✅ Success (View Logs) Aug 19, 2026 at 1:54 am
gateful ❌ Build Failed (View Logs) Web Aug 19, 2026 at 1:42 am
tempo ✅ Success (View Logs) Aug 19, 2026 at 1:39 am
authful ✅ Success (View Logs) Web Aug 19, 2026 at 1:38 am
tornado-indexer ✅ Success (View Logs) Aug 19, 2026 at 1:11 am
aave-api ✅ Success (View Logs) Aug 19, 2026 at 1:11 am
gitcoin-api ✅ Success (View Logs) Aug 19, 2026 at 1:10 am
nouns-api ✅ Success (View Logs) Aug 19, 2026 at 1:10 am
compound-api ✅ Success (View Logs) Aug 19, 2026 at 1:10 am
obol-api ✅ Success (View Logs) Aug 19, 2026 at 1:10 am
otelcol ✅ Success (View Logs) Aug 19, 2026 at 1:09 am
uniswap-indexer ✅ Success (View Logs) Aug 19, 2026 at 1:09 am
nodeful ✅ Success (View Logs) Aug 19, 2026 at 1:09 am
address-enrichment ❌ Build Failed (View Logs) Web Aug 19, 2026 at 1:06 am
erpc ❌ Build Failed (View Logs) Aug 19, 2026 at 1:05 am
docs ✅ Success (View Logs) Web Aug 19, 2026 at 1:03 am
shutter-api ❌ Build Failed (View Logs) Aug 19, 2026 at 1:02 am
shutter-indexer ❌ Build Failed (View Logs) Aug 19, 2026 at 1:02 am
scroll-api ❌ Build Failed (View Logs) Aug 19, 2026 at 1:00 am
compound-indexer-offchain ❌ Build Failed (View Logs) Aug 19, 2026 at 12:59 am
uniswap-api ❌ Build Failed (View Logs) Aug 19, 2026 at 12:59 am
uniswap-indexer-offchain ❌ Build Failed (View Logs) Aug 19, 2026 at 12:58 am
compound-indexer ❌ Build Failed (View Logs) Aug 19, 2026 at 12:58 am
ens-relayer ❌ Build Failed (View Logs) Aug 19, 2026 at 12:57 am
ens-api ❌ Build Failed (View Logs) Aug 19, 2026 at 12:57 am
fluid-indexer ❌ Build Failed (View Logs) Aug 19, 2026 at 12:56 am
loki ❌ Build Failed (View Logs) Aug 19, 2026 at 12:56 am
fluid-api ❌ Build Failed (View Logs) Aug 19, 2026 at 12:53 am
ens-indexer ❌ Build Failed (View Logs) Aug 19, 2026 at 12:52 am
tornado-api ❌ Build Failed (View Logs) Aug 19, 2026 at 12:49 am
ens-indexer-offchain ❌ Build Failed (View Logs) Aug 19, 2026 at 12:48 am
lil-nouns-api ❌ Build Failed (View Logs) Aug 19, 2026 at 12:47 am
user-api ❌ Build Failed (View Logs) Web Aug 19, 2026 at 12:43 am
gitcoin-indexer-offchain ❌ Build Failed (View Logs) Aug 19, 2026 at 12:34 am

…ard in the fork test

Once the Tornado whitelabel PR lands, TORN proposals go through
submitProposalRequest (propose(target, description)) and execution goes
through executeProposal after the built-in execution delay, so the
harness now exercises those paths instead of proposing directly. The
synthetic proposal contract gets a single STOP opcode via setCode so the
governance delegatecall on execute succeeds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d4e08cb34

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/dashboard/scripts/governance-fork-test/fork.ts
…Tornado propose

The Tornado propose path now only accepts a single action calling
executeProposal() on the proposal contract, so the harness sends that
selector instead of empty calldata.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f24f65335c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/dashboard/scripts/governance-fork-test/fork.ts Outdated
Comment thread apps/dashboard/scripts/governance-fork-test/harness.ts
…sh gateway URLs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant