Repository navigation
fork-ci-rerun: close the leftover minors from the #707 reviews - #721
Conversation
- Tracking issue: found by a marker in its body (and the bot as author), re-checked just before opening one, and a second open one is closed, so a pass that stopped after opening it leaves one issue. - Memory full: only the job's own cgroup's OOM kill counts (an ancestor's memory.events holds other jobs' kills); the job's own cgroup must have stalled too. - Pressure note: refused at GitHub's annotation cap, and its seconds must fit the runner's own start and end probe step times, so a note a step printed cannot count. - Probe steps: stopped after 40 s with a warning, so a stalled probe never skips the tests. - Runbook: a person's re-run of a run created over list_hours ago is not looked at (why, and the run_id dispatch that covers it); every rule line has a test. - Upstream sync check: git ls-remote runs from / so it never reads a checkout's .git/config, where actions/checkout keeps the job token. Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review lens A (merge path and security), head 3193e7a: SAFENothing is blocking. The token fix, the own-cgroup OOM rule, the annotation cap and the tracking-issue dedupe all hold. One gap is new, and this PR opens it: an end probe stopped by the new What I checked
These hold up
Major
Minor
🤖 Generated with Claude Code |
Review lens B (state and tests), head 3193e7a: SAFENothing is blocking. Every state case I went through either fails closed or ends with one tracking issue, and never-twice still comes from GitHub's attempts. The new tests are red on main's code and green on this head. 16 of the 17 fix lines I removed one at a time turn a test red. One stated guarantee is stronger than the code (major 1), and there are two small state gaps. What I checked
State question
Major
Minor
Not only in proseEach new rule in the runbook and docstring has a test that goes red when it is removed, except for the two cases above:
721 lens B: SAFE. 🤖 Generated with Claude Code |
A probe the end step's `timeout ... || echo` stopped (or one that raised) ends the step green with only a warning and no note, so a note a step printed earlier stood alone in a window the stop made wide. note_of now reads no note when the end step took the probe's limit or more, or when any annotation starts with the probe's own words (fork-ci-pressure:). Docs no longer claim a printed note can never count: the window stops one printed well before the end step; one printed just before it is stopped only by trust and once. Minors from the reviews of #721: - The probe limit is one value (the `changes` job's probe_seconds output; a workflow-level env is refused by the quiet contract), equal to the new config key probe_limit_seconds, with a contract test. - A duplicate tracking issue is closed first, then commented: a close that keeps failing posts no "Duplicate of" each pass, and the pass warns. - Tests for the `mine in ours` guard and for every pass closing an extra issue; the runbook says when that happens and why the 24 h count can read one low after a duplicate closes. Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix (head 50ab085)Answers review A and review B. Major (both reviews): a stopped end probe let an earlier printed note be read as the job's own. Fixed at the root in
Minors
Also fixed a stale comment in Fail on the old head. I ran the new tests against the scripts, config and workflow at 3193e7a, with a shim that only adds the new config key and name.
On the new head all of these pass: State question
CI on this head: Fork tests, Fork checks and Fork secret scan all green, no reruns. |
* fork-ci-rerun: close the leftover minors from the #707 reviews - Tracking issue: found by a marker in its body (and the bot as author), re-checked just before opening one, and a second open one is closed, so a pass that stopped after opening it leaves one issue. - Memory full: only the job's own cgroup's OOM kill counts (an ancestor's memory.events holds other jobs' kills); the job's own cgroup must have stalled too. - Pressure note: refused at GitHub's annotation cap, and its seconds must fit the runner's own start and end probe step times, so a note a step printed cannot count. - Probe steps: stopped after 40 s with a warning, so a stalled probe never skips the tests. - Runbook: a person's re-run of a run created over list_hours ago is not looked at (why, and the run_id dispatch that covers it); every rule line has a test. - Upstream sync check: git ls-remote runs from / so it never reads a checkout's .git/config, where actions/checkout keeps the job token. Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fork-ci-rerun runbook: formatter layout Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fork-ci-rerun: no note after a stopped end probe; review minors A probe the end step's `timeout ... || echo` stopped (or one that raised) ends the step green with only a warning and no note, so a note a step printed earlier stood alone in a window the stop made wide. note_of now reads no note when the end step took the probe's limit or more, or when any annotation starts with the probe's own words (fork-ci-pressure:). Docs no longer claim a printed note can never count: the window stops one printed well before the end step; one printed just before it is stopped only by trust and once. Minors from the reviews of #721: - The probe limit is one value (the `changes` job's probe_seconds output; a workflow-level env is refused by the quiet contract), equal to the new config key probe_limit_seconds, with a contract test. - A duplicate tracking issue is closed first, then commented: a close that keeps failing posts no "Duplicate of" each pass, and the pass warns. - Tests for the `mine in ours` guard and for every pass closing an extra issue; the runbook says when that happens and why the 24 h count can read one low after a duplicate closes. Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fork-ci-rerun: close the leftover minors from the #707 reviews - Tracking issue: found by a marker in its body (and the bot as author), re-checked just before opening one, and a second open one is closed, so a pass that stopped after opening it leaves one issue. - Memory full: only the job's own cgroup's OOM kill counts (an ancestor's memory.events holds other jobs' kills); the job's own cgroup must have stalled too. - Pressure note: refused at GitHub's annotation cap, and its seconds must fit the runner's own start and end probe step times, so a note a step printed cannot count. - Probe steps: stopped after 40 s with a warning, so a stalled probe never skips the tests. - Runbook: a person's re-run of a run created over list_hours ago is not looked at (why, and the run_id dispatch that covers it); every rule line has a test. - Upstream sync check: git ls-remote runs from / so it never reads a checkout's .git/config, where actions/checkout keeps the job token. Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fork-ci-rerun runbook: formatter layout Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fork-ci-rerun: no note after a stopped end probe; review minors A probe the end step's `timeout ... || echo` stopped (or one that raised) ends the step green with only a warning and no note, so a note a step printed earlier stood alone in a window the stop made wide. note_of now reads no note when the end step took the probe's limit or more, or when any annotation starts with the probe's own words (fork-ci-pressure:). Docs no longer claim a printed note can never count: the window stops one printed well before the end step; one printed just before it is stopped only by trust and once. Minors from the reviews of #721: - The probe limit is one value (the `changes` job's probe_seconds output; a workflow-level env is refused by the quiet contract), equal to the new config key probe_limit_seconds, with a contract test. - A duplicate tracking issue is closed first, then commented: a close that keeps failing posts no "Duplicate of" each pass, and the pass warns. - Tests for the `mine in ours` guard and for every pass closing an extra issue; the runbook says when that happens and why the 24 h count can read one low after a duplicate closes. Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fork-ci-rerun: close the leftover minors from the #707 reviews - Tracking issue: found by a marker in its body (and the bot as author), re-checked just before opening one, and a second open one is closed, so a pass that stopped after opening it leaves one issue. - Memory full: only the job's own cgroup's OOM kill counts (an ancestor's memory.events holds other jobs' kills); the job's own cgroup must have stalled too. - Pressure note: refused at GitHub's annotation cap, and its seconds must fit the runner's own start and end probe step times, so a note a step printed cannot count. - Probe steps: stopped after 40 s with a warning, so a stalled probe never skips the tests. - Runbook: a person's re-run of a run created over list_hours ago is not looked at (why, and the run_id dispatch that covers it); every rule line has a test. - Upstream sync check: git ls-remote runs from / so it never reads a checkout's .git/config, where actions/checkout keeps the job token. Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fork-ci-rerun runbook: formatter layout Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fork-ci-rerun: no note after a stopped end probe; review minors A probe the end step's `timeout ... || echo` stopped (or one that raised) ends the step green with only a warning and no note, so a note a step printed earlier stood alone in a window the stop made wide. note_of now reads no note when the end step took the probe's limit or more, or when any annotation starts with the probe's own words (fork-ci-pressure:). Docs no longer claim a printed note can never count: the window stops one printed well before the end step; one printed just before it is stopped only by trust and once. Minors from the reviews of #721: - The probe limit is one value (the `changes` job's probe_seconds output; a workflow-level env is refused by the quiet contract), equal to the new config key probe_limit_seconds, with a contract test. - A duplicate tracking issue is closed first, then commented: a close that keeps failing posts no "Duplicate of" each pass, and the pass warns. - Tests for the `mine in ours` guard and for every pass closing an extra issue; the runbook says when that happens and why the 24 h count can read one low after a duplicate closes. Part of #709 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
What and why
This PR closes the minor points left over from the round-2 reviews of #707 (automatic re-run of fork CI, #130). Each point from #709 is listed below with what this PR does about it.
<!-- fork-ci-rerun tracking issue -->) and by the bot as its author. The title is not used, so a renamed issue is still found.memory.eventscovers a cgroup's whole subtree, so an ancestor'soom_killincludes other jobs' kills. Only the count from the job's own cgroup (cgroups[0]) is used./as its own cgroup, gives no sign. The check fails closed.box_full_share_percent. Only then can a limited box that stalled count, through the own OOM kill or the box's ownmax/highevents.annotation_cap), no note is trusted.secondsmust also fit between the runner's own times for the start and end probe steps (probe_start_step/probe_end_step, widened bynote_slack_secondsfor whole-second stamps). A note printed well before the end step cannot know when the end step will run, so it does not fit.probe_limit_seconds), or when any annotation starts withfork-ci-pressure:(the probe's own warnings). A probe stopped by itstimeout … || echo, or one that raised, ends the step green with only that warning and no note of its own, and the stop makes the window wide (fix round, from both reviews).timeout -k 5 "${{ needs.changes.outputs.probe_seconds }}" python3 -I … || echo "::warning::…". A probe that hangs is stopped after that many seconds (40), and one that ignores the stop is killed 5 s later.changesjob'sprobe_secondsoutput (a workflow-levelenv:is refused by thefork-contracts"quiet" rule). The config'sprobe_limit_secondsmust equal it, and a contract test checks that and that no step keeps a copy.timeout-minutes: 1stays as a backstop.continue-on-erroris still not allowed by thefork-contracts"quiet" rule.created_at, so such a re-run never shows up in the lastlist_hoursof runs.run_id.${{ }}minutes, keys afterjobs:, the run's own commit only) and name matching.[0]↔[-1]on one-item lists,continue↔passwhere the loop ends anyway, and docstring or message text..git/config/git ls-remote: fixed in code.git ls-remoteran inside the checkout. So git read.git/config, whereactions/checkoutkeeps the job's token, and sent it, only ever to github.com./, and a test pinscwd='/'.Tests
fork-ci-rerun.test.py(86),fork-ci-pressure.test.py(17) andfork-fleet.test.pyall pass. The fork seam check passes, and this PR adds no lines to upstream files.Fix round: on the PR's earlier head (3193e7a) the new tests fail:
fork-ci-rerun.test.py15 failures (stopped end probe, the duplicate close that kept commenting, the zero probe limit),fork-ci-pressure.test.py8 failures and 1 error (the limit in one place, the stopped-probe round trip). Themine in ourstest and the every-pass close test pass there too, because that behaviour already existed; removing the guard turns the first one red.New tests:
test_only_an_open_issue_the_bot_opened_with_the_marker_is_ours;test_a_pass_whose_issue_reply_was_lost_opens_no_second_one;test_an_issue_another_pass_opened_since_this_one_loaded_is_used;test_two_open_issues_are_made_one_by_the_next_pass;test_a_duplicate_that_cannot_be_closed_still_leaves_one_record.test_only_the_jobs_own_oom_kill_counts,test_each_memory_threshold_is_where_the_config_puts_it.test_a_note_must_fit_the_runners_own_times_of_the_probe_steps,test_at_githubs_annotation_cap_no_note_is_trusted,test_a_stopped_end_probe_leaves_no_note_to_read(fix round).test_a_duplicate_that_cannot_be_closed_still_leaves_one_record(now three failing passes, no comment),test_every_pass_closes_a_duplicate_even_with_nothing_to_record,test_a_pass_whose_own_duplicate_another_pass_closed_leaves_it_alone(themine in oursguard).test_a_stopped_end_probe_leaves_the_rerun_no_note_to_read(the real stop warning, fed to the re-run),test_the_probe_limit_is_in_one_place.test_a_hung_probe_is_stopped_and_the_job_goes_on;test_a_probe_that_ignores_the_stop_signal_is_killed;test_a_probe_that_ends_in_time_adds_no_warning.test_each_stall_threshold_is_where_the_config_puts_it;test_the_time_limit_slack_is_where_the_config_puts_it;test_a_step_limit_needs_the_step_itself_ended_red;test_a_time_limit_message_counts_only_as_a_whole_runner_message;test_the_reader_takes_only_values_it_is_sure_of;test_a_name_matches_only_as_github_shows_it;test_the_workflow_is_read_once_at_the_runs_own_commit;test_a_job_with_no_note_at_all_is_left_red.cwd == '/'.On the old code (origin/main scripts, config and workflow, with these test files). A small shim, kept in the temp copy only, defines the new config keys and helper names, so failures show behaviour and not just missing names:
fork-ci-rerun.test.py: 25 failures and 2 errors. Among them:test_only_the_jobs_own_oom_kill_counts(7) and oftest_a_note_must_fit_the_runners_own_times_of_the_probe_steps(9);test_at_githubs_annotation_cap_no_note_is_trusted;test_only_an_open_issue_the_bot_opened_with_the_marker_is_ours,test_an_issue_another_pass_opened_since_this_one_loaded_is_used,test_two_open_issues_are_made_one_by_the_next_passandtest_a_duplicate_that_cannot_be_closed_still_leaves_one_record;test_each_memory_threshold_is_where_the_config_puts_it("its own cgroup stalled just enough");fork-ci-pressure.test.py:test_every_app_job_has_the_start_and_end_stepsfails for all 7 app jobs, because the old steps have notimeout … || echoguard.fork-fleet.test.py:test_it_asks_this_repository_anonymously_for_the_one_tagfails (KeyError: 'cwd').The state question
timeoutleaves no note, and its job's note is never read (by the end step's time or the probe's warning), so the job is left red, never re-run on a guess.General vs project
probe_start_step,note_slack_seconds,annotation_cap) are in.github/fork-ci-rerun.json.Closes #709
🤖 Generated with Claude Code