Skip to content

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

Closed
don-petry wants to merge 35 commits into
mainfrom
controller/pass-asks-jobs-of-open-pull-requests-724
Closed

don-petry wants to merge 35 commits into
mainfrom
controller/pass-asks-jobs-of-open-pull-requests-724

Conversation

@don-petry

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

Copy link
Copy Markdown
Contributor

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 (An act's read again of its item asks when that item's Runs began, all of them past the cap (#724, record 0199) #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.

Reviewer Head Unread parts Blocking Major Minor Info
agy be91bc2 none 0 0 0 0
muse be91bc2 none 0 0 1 0
astra be91bc2 none 0 1 0 0
claude-review be91bc2 none 0 0 1 1
claude-security be91bc2 none 0 0 0 1
Finding Severity Criterion Where What Disposition
muse#1 minor PR-3 tests/test_adapters.py:1415 A mutant matching items by repo and number alone, ignoring type, survives the bounded-asking test fixed in 76d926c, as astra#1
astra#1 major PR-5 tests/test_adapters.py:1415 The item filter's type boundary has no killing test fixed in 76d926c: 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#1 minor PR-5 docs/decisions/0195-the-pass-asks-when-a-run-began-only-of-the-open-pull-requests-runs.md:15 The record's rule that open issues join the items handed waits on the issue port, but no Boundaries row holds the wait fixed in 45d49dc: a Boundaries row holds the rule, waiting on adapters/issues.py, which the context check fails once that file exists
claude-review#2 info none adapters/records.py:376 At this head no test holds an item's type in the bound: a mutant that matches by repo and number alone survives fixed in 76d926c, as astra#1
claude-security#1 info PR-5 adapters/records.py:376 No test holds that the port tells an item given by its type: a mutant that matches on repo and number alone survives fixed in 76d926c, 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:

Reviewer Where What Disposition
cubic, P3 the record, line 9 "Hands none" in the Decision and "no item given" in the Boundaries read as opposites for an empty list fixed in e980ba60: a list with no item in it asks no Run, and no list asks every Run, said so in both rows
Gemini, medium tests/test_adapters.py:1427 A lambda bound to a name should be a def declined: 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, nitpick adapters/records.py:376 Fifty Runs of open pull requests whose jobs still wait are asked again each pass, so later ones could wait behind the cap no 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.

don-petry and others added 30 commits November 11, 2026 07:12
… progress or ran, and kept by the pass records (#724, record 0193)

The records port gains began_at, read from the jobs API under P-64's rule, kept by the pass records and capped at 50 Runs a read. started_at keeps its meaning. No rule of the Kernel reads the field yet.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…d the readers' findings are held (#724)

Muse, the Claude review and the security pass on e63649f: the form of a time, a job's own attempt, a runner named on a job that waits, a key the later record lists, the second read's rows, and a re-run's carried-over jobs, said as they are.

Co-Authored-By: Claude <noreply@anthropic.com>
…thing to work it off (#724)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…running still (#724)

Co-Authored-By: Claude <noreply@anthropic.com>
…t, and the prose is cut to the review budget (#724)

Co-Authored-By: Claude <noreply@anthropic.com>
…724)

Split for the review budget: this part holds the field and the port's read; begun and the Controller's hand-over follow.

Co-Authored-By: Claude <noreply@anthropic.com>
…724)

begun reads the last two pass records, and the Controller's read hands the port what they kept, so a Run's jobs are asked only until it has begun. The second part of the port's change, split for the review budget; it adds its rows to record 0193's Boundaries.

Co-Authored-By: Claude <noreply@anthropic.com>
…ted run, is no read of its jobs (#724)

Astra on d0ef97f.

Co-Authored-By: Claude <noreply@anthropic.com>
… other Runs (#724)

Astra on f321d6d.

Co-Authored-By: Claude <noreply@anthropic.com>
…o queued Run, and the record says who asks when (#724)

Co-Authored-By: Claude <noreply@anthropic.com>
…ort's (#724)

Co-Authored-By: Claude <noreply@anthropic.com>
…than their count, and a list that stays not whole (#724)

Co-Authored-By: Claude <noreply@anthropic.com>
…d by its own case and mutant (#724)

Astra on 2edf1cb.

Co-Authored-By: Claude <noreply@anthropic.com>
…and a null beginning are held (#724)

Co-Authored-By: Claude <noreply@anthropic.com>
…art is held to be a time (#724)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…one is no read, and a short list stays not whole (#724)

Co-Authored-By: Claude <noreply@anthropic.com>
…issue by title first (#724)

cubic on #751: thirty to a page, a run with more jobs would never be read whole.

Co-Authored-By: Claude <noreply@anthropic.com>
…runs-began-724

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…at a pass with nothing kept still asks

The records before now differ: the last one's word, and the one before's for a Run the last does not list.
A record that is no pass record, one not from before the pass, and none at all each hand the port nothing kept.
A null kept for a queued Run is tried too.

Co-Authored-By: Claude <noreply@anthropic.com>
… kept of a beginning

Co-Authored-By: Claude <noreply@anthropic.com>
…which it lists first

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
… open pull requests' Runs, and 0193's count is corrected

The read order is held: a list of open pull requests not read whole stops the pass before the run records are read.

Co-Authored-By: Claude <noreply@anthropic.com>
…n-pull-requests-724

Co-Authored-By: Claude <noreply@anthropic.com>
don-petry and others added 2 commits November 11, 2026 17:52
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner November 11, 2026 23:58
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@codeant-ai

codeant-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #b892f Incremental review completed 77d1f32 Nov 12, 2026 · 00:59 01:00
✅  #f7144 Reviewed your PR 45d49dc Nov 11, 2026 · 23:58 00:03

@codeant-ai

codeant-ai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T01:02:16.196690Z 77d1f32 New commits
ℹ️ 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.

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Nov 11, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements decision 0195, optimizing the workflow run querying process by limiting the retrieval of run start times to only those associated with open pull requests. This is achieved by introducing an of parameter to the records.runs function and reordering the controller's read sequence to fetch open pull requests first. The feedback points out a PEP 8 style violation in the test suite where a lambda expression is assigned to a variable instead of using a standard function definition.

Comment thread tests/test_adapters.py Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@codeant-ai

codeant-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown

CodeAnt  CodeAnt Nitpicks

1 code suggestion

1. If 50 earlier matching Runs keep waiting jobs, _began stores no began_at; each pass retries them, so later open-PR Runs can starve behind the cap.

Logic error · adapters/records.py:376-377

@codeant-ai

codeant-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: 77d1f32b486f

…, which asks every Run

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

@combsmith-sf-pr-review combsmith-sf-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings against the rubric.

donpetry-bot
donpetry-bot previously approved these changes Nov 12, 2026
don-petry and others added 2 commits November 11, 2026 18:57
Co-Authored-By: Claude <noreply@anthropic.com>
…ich now holds 0195

Co-Authored-By: Claude <noreply@anthropic.com>
@don-petry don-petry changed the title The pass asks when a Run began only of the open pull requests' Runs (#724) The pass asks when a Run began only of the open pull requests' Runs (#724, record 0196) Nov 12, 2026
@sonarqubecloud

Copy link
Copy Markdown

@combsmith-sf-pr-review combsmith-sf-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No gating findings.

@don-petry

Copy link
Copy Markdown
Contributor Author

Closed to be opened again as a new pull request from the same branch at the same head, 77d1f32. The Factory holds this one as description_edited_after_approval: its description was edited after the Factory's approval of 00:34:58Z, and only a person's approval clears that. Nothing in the change differs. The new pull request's link follows.

@don-petry don-petry closed this Nov 12, 2026
@don-petry

Copy link
Copy Markdown
Contributor Author

Replaced by #771, the same branch at the same head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants