Skip to content

#114 [High] Add a load-testing pipeline exercising intent creation, quoting, and accept flows #323

Description

@james2177

Description: There is no load/performance testing anywhere in the repository — npm test/npm run test:e2e validate correctness, not throughput or behavior under concurrency, despite known concurrency-sensitive code paths already flagged elsewhere in this backlog (issue #65's idempotency-key race, issue #76's check-then-act race in update()). Add a load-testing suite (k6, Artillery, or similar) targeting POST /api/v1/intents, the quote endpoint, and the accept endpoint under realistic concurrent load.

Problem Statement & Context: Races like the ones in issues #65 and #76 are exactly the class of bug that only reliably surfaces under real concurrent load — a load-testing pipeline both validates fixes for those issues and establishes a performance baseline before the CD/staging pipelines in issues #28/#110 start shipping regularly.

Scope & Acceptance Criteria:

Implementation Guidelines:

  1. Key files/endpoints: src/intents/intents.controller.ts, src/intents/intents.service.ts (the create()/update() methods referenced by issues Guard BigInt(dto.fillAmount) against malformed input #65/Add idempotency keys to intent creation #76), src/solvers/solvers.controller.ts.
  2. Model concurrent-accept scenarios explicitly (multiple simulated solvers racing to accept the same open intent) since that's the highest-value scenario for validating issue Add idempotency keys to intent creation #76's fix.
  3. Keep test data isolated (a dedicated load-test user/solver namespace) so results don't pollute real data in whatever environment it targets.
  4. Testing: the load-test suite itself needs to be run and its output (latency percentiles, error rate, and specifically whether any double-accept/race condition was observed) included as evidence in this issue's PR.

Definition of Done:

  • Load-test suite implemented, CI job added, baseline report produced.
  • Acceptance criteria met.
  • PR passes CI, includes load-test run output/report.
  • Reviewed and approved.

Resources: src/intents/intents.controller.ts, src/intents/intents.service.ts, src/solvers/solvers.controller.ts

Complexity: High (200 points)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions