Skip to content

Migrate v2 .dag tree to folder-based (Google C++) naming + enforce in CI: replace the __ flat-dir dimension with real subdirectories, add ci_claim_gate filename-hygiene check, document the standard - #5051

Merged
briansrls merged 4 commits into
mainfrom
session/silent-cat-907
Jun 17, 2026

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the legacy __ flat-directory encoding in 373 src/v2/**/*.dag files with real subdirectories (Google C++ style), following the mapping rules from PR-1: single-authority self-host + live-executed fixed-point claim #5050 worked examples: split on __, drop redundant layer prefix when the first segment equals the parent dir, strip {layer}_ when the first segment is {layer}_{rest}.
  • Updates path-string references that pointed at aspirational src/v2/test/claim/... paths to the actual post-migration locations (module resolution is path-independent; module decls and imports unchanged).
  • Extends ci_claim_gate with a fail-closed filename-hygiene pass: any .dag basename under --source-root containing __ is a hard error before the witness green pass.
  • Documents the enforcement in DESIGN.md Building & checks.

Test plan

  • cargo run -p ci_claim_gate --release -- --source-root src/v2 --roster-from-discovery --scan-dir src/v2/test --notice-title "v2 claim corpus" — 170 witnesses green
  • Probe: created src/v2/test/fixture/probe__bad_name.dag → gate exits 2 with hygiene error; removed probe
  • find src/v2 -name '*__*.dag' → 0 remaining

@briansrls
briansrls force-pushed the session/silent-cat-907 branch from 6be828d to cd231c3 Compare June 17, 2026 02:25
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 17, 2026 02:26
No code change — prior HEAD had a superseded cancelled ci run alongside
success; dashboard treated checks_state as failing.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls merged commit 8423d67 into main Jun 17, 2026
1 check passed
@briansrls
briansrls deleted the session/silent-cat-907 branch June 17, 2026 02:53
briansrls added a commit that referenced this pull request Jun 17, 2026
…platform island

Operator-authorized removal of the genuinely-unused release/install machinery
(never triggered: no v* tags, zero releases, no run history):
- .github/workflows/release.yml, install.sh, install/release-target-triples.sh
- src/v2/workflow/release.dag, src/v2/install/install.dag (unimported leaves)

Deleting install.dag orphaned a self-contained island whose only external entry
point it was — provably zero importers after removal, and self-described as
'Release Jun1 §5 Phase 1b prerequisite':
- src/v2/extdeps/platform_detection.dag (install.sh sed/uname projection support)
- src/v2/std/target_triple.dag, src/v2/std/platform.dag
Reconstructable from git + the-gunbai upstream (crates/gunbai-types/src/platform.rs)
if cross-compilation codegen later needs target-triple modeling.

Kept: shared infra was verified to be comment-mentions only, not real imports
(llvm_ir/dsl-v1-types carry their own TargetTriple concept). No stale comment
refs to the deleted modules remain. CI floor gate green (170 witnesses) incl.
#5051 filename-hygiene.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 17, 2026
* WIP: cruft pt 2

* cruft pt 2: drop dead scripts/v2-leaf-model-*.sh runner citations; rename v4->v2 perturb fixture dir

The scripts/v2-leaf-model-*.sh leaf-model host runners were retired repo-wide
per operator directive #4252 (the modeled .dag TestClaim is the receipt authority,
as std/leaf_model_verification.dag already documents). 14 extdeps Status:/Host
runner comments still cited them present-tense as live infrastructure — a §5
false-consumer claim. Drop the dead-script clause, keep the tool verb.

Also fixes a #5028 (v4->v2) rename skew: workflow__glob_discovery.dag:52 was
repointed to scripts/fixtures/v2_discovery_completeness_slice but the directory
itself was left as v4_discovery_completeness_slice. git mv to match.

Left intentionally: std/leaf_model_verification.dag's #4252-retirement note and
its named dissolution trigger (load-bearing design intent, per §6).

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

* WIP: cruft pt 2

* WIP: cruft pt 2

* cruft pt 2 (batch 3): delete release/install pipeline + its orphaned platform island

Operator-authorized removal of the genuinely-unused release/install machinery
(never triggered: no v* tags, zero releases, no run history):
- .github/workflows/release.yml, install.sh, install/release-target-triples.sh
- src/v2/workflow/release.dag, src/v2/install/install.dag (unimported leaves)

Deleting install.dag orphaned a self-contained island whose only external entry
point it was — provably zero importers after removal, and self-described as
'Release Jun1 §5 Phase 1b prerequisite':
- src/v2/extdeps/platform_detection.dag (install.sh sed/uname projection support)
- src/v2/std/target_triple.dag, src/v2/std/platform.dag
Reconstructable from git + the-gunbai upstream (crates/gunbai-types/src/platform.rs)
if cross-compilation codegen later needs target-triple modeling.

Kept: shared infra was verified to be comment-mentions only, not real imports
(llvm_ir/dsl-v1-types carry their own TargetTriple concept). No stale comment
refs to the deleted modules remain. CI floor gate green (170 witnesses) incl.
#5051 filename-hygiene.

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

---------

Co-authored-by: Brian Searls <briansrls@gmail.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
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>
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.

1 participant