Files
contracts/docs/impl/plans/INITIAL.md
T
mikkeli 73eff1c5d6 Plan: note the boundary protocol is undefined, and what it must carry
The app<->svc-gw channels have no wire format yet. Measured USB link
drops (~3 s per power change, sleeping tablet invisible at link level)
and yukart decision 24 already fix the required fields: heartbeat,
command idempotency key, and utterance id/sequence/terminator/expiry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:08:39 +09:00

55 lines
2.1 KiB
Markdown

---
type: plan
status: active
updated: 2026-10-09
---
# Initial plan
## What is defined
The envelope, the topic namespace, and the standard OBD-II signals — the ones
whose names, units and ranges are fixed by the standard rather than by the car.
## What is not
**Z27AG-specific signals.** They do not exist until Phase 2 identifies them from
observed traffic. They arrive as DBC entries plus registry rows with
`source: "z27ag"`, one at a time as each is confirmed.
**Composite payload shapes.** `gnss/fix`, `nav/guidance`, `nav/route` and
`system/<service>` have their fields named in `topics.json` but no JSON Schema
yet. They get one when a publisher exists to constrain.
**The app ↔ `svc-gw` boundary protocol.** Bus topics are defined here, but the
two channels across the boundary (latest-wins state down, acknowledged commands
up) have no wire format yet. Project-yukart decision 24 (proposed) already
fixes what it must carry, because the USB link drops for ~3 s at every power
change and a sleeping tablet looks alive at the link layer:
- a **heartbeat** in both directions, with an agreed interval and timeout, so the
Orin reaps a silent client instead of trusting TCP or link state;
- an **idempotency key** on every upstream command, so retries across a
reconnect never act twice;
- for TTS, **utterance id + chunk sequence + terminator + an expiry**, so a
reconnect can resume or drop an utterance rather than replay it blindly.
Defined when `svc-gw` and `app-flutter` first talk, not before.
## Order
1. Schema validation available to all three languages — the Rust services, the
Python fixtures and the Dart client must reject a malformed message
identically, or the contract is decorative.
2. `gnss/fix` schema, driven by what `tool-mock` replays.
3. Z27AG signals, as Phase 2 confirms them.
## Consumers
| Repo | Reads |
|---|---|
| `svc-core` | signals, envelope, DBC |
| `svc-gw` | topics, envelope |
| `svc-nav` | topics, envelope |
| `app-flutter` | topics, envelope, signals (for display units) |
| `tool-mock` | all of it — fixtures publish the real schema |