mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 12:42:38 +00:00
d99e16314b
TelemetryItemKind moves to Shared; TelemetryItem.ToWire() maps onto TelemetryItemDto and the uploader serialises the DTO, so both ends share one wire class. The spool line keeps writing Kind by name (StringEnumConverter registered in TelemetryItemSerializer). IngestTelemetryFunction.PartitionBatch routes by exact kind name and collects every item it cannot route or parse; a non-empty rejection list answers the batch with 422 + TelemetryItemsRejectedResponse (poison, rejectedRowKeys, reason) before anything is persisted, logs a Warning and writes the new TelemetryItemsRejected ops event. The agent's existing poison protocol drops exactly the named RowKeys and re-uploads the rest; before this the ingest skipped the items, answered 200 and the agent cleared its spool. Contract tests from both sides: TelemetryWireContractTests (agent) freezes the real batch body under tests/fixtures/telemetry-wire/ and parses the pinned poison body; TelemetryWireFixtureTests (backend) dispatches every frozen body with zero rejections, requires an arm per kind and pins the poison body. Agent-facing responses implement IApiResponse and go through ResponseHelper, request types carry [WireContract]; plain ingest refusals use the error envelope, the register-session and upload-url refusals keep their DTO bodies (the agent reads ErrorCode/Message). Manifests and generated wire types regenerated (also picks up four types HEAD had left out of the manifest). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>