• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 24890845979 / 1
90%
main: 90%

Build:
DEFAULT BRANCH: main
Ran 24 Apr 2026 01:06PM UTC
Files 2018
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Apr 2026 01:01PM UTC coverage: 56.971% (-0.2%) from 57.149%
24890845979.1

push

github

web-flow
feat: share counterfactual safes across users via junction table (#3055)

* feat: share counterfactual safes across users via junction table

Before, each row in `counterfactual_safes` was owned by a single creator
and the POST endpoint rejected any subsequent attempt to register the
same (chainId, address) pair with a 409, even if the submitted init
params matched exactly. This blocked a common real-world scenario where
two space members independently add the same counterfactual safe to
separate spaces (for example, after one member copies the safe from
another space and then adds a new chain that the original member later
tries to add too).

- Add a `counterfactual_safe_users` junction table keyed on
  `(counterfactual_safe_id, user_id)`, backfilled from the existing
  `creator_id`. `creator_id` is retained as first-creator audit metadata.
- Make the create path idempotent: when a row exists for (chainId,
  address) and every init param matches exactly, insert only the
  association for the caller; when init params differ, raise 409.
- Rename `findByCreatorId` to `findByUserId` and query through the
  junction so callers see every safe they are associated with, not only
  ones they authored.
- Delete now removes only the caller's association and keeps the
  canonical row (preserving the association graph for other users and
  spaces).

The 22 repository integration tests cover the new idempotent-match,
params-mismatch-409, second-user-attach, and delete-only-unlinks paths
against a real Postgres.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: prettier

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor: address review feedback on counterfactual-safes create

- Race safety: replace the find→insert sequence with a single bulk
  INSERT ... ON CONFLICT DO NOTHING, then SELECT back the authoritative
  canonical rows. Under concurrent POSTs for the same (chainId, address)
  one transaction win... (continued)

2427 of 4309 branches covered (56.32%)

Branch coverage included in aggregate %.

18034 of 31606 relevant lines covered (57.06%)

60.25 hits per line

Source Files on job run-unit-tests - 24890845979.1
  • Tree
  • List 2018
  • Changed 307
  • Source Changed 4
  • Coverage Changed 306
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24890845979
  • d5a03b51 on github
  • Prev Job for on main (#24884888691.2)
  • Next Job for on main (#24999258699.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc