Skip to content

test(BOP-494): cover SEIZE_RECEIVER_POLICY in the seize smoke journey - #189

Merged
stephancill merged 1 commit into
mainfrom
stephancilliers/bop-494-seize-receiver-smoke
Aug 4, 2026
Merged

test(BOP-494): cover SEIZE_RECEIVER_POLICY in the seize smoke journey#189
stephancill merged 1 commit into
mainfrom
stephancilliers/bop-494-seize-receiver-smoke

Conversation

@stephancill

Copy link
Copy Markdown
Contributor

What

Extends the Cobalt seize smoke journey (BOP-486) to exercise the new SEIZE_RECEIVER_POLICY gate on the seize destination, added in base-std #188 (BOP-491). Mirrors MINT_RECEIVER_POLICY: unset = allow-any, configured = the destination must be authorized.

Changes

  • config.py: add the SEIZE_RECEIVER_POLICY keccak constant.
  • journeys/seize.py:
    • step 1 also asserts the SEIZE_RECEIVER_POLICY() getter matches the constant.
    • new receiver-policy section: (a) unset scope allows seizing to any destination (seize to deployer lands); (b) configure an allowlist authorizing bob, seize to bob succeeds; (c) seize to an unauthorized destination reverts PolicyForbids(SEIZE_RECEIVER_POLICY, ...).
    • assert AllowlistUpdated in the emitted-events set.
  • README.md: note the coverage in the seize row.

The existing decoupling step (seize ignores the transfer receiver policy on to) is retained and still correct — that's a different scope from SEIZE_RECEIVER_POLICY.

Testing

  • python -m py_compile clean; logic + balance trace reviewed against the existing journey conventions.
  • Still fork-gated: probes SEIZE_HOLDER_POLICY() and skips cleanly on a pre-Cobalt chain.
  • Full end-to-end run requires a local Cobalt anvil fork built against the base/base seize surface (incl. BOP-492's SEIZE_RECEIVER_POLICY), matching how BOP-486 is validated — the suite is advisory/manual (no gating smoke CI). I can post a local 7/7 green run once BOP-492 lands if desired.

Ticket: https://linear.app/coinbase/issue/BOP-494

Extends the Cobalt seize journey to exercise the new receiver-side gate on `to`:
the SEIZE_RECEIVER_POLICY() getter, the unset default (allow-any), a configured
allowlist authorizing the destination, and the PolicyForbids revert for an
unauthorized destination. Still fork-gated (skips pre-Cobalt via the
SEIZE_HOLDER_POLICY() probe).

- config: add SEIZE_RECEIVER_POLICY constant.
- seize journey: getter assertion + new receiver-policy section (unset allows any
  destination; allowlist(bob) lets the seize land; unauthorized `to` reverts
  PolicyForbids); assert AllowlistUpdated in the emitted-events set.
- README: note the SEIZE_RECEIVER_POLICY coverage in the seize row.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
@linear

linear Bot commented Aug 4, 2026

Copy link
Copy Markdown

BOP-494

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Interface Coverage

✅ All interface functions have test coverage.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

📊 Forge Coverage (src/lib/)

🟡 ≥95% across all metrics — some metrics below 99%.

File Lines Stmts Branches Funcs
🔴 B20FactoryLib.sol 95.40% 96.00% 100.00% 90.00%
🔴 test/lib/ForceFeeder.sol 0.00% 0.00% 100.00% 0.00%
🔴 test/lib/PrecompileProbe.sol 0.00% 0.00% 0.00% 0.00%
🟢 MockActivationRegistry.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockActivationRegistryStorage.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockB20.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockB20Asset.sol 100.00% 100.00% 100.00% 100.00%
🟡 MockB20Factory.sol 98.96% 99.10% 100.00% 100.00%
🟢 MockB20Stablecoin.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockB20Storage.sol 100.00% 100.00% 100.00% 100.00%
🟡 MockPolicyRegistry.sol 100.00% 99.54% 97.67% 100.00%
🟢 MockPolicyRegistryStorage.sol 100.00% 100.00% 100.00% 100.00%
Total 96.79% 97.29% 98.14% 96.49%

Full report: download artifact. To browse locally: make coverage (runs forge coverage + genhtml + opens the HTML report).

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

✅ Fork tests: all 709 passed

base/base is fully in sync with the base-std spec.

@stephancill
stephancill merged commit ec4ffdb into main Aug 4, 2026
10 checks passed
@stephancill
stephancill deleted the stephancilliers/bop-494-seize-receiver-smoke branch August 4, 2026 13:40
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