Skip to content

R3 gate #42: delete src/v2/ directory (T-V2-Retirement G-2) - #2693

Merged
briansrls merged 11 commits into
mainfrom
session/calm-seal-831
May 11, 2026
Merged

briansrls merged 11 commits into
mainfrom
session/calm-seal-831

Conversation

@briansrls

@briansrls briansrls commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

SG-0 hand-path delta: -3

Summary

Implements G-2 from the T-V2-Retirement S-1 worker dispatch: remove the legacy compiler tree (src/v2/), retire related workspace members and Gap-4 emit shim surfaces, and align tooling/docs/ratchets to a v3-only workspace per docs/briefs/r3-tv2-retirement-s1-worker-brief.md and docs/audit/t-v2-g2-deletion-plan-and-guardrails.md.

G-2 guardrails (audit doc)

Confirming guardrails from docs/audit/t-v2-g2-deletion-plan-and-guardrails.md were satisfied for this PR:

  • Gd-1 (mechanical grep) — Forbidden v2-compiler / v2-compiler-tests / src/v2/… literals in policy paths (src/, dsl/, .github/) are cleared so the retirement boundary stays grep-auditable.
  • Q-V2-Retirement-Boundary-Matrix §1.8 — row Workflow catalog DSL extraction #97 method_template_projection_emit_shim_retirement_coherence — The integration gate method_template_projection_emit_shim_retirement_coherence is structured fail-closed when src/v2/ is absent: the Gap-4 triplet (emit_method_template_projection [[bin]], lib.rs export, shim sources + census entries) must not remain. Receipt: With v2/ deleted, that coherence test passes, which is the intentional positive signal that the shim retired in lockstep with the directory (no orphan [[bin]] / manifest wiring left behind).

Workspace Cargo.lock no longer resolves v2-compiler / v2-compiler-tests.

Test plan

  • cargo fmt --all --check
  • cargo clippy --all-targets -- -D warnings
  • cargo build --workspace --locked
  • cargo test --workspace

Worker attestation

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why.
  • Tests run: cargo test --workspace (plus fmt/clippy/build above); green locally before ready flip.
  • If this closes a work item, add Closes #N when tracker/issue linkage is finalized.
  • No commits on this branch are surprises.
  • No secrets / credentials / large binaries staged.

Auto-opened by session-dashboard for session calm-seal-831; branch session/calm-seal-831.

@briansrls
briansrls marked this pull request as ready for review May 11, 2026 06:55
@briansrls briansrls changed the title v2_directory_deleted R3 gate #42: delete src/v2/ directory (T-V2-Retirement G-2) May 11, 2026
@briansrls
briansrls force-pushed the session/calm-seal-831 branch 2 times, most recently from fd3d347 to ff1a5f1 Compare May 11, 2026 11:12
briansrls and others added 11 commits May 11, 2026 13:38
Concurrency cancel-in-progress supersedes the old run;
on that run duplicated v3 work and could leave spurious red checks. Retry only
on true failure conclusions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Self-hosted Spot runners hit 'lost communication' mid-suite under default
parallelism (heavy integration tests). Limit CARGO_BUILD_JOBS and
RUST_TEST_THREADS to reduce peak RSS while staying inside the 3300s budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
Capping RUST_TEST_THREADS/CARGO_BUILD_JOBS pushed many tests over the Phase-0
2s wall ratchet (libtest --report-time). Restore default parallelism.

Co-authored-by: Cursor <cursoragent@cursor.com>
After rebasing on main, this branch drops one exemption row (retired
projection-dag tests); keep the default max in sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/calm-seal-831 branch from d3943b9 to b657e21 Compare May 11, 2026 13:40
@briansrls
briansrls merged commit 39ba757 into main May 11, 2026
4 checks passed
@briansrls
briansrls deleted the session/calm-seal-831 branch May 11, 2026 14:51
briansrls added a commit that referenced this pull request May 12, 2026
…ddendum (#2729)

* docs(r3): §1.8 drift sweep — post T-Tier3/T-V2 wave + #2723 row #92 addendum

Promotions per Director greenlight at gunbc#828 c#4426061314 + delta
at gunbc#1942 c#4426061314. Sequencing per Mgr-cadence calibration
(serial-after-#2702-merge).

| Row | From | To | Evidence |
|---|---|---|---|
| #3 tier3_induction_mirror_dissolved | DECLARED | CONSUMER_LANDED | PR #2678 (merry-wolf-735, scope-verified per R-7 vs C1 Phase-1 baseline) |
| #4 tier3_effect_carrier_mirror_dissolved | DECLARED | CONSUMER_LANDED + PASSING | PR #2679 (warm-ibex-579, workflow_idempotency.rs retired) |
| #41 v2_oracle_no_remaining_test_consumers | DECLARED | CONSUMER_LANDED + PASSING | PR #2695 (witty-crab-518, T-V2 G-1 ratchet) |
| #42 v2_directory_deleted | DECLARED | CONSUMER_LANDED + PASSING | PR #2693 (calm-seal-831, -158,670 lines; row #97 coherence test) |
| #71 v3_self_host_demonstration | DECLARED | CONSUMER_LANDED + PASSING | PR #2696 (still-crab-219, demonstration harness) |

Row #92 addendum: PR #2723 hot-fix-2026-05-12 #[ignore]-tagged the
consumer t_las_complexity_contract_compile_error_test.rs (cold-CI
wall-time reduction; 14s wall). Status preserved CONSUMER_LANDED +
PASSING with explicit consumer-disabled note + rebuild-routing
context (no standing T-LAS Mgr seat per gunbc#828 c#4426497).

NOT promoted: row #1 / #2 / #65 / #64 / #6 already at correct state
or substrate-blocked (row #1 awaits actual mirror retirement now
that C1 baseline #2702 landed; row #6 was promoted in earlier
PR #2631; row #64 substrate-plumbing receipt landed via PR #2694
remains DECLARED with canonical PB-Runtime witness deferral; row #65
already PASSING; row #2 already CONSUMER_LANDED via PR #2681).

Pure documentation; no code touched.

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

* docs(r3): row #92 — replace placeholder comment-id with accurate citation

cursor/composer-2 review (9890) on PR #2729 caught the `c#4426497xxx`
stub on row #92 addendum: unfollowable placeholder weakens INVARIANTS
P1 (Modeling Faithfulness). The actual Director greenlight came via
internal dashboard messaging (warm-dove-618 → zesty-bear-812), not a
GitHub comment thread, so a `#issuecomment-` id wouldn't exist
anyway. Replace with accurate "internal-message dispatch" phrasing.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 15, 2026
* Restore src/v2 for honest v2-vs-v3 comparison

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>

* ci: re-enable v2 (frozen-buildable), freeze v3 via affected-set gating

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>

* ci: tighten v3 affected-set — drop Cargo.toml/lock trigger

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>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.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.

1 participant