Repository navigation
Commit 45418ac
D2: Order 360 timeline endpoint + stage-entry journal (#144)
* feat(ops): Order 360 timeline endpoint + stage-entry journal (D2)
GET /v1/entity/order/{order_id}/timeline composes the QueryEngine and
ControlPlaneStore ports (ADR 0011, no third path) into one read: order
state, stage history + pipeline trail from the pipeline_events journal,
the PII-free users_enriched customer block, and linked dead-letter
exceptions.
Makes the journal's entity_id axis real on the live write paths
(local_pipeline.py's three insert sites, clickhouse_sink.py's mirror —
previously only the demo seed populated it) and adds the orders.status
stage-entry writer alongside every order upsert on both backends. Seeds
stage trails for the 8 demo orders (ops-surfaces-spec.md §1.6): ORD-1004
is the sole SLA-breach candidate once D3 wires budgets, ORD-1001 carries
the full pending->confirmed->shipped->delivered story. error_rate re-pins
to 2/32 by arithmetic (B3 house rule). Excludes the new orders.status
topic from /v1/lineage's scan so the existing ingestion-trail endpoint
keeps reporting the platform-movement story, not warehouse stage moves.
sla_minutes/breached stay null until D3 lands the stages: contract block
(ops-surfaces-spec.md §1.5 is explicitly D3's, not D2's) — honest
degradation per the spec's own tolerant-of-absence design, not a gap.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(ops): satisfy the lint format gate and regenerate the OpenAPI/agent-tools contract for D2
ruff format --check flagged the new ratchet test's one-line wrap; the
export_openapi.py --check drift was expected — the new timeline endpoint
adds to the OpenAPI schema and both generated tool-call contracts.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---------
Co-authored-by: JuliaEdom <uedomskikh@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>1 parent 08e8211 commit 45418ac
15 files changed
Lines changed: 1304 additions & 14 deletions
File tree
- docs
- agent-tools
- src
- processing
- serving
- api/routers
- backends
- tests
- integration
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
109 | 125 | | |
110 | 126 | | |
111 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
118 | 137 | | |
119 | 138 | | |
120 | 139 | | |
| |||
0 commit comments