Isolated update operation API
ADR-0020 implements #73; executable evidence states its limits. UpdateServer is a Fetch API handler behind a privately configured gateway. The dashboard route is /api/sites/<siteId>/updates/<action>; its cookie bridge passes the existing ARBI bearer to the edge SDK, which owns authorization. Default/preview return unavailable. No public listener, token mint endpoint or automatic fixture fallback is installed.
| Action | Request | Capability / behavior |
|---|---|---|
available |
GET, no query | configuration.read; signed compatibility reasons, canonical inventory with unavailable driver/servo/passive targets, observed synthetic slots, transfer policy |
request |
POST {key,releaseSetId,targets,allowMetered} |
human update.request; targets must follow a prefix of remaining signed steps; returns original immutable ID/deadline on identical retries |
status |
GET ?operationId=<id> |
configuration.read; durable available/desired/installed/confirmed provenance, target phases, actual charges, receipt gaps, remaining policy bytes and required action; never dispatches |
advance |
POST {operationId} |
original actor with current update.request; one bounded range/activation/recovery step; fresh current approval before activation; overrides additionally require configuration.write |
override |
POST {operationId,bytes} |
original actor with both current capabilities; maximum 1 MiB extra allowance, 60-second expiry; does not alter local safety |
cancel |
POST {operationId} |
original actor with current update permission; unreserved operations only; reserved targets require local recovery |
audit |
GET optional after, through, limit |
audit.read; max 64 facts / 256 KiB per page; pass returned through and nextAfter to preserve the snapshot |
Mutation bodies are closed JSON, at most 4 KiB with a bounded read timeout. Caller-provided actors, manifests, source URLs, credentials, safety flags and deadlines are rejected. Human POST origin/ARBI request headers and SDK session/membership expiry remain mandatory. Revocation during download prevents activation and withholds protected response delivery. A new session may inspect or advance its original human's operation but does not rewrite the initiating session/deadline; a changed request key fingerprint conflicts.
The private recipe runs with pnpm --filter @arbi/edge-controller build followed by pnpm --filter @arbi/edge-controller simulate:updates -- --directory <private-empty-directory>. It creates ephemeral in-memory signing/provider keys, an authenticated loopback range source, actual SQLite stores and synthetic target slots. Use a private directory outside the repository; the recipe is an isolated harness, not the normal edge CLI or a persistent provisioned service. A fresh recipe creates new ephemeral trust and will refuse an existing directory binding.
The accounting layer is application response payload. Status exposes the existing ledger's original charge IDs and accepted offsets, including discarded/retried body bytes. A separate budgetOverride projection exposes its original grant, expiry and effective remaining allowance; the base policy allowance remains identifiable. Prefix receipts explicitly await whole-artifact hash/signature validation. Receipt gaps and pending upper-bound charges remain visible after uncertain persistence. Cache hits consume no new WAN bytes. This layer cannot observe headers, TLS, radio overhead, carrier bytes or an invoice; no guessed overhead is added.
The native immutable operation/audit record is acknowledged before dispatch. On a reserved target with no observed new slot, recovery returns RESERVED_INSTALLATION_UNOBSERVED_NO_RESEND; repeated advances never call installation again. An actual synthetic trial/health record resolves a lost slot acknowledgement. Health unknown keeps confirmation pending; failed canary stops subsequent targets and attempts only a safe trusted rollback. Raised floors refuse legacy recovery while retaining the installed slot/data and requested release.
Private local update-safe evidence must be current and name an independent protection owner. Active motion/manual control/maintenance conflict, parked or unknown mode, missing retention/line clearance/power/interlock/target procedure each produce a durable reason. These are declared isolated procedures; physicalInstallationEnabled is always false. Real hardware qualification, installed job locks, protected release publishing and live gateway provisioning remain their owning issues.
The canonical audit schema now admits update-observation with required phase/local record, observed outcome and none effect. Byte observations reference original charge IDs; staging/reservation references core journal records. Download progress never means install success. Actual observed boot outcomes retain the requesting human, real initiating SDK session and intent across producer epochs. Deploy the matching strict audit reader/producer cohort together. The coverage inventory registers the route and orchestration seam.