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

safe-global / safe-client-gateway / 24890845979
90%

Build:
DEFAULT BRANCH: main
Ran 24 Apr 2026 01:05PM UTC
Jobs 2
Files 1150
Run time 4min
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: 89.968% (+0.002%) from 89.966%
24890845979

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)

3309 of 4117 branches covered (80.37%)

Branch coverage included in aggregate %.

54 of 57 new or added lines in 4 files covered. (94.74%)

15658 of 16965 relevant lines covered (92.3%)

559.58 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
85.71
src/modules/counterfactual-safes/datasources/entities/counterfactual-safe-user.entity.db.ts
1
20.83
0.0% src/modules/counterfactual-safes/routes/counterfactual-safes.service.ts
Jobs
ID Job ID Ran Files Coverage
1 run-unit-tests - 24890845979.1 24 Apr 2026 01:05PM UTC 2018
56.97
GitHub Action Run
2 run-integration-tests - 24890845979.2 24 Apr 2026 01:06PM UTC 2213
79.17
GitHub Action Run
Source Files on build 24890845979
  • Tree
  • List 1150
  • Changed 321
  • Source Changed 4
  • Coverage Changed 320
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #24890845979
  • d5a03b51 on github
  • Prev Build on main (#24884888691)
  • Next Build on main (#24999258699)
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