Skip to content

ci(bootstrap): executing v2 bootstrap fixed-point claim (real, not a stub) - #5026

Closed
briansrls wants to merge 1 commit into
mainfrom
claude/peaceful-thompson-40vu2g
Closed

briansrls wants to merge 1 commit into
mainfrom
claude/peaceful-thompson-40vu2g

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Adds the v2 bootstrap fixed-point as an executing .dag claim — replacing the spec-without-execution stub direction.

bootstrap_v2_fixed_point (src/v4/workflow/bootstrap_v2_test.dag) is a test fn whose witness is a real host run: a shell-transport service op executes regen_stage0 --verify (committed stage0 == a fresh self-compile — the meta-circular fixed point) and the witness is exit 0.

No gate change. The v2 interpreter already dispatches shell transports, so the bootstrap check runs in the same ci_claim_gate as the in-interpreter test fns, discovered by the same *_test.dag glob.

Verified by execution: the gate spawns cargo run -p v2-compiler --bin regen_stage0 -- --verify (you can see [shell] … then PASS bootstrap_v2_fixed_point in the log) — corpus green at 159.

Context / follow-ups

  • This is part (a) of modeling the v2→v4 bootstrap as executing claims. v4 bootstrap (gunbc compile --source-root src/v4) is the next claim, identical shape — pending confirmation it's currently green.
  • The claim is heavy (a full v2 self-compile), so it wants affected-set gating (the ci_affected_components machinery exists but isn't wired into the floor) to fire only when v2 sources change.
  • The existing self_host__claim_t15_self_host_fixed_point compares two stub digest placeholders; this lands a real, executing one alongside it. Part (b) — fleshing workflow/bootstrap.dag into the full v2→v4 chain — follows.

https://claude.ai/code/session_01NiKQuX5vjB66m78TGLGE2i


Generated by Claude Code

briansrls added a commit that referenced this pull request Jun 16, 2026
…plate_projection_source)

`regen_stage0 --verify` was stale at HEAD: a fresh self-compile dropped
`pub mod method_template_projection_source;` from the generated lib.rs, so the
committed stage0 seed could no longer reproduce itself (and a real regen would
orphan the module + break the build, since regen_stage0.rs and tests/bootstrap.rs
reference it).

Root cause: #5025 added the hand-maintained method_template_projection_source.rs;
#5028 hand-added its `pub mod` to the generated lib.rs but never registered the
module in regen's authority, so fresh regen omitted it (a 7th hand-maintained
stage0 file outside both registries).

Fix (mirrors v1_compiler_dag_collect handling):
- register method_template_projection_source.rs in HAND_MAINTAINED_STAGE0_FILES
  so regen copies it and the output-set assertion accepts it
- ensure_method_template_projection_module() injects its `pub mod` into the
  generated lib.rs (the .dag has no source for this module — it holds
  GENERATED_METHOD_TEMPLATE_PROJECTION_DAG as a Rust const)
- sync tests/bootstrap.rs copy_stage0_support_modules to the full hand-maintained
  set (it was missing resolved_graph_cache + v1_compiler_dag_collect)

regen-safe: no .dag change, no generated stage0 file changes (committed lib.rs
already declared the module; this makes regen reproduce it). Validated:
`regen_stage0 --verify` green, regen write produces zero drift, v1 claim gate
still green (158 witnesses).

Gating of this fixed point is provided by PR #5026 (executing .dag bootstrap
claim); this PR is its prerequisite post-rename.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 16, 2026
…plate_projection_source) (#5030)

* WIP: v1 -> v2 bootstrap/compile

* fix(bootstrap): restore v1 self-host fixed point (register method_template_projection_source)

`regen_stage0 --verify` was stale at HEAD: a fresh self-compile dropped
`pub mod method_template_projection_source;` from the generated lib.rs, so the
committed stage0 seed could no longer reproduce itself (and a real regen would
orphan the module + break the build, since regen_stage0.rs and tests/bootstrap.rs
reference it).

Root cause: #5025 added the hand-maintained method_template_projection_source.rs;
#5028 hand-added its `pub mod` to the generated lib.rs but never registered the
module in regen's authority, so fresh regen omitted it (a 7th hand-maintained
stage0 file outside both registries).

