Repository navigation
fix(ci): bound every git transfer by its byte rate so a stalled checkout or history fetch retries instead of running to its timeout - #35032
Conversation
…out or history fetch retries instead of eating the step budget A git HTTP request that moves under 1000 bytes/s for 120 s now exits 128 (curl 28), so actions/checkout's own fetch retry and fetch-history.sh's retry run. The measured stalls never started the pack while the server's sideband progress kept the log growing, so fetch-history.sh's silence bound never fired. The script now exports the same defaults, prints each phase as it starts, and keeps the silence bound as a backstop. lint-eslint reads no history and checks out at depth 1. Step budgets and job walls are unchanged. Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-Authored-By: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB L1 review (#34994) · 2026-11-17T23:47ZL1: ACCEPT
Must-fixNone. Should-fixNone. What I checked
Notes
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract-review-claim: session_01WGufzgh1zkZzDXL36ckWAG · head |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: Inputs read: card #34994 (body and all 5 comments: claim 6962740145, triage network reading 6962889910, PHASE 1 report 6963324497, PHASE 2 report 6964012625, claim amendment 6964076137); PR #35032 (body, 4-file list, the net diff ① Derived judgmentsNo published schema, export or accept set moves. The diff changes CI behaviour only, in five ways.
② Semver level
Clause-②: no. The PR body, the claim and the diff agree: no published schema, export or accept set changes. ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. The five questions the review was asked
Sentence-by-sentence agreement
Nits
All five are comment or diagnostic text with no effect on correctness. A fix would move the head; a follow-up or leaving them is fine. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs Landing · area o3-B · 2026-11-17T23:57Z
State change: ready for review plus auto-merge (merge queue), ahead of this area's other landings. Card #34994 closes on merge via |
Fixes #34994
Clause-②: no
Metadata-protocol: none
Tier: S.
.github/workflows/**is a governed surface, andcheck-governed-merges --pr 35032reads this diff as Tier S by content (the workflows split, ruling record 6722205630, letter C; no Tier H trigger). Governed:.github/workflows/ci.yml,.github/workflows/lint.yml. Landing: L1-a, then the seat's PASS contract review on the head, then the owning seat's area queues it (claim amendment on #34994).维护者速读
Checkout repository/Fetch this commit's history卡死、跑满 14–25 分钟超时、把 PR 踢出队列的问题,这个 PR 就是修它的。做法是在 ci.yml 和 lint.yml 加一个工作流级env:(GIT_HTTP_LOW_SPEED_LIMIT=1000、GIT_HTTP_LOW_SPEED_TIME=120):git 的一次传输如果连续 120 秒低于 1000 字节/秒,curl 就主动中止,actions/checkout 自带的重试(3 次)和 fetch-history.sh 的重试(3 次)随即接手。fetch-history.sh 还会实时打印每个阶段;lint-eslint 这条 lane 不读历史,改为浅检出。remote: Counting objects进度,日志一直在长。最近 24 小时,失败的合并队列运行里有 18/65 死在这里。.github/workflows/ci.yml顶部的env:块及其注释;②scripts/ci/fetch-history.sh的头注释和current_phase/实时阶段打印;③.github/workflows/lint.yml中lint-eslint去掉fetch-depth: 0的那一处。bash scripts/ci/fetch-history.selftest.sh,最后一行应是fetch-history self-test: all checks passed;本 PR 自己的 CI 里,每个 checkout 都已带着这个限速运行。What changes
.github/workflows/ci.ymland.github/workflows/lint.yml: a workflow-levelenv:withGIT_HTTP_LOW_SPEED_LIMIT: '1000'andGIT_HTTP_LOW_SPEED_TIME: '120', plus a short reasoning comment.fetch-history.sh,select-shard-packages' deepen, and spec's one-tag fetch.curl 28 Operation too slow). The retry around it then runs:fetch()is wrapped inretryHelper.execute(3 attempts, 10–20 s apart), and its git inheritsprocess.env;fetch-history.shmakes 3 attempts.scripts/ci/fetch-history.sh:fetch-history: +Ns PHASEeach time a new phase starts, reading only complete lines, so a step that still hits its wall names where it stood;lint.ymllint-eslint: checks out at depth 1. Its three steps (pnpm lint,check:engine-double-contract, lane verdict) read no history. The note that justifiedfetch-depth: 0named the slot-lookup ratchet, which runs inlint-scoped-slot-corpussince the lane split. That reason now stands onlint-repo-tooling's checkout; the six "same reason as" pointers, thelintjob's lane note andtypecheck-source-gates' CHECKOUT BUDGET note follow it.governed-surface-guard.yml(0 stalls measured on it), and the other 11 lint lanes'fetch-depth: 0..github/**andscripts/ci/**ship in no package (the root package is private). This PR is labelledskip-changeset.Measurement (Actions API, 2026-11-15T22:00Z → 2026-11-17T22:26Z)
Wall hits (merge_group and main push): 29 jobs.
fetch-history.sh, 18:PR-event runs since 2026-11-16T22:00Z: 19 more, including PR #34992's
Lint · scoped · query-options erasurejob 134411985185.Queue impact: in the 24 h to 22:26Z, 18 of 65 failed or cancelled merge_group runs failed in these steps.
fetch-history.shThe tail is bimodal, not #29980's flat hazard:
Healthy pre-pack wait, measured locally (this fetch shape, git 2.43):
--unshallowpack-reused 0)GIT_HTTP_LOW_SPEED_TIME=120is 8x the slowest of these, and it still holds a 6.5x slowdown like 2026-11-03's.Measured job ids
merge_group / main: 133435052239 133462684295 133470361132 133557664420 133577089390 133628404121 133637316745 133640228994 133645669009 133708987651 134190769187 134248343224 134250079846 134252806729 134257792648 134263160306 134282169394 134300103634 134314160613 134316771638 134330131026 134330172643 134348709261 134348509034 134348594081 134348634118 134358477635 134360293444 134393319006
pull_request: 133644413587 133664673312 133694024292 133695937589 133699212754 133700332558 134179666962 134211418703 134221147317 134234042188 134242570257 134245502895 134337923899 134359661557 134377275418 134377467166 134398650398 134404354815 134411985185
Queries:
GET /repos/objectstack-ai/objectstack/actions/workflows/{ci,lint,governed-surface-guard}.yml/runsby event in 6 h windows, thenGET /actions/runs/RUN_ID/jobs?filter=allfor 1,937 runs and 329 PR runs, andGET /actions/jobs/JOB_ID/logsfor every wall hit read. The full report is on the card.Diagnosis: why #34561's stall bound did not fire
Terminate orphan processlines) isgit,git(the remote-https wrapper) andgit-remote-https, plus the script'sbashandsleepfor fetch-history. It is neverindex-pack, and fetch-pack startsindex-packonly once it reads the pack header. This holds for fetch-history, full-ref and depth-1 checkouts alike, so neither size nor depth is the cause.sleepis among the orphans, and its PID climbs about 3/s across the whole budget (2234 → 4969 over 852 s). All 13 post-fix(ci): a stalled history fetch is killed and retried, not left to the step's wall #34582 wall hits showAttempt 1 of 3, no::warning::and no attempt 2.remote: ... objects: N%lines, and no pack bytes arrive. Reproduced locally:GIT_HTTP_LOW_SPEED_LIMIT=100000000 GIT_HTTP_LOW_SPEED_TIME=5aborted a v2 fetch whileremote: Compressing objects: 36%..38%was still streaming (rc 128,error: RPC failed; curl 28 Operation too slow). So curl's byte-rate bound fires exactly where the silence bound cannot.Tests
bash scripts/ci/fetch-history.selftest.sh(=pnpm check:fetch-history) at b4162ea:fetch-history self-test: all checks passed, 65 PASS. New cases:1000 120, and a preset5 7is kept;talk-then-curl28,ok: a stub printsremote: Counting objectsevery second for 5 s, longer than the 2 s stall bound, then exits 128 withcurl 28. The script retries it, and attempt 2 succeeds, ends unshallowed and shows no stall warning. Both attempts ran under the bound, and the live linefetch-history: +Ns remote: Counting objectsprints;env:block carries the script's defaults;lint-eslintsets nofetch-depth.scripts/ablation-replace.mjs(the mutation landed per its blob/anchor proof; restored withgit checkout HEAD --, blobs equal to HEAD):exportlines made plain assignments: 7 FAIL (healthy env, talk-then-ok env, script defaults, the four workflow env pins);GIT_HTTP_LOW_SPEED_TIME: '120'→'60': exactly 1 FAIL (lint.yml's env: sets GIT_HTTP_LOW_SPEED_TIME to the script's default).Acceptance notes
If stalls persist after this lands (maintainer's option): open a GitHub Support ticket citing the job ids above. The ticket would say:
Larger runners are not expected to help, because the runner sits idle while the server stalls.
Post-landing plan: re-measure 24 h of merge_group runs after the merge and post the wall-hit count for
Checkout repositoryandFetch this commit's history and the base branchon ci: git fetch / actions/checkout stall to the step timeout (14-25 min) before any test runs — dozens of merge-queue ejections a day; #34561's stall-bound retry does not cover actions/checkout #34994. Expected: 0 wall hits, andcurl 28followed byWaiting N seconds before trying again(checkout) orAttempt 2 of 3(fetch-history) where a stall was caught.scripts/check-published-files.mjs's refusal text still truthfully cites lint.yml'sfetch-depth: 0. The lane that runs it keeps depth 0.Out of scope, noted only: the other 11 lint lanes could move to a depth-1 checkout plus
fetch-history.sh. Measured, it is about 20 s slower per lane at p50 and adds no stall coverage, so it stays with finding(ci): fetch-depth 0 checkouts fetch ~1236 heads and ~7950 tags (main alone is 15–20× faster), and Test Core shards still turn a slow fetch into a cancelled required check — the cost #22020 budgets around #22034.Verification
Local runs at b4162ea.
dispatch-gates --commandsderived 64 commands, and--ranreconciles 64 derived, 64 run, 0 unrun.Local gate results (exit code captured before any pipe)
check:fetch-history,check:ci-filter-parity,check:required-contextsandcheck:stall-guard-budget;check:stall-guard-headroom,check:workflow-status-functions,check:workflow-step-name-quotingandcheck:self-test-workflow-commands;check:pm-dispatch-gates(364 s),check:pm-governed-merges,check:nul-bytes,check:bash32-floorandcheck:select-gate-families;check:type-check-coverageandcheck:type-check-debt.dist/):check:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closure,check:sourcemap-no-sources-content. These whole-tree families read build output, and this diff touches no package; CI builds and runs them.pnpm lint,test:repo, the type-check lanes and the path-scheduled jobs. This PR's own CI runs every checkout and fetch with the new env, which is the live positive control.overlap-checkon b4162ea:VERDICT clean exit 0(origin/main merges cleanly, 0 open PR heads share a file).Generated by Claude Code