Repository navigation
A run record says when its Run began, read from its jobs under P-64's rule (#724, record 0193) #751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ae42a51
When a Run began is read from its jobs, trusted only once a job is in…
don-petry e63649f
Merge main into adapters/record-start-from-job-724
don-petry cb01adb
The jobs read is its own function, classed for the token it needs, an…
don-petry 9932fb3
A read of one item's Runs is asked past the cap, since a Run keeps no…
don-petry ca4546d
The record says when the Harness's reads begin to ask (#724)
don-petry 5095b60
A null kept for a completed Run is not said of one the list gives as …
don-petry 078c741
The read of one item's Runs moves to the pull request that asks for i…
don-petry d0ef97f
The pass's keeping of when a Run began moves to its own pull request …
don-petry 338f7c4
A job in a status GitHub gives none, or not yet completed of a comple…
don-petry a630661
Carbon's read of the port: what is kept is said past the cap and of n…
don-petry b73c482
Astra's second read of the port: a status that is no word, more jobs …
don-petry e7a1a56
Astra's third read of the port: a job listed twice, the cap's number …
don-petry 35f22ea
Astra's fourth read of the port: a job's id is a number, and every st…
don-petry 66ff40b
Merge main into adapters/record-start-from-job-724
don-petry c37e2f8
Astra's fifth read of the port: a runner that is neither a name nor n…
don-petry 6286861
A run's jobs are asked a hundred to a page, and the record cites its …
don-petry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...s-trusted-only-once-a-job-is-in-progress-or-ran-and-kept-by-the-pass-records.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # 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 | ||
|
|
||
| Status: accepted. The Factory Builder's ruling of 2026-11-11 on "A record's start is read from its job's started_at, trusted only once the job is in progress or ran (P-64)" (issue 724). It adds one field to the run record and one read to the records port. The pass's keeping of what it read, `begun` and its hand-over, is the pull request that follows this one, and adds its rows below. No rule of the Kernel reads the field yet: the record that has `approval_anchor` read it follows, and closes the residual `docs/decisions/0168-the-simulators-world-dates-an-approval-by-the-acts-run-and-the-kernels-anchor-takes-the-records-always.md` names. | ||
|
|
||
| ## Decision | ||
|
|
||
| | What | Decided | Because | | ||
| |---|---|---| | ||
| | The field | `began_at`, optional on a run record. `started_at` keeps its meaning, the run's `run_started_at` | The issue asked that `started_at` become the job's start. `controller/pass_.py`'s windows and the kept outcomes' key read `started_at`: a Run that never began, read as starting now, would hold an automatic pause at every pass, and its outcome would never be kept | | ||
| | What it says | The earliest `started_at` among the jobs GitHub lists for the run's latest attempt that are `in_progress`, or `completed` with a runner named. A re-run may list a job an earlier attempt ran, with its start, earlier than `started_at`: a start of the same run, and no job of a Run made while another of its item ran began before that one ended. Null for a completed Run whose jobs are all completed and none began. Absent where it has not begun yet, or was not read | `trials/P-64.json`: while a job waits, `pending`, the jobs API gives its creation as its start, as `run_started_at` is the run's creation; in progress, the start is when it began. `trials/P-44.json`: a job cancelled while it waited ends completed with no runner. A Run's jobs stand behind one lane (`trials/P-55.json`), so the first to begin is when the Run left it | | ||
| | 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 asks (`began`) | A queued Run has no job begun. A caller that does not ask reads as before | | ||
|
don-petry marked this conversation as resolved.
Resolved
|
||
| | What is kept | `begun` reads the last two pass records, the earlier's word only for a Run the later does not list: a time for any Run, null for a completed one, by its Run id and when its attempt started, as outcomes are kept. A re-run, a row that names no start of its attempt and a key listed twice are asked afresh | A job's start stood at every read after the first that gave it (P-64), and a completed run's jobs change no more. So a Run is asked from when it is in progress until it has begun, and then no more | | ||
| | The cap | No more than 50 Runs are asked in one read (`JOBS`). A Run past the cap has no `began_at`, and the list is not whole | 50 is what a pass reads of passes and of Effects (decision 0190), inside its step's limit. With nothing kept, N Runs are read over N/50 passes, each of which defers every Run; on 2026-11-11 the Factory's repo held 27 | | ||
| | Jobs that cannot be read | An answer that is not 200, or no list of every job counted, each once; a job of another attempt than the list gave; a job in a status GitHub gives none, or whose runner is neither a name nor none; a start that is no time; a job not yet completed of a run the list gave as completed, begun or not. Each gives no `began_at` and leaves the list not whole | What cannot be read is said, never guessed. An answer older than the list would otherwise read a Run whose job began and ended inside it as never begun, for good | | ||
| | What does not read it yet | No caller asks yet. The pass asks, and keeps, from the pull request that follows this one; the Harness's two reads ask for their own item's Runs from the one after, a person's to approve; the Kernel's reading follows both | A Run reads its item as the pass does. Were the Kernel to read the field before both ask, one reading would lack what the other has | | ||
| | The residual | A job outside its item's lane that began before the lane's would give a start that is too early. The Run P-55 recorded has none | The jobs API does not say which jobs a concurrency group holds | | ||
| | A completed Run that lists no job | Null, kept for good | Read as unreadable, it would leave the list not whole at every pass. Null admits nothing | | ||
|
|
||
| ## Why | ||
|
|
||
| `run_started_at` is when a run was made. A Run made while another of its item ran waits in the item's lane, and its record says it started when it was made. Decision 0168 names what that leaves open. P-64 asked GitHub when a job that waited began, and it answered: only once the job is in progress, or completed with a runner. | ||
|
|
||
| ## Boundaries | ||
|
|
||
| | Boundary | Check | | ||
| |---|---| | ||
| | A job in progress, or completed with a runner named, says when its Run began, the earliest of several; one that waits says nothing, and a completed Run none of whose jobs began says null; `started_at` is unchanged; a queued Run, and a caller that asks for none, has no job read; a `began_at` that is no time and not null is no run record | `examples/invalid/run-record.a-beginning-in-words.json`, `schemas/run-record.schema.json`, `tests/test_adapters.py::test_a_run_began_when_a_job_of_it_did`, `adapters/records.py`, `tools/mutants.py`, mutant: "a job that waits says when its Run began", mutant: "a job listed twice is read as two", mutant: "only the first start is held to be a time", mutant: "a run record may not say it never began", mutant: "a job in progress does not say when its Run began", mutant: "a completed job no runner ran says when its Run began", mutant: "a job that waits with a runner named says when its Run began", mutant: "a runner with no name is a runner", mutant: "the last job to begin is when its Run began", mutant: "a completed Run no job of which began says nothing", mutant: "a Run in progress with no job begun never began", mutant: "a Run not yet started is asked for its jobs", mutant: "a caller that asked for no job is read them" | | ||
| | Jobs that cannot be read give no start and leave the list not whole, and each read is uncached | `tests/test_adapters.py::test_jobs_that_cannot_be_read_say_no_start`, `adapters/records.py`, `tools/mutants.py`, mutant: "a job not yet completed of a completed run is read", mutant: "a job in a status GitHub gives none is read as one that waits", mutant: "a runner that is no name is no runner", mutant: "jobs GitHub did not answer are read", mutant: "jobs listed short of their count are read", mutant: "a count of jobs that is no number is read", mutant: "another attempt's jobs are read", mutant: "a job whose attempt is no number is its run's", mutant: "a job whose id is no number is read", mutant: "jobs are read for an attempt that cannot be read", mutant: "a job's start that is no time is a start", mutant: "a start on no day of the calendar is a time", mutant: "a time in another form is a time", mutant: "more jobs than their count are read", mutant: "jobs that cannot be read leave the list whole", mutant: "a read of jobs may be cached", mutant: "a run's jobs are asked thirty to a page" | | ||
| | What a pass record holds is not asked again, but for a re-run, a row with no start of its attempt and a key listed twice; no more than the cap are asked, and the rest leave the list not whole | `tests/test_adapters.py::test_when_a_run_began_is_asked_once_and_kept`, `adapters/records.py`, `tools/mutants.py`, mutant: "jobs are asked for the first read's rows after a second", mutant: "when a Run began is asked again though kept", mutant: "when a Run began is kept across attempts", mutant: "null kept is said of a Run the list gives as running still", mutant: "null kept stays on a Run the list gives as running still, if its jobs say nothing", mutant: "a time kept for a Run in progress is asked again", mutant: "the cap ends the saying of what was kept", mutant: "the cap on jobs reads is another", mutant: "a Run whose jobs are read makes the list whole again after one whose are not", mutant: "a row that names no start of its attempt keeps when it began", mutant: "a Run listed twice keeps when it began", mutant: "more Runs than the cap are asked for their jobs", mutant: "Runs past the cap leave the list whole" | | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "run": "r_01JA6Z", | ||
| "item": { | ||
| "repo": "combsmith/software-factory", | ||
| "type": "pull_request", | ||
| "number": 42 | ||
| }, | ||
| "role": "pr-review", | ||
| "intent": "review-change", | ||
| "content_id": "sha256:5d0c", | ||
| "status": "completed", | ||
| "conclusion": "success", | ||
| "outcome": null, | ||
| "started_at": "2026-10-11T12:05:00Z", | ||
| "began_at": "once its lane was free" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.