Summary
docs/usage-sse.md does not match UsageSseEventPayload (fields, amountUsdc as number, the 'connected' event) and says nothing about heartbeats, reconnection or per-user limits.
Why this matters
Frontend developers building live usage dashboards must reverse-engineer the stream.
Scope
Document each event name, payload fields with types, id semantics, current lack of heartbeat/replay, and authentication requirements, with a browser EventSource example.
Relevant code in CalloraOrg/Callora-Backend:
docs/usage-sse.md
src/routes/usage/sse.ts
Priority
Low
Acceptance criteria
- Every field in UsageSseEventPayload is documented
- The 'connected' event is described
- Reconnect behaviour is stated accurately
- A working client snippet is included
Validation
Compare with npm test -- src/routes/usage/sse.test.ts fixtures.
Non-goals
- Typo-only, formatting-only, or cosmetic changes.
- Unrelated refactors, dependency upgrades, or broad rewrites.
- Removing safeguards or weakening validation to make tests pass.
Contributor application
Before coding, describe the affected modules, proposed state/invariant changes, test strategy, compatibility considerations, and an estimate. Wait for assignment before starting implementation.
PR requirements
Use a feature branch and include Closes #<issue-number>. Address every criterion, map criteria to code and tests, explain security and failure-mode handling, and ensure CI passes.
Quality review
A maintainer will assess correctness, completeness, test depth, compatibility, observability, and adverse-case handling. A substantive implementation is required; merge or CI status alone does not guarantee reward eligibility.
Generated by Claude Code
Summary
docs/usage-sse.md does not match UsageSseEventPayload (fields, amountUsdc as number, the 'connected' event) and says nothing about heartbeats, reconnection or per-user limits.
Why this matters
Frontend developers building live usage dashboards must reverse-engineer the stream.
Scope
Document each event name, payload fields with types, id semantics, current lack of heartbeat/replay, and authentication requirements, with a browser EventSource example.
Relevant code in CalloraOrg/Callora-Backend:
docs/usage-sse.mdsrc/routes/usage/sse.tsPriority
Low
Acceptance criteria
Validation
Compare with
npm test -- src/routes/usage/sse.test.tsfixtures.Non-goals
Contributor application
Before coding, describe the affected modules, proposed state/invariant changes, test strategy, compatibility considerations, and an estimate. Wait for assignment before starting implementation.
PR requirements
Use a feature branch and include
Closes #<issue-number>. Address every criterion, map criteria to code and tests, explain security and failure-mode handling, and ensure CI passes.Quality review
A maintainer will assess correctness, completeness, test depth, compatibility, observability, and adverse-case handling. A substantive implementation is required; merge or CI status alone does not guarantee reward eligibility.
Generated by Claude Code