Skip to content

Deferred distribution: pause/resume controls with reason capture and audit #564

Description

@greatest0fallt1me

Description

Ops needs to pause a scheduled distribution mid-flight (e.g. on liquidity concern) and resume it later without losing state. Add pause/resume endpoints with reason capture and audit event on each transition.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: src/services/distributionScheduler.ts, src/routes/distributions.ts
  • Pause reason must be non-empty

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/distribution-pause-resume
  • Implement changes
    • Add state machine transitions with audit
    • Add API endpoints with RBAC
    • Emit distribution.paused_seconds histogram
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • npm test
  • Cover edge cases
    • Resume of an unpause is idempotent
  • Include test output and notes

Example commit message

feat: pause/resume for deferred distributions

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

Labels

Stellar WaveStellar Wave issue batch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions