Repository navigation
build: a cold worktree bootstraps again — cached graph only with a runner (#2493); runner root needs the producer's generation, fallback root checked (#2491) - #2495
Merged
Conversation
added 2 commits
October 20, 2026 10:41
…2493) A cached build graph (out/.build-state/build-graph.cache) carries no Sema: by design the parent never evaluates an action from it, the runner does. A cold worktree cannot link the runner before its bootstrap root exists, so the driver evaluates every action itself — against the placeholder, where std.build's capability types do not exist: "capability type is not visible to comptime evaluator" for every object action, a dependency cycle, 0.2 s. CI's order is exactly that: `:deps` writes the cache, `build` hits it. Every seed cut from e1d2b25 failed a fresh clone this way, on darwin and linux-x86_64 alike; deleting the cache (or build.w.effects, which keys it) let the same seed bootstrap. The cache is admitted only when build_runner_built says the runner exists, so an action never meets the placeholder; a cold worktree pays one live evaluation of build.w. The refusal names the type and the module (a tool that said only "capability type" left the hunt without its first fact). test/behavior/behav_2493_cached_graph_without_runner.w: a project whose action names a wl_* extern in an unreached arm, so its runner needs a bridge the project lacks; the second build (cache on disk, no runner) is refused on the previous commit and passes here.
… root's objects are checked too (#2491) build_runner_link_root accepted out/bootstrap-lib for a stage2 whose embedded runtime matched the seed's objects byte for byte (link_stage_runtime_dir_matches_embedded) — true once seed and stage2 compile the same rt/ identically — but the bridges nothing embeds were the seed's generation, so the runner's link refused them ("missing LLVM static bridge") and every action fell back to comptime evaluation: the reseed gate went red on main at the first seed of the same rt/ generation. A root the runner links must have this generation as its producer (link_stage_runtime_root_links_bridge); when a root passes the byte test but not the bridge test, the refusal says so. link_stage_find_runtime_object_path linked the fallback root's objects whenever the root was not provably foreign — a stale, producer-less <compiler_dir>/runtime of 2026-08 was linked by a current compiler and every current runtime symbol came up undefined (#2491, the linux-aarch64 seed cut). Only a root this generation produced, or whose objects are the ones this compiler embeds, is linked; link_stage_runtime_root_is_foreign goes with its last caller.
This was referenced Oct 20, 2026
Merged
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.
Two driver/link defects found cutting the D30 step-2 seeds; both stop-the-line class.
#2493 — every seed cut from e1d2b25 fails a fresh clone. On a
build-graph.cachehit the driver restores the graph with a placeholder Sema (by design the runner evaluates actions), but a cold worktree cannot link the runner before its bootstrap root exists, so the driver evaluates the actions itself andActionCtx& co. do not exist in the placeholder: "capability type is not visible to comptime evaluator" for every object action, then a false dependency cycle. CI's:depsthenbuildis exactly that sequence. Fix: the cache is admitted only when the runner exists (build_runner_built); the refusal names the type and module. Fixturebehav_2493_cached_graph_without_runner.w(red on main, green here). Verified end to end: fresh clones withWITH_BUILD_CACHE_DIR=none WITH_BUILD_RUNNER_DIR=/nonexistent,:deps→build, bootstrap to green with the fixed compiler on darwin (361 s) and linux-x86_64 (eric-5090); the published nightly-20261020-local-1 seeds fail the same sequence on both.#2491 and the reseed gate.
build_runner_link_rootaccepted a seed'sout/bootstrap-libfor a stage2 whose embedded runtime matched it byte for byte, but the bridges (nothing embeds them) were the seed's generation, so the runner link refused them —:install-user's reseed gate went red on main at the first seed of the samert/generation. A root the runner links must have this generation as its producer; the refusal says why when a root passes the byte test but not the bridge test. Andlink_stage_find_runtime_object_pathlinked a producer-less fallback root's objects (a stale 2026-08src/runtime/in the linux-aarch64 volume, #2491): only a root this generation produced, or whose objects are the ones this compiler embeds, is linked.Evidence (
~/.local/with-staging/runner-rootat 84e3f81, driven by the pinned seed)::gategreen, the fixture green on the release, the release compiler links its own runner,with run tools/battery.wGREEN (343 s).After this merges: reseed, re-cut all seeds from the fixed main (
nightly-20261020-local-2), bumpseed.lock.