Description
Validate metering aggregation, idempotency expectations (if any), and persistence boundaries.
Requirements and context
- Ensure metrics match API calls billed.
- Document assumptions for concurrent requests.
Suggested execution
- Fork the repo and create a branch:
git checkout -b feature/usage-metering-correctness
- Work in Callora-Backend (TypeScript / Express).
Primary paths
src/services/usageStore.ts, src/routes/usage.ts, src/__tests__/usageMetering.test.ts
- Run
npm run lint, npm run typecheck, and npm test.
Deliverables
- Unit tests + route tests as appropriate.
Test and commit
- Add or extend unit and/or integration tests (
src/**/*.test.ts, tests/integration/**).
- Paste summarized test output in the PR; call out security or data-integrity notes.
Example commit message
fix(usage): metering correctness and tests
Guidelines
- Tests should cover new behavior and important edge cases.
- Keep changes focused; follow existing patterns in the codebase.
- Timeframe: 96 hours from assignment unless agreed otherwise.
Description
Validate metering aggregation, idempotency expectations (if any), and persistence boundaries.
Requirements and context
Suggested execution
git checkout -b feature/usage-metering-correctnessPrimary paths
src/services/usageStore.ts,src/routes/usage.ts,src/__tests__/usageMetering.test.tsnpm run lint,npm run typecheck, andnpm test.Deliverables
Test and commit
src/**/*.test.ts,tests/integration/**).Example commit message
Guidelines