Repository navigation
Delta workers fetch the compiler-tier checkout under code_git_fetch_timeout_s - #2013
KaloyanNaumov wants to merge 19 commits into
Conversation
The four delta workers (scip_delta, scip_go_delta, scip_ts_delta, scip_py_delta) called compiler_tier.git for the checkout fetch without timeout_s, so the helper's 600 s default applied. On a repository with a multi-gigabyte pack the first fetch was killed on every pass before refs/loom/scip-head was recorded, and each retry re-sent the whole pack and left its temporary pack behind. scip_full already gives the same fetch code_git_fetch_timeout_s; the delta workers now pass it too. Each worker's first-run test records the fetch's keyword arguments and asserts the configured timeout, set to a value no default can match. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
…etch budget `code_git_fetch_timeout_s` covers a fetch, a forced checkout and a submodule update, as `scip_full.move_checkout` applies it. The delta workers gave only the fetch that budget; the forced checkout, which writes the whole tree of a large repository into an empty checkout on the first run, and the C/C++ worker's submodule update kept the 600 s default. The Go, TypeScript and Python workers pass the budget to `checkout --force`. The C/C++ worker runs exactly `move_checkout`'s three steps, so it calls it; each step gains one retry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
The compiler tiers' pass deadline was the harness timeout plus 1800 s, sized when the checkout steps ran under the 600 s default. They now run under `code_git_fetch_timeout_s` (3600 s by default), so a slow first fetch plus a full harness run could outlive the deadline and be cancelled mid-apply. Add `max_pass_fetch_budgets` to the registry row: the pass deadline gains that many `code_git_fetch_timeout_s` budgets. The Go, TypeScript and Python tiers move their checkout in two git steps (fetch, forced checkout); the C/C++ tier runs three steps with one retry each, as `scip_full.move_checkout` does. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
The delta workers now move their checkouts under `code_git_fetch_timeout_s` too, so the remark that the delta's 600 s is sized for a few merges is false. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit d0efea1. Configure here.
zlareb1
left a comment
There was a problem hiding this comment.
The pass deadline finding blocks approval. For example, increasing the live fetch timeout above 12,600 seconds after the TypeScript worker starts leaves its default outer deadline at 12,600 seconds. The supervisor can still cancel its first fetch before the new budget expires. Compute the outer deadline at pass admission and cover a runtime update after the supervisor starts.
A tier's pass deadline sums its harness timeout, its headroom and a number of fetch budgets at code_git_fetch_timeout_s. The registry computed that sum once, when the supervisor built the specs, while the delta workers read code_git_fetch_timeout_s on every fetch. Raising it at runtime let the git steps outlive the frozen deadline, and the pass was cancelled mid-checkout. A spec built from a setting now carries a live deadline function, and the supervisor calls it when a pass is admitted, so a runtime update of any setting the sum reads reaches the next pass. The frozen value stays on the spec for readers that want the build-time number. Assisted-by: Claude Code Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
The deadline sums a harness timeout, a headroom and some fetch budgets. Only code_git_fetch_timeout_s is a LIVE setting; the harness timeouts and headrooms are read from the environment at start. A per-worker function that re-sums the deadline can therefore return only a build-time constant for all but the four compiler tiers. WorkerSpec carries git_fetch_budgets, the number of fetch budgets the pass adds, and deadline_seconds() adds them at the current code_git_fetch_timeout_s to max_pass_seconds. The supervisor reads the deadline when a pass is admitted. The worker snapshot gains the field; max_pass_seconds holds the static part and deadline_seconds() is unchanged on every row. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
zlareb1
left a comment
There was a problem hiding this comment.
The supervisor reads the live fetch budget at pass admission and gives each checkout step room before the harness deadline. All 149 focused worker deadline and registry tests passed.
zlareb1
left a comment
There was a problem hiding this comment.
Unit parts 1 and 4 fail after the C++ checkout helper moved. I reproduced the no-delta case on the CI merge. Its first parent passes.
The clang delta worker moves its checkout through the shared helper, so `scip_delta.git` no longer exists and the cancellation and untrusted-file fixtures raised AttributeError in setup, never reaching the behaviour they assert. They patch the seam their worker exposes: the shared helper for the clang worker, git for the language workers. The cancellation, rejection and watermark assertions are unchanged. Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
zlareb1
left a comment
There was a problem hiding this comment.
The two fixtures patch the workers’ current checkout helpers, and the cancellation, refusal, and deadline cases pass. All 329 focused tests pass on this head. GitHub reports a conflict with main in server/code/workers/scip_go_delta.py.
Main moved the same delta workers and their tests while this branch was reviewed: the Go worker prunes stored retry keys that are no longer modules of the checkout (`_known_retry`), a fetch from a shallow mirror records its head, and `scip_full.move_checkout` sizes each step by `code_git_fetch_timeout_s`. One conflict, in `scip_go_delta._run_repo`: the branch's fetch and forced checkout carry that budget; main adds the retry-key prune after them. Both are kept, the move first so the prune reads the checkout the move just produced. The seam the cancellation and untrusted-file fixtures patch survives: the clang worker moves through `scip_full.move_checkout`, the language workers still call `git`, and each fixture patches what its worker exposes. Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
|
Merged main. One conflict in 311 passed across the eight focused files (302 before the merge; main added nine), 151 across the registry and deadline neighbours. Ruff clean, generators current. |
zlareb1
left a comment
There was a problem hiding this comment.
The Go delta worker keeps the workspace-scope check before checkout. It uses the configured timeout for both Git steps, and the supervisor reads the current budget when it admits a pass. The test fixtures patch the checkout helpers that each worker calls.
zlareb1
left a comment
There was a problem hiding this comment.
Unit part 6 fails in two C++ environment passthrough cases.
The C++ delta worker moves its checkout through `scip_full.move_checkout`, so `scip_delta` no longer holds `git`. The environment-passthrough fixture patched that name and raised AttributeError in setup, never reaching the harness environment its two cases assert. It patches `move_checkout`, the seam the cancellation and untrusted-file fixtures already patch; the assertions are unchanged. Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
|
Both cases were broken in fixture setup, not by the behaviour they cover. cb78a1b The branch moved the clang checkout into the shared helper ( The fixture now patches On this head: both cases pass, the file is 78 passed, and the four delta-worker files are 131 passed. The full |
zlareb1
left a comment
There was a problem hiding this comment.
The clang fixture patches move_checkout, which the worker calls on this head. The two environment cases retain their assertions. Worker, deadline and checkout tests pass (358 tests).
scip_delta keeps move_checkout, whose submodule step is compiler_tier.update_submodules and so now syncs URLs from the target .gitmodules. The worker test keeps the timeout assertions and gains main's submodule-sync sequence; its fixture patches compiler_tier.git, the helper the worker calls. Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
|
fix merge conflicts |
zlareb1
left a comment
There was a problem hiding this comment.
The merge preserves the configured checkout fetch timeout and syncs submodule URLs before fetching their pins. All 133 focused worker and submodule tests passed.
zlareb1
left a comment
There was a problem hiding this comment.
P2 — tests/unit/snapshots/worker_registry.json leaves git_fetch_budgets absent on the code calibration worker row that main added. The registry emits that field for every worker. The worker snapshot test fails on the exact CI merge and passes on main. Regenerate the snapshot from the combined registry. Failed unit job
zlareb1
left a comment
There was a problem hiding this comment.
The pinned Biome check finds the same unformatted dashboard assertion in this run and on clean main. The separate repair formats that assertion. Failed job · Repair #2107
… row (ClickHouse#2013) main grew the field on every worker row; the branch snapshot predates it, so the snapshot test failed on the merge and passed on main. Regenerated with LOOM_UPDATE_WORKER_SNAPSHOT=1 against the combined tree: one line added, the code_calibration row only. Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
|
Steady point: Snapshot regenerated from the combined tree with the repo's own writer, not hand-edited:
|
zlareb1
left a comment
There was a problem hiding this comment.
The registry snapshot includes the calibration worker. The C++ pass can still hit its deadline while Git is within its configured command and retry budgets.
|
This red looks like a random-order one-off rather than the change — evidence below, and a re-run should clear it. It is not Reproduced with your stack, not mine. PG 18 with a real streaming synchronous standby (
The suppressed stderr is clean. The test hides a child's stderr on bootstrap failure, so I ran every And the surface this PR touches is CLI help text. What differs in your run: |
zlareb1
left a comment
There was a problem hiding this comment.
The prepared-bot test fails at first-cell automation on this head and on clean main under Postgres 18. The repair waits for the first web process to enforce tenancy before provisioning the bot. Failed job · Repair #2106
zlareb1
left a comment
There was a problem hiding this comment.
The C++ checkout budget finding still applies. move_checkout runs fetch, checkout, and two submodule sync–update pairs, with one retry per command. The registry still budgets six attempts for a sequence that can take twelve.
zlareb1
left a comment
There was a problem hiding this comment.
The enrollment spend assertion in this unit job also fails on the clean CI base. It passes with the fix in #2132 and on current main. The existing run still fails. Failed job Merged repair
…e#2013) The clang delta row budgeted six git steps for a move that runs six commands with one retry each: twelve attempts. The steps now live in compiler_tier (SUBMODULE_STEPS, checkout_lead_steps) and move_checkout runs them through one runner, so checkout_move_attempts() is the sequence's own count; the registry row reads it from the worker module (max_pass_fetch_budgets_attr) instead of carrying a hand count. The deadline goes 27000 s to 48600 s on the default fetch timeout, and the step list cannot grow without the budget growing with it.
|
Merged
Rather than raising the constant, the budget is now computed from the step list |
zlareb1
left a comment
There was a problem hiding this comment.
The checkout attempt count covers all six commands and their retries. The pass can still time out after an operator raises the live Git timeout during checkout.
The supervisor fixes a pass deadline at admission from code_git_fetch_timeout_s, but move_checkout read the setting again for each half of the move. An operator raising it during the checkout gave the submodule steps the new value, so the move could outlast the deadline it was admitted under. The supervisor now reads the timeout once at admission, prices the deadline at it and records it on the pass context. move_checkout reads it once from there (the live setting outside a supervised pass) and runs every step, submodules included, under that value. Assisted-by: Claude Code:claude-sonnet-5-5 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
The Go, TypeScript and Python delta workers fetch and then check out under code_git_fetch_timeout_s, reading the setting once per step. A runtime update between the two steps gave the second one a longer timeout than the pass deadline was priced at, the same gap the clang move had. compiler_tier.fetch_timeout_s returns the timeout the supervisor read at admission (the live setting outside a supervised pass), and the three workers and move_checkout read it once for both steps. Assisted-by: Claude Code:claude-sonnet-5-5 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
test_no_new_tunable_constant lists every numeric module constant whose name reads as a tunable. CHECKOUT_MOVE_RETRIES is the retry count the pass deadline is priced at, a property of the move's command list, so it carries the not-a-setting marker the test reads. Assisted-by: Claude Code:claude-sonnet-5-5 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Kaloyan Naumov <knaumov@gmail.com>
|
Every step of a checkout move now runs under the git timeout its pass was admitted with, as described on the thread. The attempt count and the deadline sum are unchanged. I also marked |
zlareb1
left a comment
There was a problem hiding this comment.
The supervisor captures the Git timeout at admission, and the compiler tiers use that value for their checkout steps. All 291 focused tests passed, including runtime timeout changes, the worker registry snapshot, and the settings gate.

Closes: #2012
TL;DR: The four code-index delta workers fetched the compiler-tier checkout under a hard-coded 600 s limit, so a repository with a multi-gigabyte pack never finished its first fetch. They now pass
code_git_fetch_timeout_s, the settingscip_fullalready uses for the same fetch.Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The compiler-tier delta workers (C/C++, Go, TypeScript, Python) fetch the checkout under
code_git_fetch_timeout_sinstead of a fixed 600 s, so the first fetch of a repository with a multi-gigabyte pack can finish.Why
compiler_tier.gitdefaultstimeout_sto 600 s.scip_delta,scip_go_delta,scip_ts_deltaandscip_py_deltacall it for the checkout fetch withouttimeout_s. A fresh checkout has norefs/loom/scip-head, so the first fetch sends the whole pack; on a 13.7 GB pack the fetch was killed at 600 s on every pass. A killed fetch records norefs/loom/scip-head, so the next pass sends everything again and leaves another temporary pack of about 13 GB behind.scip_fullandgitrepoalready usecode_git_fetch_timeout_s(default 3600 s) for their fetches; the delta workers were the remaining callers.Scope and risk
Touches the fetch and checkout calls in each of the four workers: the supervisor reads
code_git_fetch_timeout_sonce when it admits a pass, prices the pass deadline at it, and every git step of that pass's checkout runs under the same value, so a runtime change reaches the next pass. It leaves alone the harness timeouts, the retry count andcompiler_tier.git's default. A fetch that is genuinely stuck now holds its pass for up tocode_git_fetch_timeout_sinstead of 600 s; the entry lock is held for that time, as it is underscip_full.Compatibility, rollout and rollback
code_git_fetch_timeout_salready exists and is live-tunable; a deployment that set it keeps its value.Tests
The first-run test of each worker (
test_code_scip_delta_worker.py,test_code_scip_go_delta_worker.py,test_code_scip_ts_delta_worker.py,test_code_scip_py_delta_worker.py) records the keyword arguments of the fetch and assertstimeout_sequals the configuredcode_git_fetch_timeout_s, set to 7777 so no default matches. Before the change all four fail withKeyError: 'timeout_s'; after it they pass.ruff check,ruff format --check,scripts/gates/function_length_gate.pyandscripts/gates/mypy_gate.pypass.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code wrote the change and the test edits; I read the four call sites, confirmed the red and green runs above, and checked that
scip_fulluses the same setting for the same fetch.I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make test-unitand applicable integration results are reported by CI; a full local run is not required before pushing.main; no merged migration is edited. (No migration.)frontend/changed. (Not changed.)docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.Note
Medium Risk
Changes worker pass timing and git checkout behavior for all SCIP delta tiers; mis-tuned budgets could still cancel long passes, but the intent is to prevent premature timeouts on large fetches.
Overview
Compiler-tier delta workers no longer rely on
compiler_tier.git's 600 s default for fetch/checkout. They readfetch_timeout_s(), which returnscode_git_fetch_timeout_sfixed at pass admission (pass_context.git_fetch_timeout_s) so a live setting change mid-pass cannot extend git steps beyond the supervisor deadline.Checkout moves are centralized in
compiler_tier:GitStep/run_checkout_steps, shared lead + submodule sequences, andcheckout_move_attempts()(12 for the C++ path with retries).scip_full.move_checkoutandscip_deltause that path; Go/TS/Python workers pass the same timeout into their fetch and forced-checkout calls.Worker pass deadlines now add
git_fetch_budgets × code_git_fetch_timeout_son top of harness timeouts (e.g. clang delta 12 attempts, other deltas 2), computed at each pass admission in the supervisor. Registry snapshot deadlines for SCIP delta workers increase accordingly.Reviewed by Cursor Bugbot for commit 719cb51. Bugbot is set up for automated code reviews on this repo. Configure here.