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

safe-global / safe-client-gateway / 38579474780
91%

Build:
DEFAULT BRANCH: main
Ran 14 Oct 2026 02:20PM UTC
Jobs 4
Files 1046
Run time 2min
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

14 Oct 2026 02:19PM UTC coverage: 89.973% (+0.02%) from 89.957%
38579474780

push

github

web-flow
feat(policies): Guard based policies in active policies api (#3449)

* feat(policies): report guard policies alongside allowance state

Adds the SafePolicy field to the indexer read and the mapper that turns it
into payloads, so /policies/active reports both mechanisms in one list. This is
where removing event aggregation pays off: `SafePolicy.state` is the recipient
list already folded from every `configure` delta, so this maps one row to one
payload - no replay, no per-access grouping, no delta folding.

Five kinds are rendered: the token allowlist, the cosigner, and the three
stateless fallbacks. ERC20_APPROVE, ALLOWED_MODULE, MULTISEND and the
NONE/UNKNOWN the indexer reports for an unbound or unregistered policy are
skipped and logged - rendering an unknown restriction is worse than omitting it.

Two details the tests pin because they are silently wrong otherwise:

- the allowlist's token is the access target, not something inside the state.
  The policy keys its recipients by token, so the binding names the token its
  list applies to.
- a binding whose state is not the shape its kind implies is skipped, not
  coerced. That combination means the indexer's registry and CGW disagree about
  a policy address, which deserves a log line rather than a guess.

One item per binding: rows sharing a storage key already carry the same folded
state, so `transfer` and `transferFrom` on one token report the same list -
which is what the guard enforces.

An allowlist entry is an address plus a permission: the policy holds `ONCE` or
`ALWAYS` per entry, so one list can carry a single-use grant beside an
open-ended one. The value lives inside the indexer's jsonb rather than in a
column, so CGW validates the pair itself and skips a binding whose permission
it cannot read - guessing between a single-use and an open-ended grant would
misreport what the Safe permits.

`enabled` compares the binding's guard against the guard the Safe has set, so a
policy configured th... (continued)

4657 of 5416 branches covered (85.99%)

Branch coverage included in aggregate %.

55 of 55 new or added lines in 10 files covered. (100.0%)

3 existing lines in 3 files now uncovered.

11844 of 12924 relevant lines covered (91.64%)

369.17 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
86.67
-5.0% src/modules/notifications/routes/v1/notifications.controller.ts
1
82.57
-0.92% src/modules/relay/domain/relayers/no-fee-campaign.relayer.ts
1
93.65
-1.59% src/modules/transactions/routes/mappers/common/transaction-data.mapper.ts
Jobs
ID Job ID Ran Files Coverage
1 run-unit-tests - 38579474780.1 14 Oct 2026 02:21PM UTC 1046
67.44
GitHub Action Run
2 run-integration-tests-3 - 38579474780.2 14 Oct 2026 02:20PM UTC 1046
43.41
GitHub Action Run
3 run-integration-tests-1 - 38579474780.3 14 Oct 2026 02:21PM UTC 1046
38.42
GitHub Action Run
4 run-integration-tests-2 - 38579474780.4 14 Oct 2026 02:21PM UTC 1046
42.36
GitHub Action Run
Source Files on build 38579474780
  • Tree
  • List 1046
  • Changed 30
  • Source Changed 14
  • Coverage Changed 28
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #38579474780
  • d095afa6 on github
  • Prev Build on main (#38577902981)
  • Next Build on main (#38581295179)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc