ARBI
Documents / docs/software/lifecycle-audit.md

Command and configuration lifecycle audit

ADR-0016 adds two bounded audit views at the existing jobs HTTP boundary. Both require current audit.read, exact site/realm and authenticated human context. Ordinary and preview runtimes remain fail-closed until explicitly composed.

  • GET /api/sites/{siteId}/jobs/timeline?jobId={jobId} joins one command's original actor, lease, configuration/software revision, canonical audit in committed ordinal order and authenticated protocol reports. Source clocks remain separate; arrival order is not physical execution order. Each evidence collection is limited to 128 rows and the complete response to 64 KiB; truncated reports incomplete visibility. Accepted/running are protocol receipts. A terminal event is a device report, not independent physical measurement. Contradictions remain in the report history.
  • GET /api/sites/{siteId}/jobs/attempts returns up to 33 durable counter references and their fixed minute intervals, counts, saturation, class and mixed-actor status. firstEventId links the immutable first fact. open-window-counter denotes a mutable aggregation awaiting closure, including a past interval that has received no later denial.

When audit storage is available, a denial in the human boundary is aggregated before returning. The shared Gredice boundary retains its best-effort denial policy during storage loss: the request remains denied and cannot execute; missing evidence must not be inferred as no attempts. An authorized HTTP write that subsequently fails records a sanitized rejection in a separate transaction after the failed operation rolls back. Required audit failure returns unavailable; it cannot produce a command. Read failures and signed device failures are not relabeled as human command attempts. Successful retries retain one logical command, append an attributable retry authorization event, and never resend an already receipted command.

Commissioning journals retain original actors, sanitized configuration/calibration before/after revisions and local restart/reconciliation policy. Update lifecycle conversion retains the request's actor and authorization identity. Only coherent terminal local boot observations map to installed/rolled-back device evidence; a failure after installation reservation maps to unknown effect, not proof of unchanged software. Trusted adapters must persist and upload the resulting evidence with their original journal, source and clock.

No raw request bodies or arbitrary caller-provided reason text enters attempt counters. No HTTP response establishes movement, capture, update installation or home success. Home and physical firmware activation remain inhibited until their owning interfaces and evidence gates are implemented.