<!-- SPDX-License-Identifier: Apache-2.0 -->
# Artifact-service capacity observation v1

`swarrm/artifact-service-capacity/v1` is the private retained observation produced by `capacity_admission.py artifact-service`. It is required by the declared release phases, direct full pre-push, and operator dispatch before credentials or service mutation, with a fresh dispatch observation under the host lock. An observation is not a reservation, future upload guarantee, successful qualification, or spending authorization.

The committed declaration binds repository and organization numeric identities, the reviewed Actions budget controls, and the complete workflow inventory. Original committed workflows bind every upload action revision, destination expression, condition, and retention setting. Every producer must resolve to the declared self-hosted workflow closure. Unknown Actions scopes or controls, changed helpers, incomplete workflow inventories, and unreviewed upstream enterprise billing authority refuse admission.

Each boundary obtains new observations. Paginated budget lists must be complete and stable; individual budget reads supply consumption. Compare normalized configuration separately from consumption, using exact decimal amounts. Every applicable organization, repository, or storage hard stop must have positive observed headroom. Shared organization consumption includes other repositories. Stored artifact bytes and free self-hosted compute cannot override exhausted accrued usage. Recheck configuration and consumption; never retry a negative result into acceptance. No numeric reserve, age extension, budget increase, deletion, or retention reduction is granted by this format.

The record binds exact candidate, phase, optional complete run/attempt/workflow/event context, interpreter identity, helper bytes, source inputs, API arguments, and observation times. Run-bound admission requires the exact live queued or in-progress attempt with no terminal conclusion. Repository, organization, and run reads project only required identity fields before capture; unexpected credential-bearing output is redacted and refuses admission. Original stream lengths and hashes remain available without retaining secret bytes.

Private exclusive destinations retain original bounded stdout/stderr, command metadata, producer/launcher/ownership/capture outcomes, input bytes, and their hash inventory before interpretation. The observation deadline is bounded; failed reads, observation loss, malformed output, interrupted capture, and backward clocks remain refused or unknown. Original exits remain separate from parser and preservation failures. Aggregate preservation limits remain unchanged.

`result.json` has a canonical body digest excluding `record_sha256`. The retained consumer verifies that digest, each safe regular-file member, original input bindings, the upload contract, and the ordered API transcript through the same identity/budget evaluator. Replaying retained bytes neither refreshes their observation time nor admits a later transition. Live sealed-runner upload, download, digest verification, and cleanup remain separately required proof.
