Repository navigation
Restore src/v2 — comparison artifact + frozen-buildable - #3148
Merged
Merged
Conversation
v2 was deleted in commit 39ba757 (R3 gate #42, PR #2693). Restoring the full src/v2 tree from the parent of that commit so the v3 retirement trajectory can be honestly evaluated against v2's proven 1-residual self-hosted shape. Restored src/v2/ contains the complete .dag pipeline (00_core through 05_emit*) plus stage0 and tests. Root Cargo.toml workspace entries are NOT re-added — restoration is for source-comparison purposes; v2 is not re-included in the build until/unless explicitly decided. Per docs/design-pure-bootstrap-zero.md framing: v2 retired with 1 hand-Rust residual. v3 currently sits at 56 NON_TEST + 134 TEST + 2 FRAGMENTS = 192 hand-authored files. The comparison surface this enables is load-bearing for the v4 program decision. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Coordinated CI policy change to support the v4 program (PR #3147): both v2 and v3 are now frozen-buildable — workspace members that build on demand but only run their heavy CI when their source is touched (or on push-to-main for trunk verification). ## Changes **Cargo.toml**: re-add `src/v2/stage0` + `src/v2/tests` to workspace members, plus the `[profile.dev.package.v2-compiler]` block that v2's Rc-aware stage0 needs (debug-assertions = false, opt-level = 2). Verified locally: `cargo build -p v2-compiler --release` builds clean in ~1m, no bitrot. **.github/workflows/ci.yml**: - New `affected` job: runs first (~30s), computes `v2`/`v3` outputs by diffing against origin/main (or HEAD~1 on push). Other jobs depend on its outputs. - New `v2` job: runs `bootstrap_fixed_point --ignored` test only when src/v2/ or workspace deps are affected. Verifies v2's self-host property is preserved across any v2 modification. - `v3` job: gated at top level — runs only when src/v3/, dsl/, or workspace deps affected, OR push-to-main. Effectively freezes v3 on PRs that don't touch it (the typical case during v4 development). - v3-specific steps inside the shared `ci` job (bootstrap snapshot freshness gate, gate #103 path-regex inventory + integration tests) are gated on the same condition. - `self_host_ratchet` job: now tolerates v3 being skipped (treats result=skipped as a valid no-op rather than a failure). **scripts/detect-affected-components.sh**: new script that does the git-diff-based detection. Lives outside ci.yml so it doesn't trip gate #103's `workflow_no_path_regex_policy_ci_yml` policy (which forbids path-selection substrings inside .github/workflows/*.yml). Single authority: when v3 is unfrozen and the v3 affected-set lens becomes canonical again, this script can be replaced by an invocation of that lens — workflow integration point stays the same. ## Why this shape - v2 is restored as comparison artifact + v4 bootstrap source. Editing v2 is rare but allowed; when it happens, fixed-point must hold. - v3 is frozen pending the v4 program. Most PRs (v4 work, docs, process changes) don't touch v3 — gating skips the heavy v3 build/ test (saves ~10-15min per PR). - Both v2 and v3 are still in workspace so `cargo build --workspace` works for development; CI only invokes them via `-p` when affected. - push-to-main always runs both v2 and v3 CI as trunk safety net, even when nothing in v2/v3 changed (catches dep-bump regressions). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per operator review: under v3 freeze, workspace dep changes should NOT
trigger v3 CI. v3 is abandoned; we don't care if it incidentally breaks
because of a dep bump. If v3 is ever revived, the first src/v3/ PR
catches any latent breakage at that point — costs nothing now.
Net rule (now enforced):
v2 affected: src/v2/ OR Cargo.{toml,lock} (v4 depends on v2 binary)
v3 affected: src/v3/ OR dsl/ ONLY (frozen — only explicit work)
v4 affected: src/v4/ OR Cargo.{toml,lock} (v4 builds via v2)
Effect on this PR: next CI run cancels the in-flight v3 job (via
cancel-in-progress concurrency policy) and skips v3 entirely. Future
v4 PRs that touch Cargo.toml will not drag the ~30min v3 build.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Restores
src/v2/to the repository for honest v2-vs-v3 comparison + as the bootstrap source for ongoing v4 work (see PR #3147 for v4 context). v2 retired with ~1 hand-Rust residual; v3 sits at ~192 hand-authored files. Restoring v2 enables side-by-side review.Three commits:
Restore src/v2 for honest v2-vs-v3 comparison— restores the full v2 tree (126 files:.dagpipeline + stage0 + tests + docs) from the parent of the deletion commit39ba75728(R3 gate Daglang compiler scaffolding #42, PR R3 gate #42: delete src/v2/ directory (T-V2-Retirement G-2) #2693). No Cargo workspace changes in this commit.ci: re-enable v2 (frozen-buildable), freeze v3 via affected-set gating— re-addssrc/v2/stage0+src/v2/teststo Cargo workspace + restores the[profile.dev.package.v2-compiler]block. New CI structure:affectedjob: detects v2/v3 affected from PR diff, emits outputsv2job: runsbootstrap_fixed_pointtest only when src/v2/ or workspace deps affected (~2-3 min build + test)v3job: gated to run only when src/v3/ or dsl/ affected, OR push-to-main (was always-on; now frozen-on-PR per v3 abandonment)self_host_ratchet: tolerates v3 being skipped (skipped-result is acceptable no-op)scripts/detect-affected-components.sh: keeps detection logic out of YAML to satisfy gate Add external dependency type definitions for cloud, git, GitHub, LLM, and Rust #103's path-regex policyci: tighten v3 affected-set — drop Cargo.toml/lock trigger— refinement: workspace dep changes do NOT trigger v3 CI under freeze. Saves CI minutes on every Cargo.toml-touching PR. If v3 is ever revived, the first src/v3/ PR catches latent dep-bump breakage at that point.Net CI policy after merge
src/v2/ORCargo.{toml,lock}(v2 binary is frozen-buildable; deps changes can break the build)src/v3/ORdsl/ONLY (FROZEN — workspace dep changes do NOT trigger v3 CI; v3 is abandoned)Verified locally
cargo build -p v2-compiler --release→ builds clean (~1m, no bitrot)cargo fmt --all --check→ cleancargo test -p v2-compiler-tests --release bootstrap_fixed_point -- --ignored --exact→ passes (v2 still self-hosts at fixed point)bash scripts/check-workflow-path-regex-inventory.sh→ clean (path-regex policy passes)Test plan
affectedCI job emits correct outputs (v2=true since src/v2/ changed)v2CI job runs and passes (bootstrap_fixed_point test green)v3CI job does NOT run (this PR touches Cargo.toml but per new policy that does not trigger v3 — only src/v3/ or dsl/ do)fmt,cijobs passContext
Per operator request 2026-05-15: split out from PR #3147 (v4 program) so v2-restoration can be reviewed independently. PR #3147 continues with v4 scaffold + audit doc; this PR is the v2-only piece.
🤖 Generated with Claude Code