ARBI
Documents / docs/decisions/0020-isolated-update-orchestration.md

ADR-0020: Isolated update operations and local installation authority

Status: accepted when the issue PR merges. Work record: #73.

Decision

A trusted private test composition owns the edge update API, signed release sets, inventory, artifact source and target adapters. The dashboard endpoint forwards its existing ARBI credential to that composition. Every request uses the Gredice SDK with durable authorization acknowledgement; update administration and engineering remain independent. The ordinary application and branch previews have no configured gateway. No environment switch or public request selects fixture authority, a download URL, local path, signing key or safety evidence.

Immutable SQLite operation snapshots and attributable audit deltas commit together. Request keys bind exact selection, original human and session; identical retries recover the original operation and deadlines. A group selects a prefix of remaining manifest steps from the observed installed combination. The signed compatibility planner checks every update and recovery state. The edge coordinator must be last. Global worker reservations serialize installations, including concurrent requests and process recovery. A process-local active-token fence distinguishes a completed invocation with a failed lease-release acknowledgement from a still-running invocation; another live process always blocks reclamation.

Downloads use the existing persistent transfer budget and artifact cache, with a constructor-pinned authenticated loopback HTTP Range source. Each request is bounded to 64 KiB; this operation recipe limits artifacts to 1 MiB and 32 attempts per target. Interrupted reads retain actual observed payload counts and a durable accepted prefix. The prefix awaits whole-artifact hash/signature verification; range delivery alone is not cryptographic verification. Rejected response bodies consume quota even when discarded. Quota, rate, retry, metered consent and coverage policy pause discretionary downloads without invoking local safety/control. An explicit currently authorized operator with both update and configuration permissions may grant a bounded expiring budget override; it changes no safety rule. The original budget producer's audit bytes are copied without relabeling.

The accounting layer is response-body application payload. Byte charges remain in the existing budget ledger, with original charge IDs; immutable range receipts and audit observations link to them without creating another usage ledger. Missing receipt details after a crash are visible, and ambiguous pending grants retain their conservative upper-bound debit. Headers, TLS, radio/carrier traffic and SIM invoice truth are unavailable at this layer.

Before activation, the SDK rechecks the current operator and the local adapter rechecks active motion, manual control, maintenance conflict, explicit update-safe mode, independent validated retention, line clearance, stable power, interlock and target procedure. Parked alone fails. Source tests use declared isolated procedures; the physical installation gate remains disabled. Persist the core installation-reserved event and audit before the sole dispatch. A restart or uncertain reply observes the target's persisted synthetic slot; it never resends a reserved installation with no boot observation. Failed canaries halt the group. Rollback rechecks current trust/floors and representative data compatibility; blocked downgrade requires a compatible replacement/recovery review.

A new closed update-observation audit fact represents range, staging, reservation and policy progress, with no installation effect. Only bound local boot/health establishes the final device outcome. Original actor/session/intent remain joinable across edge epochs. This additive strict-schema change requires audit readers/producers to deploy the same protocol cohort. Old rows are not rewritten. The protected local audit endpoint uses bounded pages and a fixed high-water mark.

Evidence and consequences

Software evidence covers actual SDK authorization, native SQLite, real HTTP/socket failures, byte reconciliation, concurrency, reconnect, local refusal, canary rollback and lost acknowledgement. The target stores are synthetic software slots with representative data migration, not MCU flash or Linux boot partitions. Browser rendering belongs to #75; installed job/update lock integration to #76; seeded fault acceptance to #77. Live immutable publication and qualified physical updater/recovery evidence remain separate gates.