Skip to content

fix(ci): section git fetches read up to 3 times through fetch_p6.sh (P6) (#4936) - #5066

Merged
noahgift merged 1 commit into
mainfrom
fix/4936-p6-fetch
Oct 10, 2026
Merged

noahgift merged 1 commit into
mainfrom
fix/4936-p6-fetch

Conversation

@noahgift

Copy link
Copy Markdown
Member

Refs #4936
keep-open: B cuts section-fetch drops but cannot clear them; the stalls on the egress path continue until the network is fixed, and #4936 closes only after a post-merge x86-main log shows both mechanisms engaged.

Re-cut of #5051 onto main at 9e77499, a new branch with no merge from main. #5051 left the merge queue on a conflict with #5029, which fixed the same case-table annotation symptom (part A of #4936) with scripts/ci/fixture_quiet.sh. This branch takes #5029's fix and carries part B only: every section git fetch reads up to 3 times. The fence wrapper from #5051 is not in this branch.

The patch is the one #5051 carried, minus the fence script and its two ci.yml lines. In ci.yml this branch adds only the two fetch_p6.sh lines (--self-test, --check-wiring), after main's fixture_quiet.sh --self-test.

What it does

  • scripts/ci/fetch_p6.sh: reads a fetch again when it does not answer (a timeout or a transport error), up to 3 reads. A fetch that answers with an error, such as a missing ref or a 401, is never read again: that answer is the verdict. -C with an empty or missing dir is a usage error (rc 129).
  • fetch_p6.sh --check-wiring is RED on any git fetch in ci/sections.yml that does not go through the helper. It finds 7 fetches, all through the helper.
  • scripts/ci/pin_build_base.sh and scripts/lib/resolve_base.sh read through the helper with -C kept. Their rows run from a cwd that is no repo, so a read that lost its -C is RED.
  • check_roadmap_diff_additive.sh and ratchet_semantics_test.sh get rows for the stacked merge_group path's deepen and by-sha reads.

Case tables on 66a8c28

Table Rows Result
fetch_p6.sh --self-test 48 48 ok
fetch_p6.sh --check-wiring 7 fetches PASS
pin_build_base.sh --self-test 30 30 ok
check_roadmap_diff_additive.sh --self-test 27 27 ok
fixture_quiet.sh --self-test (main's, unchanged) 14 14 ok

Planted falsifiers for the P6 half (from #5051, same blobs)

These ran against the real scripts as CI calls them. A planted git on PATH points at a real file:// remote, with the real 10 s backoff. M-off sets P6_READS=1. M-review reverts the first-round review fixes.

Row Planted input Want On a5e3f09 (same P6 blobs) M-off M-review
B1 curl 92 CANCEL twice, then an answer: rc 0 0 (30 s: 10 + 20 backoff) 128, RED 0
B2 the same: reads 3 3 1, RED 3
B3 the same: main fetched yes yes no, RED yes
B4 curl 56 on every read: rc (step stays red) 128 128 128 128
B5 the same: reads, never a 4th 3 3 1, RED 3
B6 the same: one status line per read that did not answer 3 3 0, RED 3
B7 missing ref (an answer): rc non-zero non-zero non-zero non-zero
B8 the same: reads, an answer is never re-read 1 1 1 1
B9 401 with no credentials to offer (an answer): rc / reads 128 / 1 128 / 1 128 / 1 128 / 3, RED
B10 resolve_base sourced by a relative path, REPO_ROOT another tree: the stacked entry is deepened yes yes yes no (refused), RED
B11 the same, and the caller cds elsewhere between sourcing and the call yes yes yes no (refused), RED
B12 the same, under a CDPATH holding a decoy scripts/lib yes yes yes no (refused), RED

Two non-author reviews ran on this head. One killed 3 bare-fetch mutants, the other 7 of 7 mutants. Their non-blocking notes, left for later work:

  • A fetch split across two lines evades the wiring regex.
  • The wiring check covers ci/sections.yml only.
  • lowSpeed does not cut a connection that hangs before it connects.

A wiring check for fixture_quiet.sh (never on fat_driver.py run/wait, always on the self-test) is #5063.

🤖 Generated with Claude Code

…P6) (#4936)

Every `git fetch` in ci/sections.yml, and the two in the build-base pin and
resolve_base, now goes through scripts/ci/fetch_p6.sh. A fetch that does not
answer (timeout or a transport error) is read again, up to 3 times. A fetch
that answers with an error is not read again: that answer is the verdict.

- scripts/ci/fetch_p6.sh: the helper, a --self-test case table (48 rows, a
  planted git) and --check-wiring, which is RED on any fetch in
  ci/sections.yml that does not go through the helper. x86-main runs both.
  `-C` with an empty or missing dir is a usage error (rc 129).
- scripts/ci/pin_build_base.sh, scripts/lib/resolve_base.sh: their fetches
  read through the helper, with `-C` kept; the pin self-test (30 rows) and
  two roadmap self-test rows run from a cwd that is no repo, so a read that
  lost its -C is RED.
- scripts/check_roadmap_diff_additive.sh, scripts/tests/ratchet_semantics_test.sh:
  rows for the stacked merge_group path's deepen and by-sha reads.

The case-table annotation half of #4936 (the fixture's "not completed within
12000s" line shown as a job error) landed on main in #5029 as
scripts/ci/fixture_quiet.sh. This branch takes that and carries no second
mechanism. It is a re-cut of the earlier branch on main 9e77499.

Refs #4936
Agent: aprender-4936
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noahgift

Copy link
Copy Markdown
Member Author

Supersedes #5051.

@github-actions

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=5066 head=66a8c284e0d158c8f946e3a273c9cb4d78c2419a verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

@noahgift
noahgift disabled auto-merge October 10, 2026 14:48
@noahgift
noahgift enabled auto-merge October 10, 2026 14:58
@noahgift
noahgift added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit a964e7e Oct 10, 2026
30 of 31 checks passed
@noahgift
noahgift deleted the fix/4936-p6-fetch branch October 10, 2026 16:05
@noahgift noahgift mentioned this pull request Oct 11, 2026
noahgift added a commit to guyernest/aprender that referenced this pull request Oct 12, 2026
…aiml#5076)

The ARM64 GPU quick row, the x86 CUDA unit row and mac-check could not
block a merge: none is in `gate`'s needs, and the required checks are
`gate` and `workspace-test`. Under the GATE/LAB rule a check that cannot
block never runs on a PR, merge-queue or release path. A quorum ruled
DELETE-TO-LAB 3/3 on each, PROMOTE 0/3.

- ci.yml: the gpu-touched, GPU and mac-check jobs are gone; mg-reuse
  no longer outputs `mac`. `gate`'s needs are unchanged.
- gpu-lab-nightly.yml (new): the two GPU rows, nightly + dispatch, on
  the same labels, in each box's concurrency group.
- nightly.yml: mac-check beside build-darwin; publish does not need it.
- Guards and tests follow: ci_mg_reuse wiring rows, determinism-wait
  range, ci_gpu_touched_test, contract wording (pv validate: valid).

The fourth row, sov.provenance, is not in this change: skipping it on
PRs needs a fat_driver.py edit, and that file already exceeds the
pre-commit complexity limits, so the hook refuses any edit to it. It
stays tracked on the issue.

Self-tests: ci_mg_reuse 78/0, ci_gpu_touched_test 30/0, ci_gpu_touched
19/0, determinism-wait 26/0, fat_driver 60/60; dag, perf-concurrency,
runner-labels, guards-wired, guard-steps-isolated PASS; actionlint adds
no finding.

Rebased onto main 9e77499. Main had since added the paiml#4948 teardown
step (always(), fat_teardown.sh) to the three GPU jobs here; the jobs
stay removed, and the step moves to both jobs of gpu-lab-nightly.yml.
Re-run on the rebased tree: ci_mg_reuse 78/0,
ci_gpu_touched_test 30/0, ci_gpu_touched 19/0, fat_driver 60/60;
determinism-wait, guard-steps-isolated, dag, perf-concurrency,
runner-labels, guards-are-wired PASS; pv validate: valid; actionlint
findings on ci.yml and nightly.yml equal main's (4 info).

Re-cut onto main 83ef430. paiml#5066 had routed the PR-diff selector's
shallow fetch through fetch_p6.sh; that selector block is removed here,
so the only change from the reviewed patch is the text of one deleted
line. roadmap-aggregate-check: ok.

Re-cut again onto main fec9068, after paiml#5067. The patch is byte-identical
to the one above. Only the roadmap.yaml conflict needed resolving, and
roadmap-aggregate regenerated it. contracts gate: 8 of 8 steps ran,
0 failed.

Refs paiml#4955

Agent: aprender-wmainred
Agent: apr-4918

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.

1 participant