Repository navigation
fix(refs): the WarmUp prefetch honors the persisted latest_tags fallback (the #108 warm-up-hang regression) - #109
Merged
Conversation
…ack (the #108 warm-up-hang regression) #108 (the offline-fallback cutover) moved the persisted latest_tags entries from fresh-data-with-TTL to OFFLINE-FALLBACK-ONLY — correctly, fixing the stale-latest-tag bug — but WarmUp's cold-check kept consulting ONLY the in-process maps. Those start empty in every fresh process, so every project load re-probed the ENTIRE collected corpus (measured live: 193-194 repos x 2 ls-remote ops per process, on a host whose persisted cache already held 316 latest_tags + 279 default_branches entries). The pre-#108 model served the persisted entry as fresh, so the prefetch found ~1 cold repo and returned instantly — which is why the old runs passed. Under concurrent bed runs the re-probe fanout (10 warm-up workers x N processes) trips GitHub's documented throttling threshold (the 152-concurrent- ls-remote storm this very layer was built to prevent), and every throttled fetch then burns its 30s-deadline x 3 bounded retries — a 23s warm-up (measured, healthy network) stretching into tens of minutes per process: the observed deterministic hang at 'fetching git metadata for 194 repo(s)'. The fix restores the prefetch to a UX batch, never a resolution: a repo whose PERSISTED latest_tags fallback has an entry is prefetch-warm. The freshness contract is untouched — the on-demand LatestTag path still re-probes the network in every fresh process (the offline-fallback tests keep guarding it); a repo pinned at immutable tags never resolves a latest tag at all, so for those repos the probe was pure waste. A genuinely cold repo (no persisted entry) still prefetches, unit-pinned.
Review — PASSHead SHA: Security screen: PASS — no secrets, no egress, no scope mismatch (description matches the diff exactly), no new deps, no guardrail weakening. The change reduces network fanout rather than adding it. Checklist: All applicable rules PASS or NA.
No comments on the thread to adjudicate. Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
refs.GitClient.WarmUp (the startup prefetch behind "charly: fetching git metadata for N repo(s) (first run)") regressed in #108: the offline-fallback cutover correctly moved the persisted latest_tags entries from fresh-data-with-TTL to OFFLINE-FALLBACK-ONLY, but WarmUp's cold-check kept consulting only the IN-PROCESS maps - which start empty in every fresh process. Result: every project load re-probed the entire collected corpus over the network.
Measured live on the opencharly umbrella host: a project whose persisted cache already held 316 latest_tags + 279 default_branches entries printed "fetching git metadata for 193 repo(s) (first run)" on every fresh process and ran 193 repos x 2 git ls-remote ops (~23 s healthy, uncontended). The pre-#108 model served the persisted entry as fresh, so the prefetch found ~1 cold repo and returned instantly - which is exactly why the same bed passed at run 2026.249.2233 ("fetching git metadata for 1 repo(s)" in its deploy-add log) and hung at run 2026.250.0131.
Under concurrent bed runs (the CC-1 wave: multiple charly processes x 10 warm-up workers each), the aggregate ls-remote fanout trips GitHub's throttling threshold (the documented 152-concurrent-ls-remote storm this layer was built to prevent); every throttled fetch then burns its 30 s-deadline x 3 bounded retries, stretching the 23 s warm-up into tens of minutes per process - the observed deterministic hang of two independent binaries at the identical line.
The fix restores WarmUp to a UX batch, never a resolution: a repo whose PERSISTED latest_tags fallback carries an entry is prefetch-warm. The #108 freshness contract is untouched - the on-demand LatestTag path still re-probes the network in every fresh process (guarded by the existing offline-fallback tests), and a repo pinned at immutable tags never resolves a latest tag at all, so for those repos the probe was pure waste. A genuinely cold repo (no persisted entry) still prefetches, unit-pinned.
How tested
Rulebook compliance
Change classification
Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)