A model release and its settings
A worked example: a model version's record from the build that passed testing to the day it was retired, and a run's record that names which version it ran on.
A team ships model versions and runs agents on them. Later, someone asks which version was running on a given day, with which settings, and whether the one that was tested is the one that shipped. This example keeps one record per model version, and has each run name the version it used.
The version's record
One record per version. Its entries follow the version through its life; the settings file and the artifact are fingerprinted at each step, so a later change to either shows.
| Entry | Title | kind | payloads | lifecycle |
|---|---|---|---|---|
| 1 | Model build 0417 passed testing, 15 September | model-build | The artifact, the settings file, the test report | recorded |
| 2 | Model build 0417 deployed to production | deploy | The settings as deployed | recorded |
| 3 | Model build 0417 retired | retire | The retirement note | closed |
const record = 'model-0417';
await pac.records.emit({
record,
title: 'Model build 0417 passed testing, 15 September',
kind: 'model-build',
occurredAt: '2026-09-15T16:04:17Z',
actorId: 'ci-runner-7',
instructedBy: 'release-manager',
payloads: [
await fingerprint(await openAsBlob('./build-0417.tar')),
await fingerprint(settingsBytes),
await fingerprint(testReportBytes),
],
idempotencyKey: `${record}:tested`,
});
await pac.records.emit({
record,
title: 'Model build 0417 deployed to production',
kind: 'deploy',
occurredAt: '2026-09-16T09:30:00Z',
actorId: 'deploy-pipeline',
instructedBy: 'release-manager',
payloads: [await fingerprint(deployedSettingsBytes)],
idempotencyKey: `${record}:deployed`,
});The deployed settings are fingerprinted again at deploy time. If they match the fingerprint in entry 1, the settings that were tested are the settings that shipped, and anyone with the record can see that the two fingerprints agree. If they do not, the record shows exactly that.
A run names its version
An agent run that used this version carries a reference to the version's deploy entry. The reference is { recordKey, entry }, and the entry must already be committed in your workspace. Keep the version record's recordKey from its first write's answer.
await pac.records.emit({
record: `run-${runId}`,
title: `Support run for ticket ${ticketId}, 18 September`,
kind: 'agent-run',
occurredAt: startedAt,
actorId: 'support-agent-3',
instructedBy: requestedBy,
payloads: [await fingerprint(instructionBytes)],
references: [{ recordKey: modelRecordKey, entry: 2 }], // entry 2 of model-0417: deployed
idempotencyKey: `run-${runId}:open`,
});A reader of the run's record sees the reference and can open the version's record, as it was at the time. A reader of the version's record can be handed the artifact and check it against entry 1's fingerprint.
Retiring it
When the version is retired, the last entry closes the record. Anything that tries to write to it afterward, a deploy pipeline that was not updated, say, is recorded as an attempt, and the record shows it.
await pac.records.emit({
record,
title: 'Model build 0417 retired',
kind: 'retire',
lifecycle: 'closed',
occurredAt: '2026-10-02T08:00:00Z',
actorId: 'release-manager',
payloads: [await fingerprint(retirementNoteBytes)],
idempotencyKey: `${record}:retired`,
});What the record answers
- Which version was running on 18 September? The run's reference points at model-0417, entry 2, deployed 16 September.
- Were the settings that shipped the settings that were tested? Compare the fingerprints in entries 1 and 2.
- Is this artifact the one that passed testing? Fingerprint it and check it against entry 1, on the Shared Record or with
records.checkandexpect. - When was it retired, and did anything try to deploy it afterward? Entry 3, and any attempt after it.