test(e2e): cover the act-as Safe flow end to end - #105
Open
douglance wants to merge 1 commit into
Open
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
douglance
force-pushed
the
siwe/act-as-specs
branch
from
August 17, 2026 17:28
4317c12 to
e74773d
Compare
douglance
force-pushed
the
siwe/act-as-specs
branch
from
August 19, 2026 21:02
e74773d to
41c5b2c
Compare
douglance
force-pushed
the
siwe/act-as-specs
branch
from
August 20, 2026 16:45
41c5b2c to
c8573a0
Compare
fionnachan
force-pushed
the
siwe/act-as-specs
branch
from
August 20, 2026 16:55
c8573a0 to
0a3f149
Compare
douglance
force-pushed
the
siwe/act-as-specs
branch
from
August 24, 2026 16:26
0a3f149 to
dce34aa
Compare
Exercises GET /api/auth/safes and POST/DELETE /api/auth/act-as against the real stack: by-address entry, 404 safe_not_found, client-side address validation, the full switch (banner, reload persistence, recall list, revert) and 403 not_an_owner. The empty-Safe-list test deliberately signs in as a key that owns no Safe rather than the profile key. The indexer only records a Safe after a successful act-as, and those known_safe rows outlive a run because the app schema is not namespaced by PONDER_SCHEMA — so asserting emptiness with a key that can act-as passes once and then fails forever. A key that structurally cannot populate the table is history-independent. The on-chain cases need a Safe on chain 412346 and are skipped unless TEST_SAFE_ADDRESS is set; the testnode image does not bake one yet.
douglance
force-pushed
the
siwe/act-as-specs
branch
from
August 27, 2026 18:08
dce34aa to
f488e0f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #104. Last of four.
Exercises
GET /api/auth/safesandPOST/DELETE /api/auth/act-asagainst the real stack (local governance testnode + ponder + Postgres):GET /api/auth/safessafe_not_foundPOST+DELETE /api/auth/act-asnot_an_ownerOne subtlety worth calling out
The empty-Safe-list test signs in as a key that owns no Safe, not the profile key. The indexer only records a Safe after a successful act-as, and those
known_saferows outlive a run because theappschema is not namespaced byPONDER_SCHEMA. Asserting emptiness with a key that can act-as therefore passes once and fails forever after.This actually happened during development: the test went green, then failed on the next run. A key that structurally cannot populate the table is history-independent, which is a stronger guarantee than remembering to reset the database first.
Skip condition
The two on-chain cases need a Safe on chain 412346 and are skipped unless
TEST_SAFE_ADDRESSis set. The testnode image does not bake one yet —OffchainLabs/arbitrum-governance-indexertestnode/safe-fixtureadds it, and both tests pass against that Safe locally:Verification
11 passed, three consecutive runs (5 setup + 5 act-as + existing profile spec).