A run record says when its Run began, read from its jobs under P-64's rule (#724, record 0193)
Part 1 of 4 for #724. It does not close the issue.
What changes
A run record can now say when its Run began, read from its jobs under the rule trials/P-64.json showed. No caller asks for it yet, so nothing changes in a pass or a Run until the parts that follow.
- The field:
began_at, optional on a run record.started_atkeeps its meaning, the run'srun_started_at. - What it says: the earliest
started_atamong the latest attempt's jobs that arein_progress, orcompletedwith a runner named. Null for a completed Run none of whose jobs began. Absent where it has not begun, or was not read. - What is asked:
GET /repos/{repo}/actions/runs/{id}/jobs, as P-64 asked it but a hundred to a page, uncached, for each Run in progress or completed, and only for a caller that handsbegan. - What a caller kept: a Run whose beginning the caller hands in is not asked again. A re-run is asked afresh.
- The cap: 50 Runs are asked in one read (
JOBS). A Run past the cap, or whose jobs cannot be read, has nobegan_atand leaves the list not whole.
Why not started_at itself
The issue asks that a record's started_at become its job's start, with a Run that has not begun read as starting now. Two readers of started_at rule that out, and the Factory Builder ruled for a field of its own on 2026-11-11:
controller/pass_.py's_streakreads a completed record'sstarted_atinside a window. A Run that never began would be recent at every pass, and an automatic pause it held would never lapse.adapters/records.py'sknownkeys a kept outcome by(run, started_at). A start that moves at every pass is never kept.
The four parts, and their order
The whole change measured 63,442 characters as the Kernel counts a diff, over the review budget of 60,000, so it is split. This part is 58,432.
- This one: the field and the port's read.
- The pass keeps:
begunreads the pass records before, and the Controller's read hands the port what they kept. - The Harness asks (
harness/read.py,harness/reread.py) for its own item's Runs. A model Lens's input, so a person's to approve. - The Kernel reads:
approval_anchor's browser fallback takes a record as old as the approval bybegan_at. That closes the residual decision 0168 names.
The order matters: a Run reads its item as the pass does, so both must hand the Kernel the field before the Kernel reads it.
Said plainly
- A re-run's carried-over jobs: after a re-run of some jobs GitHub lists the others with the starts an earlier attempt gave them, so
began_atcan be earlier thanstarted_at. Seen on runs of this repo, in no trial. It is kept: a real start of the same run. - No stamp: a jobs read leaves no date and no age in the pass record, as an outcome's read does. Nothing acts on a read's age.
- A job outside the lane: one that began before its item's lane job would give a start that is too early. The Run P-55 recorded has none; the record names it as a residual.
- The record's number is provisional until enqueue.
Checks
make checks: OK at6286861f, which holds main merged at05177d55.- Every test module but the simulators, the hooks' and the tools': OK at
e7a1a563; the adapters', the Controller's and the token needs' again at6286861f.tests.test_tools: OK atcb01adbe. A later run of it at the desk failed one test,test_every_check_has_a_test_in_which_it_fails, while I was editing the worktree under it; that test passes alone at6286861f, and CI's verify is the answer. - Mutants of
adapters/records.py, filtered: 117 of 117 killed at6286861f. Every mutant's text was checked against its file: none stale. - gitleaks: no leaks.
Reviews
Carbon, Muse, Astra, the Claude review and the security pass. Muse and the two Claude reads read e63649f0, before the split, when this part still held parts 2 and 3; Carbon and Astra read d0ef97f3, after it. Every finding below is fixed or answered.
| Reviewer | Head | Unread parts | Blocking | Major | Minor | Info |
|---|---|---|---|---|---|---|
| agy | d0ef97f | none | 0 | 10 | 4 | 0 |
| muse | e63649f | none | 0 | 0 | 2 | 0 |
| astra | d0ef97f | none | 0 | 2 | 0 | 0 |
| claude-review | e63649f | none | 1 | 1 | 2 | 0 |
| claude-security | e63649f | none | 0 | 0 | 4 | 3 |
| Finding | Severity | Criterion | Where | What | Disposition |
|---|---|---|---|---|---|
| agy#1 | major | PR-3 | adapters/records.py:226 | _began returns whole=True for a completed run with uncompleted jobs when starts is non-empty | fixed in 338f7c45: a job not yet completed of a completed run is no read, begun or not |
| agy#2 | major | PR-3 | adapters/records.py:342 | _began HTTP reads are not recorded in runs()['reads'] | declined: nothing acts on a read's age, and the stamp needs pass/1's enum and the Controller's check of it. An answer older than the list now reads as unread or not begun, never as a wrong time; offered to the Builder as a follow-up |
| agy#3 | major | none | docs/decisions/0193-when-a-run-began-is-read-from-its-jobs-trusted-only-once-a-job-is-in-progress-or-ran-and-kept-by-the-pass-records.md:10 | Partial re-run uses an earlier attempt's job start (< started_at), backdating began_at before intervening item Runs and caching it before Attempt 2 runs | declined: kept, and said so. It is a real start of the same run, and no job of a Run made while another of its item ran began before that one ended, at any attempt, so the anchor's use of it is sound. The schema, the record and a test now say that it may be earlier than started_at (cb01adbe) |
| agy#4 | major | PR-5 | docs/decisions/0193-when-a-run-began-is-read-from-its-jobs-trusted-only-once-a-job-is-in-progress-or-ran-and-kept-by-the-pass-records.md:18 | The 'No stamp' pass-record rule is neither marked as waiting on the follow-up pass PR nor held by any test in Boundaries | fixed in a6306613: the row is gone from the record's Decision; the body says the read is not stamped |
| agy#5 | major | PR-3 | tests/test_adapters.py:1369 | No test checks an unreadable job status or GitHub's waiting and requested job statuses | fixed in 338f7c45: a job in a status GitHub gives none is no read, with its test and mutant |
| agy#6 | major | PR-3 | tests/test_adapters.py:1453 | A completed Run with a job still pending records began_at once another job started | fixed in 338f7c45, as agy#1 |
| agy#7 | major | PR-3 | tests/test_adapters.py:1462 | JOBS cap test places cached runs before uncached ones, leaving post-cap cache preservation unheld | fixed in a6306613: a kept Run listed after one the cap left unasked still says when it began, with a mutant |
| agy#8 | major | PR-3 | tools/mutants.py:4346 | Runner-type mutant is subsumed by empty-runner-name mutant, leaving runner_name=None unheld | fixed in a6306613: the mutant now drops the type test alone |
| agy#9 | major | PR-3 | tools/mutants.py:4374 | Missing mutants for /jobs body, jobs-list, total_count type, and job-dict guards | fixed in a6306613 for the count's type; declined for the rest: the tests feed a body, a list and a job that are none, and a mutant of each guard dies by a raised error, which holds nothing more |
| agy#10 | major | PR-3 | tools/mutants.py:4409 | Kept-began branches and del record["began_at"] lack individual mutants | fixed in a6306613: a mutant for the del and one for the kept time of a Run in progress |
| agy#11 | minor | none | adapters/records.py:222 | _began treats missing/non-string job status or redacted runner_name on a succeeded job as whole | fixed in 338f7c45 for the status; declined for the runner: a completed job with no runner named never ran, which is the issue's rule (P-44) |
| agy#12 | minor | none | docs/decisions/0193-when-a-run-began-is-read-from-its-jobs-trusted-only-once-a-job-is-in-progress-or-ran-and-kept-by-the-pass-records.md:15 | 'What does not read it yet' still claims the pass already has began_at and contradicts Line 3 on which pull request follows | fixed in a6306613: the row says no caller asks yet, and which pull request brings each |
| agy#13 | minor | PR-3 | tests/test_adapters.py:1424 | Kept began_at against a queued or waiting workflow run row is untested, and untimed/twice omit record checks | fixed in a6306613 for a queued row; declined for the two cases that assert the asking alone, which is what they hold |
| agy#14 | minor | PR-3 | tools/mutants.py:4418 | Cap mutant replaces asked == JOBS with False instead of holding the JOBS boundary | declined: the test asserts exactly which two Runs are asked at a cap of 2, so one more or one fewer fails it |
| muse#1 | minor | PR-3 | adapters/records.py:201 | Dropping TIME.fullmatch from _time survives every named test | fixed in cb01adbe: a time in another form is fed, with a mutant for the pattern |
| muse#2 | minor | PR-3 | adapters/records.py:220 | A job whose run_attempt is true or 1.0 is read as attempt 1's job | fixed in cb01adbe: a job's own attempt must be a number |
| astra#1 | major | PR-3 | adapters/records.py:226 | A valid start bypasses the completed-Run consistency check | fixed in 338f7c45 |
| astra#2 | major | PR-3 | adapters/records.py:228 | An unreadable job status is accepted as a whole read | fixed in 338f7c45 |
| claude-review#1 | blocking | none | adapters/records.py:368 | The jobs read is built in records.runs, which tests/test_token_needs.py does not class: two of its tests fail on this head | fixed in cb01adbe: the jobs read is its own function, _began, classed actions: read in tests/test_token_needs.py |
| claude-review#2 | major | PR-3 | adapters/records.py:227 | After a re-run of failed jobs, began_at is an earlier attempt's start, before the attempt's own started_at | declined: kept, and said so. It is a real start of the same run, and no job of a Run made while another of its item ran began before that one ended, at any attempt, so the anchor's use of it is sound. The schema, the record and a test now say that it may be earlier than started_at (cb01adbe) |
| claude-review#3 | minor | PR-3 | adapters/records.py:201 | No test holds the TIME pattern in _time: a start strptime accepts but the schema refuses would survive | fixed in cb01adbe, as muse#1 |
| claude-review#4 | minor | PR-3 | adapters/records.py:346 | No test holds that jobs are asked for the second read's rows when the list is read again | fixed in cb01adbe: a list read twice is asked by the second read's rows, with a mutant |
| claude-security#1 | minor | PR-3 | adapters/records.py:201 | No test holds the form of a time: _time without TIME.fullmatch passes every test at this head | fixed in cb01adbe, as muse#1 |
| claude-security#2 | minor | PR-3 | adapters/records.py:223 | No test holds that a job with a runner named must be completed before its start is trusted | fixed in cb01adbe: a runner named on a job that still waits is no start, with a mutant |
| claude-security#3 | minor | PR-3 | adapters/records.py:227 | On a re-run of failed jobs, began_at is the first attempt's job start, before the attempt's own started_at | declined: kept, and said so. It is a real start of the same run, and no job of a Run made while another of its item ran began before that one ended, at any attempt, so the anchor's use of it is sound. The schema, the record and a test now say that it may be earlier than started_at (cb01adbe) |
| claude-security#4 | minor | PR-3 | adapters/records.py:248 | A key listed twice is not held to be kept from neither listing: one mutant survives, and an earlier record's word stands | moved: begun is in the pull request that follows; fixed there, the earlier record's word standing only for a Run the later does not list |
| claude-security#5 | info | PR-3 | adapters/records.py:220 | A job whose run_attempt is true or 1.0 is read as a job of attempt 1 | fixed in cb01adbe, as muse#2 |
| claude-security#6 | info | none | adapters/records.py:230 | A completed Run whose jobs answer lists no job is read as never begun and kept for good, whatever its conclusion | declined: read as unreadable, a Run GitHub never lists a job for would leave the list not whole at every pass. Null admits nothing; the record says so |
| claude-security#7 | info | none | adapters/records.py:368 | A read of a run's jobs leaves no date or age in the pass record | declined: nothing acts on a read's age, and the stamp needs pass/1's enum and the Controller's check of it. An answer older than the list now reads as unread or not begun, never as a wrong time; offered to the Builder as a follow-up |
Astra read four more times, each on the head its last findings were fixed in. Its findings after the first read:
| Head read | Finding | Disposition |
|---|---|---|
a630661 | major: a job's status that is no word raised in the port | fixed in b73c482d: it is no read of the jobs |
a630661 | major: no test held that one Run's unread jobs leave the list not whole whatever follows | fixed in b73c482d, with a mutant |
a630661 | major: only a list shorter than its count was fed | fixed in b73c482d: more jobs than the count, with a mutant |
b73c482 | major: a job listed twice could stand where another was left out | fixed in e7a1a563: each job is counted once |
b73c482 | major: no test held the cap at 50 | fixed in e7a1a563, with a mutant |
b73c482 | major: no test held that a run record may say null | fixed in e7a1a563: the port's null record is held to the schema, with a mutant |
e7a1a56 | major: a job's id that is no number raised in the port | fixed in 35f22ea3: it is no read of the jobs |
e7a1a56 | major: only the first start was held to be a time | fixed in 35f22ea3, with a mutant |
66ff40b | major: a runner that is neither a name nor none was read as no runner | fixed in c37e2f8a: it is no read of the jobs, with a mutant |
66ff40b | major: no test held that a list read short stays not whole once its Runs' jobs are read | fixed in c37e2f8a |
Astra has not read c37e2f8a, which holds its last two fixes. Five reads each found two or three test gaps or malformed answers; I stopped there, near the budget's 60,000. Carbon's first run, on e63649f0, timed out on two of ten parts and was stopped; its run on d0ef97f3 read all nine parts.
cubic, on 66ff40be:
| Finding | Where | What | Disposition |
|---|---|---|---|
| P2 | adapters/records.py:217 | GitHub pages a run's jobs thirty at a time, so a run with more would never be read whole | fixed in 6286861f: asked a hundred to a page, with a mutant |
| P2 | schemas/run-record.schema.json:75 | The pattern admits a day no month has | declined: it is the one pattern every time in the schema carries; the port's _time and the Kernel's is_time hold the calendar |
| P3 | the record, line 3 | The Status cites the issue's number before its title | fixed in 6286861f |
CodeAnt, on 6286861f, one finding, major: a jobs request that raises Unanswered escapes the read. Declined: a request GitHub does not answer refuses the whole read in this port already, for the list and for an outcome alike, and the pass then reads the records as unread and defers.
cubic again, on 6286861f, two findings, both declined: P1, the same as CodeAnt's, for the same reason; P2, that the record's Decision rows were edited, which holds for a record on main, and this pull request adds 0193.
Codex found nothing on 66ff40be. CodeRabbit: skipped, auto reviews are off on this repo.
š¤ Generated with Claude Code