Data consumer receipt v1 delivery report¶
The public receipt and callback formats below describe the delivery contract. The historical integration record applies only to its recorded source revision; it does not establish validation of subsequent changes.
Current stage artifacts may carry private producer-outcome.json alongside
the unchanged receipt contract. Actual producer decisions distinguish a
targetless no-op, a stored verified replay and current targeted output.
The reporter binds the witness to the API-observed run/attempt/head, current
artifact inventory and actual producer job, then consumes its decision inputs.
Missing or invalid evidence never grants no-op success. Stored replay is
compared with the immutable asset, installed lock and served package proof;
its original identities remain unchanged and it is not re-emitted.
The public release-receipt-data archive still contains exactly one
release-receipt.json. The internal witness never enters the immutable public
completion asset or callback. The reporting workflow separately retains private
run-context.json as release-run-context-<attempt>, capturing the runner's
original triggering event and the caller's actual needs data before transport.
It includes the original upstream run/attempt/event or Release dispatch inputs,
bound to the repository and current run/attempt/head.
Both the same-run collector and the completed-run adapter check this context against independent current run, job and artifact observations; a workflow-run source is re-read at its recorded run ID and attempt. A later running attempt does not invalidate that completed original trigger. Missing or conflicting specific-attempt data still refuses. Manual CI and Native feed dispatches on main and successful placeholder claims can therefore finish silently when all release producers were skipped. Empty inventory alone cannot grant this outcome. Executed producers still require their evidence. Missing, stale or conflicting context and incomplete inventories refuse collection.
One narrow case can be quiet without a context that had no chance to be written:
the provider independently proves that the exact main-branch Release attempt
completed with conclusion cancelled, and its complete attempt-job response
explicitly declares total_count: 0 and jobs: []. Repository, workflow,
source and attempt must match, and no stage, context, bundle or receipt evidence
may exist. Downloaded stage evidence also refuses this outcome. The adapter
records publisher-cancelled-before-execution in the existing internal witness,
bound to publisher ID, attempt and head, and rechecks the provider facts when
collecting it.
The adapter's own authenticated context remains required.
For a workflow_run report, the witness tuple must first match the authenticated
original event. The collector then reads that event's exact independent API
attempt and complete job inventory, without reading the latest publisher run.
Advancing only latest to a running or successful attempt therefore preserves
the original cancelled-attempt outcome. Missing or conflicting historical facts
still refuse. A manual workflow_dispatch request's original publication_run
continues to select the latest publisher; an older cancelled witness cannot
override that current target. Publisher evidence from any attempt still refuses
the quiet cancellation outcome. Empty lists without complete metadata, any
executed or refused authz job, or another publisher conclusion cannot authorize
this outcome.
This proves no execution; it does not establish why cancellation happened.
No public receipt or callback is produced for that publisher.
The context is an ordinary run artifact with the repository's artifact access and 90-day retention. It contains the full original event payload; "private" here means outside the public receipt contract, not a separate access boundary.
Same-run completion comes from actual workflow needs; lagging REST status does
not withhold a valid producer snapshot. The API still supplies independent job
names and run/attempt/source bindings, and conflicting observations refuse.
Incident fallback is diagnostic only and preserves upstream failure stages.
Delivery failures use the collected event/PR when available, while API or
collection failures reach a run-scoped incident. It never writes or dispatches
a diagnostic receipt, and incident-delivery errors remain visible failures.
Collection has one strict path for production and library callers; there is no
permissive missing-snapshot default. Current stages must agree on the decision.
Package stages bind the carried decision to the actual bundle's CI run,
attempt, source and version. Repair handoffs check the completed publisher's
current verification artifact and independently observed PR version/source.
The control families exercise actual prepare, manual, reconcile,
github-release, preflight, verify, publication, collect and incident
commands using their existing arguments. Stored replay controls retain the
original run 300 receipt while varying the current adapter envelope. The
recovery-handoff control executes real main and pre-merge gate parsing over
fixture transports. Existing full-main-proof controls stop at an explicit
candidate boundary; the synthetic completion fixture replaces later proof
boundaries. Its handoff controls test orchestration only. Historically, 14 rows
were named as full publication checks over those fixed boundaries; those rows
are invalid evidence of full-gate verification. Their scope is now named
explicitly, without promoting the historical results. Neither fixture execution
nor a skipped live-PyPI control establishes provider or native acceptance.
Historical integration record¶
The original integration recorded source revision
63c66863272f4b362c1efa503d50dda0e34ced3c. The following inventory and static
check transcript belong to that historical integration.
The integration review's sections 1 and 3, the entire hub Consumer receipt
contract v1 section, its reference builder and release_receipts.py's
validate_receipt, collect, profile, signal and supporting checks were
reviewed. The validator is authoritative. No unresolved documentation/code
conflict was found for the data receipt fields or transport. The B4 image label
spelling follows the hub's actual code: Dockerfile line 74 consumes
RELEASE_VERSION, publish.yml passes the v-prefixed Git tag, and
release_smoke.py explicitly expects v + the bare release version.
Historical file inventory¶
.github/workflows/pineforge-release.yml.github/workflows/release-report.yml.github/workflows/release.ymldocs/release-receipt-report.mddocs/releasing.mdscripts/release_adapter.pyscripts/release_chain/automation.pyscripts/release_chain/contract.pyscripts/release_chain/publishing.pyscripts/release_chain/receipts.pyscripts/release_chain/reporting.pytests/fixtures/release_chain/README.mdtests/fixtures/release_chain/amd64-config.jsontests/fixtures/release_chain/amd64-manifest.jsontests/fixtures/release_chain/arm64-config.jsontests/fixtures/release_chain/arm64-manifest.jsontests/fixtures/release_chain/index.jsontests/fixtures/release_chain/ready-event.jsontests/fixtures/release_chain/receipt-policy.jsontests/fixtures/release_chain/release-manifest.jsontests/fixtures/release_chain/sample-release-receipt.jsontests/hub_receipt_validator.pytests/test_consumer_receipt.pytests/test_release_adapter.py
ci.yml, its required aggregate, all real Docker/database E2E checks, the unit
matrix, deterministic App PR diff/head/base/tree gates, protected squash merge,
landed CI distribution checks, OIDC publisher, immutable tag/assets, and actual
PyPI byte verification are retained. evidence.json remains the existing CI
build provenance; it is not a second consumer receipt. Ordinary manual package
publication without a product target still uses those gates and does not emit
an invalid receipt with null event/version fields.
The old report's manifest, object-shaped attempt, completed_at,
pull_request, verification and deployment fields, per-run hub artifact
names, consumer-receipt.json release asset, configurable event type and
full-receipt dispatch were replaced. No alternate receipt builder or callback
format remains in the runtime code. Human-facing consumer incident issues and
supersession PR comments remain. Diagnostics and private run/PR links stay in
those issues and Actions logs.
Artifact and producing workflow/job¶
- Artifact:
release-receipt-data(literal, no attempt/version/run suffix). - Archive inventory: exactly one root file,
release-receipt.json. - Reporting workflow/policy:
.github/workflows/pineforge-release.yml. - Builder:
reconcile, running trusted checked-outmaincode. It reconciles ready requests/PR CI, or verifies a completedReleaserun viarelease_chain.reporting.publication. - Uploader and callback: caller job
reportinvokes.github/workflows/release-report.ymljobreport(Actions job displayreport / report). Only the coordinator passeshub: true; publication's own reusable report call keeps the defaultfalse. - Serialization: sorted compact UTF-8 JSON plus LF. One live artifact per
reporting run; overwrite on an Actions rerun and increase
sequenceusingGITHUB_RUN_ATTEMPT.attemptis the coordinator's numericGITHUB_RUN_ID. - Order: upload succeeds, retain the same verified contract as immutable
release-receipt.jsonon the data GitHub Release, mint a hub-only App token, send the four-key signal. Upload failure prevents dispatch. A transport error creates a local incident without overwriting an uploaded completion snapshot.
Intermediate receipt snapshots serialize the same public contract. Stages also carry a separate private producer witness for targetless decisions and stored replay. Only the literal coordinator artifact is selected by the hub policy.
For verified, both CI/E2E reference the complete successful pre-merge PR CI
attempt, including release/ready. Main CI independently authorizes the exact
published distributions. After the Release run finishes, the coordinator
rechecks actual GitHub PR/head/base/merge/first parent, pre-merge completion
times, main CI artifact identity, deploy job inventory, immutable PyPI downloads,
matching GitHub distribution bytes, wheel-embedded source/manifest/facts, and
previous distribution identity. Deploy and reporting run heads must equal the
merge. If workflow_run picked up a newer main SHA, repair dispatches use the
verified immutable data package tag, never the PR head; no invalid snapshot is
uploaded while repair is queued. Previously verified targets never emit later
failure/progress/superseded snapshots; local incidents still record errors.
Synthetic sample receipt¶
This is the complete sample used by the new CI test (synthetic run IDs 70 for pre-merge CI/E2E, 80 for landed build provenance, 200 for publication, and 300 for the coordinator). It is not a receipt from a live production run. Actual receipts hash the real package-version/distribution inventory as the deployment identity, and use observed commits, digests, run results and UTC completion time.
{
"attempt": 300,
"ci": {
"approved_skips": [],
"expected": [
"Python 3.11",
"Python 3.12",
"Python 3.13",
"Release contract",
"Docker runtime",
"Database E2E",
"Distribution",
"release/ready"
],
"results": {
"Database E2E": "success",
"Distribution": "success",
"Docker runtime": "success",
"Python 3.11": "success",
"Python 3.12": "success",
"Python 3.13": "success",
"Release contract": "success",
"release/ready": "success"
},
"run_attempt": 2,
"run_id": 70,
"sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"consumer": "data",
"deploy": {
"approved_skips": [
"publish"
],
"expected": [
"prepare",
"build",
"github-release",
"publish",
"verify"
],
"results": {
"build": "success",
"github-release": "success",
"prepare": "success",
"publish": "success",
"verify": "success"
},
"run_attempt": 1,
"run_id": 200,
"sha": "cccccccccccccccccccccccccccccccccccccccc"
},
"deployed": {
"deployment_id_sha256": "fda9cda3a5ee2e0490aa51926b814488b288052e537910fdf0aa1cfd03a3fc9a",
"facts_commit": "5555555555555555555555555555555555555555",
"facts_sha256": "c4cbcff4e067a80515a05616a3d4dd4e672b4237d8d384250de2d5071b2070ee",
"image_digest": "sha256:cd06c078d3fc66f79d7b9815b1a68cdce51f0b0e68812466a051e436ed2ff3cc",
"source": "cccccccccccccccccccccccccccccccccccccccc"
},
"e2e": {
"approved_skips": [],
"expected": [
"Python 3.11",
"Python 3.12",
"Python 3.13",
"Release contract",
"Docker runtime",
"Database E2E",
"Distribution",
"release/ready"
],
"results": {
"Database E2E": "success",
"Distribution": "success",
"Docker runtime": "success",
"Python 3.11": "success",
"Python 3.12": "success",
"Python 3.13": "success",
"Release contract": "success",
"release/ready": "success"
},
"run_attempt": 2,
"run_id": 70,
"sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"event_id": "sha256:8b23d0dd906cd9e5fc8f9750f486b9ca141466d4abdb021f7ba2ebdcf2e3cf11",
"pr": {
"base": "main",
"base_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"head": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"merge": "cccccccccccccccccccccccccccccccccccccccc",
"number": 7
},
"preview": {
"deployment_id_sha256": "a64240825d1189c77374a67057257d5877c4cdadeeab6f8d08a3a3df53206800",
"facts_commit": "5555555555555555555555555555555555555555",
"facts_sha256": "c4cbcff4e067a80515a05616a3d4dd4e672b4237d8d384250de2d5071b2070ee",
"image_digest": "sha256:cd06c078d3fc66f79d7b9815b1a68cdce51f0b0e68812466a051e436ed2ff3cc",
"source": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"previous": {
"deployment_id_sha256": "a2ddfbc368cb7ea8af71abdd57c9a34b4df4d48827c82bd28d43f385b7805849",
"facts_commit": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"facts_sha256": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
"image_digest": "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"source": "dddddddddddddddddddddddddddddddddddddddd"
},
"release_version": "1.6.0",
"schema": "pineforge/consumer-receipt/v1",
"sequence": 1,
"state": "verified",
"timestamp": "2020-01-01T00:07:00Z"
}
Exact callback¶
The App token is separately scoped only to the hub, with Contents write. POST
repos/pineforge-4pass/pineforge-release/dispatches only after artifact upload.
client_payload contains exactly these four keys. run_id is the reporting
run containing release-receipt-data, not the publication or CI run.
{
"event_type": "pineforge-release-status",
"client_payload": {
"schema": "pineforge/consumer-signal/v1",
"consumer": "data",
"release_version": "1.6.0",
"run_id": 300
}
}
RELEASE_RECEIPT_EVENT_TYPE is no longer required or used. The contract fixes
pineforge-release-status; a legacy/custom callback cannot be selected.
Hub RELEASE_RECEIPT_POLICY entry¶
Merge this data entry into the hub's existing policy object; preserve other
roles. The same entry is checked into receipt-policy.json for CI. CI and E2E
both use the full, ordered eight-job inventory with zero job-level skips.
Deploy includes previous identity recording in prepare and served-byte checking
in verify. Only publish can skip, after proving matching bytes already exist.
{
"data": {
"artifact": "release-receipt-data",
"base": "main",
"ci": {
"approved_skips": [],
"expected": [
"Python 3.11",
"Python 3.12",
"Python 3.13",
"Release contract",
"Docker runtime",
"Database E2E",
"Distribution",
"release/ready"
],
"workflow": "ci.yml"
},
"deploy": {
"approved_skips": [
"publish"
],
"expected": [
"prepare",
"build",
"github-release",
"publish",
"verify"
],
"workflow": "release.yml"
},
"e2e": {
"approved_skips": [],
"expected": [
"Python 3.11",
"Python 3.12",
"Python 3.13",
"Release contract",
"Docker runtime",
"Database E2E",
"Distribution",
"release/ready"
],
"workflow": "ci.yml"
},
"workflow": "pineforge-release.yml"
}
}
Validation and remaining rollout requirement¶
tests/test_consumer_receipt.py builds the sample through a synthetic completed
publication coordinator fixture, validates it with the hub's own validate_receipt /
check_run / identity logic, checks the artifact archive and exact signal with
the hub checks, rejects schema/gate/source drift, and covers immutable-source
repair, approved publication replay skips and verified-state non-regression.
The fixture replaces candidate, main, local-lock, OCI, served and previous
validators with fixed answers; those checks are outside its demonstrated scope.
The sibling checkout cannot be imported in standalone consumer CI, so the
minimal validator/check/helper snapshot is vendored in
tests/hub_receipt_validator.py, not used by production. Its field-check
function ASTs were compared statically with the current hub: all eight match
exactly. Its signal version helper inlines the same bare semver subset to avoid
importing the rest of the hub. The upstream function bodies are preserved,
including their formatting, rather than rewritten to this repo's lint style.
Upstream scripts/release_receipts.py SHA-256:
6fe7b0afcb7a34de9e28bce9d8372e5a4eaa6695398536697f59ed705b0cc23a.
Only static checks were recorded for that historical integration. The transcript contains no pytest, Docker, database, distribution exercise, publication or live callback evidence, and must not be used as validation of the current source.
$ ruff check .
All checks passed!
exit 0
$ mypy src
Success: no issues found in 21 source files
exit 0
$ actionlint
(no output)
exit 0
$ python3 -m py_compile scripts/release_adapter.py scripts/release_chain/__init__.py scripts/release_chain/automation.py scripts/release_chain/contract.py scripts/release_chain/evidence.py scripts/release_chain/publishing.py scripts/release_chain/receipts.py scripts/release_chain/reporting.py tests/test_release_adapter.py tests/test_consumer_receipt.py tests/hub_receipt_validator.py
(no output)
exit 0
$ git diff --check
(no output)
exit 0
node --check: not applicable; no .js, .mjs or .cjs sources in this repository.
Static AST comparison: all 8 copied hub validator functions match the current hub exactly.
$ git rev-parse HEAD
63c66863272f4b362c1efa503d50dda0e34ced3c
$ git diff --name-only --diff-filter=D
(no output; no tracked files deleted)
Baseline requirement before enabling data: the hub contract requires a real
previous/rollback identity with source, image and consumed facts provenance.
A pre-manifest package cannot truthfully supply its previous facts fields. The
adapter verifies the previous wheel/sdist downloads, matching GitHub assets,
unchanged tag/source, and wheel-embedded manifest/facts. If that provenance is
absent, prepare fails before OIDC publication and reports the failure; it does
not invent an identity or claim verified. Establish a manifest-based published
baseline in CI before setting the hub's data readiness flag. Automatic rollback
also continues to require a stored verified contract. This rollout prerequisite
is explicit in docs/releasing.md; it was not bypassed to fabricate a receipt.
TEMPORARY first-adopter exception (TX-DATA-BASELINE2, L6 10-19): for
pineforge-data 0.3.0 → 0.3.1 only, the previous identity uses
provenance: "pre-manifest-bootstrap" with facts_commit and facts_sha256
keys ABSENT, including no null placeholders. The producer verifies actual
PyPI wheel/sdist bytes against recorded hashes, matching immutable release
assets and the recorded tag commit. This form is for one use; a receipt carries
no data package version, so the hub cannot refuse the form in a later data
receipt. The data producer's 0.3.1 adopter-version gate and removal enforce the
one-time limit. Remove the data exemption and the hub form together, only after
0.3.1 is verified AND every retained release-receipt-data artifact carrying the
bootstrap previous has expired (90-day retention), because the hub's scheduled
collector re-validates retained receipts and recover_applied replays the stored
receipt.