Skip to content

ci(e2e): deploy the act-as test Safe so those specs stop skipping - #111

Open
douglance wants to merge 3 commits into
siwe/remaining-specsfrom
ci/e2e
Open

ci(e2e): deploy the act-as test Safe so those specs stop skipping#111
douglance wants to merge 3 commits into
siwe/remaining-specsfrom
ci/e2e

Conversation

@douglance

Copy link
Copy Markdown
Contributor

The act-as specs read getOwners() off a real Safe and skip themselves without TEST_SAFE_ADDRESS, so CI was running them as no-ops. This deploys the Safe after the chain boots and wires its address into the Playwright env.

Deploying beats baking it into the image: the script is idempotent (it reuses a Safe whose owners still match), takes seconds, and this way the image tag stays put instead of needing a version bump and a write:packages token.

The step is guarded on the script existing, because indexer-ref is a workflow input — on a ref without it, the step no-ops and those tests go back to skipping rather than failing the run.

Deliberately not added: reset:siwe and a per-run PONDER_SCHEMA

Both were in the plan. Neither belongs here.

The Postgres service container is created fresh for every job, so the ponder schema and the SIWE app tables already start empty. Those two steps matter against a long-lived local database:

  • a chain reboot rewinds the head under a schema that recorded a later block (Finalized block for chain "412346" cannot move backwards)
  • act-as leaves session rows behind between runs, which is what made the local suite non-idempotent until the tables were truncated

In CI neither can happen, so adding them would be machinery for an impossible failure. The reasoning is recorded in the workflow so the next person doesn't have to rediscover it.

Verified: prettier clean, the step's shell body passes bash -n, and the locally equivalent sequence (boot → bake → export TEST_SAFE_ADDRESS → run) produced three consecutive green suites.

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
tally-zero Ready Ready Preview Aug 27, 2026 6:11pm

Request Review

Comment thread .github/workflows/ci.yml
Comment on lines +14 to +39
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile

# Deliberately not `pnpm lint` / `pnpm test`: those run `eslint --fix .`,
# which repairs fixable violations and exits 0, so drift never surfaces on
# a gate. The pre-commit hook keeps `--fix` for local convenience.
- name: Lint
run: pnpm exec eslint .

- name: Typecheck
run: pnpm exec tsc --noEmit

- name: Unit tests
run: pnpm exec vitest run

# Separate job: unlike the ~15s gates above, this prerenders ~240 pages
# (proposals + contenders) and the tracked data/delegates-*.json make checkout
# heavy, so it must not delay the fast required checks.
build:
Comment thread .github/workflows/ci.yml
Comment on lines +40 to +53
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
# env.ts requires this one; every other key is optional.
- name: Build
run: pnpm build
env:
NEXT_PUBLIC_REOWN_PROJECT_ID: test
Comment on lines +130 to +134
JSON.stringify({
jsonrpc: "2.0",
id: null,
error: { code: -32000, message: String(error) },
})
dlance and others added 3 commits August 27, 2026 13:49
The act-as specs read getOwners() off a real Safe and skip themselves
without TEST_SAFE_ADDRESS, so CI was running them as no-ops. This deploys
the Safe after the chain boots and wires its address into the Playwright
env. Deploying beats baking it into the image: the script is idempotent,
takes seconds, and this way the image tag stays put instead of needing a
version bump and a write:packages token.

The step is guarded on the script existing because `indexer-ref` is a
workflow input — on a ref without it, the step no-ops and those tests go
back to skipping rather than failing the run.

Deliberately NOT adding `reset:siwe` or a per-run PONDER_SCHEMA, both of
which the plan called for. The Postgres service container is created fresh
for every job, so the ponder schema and the SIWE `app` tables already
start empty. Those two steps matter against a long-lived local database —
a chain reboot rewinds the head under a schema that recorded a later
block, and act-as leaves session rows behind between runs, which is what
made the local suite non-idempotent until the tables were truncated. In CI
neither can happen, so adding them would be machinery for an impossible
failure. The reasoning is recorded in the workflow so the next person does
not have to rediscover it.

Verified: prettier clean, the step's shell body passes `bash -n`, and the
locally equivalent sequence (boot, bake, export TEST_SAFE_ADDRESS, run)
produced three consecutive green suites.
computeWeightInfo decides how much a member-election vote is worth and had no
tests. The decay curve also existed twice — once over bigint L1 blocks here,
once over float days in VoteWeightChart — with nothing forcing them to agree,
so the plotted curve and the banner percentage could silently diverge. Moves
the day-based curve next to its twin and adds a property test comparing them
across the span.

Extracts selectRelevantStageTypes out of ProposalStages' useMemo so the 7-vs-4
stage derivation is reachable as a unit. It is fed the real gov-tracker list,
so an SDK change surfaces as a failing test.

Adds a CI job running eslint (without --fix, unlike the test script), tsc and
vitest on PRs. These gates take ~15s and were previously enforced only by a
bypassable pre-commit hook.
…testnode

The chain is now Nitro compiled to wasm, running in a headless browser page.
browser-nitro-host.mjs serves it over HTTP on :8547 so Node clients — notably
the Ponder indexer — can reach a chain that lives inside a browser; that was
the blocker a Service Worker could not solve.

The engine boots an empty chain, but the indexer derives delegates, proposals
and elections from logs, so state alone is not enough. capture-l2-history.mjs
records the testnode's history once and replay-l2-history.mjs re-executes it.
Because CREATE/CREATE2 addresses derive from sender and nonce, replaying the
same transactions in order reproduces every contract at its original address,
so the existing governance manifest keeps working unchanged. l2-history.json
is committed because regenerating it needs the very testnode this removes.

network.ts points RPC at the local stack and refuses all remote egress, so a
spec cannot silently fall back to public mainnet. testnode.ts resolves the
act-as Safe from the testnode manifest rather than an env var, which stops
two specs skipping whenever TEST_SAFE_ADDRESS was not exported.

candidates.spec.ts stubs the elections list instead of branching on live
state; the two cases were inverted twins, so only one could ever run.

Adds governance-lifecycle.spec.ts covering the proposal lifecycle view, the
first e2e coverage of the governance core.
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.

2 participants