Repository navigation
Commit 3e41e36
feat(ci): one run per PR head, the private bootstrap off pull requests, in-job skips and a once-only flake rerun (T133 ci-efficiency a01) (#409)
* test(ci): concurrency per PR head, private bootstrap off pull requests, in-job skips and the flake rerun script (T133 ci-efficiency a01, red)
The workflow tests read the concurrency block of test.yaml, remote.yaml
and agent-assets.yml, the triggers of a new private-bootstrap.yaml, the
bootstrap decision's path filter and the macos-14 skip of an
OS-independent diff. test_ci_rerun.py drives scripts/orchestrator/ci-rerun.sh
with a stub gh. The item 0 measurement (measure.md) and the task copy
come first, before any workflow change.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(ci): one run per PR head, the private bootstrap off pull requests, in-job skips and a once-only flake rerun (T133 ci-efficiency a01)
- test.yaml, remote.yaml, agent-assets.yml: one concurrency group per pull
request (a newer head cancels the older run) and per main commit (always
completes); schedule and dispatch runs never share a PR's group.
- private-bootstrap moves from remote.yaml to private-bootstrap.yaml, which
runs on push to main, the same weekly schedule and workflow_dispatch;
it is not a required check. remote.yaml keeps public-bootstrap only.
- The bootstrap decision runs on a pull request only when a path that can
change what setup.sh installs changed (or the diff is empty); the unit
test decision skips macos-14 on a pull request whose every relevant path
is Python, docs or records, and names the reason it skipped. No job-level
if or needs: every required context still reports.
- .github/flakes.yaml seeds one measured signature (a Snap Store assertion
timeout); scripts/orchestrator/ci-rerun.sh reruns a run's failed jobs once
when every failure matches one, records the rerun in
.orchestration/validation/ci-reruns.tsv, and exits 3 on a real failure.
- test_workflow_security.py: EXPECTED_PERMISSIONS gains the new workflow
(amendment 1).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(ci): ci-rerun.sh reports a failing gh call as exit 1, never with its own codes (T133 ci-efficiency a01, worker review P2, red)
gh exits 4 when it needs authentication and 2 when cancelled; under
set -e the script passed those through, so a sandbox without gh's token
read as "already rerun once" (4) or a usage error (2).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(ci): ci-rerun.sh exits 1 on any failed gh or jq call; the concurrency comment says what the group does (T133 ci-efficiency a01, worker review P2 and P3)
Under set -e a failing `gh run view` or `gh run rerun` returned gh's own
code, so gh's 4 (authentication required) read as "already rerun once"
and its 2 (cancelled) as a usage error; jq 1.6 also exits 2 on bad input.
Each call now ends in `|| exit 1`. The workflows' comment no longer
claims a main, schedule or dispatch run has a group of its own: it is
grouped by its commit, never with a pull request, and never cancelled
while it runs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore(orchestration): T133 ci-efficiency a01 records (report, validation, sandbox, learning, worker review evidence)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(ci): the bootstrap gate runs on .chezmoiroot and vendor/, and ci-rerun.sh reserves a run before rerunning it (T133 ci-efficiency a01, revise round 1, Bot P2 4305896433 and 4305896435, red)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(ci): the bootstrap gate runs on .chezmoiroot and vendor/; ci-rerun.sh reserves the run under a lock before rerunning it (T133 ci-efficiency a01, revise round 1, Bot P2 4305896433 and 4305896435)
- remote.yaml and private-bootstrap.yaml: the pull-request path gate also
runs the bootstrap when .chezmoiroot (chezmoi's source root) or vendor/
(update-agent-assets.sh resolves its source root through
vendor/compactiondb) changes.
- ci-rerun.sh: one call at a time holds ci-reruns.lock beside the ledger
(an atomic mkdir, released on exit); the ledger check runs under it, the
rows are written before `gh run rerun`, and a failed rerun exits 1 with
the reservation kept, so a crash or a concurrent call never reruns twice.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore(orchestration): T133 ci-efficiency a01 revise round 1 records (task copy at amendment 2, revise.yaml, report, validation, sandbox)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(ci): the a01 audit's P2 as tests: superseded heads, timed-out and cancelled jobs, the production registry, per-run reservations and home or install Markdown on macOS (T133 ci-efficiency a02, red)
Red against 27613c0: ci-rerun.sh reruns a superseded head's run,
ignores timed-out and cancelled jobs, and serialises every run behind
one checkout-wide lock; test.yaml's `.*\.md$` lets Markdown under home/
or install/ skip macOS. The production-registry test reads the
checked-in .github/flakes.yaml; its red evidence is a mutated registry.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(ci): ci-rerun.sh refuses superseded heads, needs a signature for every failed, timed-out or cancelled job, and reserves per run; home or install Markdown keeps macOS (T133 ci-efficiency a02)
- A pull-request run must belong to one pull request whose current head is
the run's headSha, checked before the logs are read and again right
before the rerun; a mismatch is `superseded: run <id>` (exit 3) and
unreadable evidence exits 1, never rerunning.
- Jobs concluded failure, timed_out or cancelled all need a signature;
timed-out and cancelled logs are read whole, and an empty log matches
nothing.
- The checkout-wide ci-reruns.lock gives way to a persistent atomic
ci-reruns.lock.d/<run-id> taken after classification and the first
head check, before the ledger rows and the rerun; it blocks only its
own run.
- test.yaml: the OS-independent Markdown arm is `[^/]+\.md$`, so only
root-level Markdown lets a pull request skip macos-14.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(ci): ci-rerun.sh refuses a run still in progress; a missing log matches no signature; the stub runs the script's --jq on a pull_requests payload (T133 ci-efficiency a02, worker review, red)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(ci): ci-rerun.sh refuses a run not completed yet and reports a reservation it cannot create as an error; the flake file's header says what is matched (T133 ci-efficiency a02, worker review P2 and P3)
A run in progress has jobs that are not final: GitHub refuses its rerun
(spending the reservation) or `--failed` reruns jobs that failed after
the snapshot without a signature. It now exits 2 before any reservation.
A failed mkdir of the reservation exits 1 unless the directory exists.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore(orchestration): T133 ci-efficiency a02 records (report, validation, sandbox, learning, autoskill, the inherited measurement, worker review evidence)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(ci): the test, public-bootstrap and private-bootstrap matrices do not fail fast (T133 ci-efficiency a02, amendment 1, revise round 1, red)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(ci): the test, public-bootstrap and private-bootstrap matrices set fail-fast false (T133 ci-efficiency a02, amendment 1, revise round 1)
Under GitHub's default fail-fast true, one failing matrix job cancels its
siblings; ci-rerun.sh needs a signature for every cancelled job, so it
refused the measured flake run 39046848147 attempt 1, whose two cancelled
public-bootstrap jobs only a sibling's failure had caused. Every matrix
job now reports its own conclusion.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore(orchestration): T133 ci-efficiency a02 revise round 1 records (task copy at amendment 1, revise.yaml, report, validation)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(ci): two concurrent ci-rerun.sh calls rerun a run once even where mkdir ignores EEXIST (T133 ci-efficiency a02, revise round 1, red)
PR #409's ubuntu-26.04 canary (run 39111755140, job 117629185615) failed
test_ci_rerun_reservations_are_per_run_and_do_not_block_other_runs with
[0, 4] != [0, 0]: both concurrent calls for one run reran it. uutils'
mkdir ignored EEXIST on a non-recursive creation until uutils
bf423f388d (2026-08-28), and Ubuntu 26.04 ships an older uutils. A fake
mkdir with that behaviour first on PATH makes the race deterministic.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(ci): ci-rerun.sh claims a run's reservation with mkdir(2), not the mkdir binary (T133 ci-efficiency a02, revise round 1)
uutils' mkdir ignored EEXIST on a non-recursive creation until uutils
bf423f388d (2026-08-28, uutils/coreutils#13970), so on Ubuntu 26.04 both
of two concurrent calls for one run "created" its reservation and reran
it (PR #409's ubuntu-26.04 canary). python3's os.mkdir makes the
mkdir(2) call itself: FileExistsError exits 4, any other failure 1.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore(orchestration): T133 ci-efficiency a02 records for revise round 1 and the canary race (report, validation, learning)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>1 parent de3b73c commit 3e41e36
28 files changed
Lines changed: 5223 additions & 98 deletions
File tree
- .github
- workflows
- .orchestration
- dotfiles-T133-ci-efficiency-a01
- dotfiles-T133-ci-efficiency-a02
- scripts/orchestrator
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| 24 | + | |
| 25 | + | |
17 | 26 | | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
| |||
62 | 72 | | |
63 | 73 | | |
64 | 74 | | |
65 | | - | |
| 75 | + | |
| 76 | + | |
66 | 77 | | |
67 | | - | |
| 78 | + | |
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
72 | 83 | | |
73 | | - | |
| 84 | + | |
74 | 85 | | |
75 | | - | |
| 86 | + | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
| |||
108 | 119 | | |
109 | 120 | | |
110 | 121 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
13 | 21 | | |
14 | 22 | | |
15 | 23 | | |
| |||
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
| 29 | + | |
| 30 | + | |
21 | 31 | | |
| 32 | + | |
22 | 33 | | |
23 | 34 | | |
24 | 35 | | |
| |||
99 | 110 | | |
100 | 111 | | |
101 | 112 | | |
102 | | - | |
103 | | - | |
104 | | - | |
| 113 | + | |
105 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
106 | 124 | | |
107 | 125 | | |
108 | 126 | | |
109 | 127 | | |
| 128 | + | |
| 129 | + | |
110 | 130 | | |
111 | | - | |
| 131 | + | |
112 | 132 | | |
113 | 133 | | |
114 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments