Skip to content

chore: drop recourse and identity packages - #1

Merged
0xkkkn merged 1 commit into
mainfrom
chore/drop-recourse-identity
Aug 20, 2026
Merged

chore: drop recourse and identity packages#1
0xkkkn merged 1 commit into
mainfrom
chore/drop-recourse-identity

Conversation

@0xkkkn

@0xkkkn 0xkkkn commented Aug 20, 2026

Copy link
Copy Markdown

Summary

Narrows the repository to the escrow core ahead of the Fhenix audit. packages/ is now escrow, offchain, sdk, shared.

Removed

  • packages/recourse — pools, factory, policy registry, coverage manager, strategy router and their confidential variants.
  • packages/identity — ERC-8004 agent identity / validation / reputation registries. Nothing else in the repository referenced them.
  • 13 recourse-only files from packages/shared: RecoursePoolLib, PoolRiskLib, CoverageLib, CoverageInviteLib, PolicyRegistryLib, PoolFactoryLib, IUnderwriterPolicy, IConfidentialUnderwriterPolicy, the pool/coverage/policy event interfaces, and the unused TestnetPausableBase.
  • SDK recourse surface: sdk.recourse / sdk.recoursePlain, pool and coverage instances (plain + confidential), the builder's .recourse() step, RecourseEventName and its listeners, CoverageNotActiveError, recourse addresses and ABIs.
  • e2e/flows/recourse.test.ts and the recourse deploy/wiring steps in e2e/run.sh.
  • Recourse references in CI, aderyn.toml, scripts/run-slither.sh, CODEOWNERS, PR template, README, SECURITY, CONTRIBUTING, LICENSE, NOTICE and the implementation-status doc. RELEASES.md history is untouched; the change is recorded under a new Unreleased heading.

Deliberately kept — escrow ABI and storage layout are unchanged

Escrow and ConfidentialEscrow still expose setCoverageManager(), setUnderwriterFee() and coverageManager(). An external coverage manager can still be wired in by address, and no redeploy is forced by this PR. Two escrow tests covering that seam were renamed from test_recourse_* to test_underwriterFee_*.

Type of Change

  • Refactor / cleanup
  • Documentation
  • CI / tooling

Packages Affected

  • @reineira-os/shared
  • @reineira-os/escrow (tests renamed only — no contract changes)
  • @reineira-os/sdk

Testing

  • Unit tests pass — 200 forge tests (escrow), 67 vitest (SDK), 133 Jest (offchain pnpm ci)
  • Contracts compile (forge build for shared and escrow)
  • e2e/run.sh green against anvil — 10 tests, after removing the recourse deploy steps
  • pnpm format:check and solhint 'packages/*/contracts/**/*.sol' clean

Security Considerations

No change to access control, FHE paths, or fund handling. setCoverageManager / setUnderwriterFee remain owner- and coverage-manager-gated exactly as before. Worth flagging for the audit: with recourse gone, setCoverageManager is a privileged setter whose counterparty no longer ships in this repository — expect it to be raised as an informational finding.

Narrows the repository to the escrow core ahead of the Fhenix audit.

Removed:
- packages/recourse — pools, factory, policy registry, coverage manager,
  strategy router and their confidential variants
- packages/identity — ERC-8004 agent identity/validation/reputation registries
- 13 recourse-only files from packages/shared (RecoursePoolLib, PoolRiskLib,
  CoverageLib, CoverageInviteLib, PolicyRegistryLib, PoolFactoryLib,
  IUnderwriterPolicy, IConfidentialUnderwriterPolicy, pool/coverage/policy
  event interfaces, TestnetPausableBase)
- SDK recourse surface: recourse/recourse-plain modules, pool and coverage
  instances, builder .recourse(), RecourseEventName and its listeners,
  CoverageNotActiveError, recourse addresses and ABIs
- e2e recourse flow and its deploy/wiring steps

Escrow ABI and storage layout are unchanged: setCoverageManager(),
setUnderwriterFee() and coverageManager() stay, so an external coverage
manager can still be wired in by address.

Verified: forge test (200 escrow tests), sdk vitest (67), offchain ci
(133 operator + coordinator), e2e run.sh (10), prettier --check, solhint.
@0xkkkn
0xkkkn requested a review from grimnote as a code owner August 20, 2026 20:36
@0xkkkn
0xkkkn merged commit a554e2f into main Aug 20, 2026
8 checks passed
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.

1 participant