Skip to content

The release step keeps its own exchanges, held to lists, as a public artifact of its run (record 0176) - #689

Merged
don-petry merged 6 commits into
mainfrom
release-exchanges-531
Nov 9, 2026
Merged

don-petry merged 6 commits into
mainfrom
release-exchanges-531

Conversation

@don-petry

@don-petry don-petry commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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 uploads release-exchanges.json as the one artifact release-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:

  1. It is pure. Importing release.exchanges starts no process and opens nothing but modules, held by an audit-hook test.
  2. It redacts what the trials' own tests use. A test runs every counter-example in tests/test_tools.py's SHAPED through it.

Held by

  • Tests: tests/test_release_exchanges.py has 15, and tests/test_tools.py one more for the root file.
  • Workflow shape: tools/check_workflows.py's rules for release.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 of release/exchanges.py and release/move.py is 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 in release/AGENTS.md.

Checks

  • make verify on an export of the head, 8057b8e (tree a7e3ecd): running; the result is added below when it ends.
  • Every mutant of release/exchanges.py and release/move.py, 46 in all, is killed by its named tests alone; 41 of them were also run by tools.mutants and 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

View guided diff Turn on auto-fix

don-petry and others added 5 commits November 8, 2026 21:48
…artifact of its run (#531)

release/exchanges.py's Recording wraps the step's one transport and keeps each exchange
it sends through RELEASE_TOKEN: the call, its Accept, the headers a trial's fixture keeps
but location, and of a JSON body only the fields FIELDS names. An artifact's download, a
file read at a commit and any body that is not JSON are kept as their size and sha256
alone. tools/redact_trial.py's redact_json then takes out anything shaped like a
credential, as from a trial's capture. A fault in keeping drops that exchange and never
changes the step.

release/move.py keeps them where RELEASE_EXCHANGES names a folder, and writes the file in
a finally, whatever stopped the step; it prints what it printed before. release.yml names
the folder, ${{ github.workspace }}, and its last step, if: always(), uploads
release-exchanges.json as the one artifact release-exchanges for 90 days. The shape rules,
five counter-examples, the release-exchanges/1 schema, 8 tests and 14 mutants hold it.

The record is NNNN until the Factory Builder numbers it. The release.yml edit was
pre-approved by the Maintainer 2026-11-08, ruled by the Factory Builder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lds its rule within 40 lines (#531)

Two mutants survived: a download kept whole, since a text body is measured anyway, and a
file written over, since open's "x" refuses one. The leak test now has a download the
storage answers as JSON, kept by its measure alone; the exists() check, which "x" already
does, is gone, and the mutant writes with "w". release/AGENTS.md gains one row for the
exchanges and merges two of the tag rows to stay at 40 lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…held to the lists; a file is measured as itself (#531)

The security pass and the Claude review of 1c71084:
- The step writes release-exchanges.json at the checkout's root. One a commit carried
  would stand there first, the write would refuse it, and the upload would publish it,
  or what a link points at, in place of the step's record. tools/check_repo.py now
  refuses that path at the root, so no such commit passes verify to reach main.
- A request's own body and headers are held to the lists as an answer's are, and each
  field left out is named in dropped; a test now sends both.
- An opaque answer with no body wrote "measured": null, which its schema refuses; it is
  now left out.
- A file read at a commit is measured as its own bytes, decoded from GitHub's base64,
  not as GitHub's JSON around it, so a fixture can hold it to the file.
Six mutants, and the record's rows say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ording a step, always written (#531)

Argon's and Muse's reads of fcfbfc3:
- A text in a list no field names, or a body that is a bare value, was kept whole (Muse).
  Now a text, a number or a truth is kept only under a field FIELDS names; anything else
  is left out and its place named.
- move.py made a recording for each transport, which a second could not write over
  (Argon). Now one recording serves the step, and it writes its file even where the step
  stopped before it connected.
- A header's name kept its spaces, and an Accept not given was written as null (Argon).
- A place left out was named though its exchange was not kept (Argon).
- No test held that a left-out field's name is written only as a plain identifier, or
  that a relative folder is refused (Muse).
Each with a test and a mutant; three mutants re-pointed to the lines that moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…der gave it at enqueue

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner November 9, 2026 20:57
@don-petry don-petry added the factory:hands-off A person's mark: the Factory writes nothing on this pull request (kernel/terms.py LABEL_HANDS_OFF) label Nov 9, 2026
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T20:57:39.389605Z
We couldn’t complete this review. Comment @codex review to try again.
8057b8e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

The rename to 0176 was committed, but not the title's own number, which still read NNNN:
check_context in CI refused it, as it read the commit where the local checks read the
working tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@don-petry
don-petry added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit a6bc0df Nov 9, 2026
26 checks passed
@don-petry
don-petry deleted the release-exchanges-531 branch November 9, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

factory:hands-off A person's mark: the Factory writes nothing on this pull request (kernel/terms.py LABEL_HANDS_OFF)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The release step records its own exchanges, redacted, after factory/v0.1.0

1 participant