Execution Record Publishing#
Execution records are per-cell artifacts that carry the OCI push result (digest, registry, tag, labels) from publish-oci to publish-site, bridging the parallel matrix of image pushes with the single serialized site build.
1. publish-oci — Writing the Record#
publish-oci/action.yml invokes aetherpak push-oci --records-dir "$RECORDS_DIR" ... . The CLI's WriteRecord creates a cell directory under records-dir:
<records-dir>/<app-id>-<branch>-<arch>/ # branch-qualified (current)
record.json { app-id, arch, branch, name, registry, digest, ref, tag }
labels.json full OCI label set read from the pushed image
sigs/<repo>@sha256=<hex>/signature-1 # only when signed
The cell directory name encodes branch since v3 . Records written before that change use the legacy <app-id>-<arch> form ; IterRecords prefers the branch-qualified form when both appear in the same tree .
After the push step, the reusable workflow (not the composite action itself) uploads _records as a named GitHub artifact :
artifact name: aetherpak-record-<app-id>-<arch>
path: _records
retention: 1 day
2. publish-site — Downloading and Merging#
The single, concurrency-locked publish-site job in the reusable workflow performs a download → build sequence:
- Download —
actions/download-artifact@v8withpattern: aetherpak-record-*,path: _records, andmerge-multiple: truemerges every record artifact directly into_records/. There is no separate flatten step; the workflow does not reshape the CLI-owned record tree. The step is skipped forreconcile-onlyruns. - Build — The
publish-sitecomposite action callsaetherpak build-site --records-dir _records ..., which callsIterRecordsto walk every cell directory and merge records intoindex/static.
The records-dir input of publish-site (default _records) holds the per-cell record subdirectories, named <app-id>-<branch>-<arch>.
3. The Single-Artifact Cell-Loss Risk#
One publish-oci run writes one record cell per pushed ref, and a single matrix cell can write the app plus its .Debug/.Locale companions. Those cells travel together in one workflow artifact, aetherpak-record-<app-id>-<arch>.
actions/download-artifact extracts a lone pattern match directly into path, without an artifact-name subdirectory. A flatten step that copied each downloaded directory's contents into _records/ therefore collapsed those cells: the last one copied overwrote the others, and build-site found a single record. In a single-arch publish this could advertise only a .Debug or .Locale companion in the index while the app image sat in the registry, unreachable. The default two-arch matrix produces two artifacts and masked the problem.
merge-multiple: true keeps every cell one level deep regardless of how many artifacts matched, so every pushed ref reaches index/static. A guard in CI (tests/check_record_artifact_merge.py) fails if the download stops merging artifacts.
The CLI-side deduplication in IterRecords only resolves legacy vs. branch-qualified forms within the same merged tree ; it cannot recover a cell that was overwritten on disk.
Key Files#
| File | Role |
|---|---|
pkg/record/record.go | Record type, WriteRecord, IterRecords, cell-path logic |
publish-oci/action.yml | Composite action; runs aetherpak push-oci --records-dir |
.github/workflows/publish.yml | Artifact upload (line 464–470), download with merge-multiple into _records, calls publish-site |
publish-site/action.yml | Composite action; runs aetherpak build-site --records-dir |
ARCHITECTURE.md — Records contract | Normative description of the cell directory structure |