Skip to content

refactor: decompose idempotency and subscription orchestration #175

@gabedalmolin

Description

@gabedalmolin

Objective

Reduce structural risk in the application layer by decomposing idempotency and subscription orchestration hotspots into smaller cohesive modules while preserving public behaviour.

Scope

  • decompose packages/application/src/idempotency.ts into clearer units of responsibility
  • decompose packages/application/src/subscription.ts incrementally, following the same stable-facade approach used in invoice orchestration
  • keep public application-layer contracts stable unless an intentional change is explicitly documented
  • improve navigability, testability, and change safety in the application core
  • avoid mixing new billing features into this refactor

Acceptance Criteria

  • idempotency orchestration is split into smaller, cohesive modules with clearer boundaries
  • subscription orchestration is materially easier to navigate and no longer concentrated in a single large hotspot
  • public surface remains stable or any intentional change is explicitly documented
  • existing behaviour is preserved through focused validation and test coverage
  • npm run quality:gate passes
  • DATABASE_URL='postgresql://grantledger_app:grantledger_app@localhost:5432/grantledger_rls' npm run test:pg passes

Metadata

Metadata

Assignees

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions