A cut's fixture reads a page of next's Deployments, held to its order, and every cut after factory/v0.1.11 must (#792)

Merged
DO
4d ago
+164-52

Fixes #792

A cut's fixture now reads a page of next's Deployments. The pull request for a cut is then the same size however many Deployments there are, and GitHub's default page of 30 never cuts the list short. The cuts are read from release/fixtures/cut.v*.json in version order, so a new cut adds no line to the test. Every cut after factory/v0.1.11, the last cut that read the whole list, must read a page. No record: the change states no new rule of the Factory, only of a test.

What

tests/test_release.py:

  • deployments_read reads next's Deployments in one of two forms, and the path must match one of them exactly:

    • the whole list, which every cut through v0.1.11 asked for;
    • a first page of per_page=1..9, which every cut from issue 792 on asks for.

    A later page (&page=2), any other query, or a page of 10 or more is refused.

  • a_later_cut_moved_next_on, for a page: the page must hold what stands above the cut's own Deployment, that Deployment, and the one next moved off. They must be in order, and they must be the first entries of the list the earlier cuts build. A page too short for them, in another order, or not the first page is refused.

  • cuts() / each_cut_moved_next_on():

    • every cut fixture is read in version order, and each cut's eval run comes from its own fixture;
    • test_the_next_cut_moved_next_on pins the twelve cuts on main by name, plus v0.1.1's eval run (42694638100).
  • WHOLE_LIST = TWELFTH_CUT: each cut after it must read a page. That is checked before anything else about the cut, so a whole-list read is refused for that reason alone.

  • deployments_after reads LATER, the cuts a rollback and a move forward followed, by the fixture's name.

  • paged(): factory/v0.1.10's fixture, asked again as a page. Two tests use it.

.claude/skills/cut-a-release/SKILL.md: one line on asking a page of 4 at capture, and on the page rule.

The capture copy: the builder that makes the raw capture lives outside the repo. Lane e owns build_cut2.py, and I did not edit it. My copy with &per_page=4 on both Deployments reads is at /Users/rachelpetry/Library/Application Support/Claude/side-session-notes/local_c510c58f-f558-40e3-9448-76cbe305ed2b/lane-552-792/build_cut_paged.py. It compiles, but it has not run against GitHub. The next cut is its first real run.

Held by

  • tests/test_release.py::test_a_cut_that_reads_a_page_of_next_s_deployments_is_held_to_its_order: v0.1.10 asked as a page of 4 passes. A page of 3, a page with two entries swapped, a short page, &page=2 and a page of 10 are each refused.
  • tests/test_release.py::test_a_cut_added_later_is_held_as_every_cut_is: a cut added after the last, at the next version, is read in its place.
    • Asked for the whole list, it is refused by the page rule, under the default WHOLE_LIST.
    • Asked for a page, it is refused for what the page holds.
  • tests/test_release.py::test_a_cut_after_the_last_that_read_the_whole_list_reads_a_page:
    • with v0.1.10 as the last whole-list cut, v0.1.11, the cut right after it, is refused for reading the whole list;
    • with v0.1.9 as the last, v0.1.10 asked as a page of 4 is held.
  • Mutants: 12 new, each killed by the test it names. Mutants of tests/test_release.py: 12 of 12 killed. Mutants of the release fixtures: 184 of 184 killed.
  • make checks: green.

Diff: about 24,000 characters, 279 lines.

Second readers

ReaderHeadResult
Carbon (Gemini 4 Carbon)7de0cd2a (before the rebase)no findings
Carbon58ca879anot run (quota), owed
Muse—not run (it hung on the first read), owed
Astra (gpt-6-astra)before the rebase1 major, fixed: nothing showed a cut added later is held. 1 minor, fixed: the page parser took any query after per_page
Astra58ca879a2 majors, both fixed in 90ddc878: the synthetic later cut stopped being later at v0.2.0, so it now takes the next version after the last cut; under the default WHOLE_LIST, nothing refused a later whole-list cut for the page rule (test and mutant added)
Claude + securitybefore the rebaseno blocker. Minors left as they are: (1) the eval run id of each cut after v0.1.1 is held only by its fixture; (2) LATER needs a code line for the next rollback; (3) the old comment's per-cut history is gone, though it is still in git
Claude + security58ca879ano security finding. 1 major, fixed in 90ddc878: the bound could shift by one unseen, so the refusal is now shown on the cut right after the last. 2 minors, fixed: the last whole-list cut must be among those read; a page is at most 9

The fixes in 90ddc878 came after the readers; none of them re-read that head.

šŸ¤– Generated with Claude Code