Fix (mirrors v1_compiler_dag_collect handling):
- register method_template_projection_source.rs in HAND_MAINTAINED_STAGE0_FILES
  so regen copies it and the output-set assertion accepts it
- ensure_method_template_projection_module() injects its `pub mod` into the
  generated lib.rs (the .dag has no source for this module — it holds
  GENERATED_METHOD_TEMPLATE_PROJECTION_DAG as a Rust const)
- sync tests/bootstrap.rs copy_stage0_support_modules to the full hand-maintained
  set (it was missing resolved_graph_cache + v1_compiler_dag_collect)

regen-safe: no .dag change, no generated stage0 file changes (committed lib.rs
already declared the module; this makes regen reproduce it). Validated:
`regen_stage0 --verify` green, regen write produces zero drift, v1 claim gate
still green (158 witnesses).

Gating of this fixed point is provided by PR #5026 (executing .dag bootstrap
claim); this PR is its prerequisite post-rename.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#5025 migrated the method-template producer into the bootstrap compiler
and hand-added `pub mod method_template_projection_source;` to the
committed stage0 lib.rs, but never taught the self-compile to emit it.
A fresh self-compile omits the line, so `regen_stage0 --verify` (the
self-host fixed point) fails: committed stage0 != fresh self-compile.
CI does not run regen --verify, so the drift sits latent on main. The
module is load-bearing — regen_stage0 and the bootstrap test both
`use v1_compiler::method_template_projection_source`.

Handle it as the hand-written infra module it is, in the three places
its peers (v1_interpreter, cli_run, ...) are already handled:
  - 05_emit_rust.dag: add to emit_lib_rs_from_files hand_maintained_mods
    (+ regenerated v1_compiler_emit_rust.rs seed)
  - regen_stage0: add to HAND_MAINTAINED_STAGE0_FILES (copied into the
    fresh self-compile dir; excluded from the generated-output registry)
  - bootstrap tests: copy into stage dirs + exclude from the cross-pass
    fixed-point diff

regen_stage0 --verify now passes; committed lib.rs is unchanged (the
generator reproduces it).

https://claude.ai/code/session_01NiKQuX5vjB66m78TGLGE2i
@briansrls
briansrls force-pushed the claude/peaceful-thompson-40vu2g branch from c68f200 to 668ec9a Compare June 16, 2026 21:10
@briansrls briansrls closed this Jun 16, 2026
briansrls added a commit that referenced this pull request Jun 16, 2026
…osed receipt-parse bug + 2 masked lints (#5045)

* WIP: v1 -> v2 bootstrap/compile

* fix(bootstrap): restore v1 self-host fixed point (register method_template_projection_source)

`regen_stage0 --verify` was stale at HEAD: a fresh self-compile dropped
`pub mod method_template_projection_source;` from the generated lib.rs, so the
committed stage0 seed could no longer reproduce itself (and a real regen would
orphan the module + break the build, since regen_stage0.rs and tests/bootstrap.rs
reference it).

Root cause: #5025 added the hand-maintained method_template_projection_source.rs;
#5028 hand-added its `pub mod` to the generated lib.rs but never registered the
module in regen's authority, so fresh regen omitted it (a 7th hand-maintained
stage0 file outside both registries).

Fix (mirrors v1_compiler_dag_collect handling):
- register method_template_projection_source.rs in HAND_MAINTAINED_STAGE0_FILES
  so regen copies it and the output-set assertion accepts it
- ensure_method_template_projection_module() injects its `pub mod` into the
  generated lib.rs (the .dag has no source for this module — it holds
  GENERATED_METHOD_TEMPLATE_PROJECTION_DAG as a Rust const)
- sync tests/bootstrap.rs copy_stage0_support_modules to the full hand-maintained
  set (it was missing resolved_graph_cache + v1_compiler_dag_collect)

regen-safe: no .dag change, no generated stage0 file changes (committed lib.rs
already declared the module; this makes regen reproduce it). Validated:
`regen_stage0 --verify` green, regen write produces zero drift, v1 claim gate
still green (158 witnesses).

Gating of this fixed point is provided by PR #5026 (executing .dag bootstrap
claim); this PR is its prerequisite post-rename.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: v1 -> v2 bootstrap/compile

* Clear two clippy lints masked behind the never_loop error

- src/v1/tests/src/lib.rs: remove duplicated #[cfg(test)] on mod pd3_adversarial (clippy::duplicated_attributes)
- tools/ci_claim_gate/src/main.rs: fix doc-comment list markdown (clippy::doc_lazy_continuation); wording unchanged

clippy --all-targets -- -D warnings now clean workspace-wide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Resolve merge with main #5038: keep the fail-closed rev-scan fix

main's #5038 silenced clippy::never_loop by reducing parse_compiled_receipt to
lines().next_back(), which only inspects the literal last line and preserves the
original fail-closed bug (trailing output after the compiled: line -> false reject).
This keeps the rev-scan that actually fixes it, guarded by the discriminating test
parse_compiled_receipt_skips_non_matching_trailing_lines.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 17, 2026
…s (deletes tools/) (#5048)

* WIP: v1 -> v2 bootstrap/compile

* fix(bootstrap): restore v1 self-host fixed point (register method_template_projection_source)

`regen_stage0 --verify` was stale at HEAD: a fresh self-compile dropped
`pub mod method_template_projection_source;` from the generated lib.rs, so the
committed stage0 seed could no longer reproduce itself (and a real regen would
orphan the module + break the build, since regen_stage0.rs and tests/bootstrap.rs
reference it).

Root cause: #5025 added the hand-maintained method_template_projection_source.rs;
#5028 hand-added its `pub mod` to the generated lib.rs but never registered the
module in regen's authority, so fresh regen omitted it (a 7th hand-maintained
stage0 file outside both registries).

Fix (mirrors v1_compiler_dag_collect handling):
- register method_template_projection_source.rs in HAND_MAINTAINED_STAGE0_FILES
  so regen copies it and the output-set assertion accepts it
- ensure_method_template_projection_module() injects its `pub mod` into the
  generated lib.rs (the .dag has no source for this module — it holds
  GENERATED_METHOD_TEMPLATE_PROJECTION_DAG as a Rust const)
- sync tests/bootstrap.rs copy_stage0_support_modules to the full hand-maintained
  set (it was missing resolved_graph_cache + v1_compiler_dag_collect)

regen-safe: no .dag change, no generated stage0 file changes (committed lib.rs
already declared the module; this makes regen reproduce it). Validated:
`regen_stage0 --verify` green, regen write produces zero drift, v1 claim gate
still green (158 witnesses).

Gating of this fixed point is provided by PR #5026 (executing .dag bootstrap
claim); this PR is its prerequisite post-rename.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: v1 -> v2 bootstrap/compile

* Clear two clippy lints masked behind the never_loop error

- src/v1/tests/src/lib.rs: remove duplicated #[cfg(test)] on mod pd3_adversarial (clippy::duplicated_attributes)
- tools/ci_claim_gate/src/main.rs: fix doc-comment list markdown (clippy::doc_lazy_continuation); wording unchanged

clippy --all-targets -- -D warnings now clean workspace-wide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Resolve merge with main #5038: keep the fail-closed rev-scan fix

main's #5038 silenced clippy::never_loop by reducing parse_compiled_receipt to
lines().next_back(), which only inspects the literal last line and preserves the
original fail-closed bug (trailing output after the compiled: line -> false reject).
This keeps the rev-scan that actually fixes it, guarded by the discriminating test
parse_compiled_receipt_skips_non_matching_trailing_lines.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: v1 -> v2 bootstrap/compile

