Skip to content

fork-ci-rerun: close the leftover minors from the #707 reviews - #721

Merged
scuttletoby merged 4 commits into
mainfrom
fork-ci-rerun-minors-709
Nov 21, 2026
Merged

scuttletoby merged 4 commits into
mainfrom
fork-ci-rerun-minors-709

Conversation

@scuttletoby

@scuttletoby scuttletoby commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

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.

  1. Tracking issue: a pass that stops after opening it no longer leaves two.
    • The issue is found by a marker on its first line (<!-- fork-ci-rerun tracking issue -->) and by the bot as its author. The title is not used, so a renamed issue is still found.
    • A pass checks again just before it opens an issue, so an issue another pass opened in the meantime is used.
    • When two are open, the next pass keeps the lowest number and closes the others. Every pass does this, because it reads the issue for its 24 h count at its end.
    • An extra issue is closed first, then gets one "Duplicate of #N." comment. If a close fails, the pass warns, posts no comment, still writes to the kept issue, and a later pass tries again.
    • The re-run comments on a closed duplicate drop out of the 24 h count. That count only informs; never-twice comes from the run's attempts. The runbook says so.
  2. Memory full: only this job's own OOM kill counts.
    • cgroup v2 memory.events covers a cgroup's whole subtree, so an ancestor's oom_kill includes other jobs' kills. Only the count from the job's own cgroup (cgroups[0]) is used.
    • A note with no own cgroup, or with / as its own cgroup, gives no sign. The check fails closed.
    • The job's own cgroup must also have stalled at least box_full_share_percent. Only then can a limited box that stalled count, through the own OOM kill or the box's own max/high events.
  3. Annotation cap and printed notes: a note printed well before the end step does not count.
    • GitHub keeps 50 annotations per job, and the end step's note is written last. So at the cap (annotation_cap), no note is trusted.
    • A note's seconds must also fit between the runner's own times for the start and end probe steps (probe_start_step/probe_end_step, widened by note_slack_seconds for whole-second stamps). A note printed well before the end step cannot know when the end step will run, so it does not fit.
    • No note is read when the end step took the probe's limit or more (probe_limit_seconds), or when any annotation starts with fork-ci-pressure: (the probe's own warnings). A probe stopped by its timeout … || 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).
    • Not stopped by these rules: a step that runs just before the end step knows the start time, so it can print a note that fits and then hide the real one. Only trust stops that: only trusted runs are read, and each gets one re-run at most, recorded on the issue. The runbook says so.
    • Checked on a real green Fork tests run: all 17 app jobs' real seconds fit their window.
  4. Stalled start probe: the tests still run.
    • Each probe step runs as 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.
    • The limit is one value, the changes job's probe_seconds output (a workflow-level env: is refused by the fork-contracts "quiet" rule). The config's probe_limit_seconds must equal it, and a contract test checks that and that no step keeps a copy.
    • The step then prints a warning and ends green, so the job's tests run.
    • timeout-minutes: 1 stays as a backstop. continue-on-error is still not allowed by the fork-contracts "quiet" rule.
  5. A person's re-run of a run older than 6 h: documented, not fixed.
    • GitHub lists runs only by creation time, and a re-run keeps the run's created_at, so such a re-run never shows up in the last list_hours of runs.
    • Finding it would mean reading further back on every pass. That costs API calls for a rare case, and a person who re-ran by hand is already watching.
    • The runbook now says this, gives the reason, and gives the fix: dispatch the workflow with run_id.
  6. Each rule line pinned.
    • Tests were added for every time-limit, stall and memory threshold, the step-limit rule, the runner-message rule, the workflow reader (scalars, ${{ }} minutes, keys after jobs:, the run's own commit only) and name matching.
    • A mutation sweep of the rule functions (322 mutants) now leaves only survivors that do not change behaviour: [0]↔[-1] on one-item lists, continue↔pass where the loop ends anyway, and docstring or message text.
  7. .git/config / git ls-remote: fixed in code.

Tests

fork-ci-rerun.test.py (86), fork-ci-pressure.test.py (17) and fork-fleet.test.py all 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.py 15 failures (stopped end probe, the duplicate close that kept commenting, the zero probe limit), fork-ci-pressure.test.py 8 failures and 1 error (the limit in one place, the stopped-probe round trip). The mine in ours test and the every-pass close test pass there too, because that behaviour already existed; removing the guard turns the first one red.

New tests:

  • Tracking issue:
    • 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.
  • Memory: test_only_the_jobs_own_oom_kill_counts, test_each_memory_threshold_is_where_the_config_puts_it.
  • Note: 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).
  • Fix round, tracking issue: 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 (the mine in ours guard).
  • Fix round, probe: 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.
  • Probe:
    • 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.
    • These run the workflow's real step text in bash, with a fake python3 and a shorter limit.
  • Rule lines:
    • 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.
  • Config: four new bad-config cases.
  • Fleet: 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:
    • every case of test_only_the_jobs_own_oom_kill_counts (7) and of test_a_note_must_fit_the_runners_own_times_of_the_probe_steps (9);
    • both cases of 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_pass and test_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");
    • the config tests, which need the new keys.
  • fork-ci-pressure.test.py: test_every_app_job_has_the_start_and_end_steps fails for all 7 app jobs, because the old steps have no timeout … || echo guard.
    • The three probe tests pin what that step text does: stopped at the limit (124), killed (137), unchanged when it ends in time. This test pins that the workflow really uses that text.
  • fork-fleet.test.py: test_it_asks_this_repository_anonymously_for_the_one_tag fails (KeyError: 'cwd').
  • The rule-line tests (thresholds, step limit, runner message, reader, names) pass on the old code too. They pin behaviour that was already right, and the mutation sweep shows they turn red when that behaviour changes.

The state question

  • Runs again: a second pass finds the same issue by its marker, so it opens no new one and adds no second comment for the same run and attempt (as before).
  • Stops half-way:
    • If the issue was created but the reply was lost, the next pass finds the issue by its marker.
    • If a pass stops after a duplicate opened, the next pass closes the duplicate.
    • If a close fails, the record still goes to the kept issue.
    • A probe stopped by timeout leaves 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.
  • Old, empty or missing state:

General vs project

  • General: the rules, the marker, the cap and the probe time limit all live in the general scripts and the runbook.
  • Project: values only (probe_start_step, note_slack_seconds, annotation_cap) are in .github/fork-ci-rerun.json.
  • No project names, hosts or paths were added.

Closes #709

🤖 Generated with Claude Code

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

Copy link
Copy Markdown
Owner Author

Review lens A (merge path and security), head 3193e7a: SAFE

Nothing 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 timeout … || echo now leaves a green end step with no note of its own. A note printed by a step can then stand alone, and it fits the time window that the stop makes wider (major 1). Only a trusted run can reach this, it needs a stall and a full forged note, and it gets one re-run at most, which the tracking issue records.

What I checked

These hold up

  • Token (fork-fleet.py:380-385):
    • git ls-remote now runs with cwd='/', GIT_CONFIG_NOSYSTEM=1, GIT_CONFIG_GLOBAL=/dev/null and a minimal env with no GIT_DIR.
    • So no repository config, and with it no checkout extraheader, can be read. It is anonymous now, and the test pins cwd.
    • Nothing else in the re-run path starts a subprocess.
    • The API client builds every URL as {API}/repos/{repo}/…. It never follows a URL from a reply, so the token only goes to the API host.
  • Own OOM kill (fork-ci-rerun.py:329-358):
    • cgroups[0] is the innermost cgroup, the probe's own (fork-ci-pressure.py cgroups()).
    • oom_kill is a delta since start (numbers()), so kills from earlier jobs in the same unit never count.
    • An own path of /, empty or missing gives no sign.
    • An ancestor's oom_kill is no longer read at all. Its max/high count only together with the job's own stall.
  • Annotation cap (:262): at 50 or more annotations no note is read. All pages are read (per_page=100, most=3), so the count is complete.
  • Note window (:283-305): in a normal job the window is a few seconds wide, and a printed note cannot know when the end step will start. A stopped start probe leaves no sample, so seconds is null and the note is refused. This fails closed.
  • Probe guard:
    • $? inside the || echo is timeout's status.
    • -k 5 40 ends within the start step's timeout-minutes: 1.
    • Every probe job runs on Linux. The macOS job has no probe, so a missing timeout binary is no concern.
  • Tracking-issue dedupe (:597-620):
    • An issue counts only when it is open, was created by github-actions[bot], and its body starts with the marker.
    • A person cannot create an issue as the bot.
    • The repo's other bot-opened bodies (fork-run-alert.sh, fork-follow-report.sh, fork-interaction-limit.sh) all start with fixed text or **…, so none can start with the marker.
    • So closing an extra one can never close a person's issue, nor another tool's issue.
    • If two passes close the same duplicate at once, the worst result is a second "Duplicate of" comment.
    • The re-check before _open() (:681) and mine in ours (:658) are right.
  • Run older than 6 h (runbook :137): acceptable. It fails closed (the run stays red), the reason given is true, and a dispatch with run_id covers it. A person's own attempt is trusted, so that dispatch still allows only one automatic re-run.
  • Nothing personal in the diff: no names, hosts, IPs, paths or tokens.

Major

  1. A stopped end probe lets a printed note count (fork-ci-rerun.py:248-289 with fork-tests.yml:816, :987 and the other end steps).
    • Before this PR, a hung end probe failed its step at timeout-minutes: 1. So end_step_ran was false and no note was read.
    • Now, timeout -k 5 40 … || echo "::warning::…" ends the step success with no note written.
    • If a step printed a fork-ci-pressure note earlier in that job, that note is now the only one. Then:
      • it is read as the job's own;
      • the window check still applies, but the end step's 40–45 s widens the window to about 50 s;
      • a guess of the remaining job time is enough to land inside it.
    • I checked this with the PR's own job_sign:
      • the start step took 1 s, the tests failed after 5 min, and the end step took 45 s (stopped);
      • one printed note with seconds: 320 fell inside the window of 296–348 s;
      • the result was memory full, so the run would be re-run.
    • The same happens if fork-ci-pressure.py end raises (warning, no note). That path was there before, but the window was narrow then.
    • Why it is not blocking: it needs a trusted run, a real stall that holds the end probe for more than 40 s, and a step that prints a complete note with stall numbers. Nothing in the app jobs prints one, and the result is one recorded re-run at most.
    • Fix (cheap), in note_of:
      • refuse the note when any annotation's message starts with fork-ci-pressure: end (the stop warning and the exception warning);
      • or refuse it when the end step took 40 s or more, or both.
      • A printed warning of that kind can only make the check fail closed.
      • Add a test with exactly the record above: it must be left red.

Minor

  1. The probe limit 40 is written into 7 workflow lines and appears nowhere in the config. If major 1 is fixed by step duration, the script needs that number too. Put it in one place: a config key that the pressure test checks against the workflow text.
  2. load() now writes (it closes duplicates) on any pass that loads the issue, including a fleet-mode report pass. That is fine. The runbook's state table could say that duplicates are closed by the next pass that has something to record, not by every pass.

🤖 Generated with Claude Code

@scuttletoby

Copy link
Copy Markdown
Owner Author

Review lens B (state and tests), head 3193e7a: SAFE

Nothing 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

  • CI on 3193e7a: all green. That covers Fork tests run 44891887479 (all app jobs, fork-ci-result), Fork checks and both secret scans. I dispatched nothing and asked for no re-run.
  • Tests on this head (temp worktree): fork-ci-rerun.test.py 83/83 OK, fork-ci-pressure.test.py 15/15 OK.
  • New tests on main's code. I used main's scripts and workflow with this PR's tests and config. A small shim adds the new config keys, ISSUE_MARK, and a probe_window that accepts any time.
    • rerun: 25 failures, 2 errors, including all 7 cases of the own-OOM test, the cap test, the marker test, the "opened since load" test, both two-issue tests and the window test.
    • pressure: test_every_app_job_has_the_start_and_end_steps fails for all 7 app jobs.
    • fleet UpstreamSync: 1 error (cwd).
    • This matches the PR body.
  • Mutation spot-check: 17 fix lines, removed or weakened one at a time.
    • Red (16):
      • the 40 s probe limit (40 → 400 in one job);
      • own-cgroup OOM → any box's OOM;
      • dropping the own-cgroup stall rule;
      • dropping the / own-path rule;
      • cap >= → >;
      • dropping the window check, dropping its upper bound, and ignoring the slack;
      • letting times() accept two same-named steps;
      • no duplicate close in load(), and keeping ours[-1] instead;
      • swallowing no close error;
      • no re-look before _open();
      • marker → title, and startswith → in;
      • dropping cwd='/'.
    • Green (1): the if mine in ours guard (fork-ci-rerun.py:660), see minor 3.
  • Old state. The bot has never opened the tracking issue: its only issues are "Secret sweep failed" and "Fork cannot follow upstream", all closed. So the move from title to marker orphans nothing.

State question

  • Runs again:
    • The issue is found by its marker, so no second issue or comment is made.
    • A renamed issue is still found (tested).
  • Stops after creating the tracking issue, reply lost:
    • That pass ends red with no comment and no POST.
    • The next pass finds the issue and uses it (tested).
    • Note: this test also passes on main's code, because main found it by title. Its comment "Old code: … opened a second one" is not quite right, but the case is pinned.
  • Two passes at once: the lowest number is kept, and the other pass closes its own. If a pass stopped before closing, the next load() closes the extra issue (tested both ways).
  • Old, empty or missing:
    • A note without seconds, without the start or end step times, or with two start steps gives no sign.
    • An own cgroup of / or none gives no sign.
    • A start probe stopped at 40 s leaves no sample, so seconds is null and the job can only be lost.
  • First pass after merge:
    • The config and the script ship together, and the sweep's sparse checkout reads both from main.
    • Runs from before the merge keep the same step names and note format, so they are judged by the same rules.

Major

  1. "A note printed by a step cannot count" does not hold for a step that runs last. See fork-ci-rerun.py:286, the probe_window docstring at :295, and the runbook at fork-ci-rerun.md:89 and :159.
    • The window is not secret. A test step that runs just before the end step knows the start time (the sample in $RUNNER_TEMP, or its own clock). It can print a note whose seconds = now − start, and that fits the window to within a few seconds.
    • This PR adds a new way to remove the real note. The end step is now timeout -k 5 40 … || echo. A probe that hangs for 40 s writes no note, yet the step ends success, so end_step_ran is true. Before this PR, that step failed at its 1-minute limit and no note was read.
    • Verified on this head with the test file's fixtures:
      • end step 45 s long (killed and green), with StepOutputIsNoSign.FORGED as the job's only note;
      • the window is (57, 113) s;
      • result: re-run.
    • Older ways to remove the real note, which already existed:
      • a step that garbles $RUNNER_TEMP/fork-ci-pressure-start.json, so that numbers() raises and the probe prints only a warning;
      • a fake python3 put first on $GITHUB_PATH.
    • Why it is not blocking: it needs deliberate code in a trusted run, plus a real stall or a forged one, and it gets one re-run at most, recorded on the issue.
    • Fix (cheap):
      • (a) In note_of, refuse a job whose end step took at least the probe limit (the step record shows ≥ 40 s), or that has a warning annotation starting with fork-ci-pressure: (the probe's own "stopped" or exception line). Add a test with the 45 s end step above.
      • (b) Reword the docstring and runbook. The window stops a note printed earlier, not one printed by the step just before the end step. The real guard against a step that suppresses the probe is "trusted runs only, once".

Minor

  1. A close that keeps failing posts "Duplicate of #N." on every pass (fork-ci-rerun.py:604-616).
  2. if mine in ours (:660) is unpinned. Without it, a pass whose own extra issue another pass's load() already closed posts a second "Duplicate" comment and PATCHes a closed issue. That is harmless, but no test has a load() closing the issue during _open(). One subtest would pin it.
  3. The comments of a closed duplicate drop out of the 24 h count. Suppose two passes race and each records a run on its own issue. When the higher issue is closed, its marker is no longer read. So count() undercounts by one until the window passes.
    • Never-twice is not affected (it comes from attempts).
    • A line in the state table is enough.

Not only in prose

Each new rule in the runbook and docstring has a test that goes red when it is removed, except for the two cases above:

  • the guard in minor 3;
  • the "cannot know" claim in major 1, which is prose that no test can back.

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

Copy link
Copy Markdown
Owner Author

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

  • No note is read when the end probe step took the probe's limit or more (probe_limit_seconds, 40). A step that long was stopped by its timeout, so it has no note of its own.
  • No note is read when any annotation starts with fork-ci-pressure:. That covers the probe's own warnings: stopped (124 or 137) and raised. A start or end probe that warned may have left no note of its own.
  • Either way the job is left red and not re-run on a guess.
  • The docs and PR body no longer say a printed note can never count. They now say three things:
    • the window stops a note printed well before the end step;
    • a stopped or warning probe means no note is read;
    • a step just before the end step can still print a note that fits. Only trust stops that, plus one re-run at most, recorded on the issue.
  • Tests:
    • test_a_stopped_end_probe_leaves_no_note_to_read covers end step times of limit-1 (re-run), limit, 45 and limit+600 (left red). It covers each warning kind placed before and after the forged note, and a line that only contains the prefix (still read).
    • test_a_stopped_end_probe_leaves_the_rerun_no_note_to_read (pressure tests) runs the real end step text from fork-tests.yml with a hanging python3. It feeds the stop warning to the re-run, which refuses a note it would otherwise read.

Minors

  1. 40 s in one place: done. The value lives in the changes job output probe_seconds, and all 14 probe lines use "${{ needs.changes.outputs.probe_seconds }}". I tried a workflow env: first, but the fork-contracts "quiet" rule refuses workflow-level env in fork-tests.yml. The re-run config's probe_limit_seconds must equal the output. test_the_probe_limit_is_in_one_place checks that they are equal, that no numeric timeout or "40 s" copy is left, that every app job needs changes, and that limit + 5 s fits the 50 s rule.
  2. When duplicates are closed: done in the runbook. Every pass closes them, because it reads the issue for its 24 h count at the end of each pass. A pass with a run to record does it earlier. New test: test_every_pass_closes_a_duplicate_even_with_nothing_to_record.
  3. No repeat "Duplicate of #N." comment: done. The close now happens first and the comment comes after it. When the close fails, the pass prints a warning, posts no comment and still writes to the kept issue, and the next pass tries again. It is a warning, not a red pass, because the record is intact. test_a_duplicate_that_cannot_be_closed_still_leaves_one_record now runs three failing passes (no comment) and then a working one (exactly one comment).
  4. if mine in ours guard: test added. test_a_pass_whose_own_duplicate_another_pass_closed_leaves_it_alone. With the guard removed, it fails.
  5. Markers on a closed duplicate drop out of the 24 h count: not fixed, on purpose. The count goes only into the summary, and nothing reads it to decide anything. Never-twice comes from the run's own attempts. Counting closed issues would add an extra API read on every pass for an informational number. The runbook's state table now has this row.

Also fixed a stale comment in test_a_pass_whose_issue_reply_was_lost_opens_no_second_one.

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.

  • fork-ci-rerun.test.py: 15 failures.
  • fork-ci-pressure.test.py: 8 failures and 1 error.
  • The guard test and the every-pass test pass there too, because that behaviour already existed.

On the new head all of these pass: fork-ci-rerun (86), fork-ci-pressure (17), fork-contracts, fork-fleet, fork-checks-ran, fork-ci-release, fork-owned-*, fork-ci-tests, fork-tests-drift and vp fmt --check.

State question

  • Runs again: a failed close is retried every pass, and the comment is posted once.
  • Stops half-way: the probe was stopped (the end step reached the limit, or it warned), so no note is read. A close that failed leaves no comment.
  • Old, empty or missing state: a missing or zero probe_limit_seconds is refused by the config check. A pass with nothing to record still closes duplicates. A duplicate already closed by another pass is left alone.

CI on this head: Fork tests, Fork checks and Fork secret scan all green, no reruns.

@scuttletoby
scuttletoby merged commit d173c14 into main Nov 21, 2026
40 checks passed
scuttletoby added a commit that referenced this pull request Nov 21, 2026
* 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>
scuttletoby added a commit that referenced this pull request Nov 21, 2026
* 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>
scuttletoby added a commit that referenced this pull request Nov 21, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fork CI re-run: leftover minors from #707 reviews

1 participant