Skip to content

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

Merged
don-petry merged 35 commits into
mainfrom
controller/pass-asks-jobs-of-open-pull-requests-724
Nov 12, 2026
Merged

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

Conversation

@don-petry

@don-petry don-petry commented Nov 12, 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

View guided diff Turn on auto-fix


CodeAnt-AI Description

Request start times only for runs from open pull requests

What Changed

  • The pass now requests job start times only for runs associated with open pull requests. Other runs keep any start time already recorded, without another request.
  • The 50-run limit applies only to runs from open pull requests, so unrelated historical runs no longer use up the limit.
  • The pass lists open pull requests before reading run records and stops without reading runs if that list is incomplete.

Impact

✅ Fewer job requests for runs from closed pull requests
✅ Fewer passes to collect start times for open pull requests
✅ No run-record reads after an incomplete pull request list

💡 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 5 commits November 11, 2026 17:52
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…, which asks every Run

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…ich now holds 0195

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

coderabbitai Bot commented Nov 12, 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

@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-12T01:43:34.584546Z
We couldn’t complete this review. Comment @codex review to try again.
77d1f32 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.

@codeant-ai

codeant-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #a4f28 Reviewed your PR 77d1f32 Nov 12, 2026 · 01:43 01:46

@codeant-ai

codeant-ai Bot commented Nov 12, 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

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.

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Nov 12, 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 0196, which optimizes the process of determining when workflow runs began by restricting the query exclusively to open pull requests. In adapters/records.py, the runs function is updated to accept an optional of parameter to filter runs. In controller/__main__.py, the execution order is adjusted to fetch open pull requests first, passing them to the run records query. A new decision document is added, and corresponding unit tests are introduced in tests/test_adapters.py and tests/test_controller.py to validate this behavior. There are no review comments, so I have no feedback to provide.

@sonarqubecloud

Copy link
Copy Markdown

@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.

1 issue found across 6 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tests/test_controller.py">

<violation number="1" location="tests/test_controller.py:1479">
P2: This assertion does not prove that Run records were skipped: it ignores the approval and optional queue workflow endpoints. Match every workflow-run path (for example, `/actions/workflows/` together with `/runs`) so the test fails if any Run listing occurs.</violation>
</file>

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

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

Comment thread tests/test_controller.py Resolved
@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

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