* Park axiom slice: remove broken prose axiom model (idea deferred)

The prose statement: String axiom model was inert (a human restating
DESIGN.md, not mechanically checked) and had unresolved v2 type errors
(List not matchable with Empty/Cons; generic-lambda params not inferring
field access). Operator parked the axiom-modeling idea; removing the
slice rather than shipping cringey/broken code into std/. The mechanical
reframe (time->cost.dag, safety->Risk dim with Diagnostic as values) is
saved for a future clean take.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* Slice 2: wire clippy/fmt CI gates (rust_gate_runner) + fix the latent stage0_core breakage they caught

What ships:
- rust_gate_runner (tools/): realizes the v2.workflow.rust_stage0_gates .dag
  selector. Per changed path it calls path_is_rust_monolith (String->Bool, in
  the v1 interpreter) — the .dag is the authority for WHICH gates run, the binary
  is the realizer. On a Rust-touching diff it runs cargo fmt --all --check and
  cargo clippy --all-targets -- -D warnings, fail-closed (undeterminable diff =>
  run the gates). The in-process witness gate stays the always-on floor; this adds
  the two Rust-only dependents. A .dag-only diff selects neither.
- ci.yml: adds the runner step (affected-set via origin/main...HEAD); fetch-depth
  1->0 so the merge-base resolves (runner fail-closes if absent). SCAFFOLD,
  dissolves when the Rust seed reaches zero (DESIGN §7).

Latent breakages the clippy gate caught on first run (both pre-existing on main,
uncaught because CI only ran the witness gate):
- v1-stage0-core did not compile (E0432): the generated CoreCrate module list
  omitted std_emit_model, though the shared emit files import it. Fixed at the
  authority (stage0_crates.dag) + regen_stage0; 'regen --verify' confirms the seed
  is at a fixpoint. This makes 'cargo check --workspace' green again.
- doc_lazy_continuation lint in src/v1/tests/src/pipeline.rs (same class as #5045).

Proven by execution: witness gate 176 green; rust_gate_runner exit 0 (fmt+clippy
both pass) on a .rs path; exit 1 on a planted fmt violation; skips on .dag-only;
git-mode plan resolves the diff vs origin/main.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* Merge origin/main into session/jolly-bear-882

Integrate main's v2 self-host (#5052), folder-based .dag naming (#5051), and
cruft sweep (#5053). Conflict resolutions:
- ci_claim_gate (modify/delete): keep the deletion; #5051's filename-hygiene
  check (no __ in .dag basenames) is ported into claim_batch's discovery path,
  so the witness floor still enforces it.
- DESIGN.md: CI floor line points at claim_batch + the gunbc rust gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fmt: reflow claim_batch import block after merge

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Replace emit_host_runner with gunbc-run emit_host_gate.dag (#5058)

* WIP: Replace emit_host_runner (bespoke tools/ Rust) with a gunbc-run .dag gat

* Replace emit_host_runner with gunbc-run emit_host_gate and delete the crate.

Host MVP smoke rows (rust/python/go/typescript) now run via dsl/tools/emit_host_gate.dag
with POSIX shell transports; CI witnesses the gate by execution. emit_host.dag transport
rows stay fail-closed in src/v2 (no host effects there) until T-22 Realization lands.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(emit-host-gate): bootstrap portable Go when absent from CI PATH.

Self-hosted runners have cargo/rust but not always `go`; download the
arch-matched toolchain tarball before the MVP smoke row runs.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansrls@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* WIP: v1 -> v2 bootstrap/compile

* fmt: reformat interp_dry_run_test.rs (pre-existing violation caught by the new rust gate)

The #5048 rust gate (cargo fmt --all --check) is the first CI fmt enforcement;
this test file accumulated a violation on main before any gate existed. Reformat
so the gate lands green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: v1 -> v2 bootstrap/compile

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: gunbai-bot[bot] <289086189+gunbai-bot[bot]@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants