Specification · 004-query-endpoint
Position query endpoint
A read-only HTTP endpoint to look up a current position.
A read-only query endpoint over positions. It reads through the adapter and touches no write path — unrelated to ADR-0007, one of the features that put distance between the decision and the reconciliation request.
- I Independent
- A self-contained feature in the position-keeper timeline.
- N Negotiable
- Outcomes contract; the mechanism is the design's.
- V Valuable
- Unlocks SC-001.
- E Estimable
- Plan derivable.
- S Small
- 3 requirements.
- T Testable
- Observable via its success criterion.
- Exec / PM
- §Context, §Success criteria.
- Reviewer
- §Requirements, §Open questions.
- Implementer
- §Requirements, §Data model.
1 · Context
Downstream tools want to read a current position over HTTP. This endpoint is read-only; it does not mutate positions and does not touch ADR-0007. Its role in this example is distance — a merge that never mentions the decision.
2 · User scenarios & testing
Read a position. A GET returns the current quantity for an instrument.
Missing instrument. An unknown instrument returns 404.
3 · Requirements
- A history/time-series API — a later analytics feature.
- Authentication — handled by the gateway.
4 · Data model
- Position view
- instrument + quantity, read-only projection.
5 · Success criteria
Observed at
An HTTP test asserting the read result and the absence of any write.
6 · Assumptions
- Fits the hexagonal shape established in 001.
7 · Open questions
None outstanding.
8 · Conformance index
9 · Change log
- Status flipped Draft → Accepted on 18 Sep 2026 — zero remaining unchecked tasks (9/9); ./gradlew build green with PositionsEndpointTest (SC-001) verified passing and the process exercised with curl per author pre-confirmation for 003–007; contract promoted to api/positions.openapi.yaml. Sibling bundle (REQ-LIFECYCLE-005).
- Reset to Draft — re-driven through tasks → implement → verify against a real Gradle build; the 2024–25 dates in docs/timeline.md remain the narrated history.
- Accepted — read-only position query endpoint. Does not touch positions writes or ADR-0007.