Skip to content

build: :clean leaves out/bootstrap-lib; a dev-built runtime root then breaks the seed-driven stage1 and last-green #2388

Closed

Description

@ehartford

Repro (2026-10-13, d117 worktree): iterate with with build :dev (installed compiler), then run the battery. Two traps, one root — out/bootstrap-lib and the stage1 in out/bootstrap keep the dev compiler's generation and nothing invalidates them:

  1. Battery run 1: every test target passes, then last-green-record fails: stage1 was seeded by /Users/eric/.local/bin/with (sha256 faae4673…), not the pinned seed. The gate's release build had reused the dev-seeded stage1.
  2. src/main build :clean does not remove out/bootstrap-lib. Battery run 2 gate: WITH_RUNTIME_ROOT=…/out/bootstrap-lib holds runtime objects of compiler generation e3e911d2…, but this compiler is generation dc4b85af…; linking them would mix compiler generations (D30, #1815) → stage1 RED and the whole gate cascades.

Fixes to consider: :clean removes out/bootstrap-lib (and audits what else carries a generation stamp); a stage1 built by a non-seed driver is marked so the seed-driven build rebuilds rather than reuses it (the provenance facts last-green reads already exist).

Activity

  1. ehartford commented on Oct 13, 2026

    @ehartford
    ContributorAuthor

    Sharper repro, no :dev involved (2026-10-13, fresh worktree at 45e682e): with build :seed (installed driver, as its own docs prescribe) leaves out/bootstrap-lib stamped with the installed compiler's generation (78b1ea05…), after which the seed-driven src/main build :gate fails stage1 with the D30 mixed-generation refusal (this compiler dc4b85af…). Every fresh worktree that follows the documented :seed → gate path hits this; deleting out/bootstrap-lib + out/bootstrap is the workaround. The :seed path should not leave generation-stamped runtime objects the seed itself will refuse, or the seed-driven build should invalidate a bootstrap-lib whose stamp is not the seed's instead of linking against it.

  2. self-assigned this
    on Oct 16, 2026
  3. ehartford commented on Oct 16, 2026

    @ehartford
    ContributorAuthor

    Investigation update at 6069361 on Linux ARM64: the current clean target declares the whole out directory (build.w:5023 onward), but I have not verified its execution or the separate seed/runtime provenance invalidation problem. The SHA256-verified Linux ARM64 asset from nightly-20261003-local-2-b78ceca2d3c5 starts successfully; running with-linux-aarch64 build :clean --dry-run fails before executing the target with unknown type: List, first at build/par.w:18. I am stopping this attempt at that bootstrap/build-graph loading blocker, not treating this as a reproduction or a fix of #2388. No source changes or PR. Next investigation is to determine why this driver cannot load the current build graph before testing clean and generation invalidation.

  4. ehartford commented on Oct 16, 2026

    @ehartford
    ContributorAuthor

    Follow-up at 6069361: the build-graph loading blocker is bypassed for investigation using the SHA256-verified current Linux x86_64 seed under QEMU on this ARM64 host. In an isolated detached worktree, I placed sentinels in out/bootstrap-lib, out/bootstrap, and .with, then ran the actual build :clean (not --dry-run). It exited 0, reported cleaned 2 build artifact paths, and all three directories were absent afterward. Thus the clean subproblem does not reproduce at this revision with this driver. This does not establish that the separate installed-driver :seed -> seed-driven :gate provenance/invalidation problem is fixed. No source changes or PR; that provenance path remains the next investigation.

  5. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Triage 2026-10-25, with v0.15.3.0 (main a261b65): does not reproduce. :clean now removes the whole out/ tree (build.w:4955-4956: target_new(.Clean, "clean", "") then .arg("out")), which includes out/bootstrap-lib and out/bootstrap, as the sentinel run in the comment above found. A runtime of another generation is refused at link (D132).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions