The pass asks when a Run began only of the open pull requests' Runs (#724, record 0196)

Closed
DO
6d ago
+129-15

User description

A follow-on to #724 (record 0196), ruled by the Factory Builder on 2026-11-11 when part 2 (#759) landed. It does not close the issue.

What changes

The pass asks when a Run began only of the open pull requests' Runs. Until now it asked every Run GitHub lists, 50 a pass.

  • The port's of: records.runs takes a list of items. A Run of any other item is not asked, says what the records before kept of it and no more, and leaves the list whole. The cap of 50 holds among the items given. With none said, every Run is asked, as before.
  • The entry: controller/__main__.py hands the port the open pull requests of the home repo. To do that it lists them before it reads the run records; the order was the other way round. A list of open pull requests not read whole still stops the pass, now before the run records are read.
  • A record, amending two rows of 0193: what is asked, and its count.

Why

Record 0193 reasoned from 27 Runs. That count was mine and it was wrong.

  • The count: on 2026-11-11 GitHub listed 98 dispatched Runs on main for the two Role workflows, the oldest two days old, about 40 more a day, kept 90 days. 47 of them were of the 11 pull requests then open.
  • The cold start: with nothing kept, N Runs take ceil(N/50) passes to read, and every item is deferred in each but the last. Asking every Run, that was 1 deferring pass that day and about 19 at 1,000 Runs, at 20 minutes a pass. Asking the open pull requests' Runs, N was 47: no deferring pass.
  • When it happens: the first pass that asks, and after any two pass records in a row that list no Run, as after an outage.
  • The ruling: the Factory Builder cuts no Release carrying part 2 while its cold start would defer more than 2 passes. This is what lets it.

Said plainly

  • The margin is thin: 47 against a cap of 50. Four stalled pull requests held 10 to 12 Runs each. A busier day gives a cold start of two passes, one of them deferring.
  • The read order changed: a pull request opened between the two reads was served by that pass and is now served by the next. Nothing else I found reads the order; tests/test_controller.py holds the new one.
  • Issues: not asked, since the pass decides none yet. The record's last row waits on adapters/issues.py.
  • Part 3 (#760) also changes the port's asking loop, with on, for one item without a cap. Whichever merges second takes main in first; the two do not overlap in what they decide.
  • The record's number is 0196, given by the Factory Builder on 2026-11-12. Main ends at 0195.

Checks

  • make checks: OK at 77d1f32b, which holds main at 1b0ae816.
  • Eleven quick test modules: OK at be91bc25 and again with main merged in, one commit before 77d1f32b (429 tests); the Controller's at 77d1f32b. The simulators, the hooks' and the tools' modules were not run at the desk: CI's verify is the answer.
  • Mutants of adapters/records.py and of the entry's hand-over, filtered: 145 of 145 killed with main merged in, one commit before 77d1f32b, which then changed one comment's number. No mutant is stale.
  • gitleaks: no leaks.
  • Size as the Kernel counts a diff: 25,410 characters, 257 lines.

Reviews

Carbon, Muse, Astra, the Claude review and the security pass, each at be91bc25. Four of the five findings are one gap, and every finding is fixed.

ReviewerHeadUnread partsBlockingMajorMinorInfo
agybe91bc2none0000
musebe91bc2none0010
astrabe91bc2none0100
claude-reviewbe91bc2none0011
claude-securitybe91bc2none0001
FindingSeverityCriterionWhereWhatDisposition
muse#1minorPR-3tests/test_adapters.py:1415A mutant matching items by repo and number alone, ignoring type, survives the bounded-asking testfixed in 76d926c8, as astra#1
astra#1majorPR-5tests/test_adapters.py:1415The item filter's type boundary has no killing testfixed in 76d926c8: an issue of the same repo and number is given, and none of the pull request's Runs is asked, with the mutant "an item is given by its repo and number, whatever its type"
claude-review#1minorPR-5docs/decisions/0195-the-pass-asks-when-a-run-began-only-of-the-open-pull-requests-runs.md:15The record's rule that open issues join the items handed waits on the issue port, but no Boundaries row holds the waitfixed in 45d49dc9: a Boundaries row holds the rule, waiting on adapters/issues.py, which the context check fails once that file exists
claude-review#2infononeadapters/records.py:376At this head no test holds an item's type in the bound: a mutant that matches by repo and number alone survivesfixed in 76d926c8, as astra#1
claude-security#1infoPR-5adapters/records.py:376No test holds that the port tells an item given by its type: a mutant that matches on repo and number alone survivesfixed in 76d926c8, as astra#1

No reader of mine has read 45d49dc9, which holds those fixes: one test case, one mutant and two record rows.

On GitHub, at 45d49dc9:

ReviewerWhereWhatDisposition
cubic, P3the record, line 9"Hands none" in the Decision and "no item given" in the Boundaries read as opposites for an empty listfixed in e980ba60: a list with no item in it asks no Run, and no list asks every Run, said so in both rows
Gemini, mediumtests/test_adapters.py:1427A lambda bound to a name should be a defdeclined: this test file names a one-line helper by a lambda in nine other places, and tests/test_controller.py builds the same item so
CodeAnt, nitpickadapters/records.py:376Fifty Runs of open pull requests whose jobs still wait are asked again each pass, so later ones could wait behind the capno change: true of the cap as record 0193 made it, and this pull request makes it less likely, not more. While it lasted the list would be not whole, which defers. Fifty Runs waiting at once is far past what the Factory runs

Codex found nothing. CodeRabbit: skipped, auto reviews are off on this repo.

🤖 Generated with Claude Code


CodeAnt-AI Description

Limit run start-time checks to open pull requests

What Changed

  • The pass checks job start times only for runs belonging to currently open pull requests. Other runs keep any previously saved start time but are not checked again.
  • The 50-run lookup limit now applies only to open pull requests' runs, so older run history cannot use up the capacity.
  • The pass lists open pull requests before reading run records and stops if that list is incomplete.

Impact

✅ Fewer open pull requests deferred by old run history
✅ Job lookup capacity reserved for active pull requests

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.