The release step keeps its own exchanges, held to lists, as a public artifact of its run (record 0176)
Closes #531, "The release step records its own exchanges, redacted, after factory/v0.1.0".
The edit to .github/workflows/release.yml was pre-approved by the Maintainer 2026-11-08, ruled by the Factory Builder. The design was approved on 2026-11-09 with three rulings:
- one record, numbered at enqueue;
- import
tools/redact_trial.py, don't copy it; - keep the artifact 90 days.
The record is 0176, the number the Factory Builder gave at enqueue; main is merged in.
What it does
release/exchanges.py's Recording wraps the release step's one transport. It keeps each exchange the step sends through RELEASE_TOKEN, and passes every request through unchanged. The file becomes an artifact of a public repo, so what is kept is held to lists, and anything not on them is left out and its place named in dropped:
| What | Kept as |
|---|---|
| The call and its Accept | As sent; an Accept only where one is given |
| Headers, sent and answered | Only those tools/check_trials.py's HEADERS lets a trial's fixture keep, but location, a redirect's address |
| A JSON body, sent or answered | Only the fields FIELDS names, at any depth; a text, a number or a truth only under such a field |
| An artifact's download, a file read at a commit, a body that is not JSON | Size and sha256 alone; a file by its own bytes, so a fixture can hold it to the file; an answer with no body, by nothing |
| Everything kept | Then put through tools/redact_trial.py's redact_json, the trials' own redaction |
Keeping never changes the step. A fault drops that exchange and is counted in unkept. release/move.py writes the file in a finally, whatever stopped the step, and prints what it printed before.
release.yml:
- names the folder:
RELEASE_EXCHANGES: ${{ github.workspace }}; - gains a last step,
if: always(), that uploadsrelease-exchanges.jsonas the one artifactrelease-exchanges, kept 90 days. Nothing prints it.
tools/check_repo.py refuses that file at the checkout's root, so a committed one can never stand there first and be uploaded in place of the step's own record.
The rulings' conditions on the import:
- It is pure. Importing
release.exchangesstarts no process and opens nothing but modules, held by an audit-hook test. - It redacts what the trials' own tests use. A test runs every counter-example in
tests/test_tools.py'sSHAPEDthrough it.
Held by
- Tests:
tests/test_release_exchanges.pyhas 15, andtests/test_tools.pyone more for the root file. - Workflow shape:
tools/check_workflows.py's rules forrelease.yml, with six counter-examples:- the upload only on success;
- the exchanges printed;
- another name;
- 30 days;
- no folder named;
- an empty
with:on the step.
- Schema:
release-exchanges/1(schemas/release-exchanges.schema.json), with an example and a counter-example. - Mutants: 26 new, plus 4 of
tools/check_workflows.py's re-pointed to lines this change moved. Every mutant ofrelease/exchanges.pyandrelease/move.pyis killed by the tests it names alone. - The record:
docs/decisions/0176-the-release-step-keeps-its-own-exchanges-held-to-lists-as-a-public-artifact-of-its-run.md, and a row inrelease/AGENTS.md.
Checks
make verifyon an export of the head,8057b8e(treea7e3ecd): running; the result is added below when it ends.- Every mutant of
release/exchanges.pyandrelease/move.py, 46 in all, is killed by its named tests alone; 41 of them were also run bytools.mutantsand killed.
Reads
Argon and Muse read fcfbfc3; the Claude review and the security pass read 1c71084. The fix round after them, d71ec66, answers their findings, and no reader read it again. The merge of main and the numbering change nothing of this PR's own.
| Reviewer | Head | Unread parts | Blocking | Major | Minor | Info |
|---|---|---|---|---|---|---|
| agy | fcfbfc3 | none | 0 | 1 | 2 | 0 |
| muse | fcfbfc3 | none | 0 | 1 | 2 | 0 |
| claude-review | 1c71084 | none | 0 | 0 | 4 | 1 |
| claude-security | 1c71084 | none | 0 | 0 | 1 | 0 |
| Finding | Severity | Criterion | Where | What | Disposition |
|---|---|---|---|---|---|
| agy#1 | major | PR-3 | release/move.py:181 | Multiple Recording instances overwrite-fail on mode 'x', and zero connections write no exchanges file | Fixed in d71ec66: one recording serves the step, set on each transport it makes, and writes its file even where the step stopped before it connected. |
| agy#2 | minor | PR-3 | release/exchanges.py:74 | _headers strips header names in the KEPT_HEADERS check but not in dict keys, and _keep sets accept=None when omitted | Fixed in d71ec66: a header's name is kept stripped, and an Accept is written only where one was given, each with a mutant. |
| agy#3 | minor | PR-3 | release/exchanges.py:105 | Recording._keep mutates self.dropped in place before an exchange is completely kept | Fixed in d71ec66: what an exchange leaves out is named only once the exchange is kept, with a mutant. |
| muse#1 | major | PR-1 | release/exchanges.py:71 | A JSON array-of-strings (or scalar) body is kept whole, under no named field | Fixed in d71ec66: a text, a number or a truth is kept only under a field FIELDS names; one alone or in a list no field names is left out and its place named, with a mutant. |
| muse#2 | minor | PR-3 | release/exchanges.py:69 | No test or mutant holds the masking of a non-identifier dropped field name | Fixed in d71ec66: a left-out field whose name is not a plain identifier is named by its place alone, held by a test and a mutant. |
| muse#3 | minor | PR-3 | release/exchanges.py:133 | No test or mutant holds write()'s refusal of a relative folder | Fixed in d71ec66: a relative folder that stands is refused, held by a test and a mutant. |
| claude-review#1 | minor | none | release/exchanges.py:50 | A file read at a commit is measured as its re-serialized API envelope, not as the file or the bytes GitHub sent | Fixed in fcfbfc3: an opaque answer with no body has no measure, and validates. |
| claude-review#2 | minor | PR-3 | release/exchanges.py:62 | No test holds that each field left out is listed in dropped | Fixed in fcfbfc3: a request's body and headers are held to the lists in a test, with two mutants. |
| claude-review#3 | minor | PR-3 | release/exchanges.py:98 | No test holds the request side to the lists: a mutant that keeps the request body or headers whole survives | Fixed in fcfbfc3: the test asserts what dropped names, with a mutant. |
| claude-review#4 | minor | PR-3 | release/exchanges.py:105 | An opaque read answered with an empty JSON body is written as measured: null, which fails release-exchanges/1 | Fixed in fcfbfc3: a file at a commit is measured as its own bytes, decoded from GitHub's base64, with a mutant. |
| claude-review#5 | info | PR-1 | release/exchanges.py:39 | An error's message is kept verbatim (less any credential shape), where the issue lists an error body among what is dropped | Kept, as ruled: an error's message and documentation are what tell a refusal from another, and are redacted; nothing else of an error body is kept. |
| claude-security#1 | minor | PR-3 | release/exchanges.py:128 | A release-exchanges.json committed at the cut commit, as a file or a symlink, is uploaded publicly in place of the step's own record | Fixed in fcfbfc3: tools/check_repo.py refuses release-exchanges.json at the root, so no commit carrying one passes verify to reach main; a test and a mutant hold it. |
š¤ Generated with Claude Code