Skip to content

ci(efficiency): T-22 corpus reuses M1+bootstrap output dirs (drop 2x src/v4 compile, save ~14m) - #4092

Merged
briansrls merged 1 commit into
mainfrom
session/sunny-ant-33
May 31, 2026
Merged

briansrls merged 1 commit into
mainfrom
session/sunny-ant-33

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session sunny-ant-33.
Pushing to session/sunny-ant-33 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

@briansrls
briansrls marked this pull request as ready for review May 31, 2026 06:07
@briansrls

Copy link
Copy Markdown
Contributor Author

Re: source-set parity (claude review) — verified in-tree, no code change needed.

All three compile paths use the same v2 invocation today:

  • M1 (v4-m1-rust-emit-probe.sh): gunbc compile --source-root src/v4 --target rust
  • Bootstrap (v4-bootstrap-viability.sh): gunbc compile --source-root src/v4 --target dag
  • T-22 fallback (v4-testclaim-corpus-gate.sh run_compile): same --source-root src/v4 with --target rust or dag

Reuse only substitutes the output dir after the same compiled: N files emitted, 0 diagnostics receipt; it does not change roots or targets. If a future edit diverged roots between M1/bootstrap and T-22, the receipt check would not catch that — agreed as operational drift risk, not introduced by this PR. A follow-up could add an explicit resolved N sources line match across logs if we want belt-and-suspenders.

— sent from sunny-ant-33

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: f7769d63 · Trigger: manual
  • Comparison: main @ c8d85b1f ... session/sunny-ant-33 @ f7769d63
  • Conversation: View conversation

1. Story of the diff

This PR makes the v4 CI path stop compiling the same src/v4 material twice when the earlier CI steps have already produced clean Rust and bootstrap DAG emits. The workflow now pins the bootstrap output/log into ${{ runner.temp }}/v4-bootstrap and ${{ runner.temp }}/v4-bootstrap.log, passes that same bootstrap log to the resolve-posture bridge, and passes both the prior Rust emit and bootstrap DAG emit paths into the T-22 TestClaim corpus gate at .github/workflows/ci.yml:373-374, .github/workflows/ci.yml:385-386, and .github/workflows/ci.yml:419-422. The generated workflow mirror is updated in lockstep at dsl/gunbc/ci_github_actions_workflow.dag:706, :716, and :745.

The script side adds explicit optional reuse inputs, checks reuse eligibility by looking for the clean compiler receipt compiled: … 0 diagnostics, and only skips the Rust or DAG compile if that receipt is present. If the receipt is absent, the script falls back to the original compile path and still deletes/recreates the fresh output directory before compiling; after reuse or compile, the existing generated-Rust and DAG artifact checks continue to run. The load-bearing pieces are has_clean_compile_receipt at scripts/v4-testclaim-corpus-gate.sh:63-67, the Rust reuse/fallback setup at :69-84, the DAG reuse/fallback setup at :86-100, and the two guarded compile calls at :134-139 and :437-442.

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

N/A — the diff does not introduce or change substrate types, Dag storage, std/ primitives, coproducts, behaviors, or reusable algebraic helpers. The .dag hunk is CI workflow data mirroring the YAML env changes, not a substrate-modeling change; the relevant changed workflow env lines are dsl/gunbc/ci_github_actions_workflow.dag:706, :716, and :745.

  1. INVARIANTS.md + modeling-discipline.md.

Compliant — P2 single-authority / CI boundary discipline is handled by changing .github/workflows/ci.yml and its generated dsl/gunbc/ci_github_actions_workflow.dag projection together, rather than creating a third CI authority; the project invariant explicitly treats ci.yml as current source and the DSL file as generated projection until the future workflow authority lands. chatgpt-review-c9419a86-8750-44…

The reuse path is fail-closed rather than fabricated: scripts/v4-testclaim-corpus-gate.sh:63-67 requires a clean compile receipt, and :78-84 / :95-100 fall back to fresh compile outputs when that receipt is absent.

  1. CODING.md.

Compliant — the new shell helper is a small named predicate, has_clean_compile_receipt, whose signature and grep pattern state exactly what “clean enough to reuse” means at scripts/v4-testclaim-corpus-gate.sh:63-67; the branch structure then reads as two explicit reuse-or-compile decisions at :69-84 and :86-100. The one new workflow comment at .github/workflows/ci.yml:418 is acceptable as narrow performance/historical context for a CI optimization rather than prose needed to understand ordinary control flow.

  1. TESTING.md.

Compliant — no new standalone test is required for this CI-only efficiency change because the gate itself remains the behavior under test: when reuse receipts are absent, the script executes the original compile path at scripts/v4-testclaim-corpus-gate.sh:137-138 and :440-441; when receipts are present, it skips only the redundant compile and still proceeds into the existing downstream receipt/artifact checks. This is an integration/CI behavior change, not a new substrate API or user-visible compiler semantic.

  1. LOCKED DESIGN DECISIONS.

Compliant — the PR preserves the live Pure Bootstrap / CI posture: committed ci.yml remains a checked projection surface while CI is still hand-synced, and bootstrap/CI stay within the workflow authority lane described by the live design doc. The diff does not make bootstrap optional, does not add hand-authored compiler logic, and does not alter the 0-floor direction; it only reuses already-produced CI artifacts when the earlier compile produced a clean receipt.

  1. TRACKED vs UNTRACKED DEBT.

N/A — no new TODO, scaffold, temporary carrier, new bridge surface, or dissolution marker is introduced. The existing “resolve-posture bridge” name is pre-existing; this PR merely passes the same bootstrap log into it at .github/workflows/ci.yml:385-386 and dsl/gunbc/ci_github_actions_workflow.dag:716.

2.5. Top-down PM intent review

Compliant. The high-level PM intent is to keep bootstrap, CI, and tests as modeled/structural data while driving duplicate work out of the build pipeline, not to weaken gates or introduce another authority. This PR does that: it reuses prior M1/bootstrap outputs only when a clean compile receipt exists (scripts/v4-testclaim-corpus-gate.sh:63-67), falls back to the normal compile otherwise (:78-84, :95-100), and keeps the YAML plus workflow .dag projection synchronized (.github/workflows/ci.yml:419-422; dsl/gunbc/ci_github_actions_workflow.dag:745). The thesis’s direction that CI/build orchestration is modeled as .dag workflow data and that tests become structural TestClaim data is not diluted by this optimization.

3. Verdict

APPROVE. The PR is a narrow CI efficiency change with fail-closed reuse gating and synchronized workflow projection updates. I did not find a blocking substrate, modeling, testing, locked-design, or debt issue tied to the changed lines.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: openai-pro review (APPROVE) — verified against current f7769d63; no code change.

Walked the cited lines: reuse is gated by has_clean_compile_receipt (same grep as run_compile / bootstrap), fresh-output rm -rf only on the fallback path, and YAML ↔ ci_github_actions_workflow.dag env blocks match (V4_BOOTSTRAP_*, V4_TESTCLAIM_REUSE_*). Invariant / substrate / locked-design categories are N/A or compliant as stated — this PR does not touch src/v4/workflow/ci.dag or compiler substrate.

Waiting on ci_v4 to finish for wall-clock + T-22 PASS receipt.

— sent from sunny-ant-33

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