Status: Official Contract
Effective Date: 2026-02-28
Schema Version: tp.archive.machine.v1
Compatibility: Additive to existing tp.meta.machine.v1; no modifications to ingest machine contract.
This contract defines deterministic machine-readable output for archive-governance workflows driven by tools/archive_governance.py.
Schema root:
docs/schemas/machine_mode/tp.archive.machine.v1/
Entrypoint:
docs/schemas/machine_mode/tp.archive.machine.v1/machine_mode.schema.json
All commands emit this envelope:
{
"schema": "tp.archive.machine.v1",
"command": "fixity-scan",
"success": true,
"exit_code": 0,
"data": {},
"error": null
}Top-level key ordering is deterministic through canonical serialization. Consumers must parse by key name, not key position.
fixity-scanfixity-verifymanifest-buildrights-applybag-buildbag-validatepremis-exportdedup-planmets-exportprov-exportstac-exportsealed-eval-run
Phase availability note: branches that have not landed the implementation scripts for a command MUST emit ToolUnavailableError with non-zero exit_code, instead of a raw subprocess failure.
sealed-eval-run supports --subset-root and enforces a read-only subset mount contract by default (override with --allow-writable-subset for local development) when scripts/pipelines/run_sealed_eval_72h.sh is present. In that configuration, the harness writes a deterministic audit package under audit_package/ with audit_manifest.json.
archive_governance.py supports:
canonical_v1: UTF-8 JSON, sorted keys,allow_nan=falsejcs: RFC 8785 canonical JSON viatransformation_portal.determinism.jcs
On failure, error is a typed object with:
typemessageexit_code(name,value)priority
Failures should route by exit_code and error.type, not message text.
Archive prerequisite validation failures are additive within v1. Current archive-gate commands may emit typed errors such as:
ArchiveIndexNotFoundErrorArchiveIndexTypeErrorHashManifestNotFoundErrorHashManifestTypeErrorArchiveRootNotFoundErrorArchiveRootTypeErrorRightsJsonlNotFoundErrorRightsJsonlTypeError
The contract allows runtime variance in non-semantic command text fields such as human-oriented tool stdout/stderr snapshots. Deterministic artifacts are surfaced via explicit output paths in data.
- Additive changes in
datapayloads are allowed within v1. - Breaking structural changes require version bump to
tp.archive.machine.v2.