feat(fleet): add shared WireGuard profiles and bounded rover transport
Add portable shared WireGuard profiles while retaining Tailscale and Worker boundaries. Bound rover command/telemetry delivery, recovery and diagnostic capture across Core and Node.
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
# Network runtime and configurable DEV capture — 2026-10-26
|
||||
|
||||
## Product surface brief
|
||||
|
||||
The operator starts one diagnostic capture from the existing DEV action in the
|
||||
board observation workspace. Before starting, they choose local event sources,
|
||||
whether to show live rows, whether to transfer Core/browser evidence to the
|
||||
board, and independent event-payload rate limits. A capture owns immutable
|
||||
options, its identifier, on-board JSONL writer and explicit stop/export lifecycle.
|
||||
It never owns motor authority. Opening the modal removes driving input focus.
|
||||
|
||||
Chosen composition: the owner-requested modal using the existing Design Guideline
|
||||
Window, WindowFooterActions, SettingsCard, Switch, Select, Description and Button.
|
||||
An always-visible settings panel was considered: it would consume observation
|
||||
space and imply that choices can mutate a running capture. The modal fits the
|
||||
one-time pre-start decision. No new workspace, navigation or shared visual entity
|
||||
is introduced. Local-only event recording is the default; short lifecycle status
|
||||
still crosses the network. Normal telemetry/video are separate choices.
|
||||
|
||||
Start is disabled until Node advertises option support. Cancel/Escape do not
|
||||
start capture. Pending, error, closing, completed-file and interrupted-file states
|
||||
reuse existing controls. The log panel remains available after stop for export.
|
||||
A file's dropped records and errors remain visible. Capture configuration is not
|
||||
a claim of recording acceptance until board storage status arrives.
|
||||
|
||||
## Implemented network contracts
|
||||
|
||||
- Packet admission uses cancellable asynchronous Unix IPC. A single absolute
|
||||
500 ms frame/datagram lifetime covers queue age, permit wait and actual send.
|
||||
Expired SCTP entries never wait for another permit; transient IPC/allocation
|
||||
loss retires payload and preserves the peer. Invalid policy framing is terminal.
|
||||
- Protocol-only DTLS/RTCP has a bounded 2 KiB/s allowance with an 8 KiB burst per
|
||||
admitted transport, outside disposable payload backlog. Ordinary payload has
|
||||
no essential flag. Existing peer counts and aggregate payload gates remain.
|
||||
- Producer leases carry an explicit operator-primary role. Most recent selection
|
||||
wins, expires after 3 s, and is released with its peer. Primary video receives
|
||||
its requested share first; other video shares the residual. Finite metadata
|
||||
gets at most 32 kbit/s before video, cloud/export receive residual capacity.
|
||||
- At command pressure (existing 150 ms threshold), only an explicitly selected
|
||||
video may use at most 384 kbit/s. At 250 ms gap/age/silence all optional payload
|
||||
yields. This is a new policy requiring field qualification; motor deadlines
|
||||
(400 ms Core lease, 350 ms stream guard, native watchdog) are unchanged.
|
||||
- H.264 payloads are bounded to 1100 bytes by a per-sender packetizer. NAL content
|
||||
and order are preserved; no codec globals are changed. Encoder/frame sizes,
|
||||
reinitializations, expiry, protocol and permit-wait counters are exposed.
|
||||
- Full budget summaries run at 1 Hz only after capability negotiation. Actual
|
||||
motor telemetry cadence/sample clocks remain unchanged. Core retains the budget
|
||||
summary for at most 2 s, with explicit age, independently of motor freshness.
|
||||
- X4 view canvases retain the last rendered pixels; the UI shows last-presented
|
||||
frame age during interruption. Decode progress does not advance presentation
|
||||
time. This does not measure capture-to-screen latency.
|
||||
|
||||
## Recording contracts
|
||||
|
||||
A strict six-field option schema is negotiated. Core/browser and live event
|
||||
payloads have independent 8/16/32/64 kbit/s limits; metadata/protocol overhead is
|
||||
separate. Local-only capture sends no event rows. Local Node events still enter
|
||||
the on-board file. Recorder lifecycle polls use bounded metadata capacity;
|
||||
record rows and exports use bulk capacity. Closing a local-only file ends local
|
||||
polling without waiting for a deliberately disabled live cursor.
|
||||
|
||||
Writer rows are immutable serialized bytes, at most 8192 bytes per record,
|
||||
4096 entries and 4 MiB queued. Stop is out of band, so saturation cannot discard
|
||||
it. Accepted rows drain before the footer. Oversized Core rows get an explicit
|
||||
omission marker so stop cursors can complete; missing rows are never silently
|
||||
reported as complete evidence. Session manifest includes the selected options.
|
||||
|
||||
## Qualification and rollout
|
||||
|
||||
Node72/X4-22 are qualified and installed through their versioned owner
|
||||
installers. Core/UI is rebuilt and running; 1344 frontend tests, subsequent
|
||||
focused checks, typecheck and passive Chrome modal QA passed. X4 passed 126
|
||||
Ubuntu package tests. Node72 passed full Go race tests, Node UI, environment,
|
||||
USB-CAN ABI and 427 VESC tests. Its interrupted dependency-fetch stage was
|
||||
completed by a pinned packaging continuation with source and ELF hash guards;
|
||||
the original timeout evidence is retained. No unversioned runtime patch was used.
|
||||
|
||||
Local DEV recorded 1472 events with zero drops; all 12 export chunks were verified.
|
||||
The minimum-rate live check found metadata consuming event capacity in Node71.
|
||||
Node72 separates metadata/export from the event allowance and shares remaining
|
||||
event capacity between row sources. Two regressions include a real-sized 985-byte
|
||||
motor row. Physical 8-kbit/s acceptance received 13 motor rows in 16 observations;
|
||||
the full file retained 824 events, zero drops, seven verified export chunks.
|
||||
Minimal local configuration selected through Chrome retained only capture start
|
||||
and stop, with all four optional switches off; its manifest and file agree.
|
||||
The default modal values return on reopening, and camera preview is live.
|
||||
|
||||
Node CAN maintenance restored observation with motor_commands=false. The first
|
||||
live check during a concurrent large engineering SSH transfer had only 6/16
|
||||
fresh received snapshots; after pausing that transfer the repeat had 16/16.
|
||||
Device age is separate: the repeat's first pre-capture sample was 4600 ms old,
|
||||
then at most 602 ms in the remaining observations. This is scoped evidence,
|
||||
not a claim of universal low latency. The application regulator does not own SSH.
|
||||
Exact hashes and acceptance limits are in
|
||||
`../../outputs/network-dev-20261026/REPORT.txt`.
|
||||
|
||||
Scope excludes a transport migration to QUIC, speculative vendor codec tuning,
|
||||
autonomous movement and physical motor tests without an awake operator. The
|
||||
provided audit's later transport/LiDAR stages remain separate measured decisions.
|
||||
Reference in New Issue
Block a user