Skip to content

Wire dsl whole-tree compile-clean CI gate + fix Option surface backlog - #5089

Merged
briansrls merged 15 commits into
mainfrom
session/tidy-ferret-144
Jun 17, 2026
Merged

briansrls merged 15 commits into
mainfrom
session/tidy-ferret-144

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

Summary

  • Part 1 (backlog): Fix whole-tree dsl/ compile failures surfaced by gunbc compile --source-root dsl:
    • Root cause A: delete invalid import std.primitives { concat } from std.os (concat is a bare builtin).
    • Root cause B: migrate compiler-flagged Some/None/none optional skew to Present/Absent/none in ~11 modules (behavior-preserving spelling fix only).
    • Extra: Url→String cast in digest_render kv_pair.
  • Part 2 (gate): Enroll gunbc compile --source-root dsl --target rust in CI floor (fail-closed, 245 modules, 0 hard diagnostics). Replaces the prior ci_full_dsl cargo test.
  • Witness: dsl/test/claim/dsl_compile_clean_witness.dag (claim-run in CI).

Note on --target dag: Brief requested --target dag; clean tree passes index+resolve+typecheck but dag artifact emit fails with 180 identity-key :0..0 collisions in v1.compiler.dag_collect (load-bearing substrate). Gate uses --target rust which proves whole-tree compile-clean through emit; dag-target debt escalated to parent.

+/- witness

GREEN (clean tree):

cargo build -p v1-compiler --release --bin gunbc
gunbc compile --source-root dsl --output-dir /tmp/pc --target rust
# → compiled: 267 files emitted, 0 diagnostics; exit 0

RED (perturb — do not commit):

cp -r dsl /tmp/dsl-red && cat > /tmp/dsl-red/test/red_probe.dag <<'DAG'
module test.red_probe
fn probe() -> String? {
  match Present { value: "x" } {
    Some { value: s } => Some { value: s }
    None => none
  }
}
DAG
gunbc compile --source-root /tmp/dsl-red --output-dir /tmp/pc-red --target rust
# → 4 diagnostics (Some/None skew); exit 1

Test plan

  • gunbc compile --source-root dsl --target rust — 0 hard diagnostics
  • gunbc run ... dsl_compile_clean_witness.dag --claim-run — true
  • RED perturb repro above — exit 1 with expected diagnostics
  • CI floor on merge

briansrls and others added 3 commits June 17, 2026 07:57
…log.

Enroll `ci_full_dsl` in the CI floor so every dsl/**/*.dag file must compile;
migrate lingering Some/None spellings to Present/Absent/none and fix the Url→String kv_pair mismatch that blocked a clean tree.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot gunbai-bot Bot changed the title dsl whole-tree compile-clean CI gate + fix the backlog it surfaces Wire dsl whole-tree compile-clean CI gate + fix Option surface backlog Jun 17, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 17, 2026 08:16
briansrls and others added 7 commits June 17, 2026 08:22
Replace ci_full_dsl cargo test with `gunbc compile --source-root dsl --target rust` in CI (whole-tree index+resolve+typecheck+emit, 0 hard diagnostics). Add dsl_compile_clean_witness claim-run pin; document RED perturb in witness comments. Note: --target dag blocked on dag_collect identity-key debt (180 emit errors) — escalated to parent.

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

#5082 follow-up: the symbol lives in v2.std.grammar (caret binding), not target_model export — unblocks claim_batch resolve in CI.
Wire CI through dsl_compile_clean_gate (SCAFFOLD: --target rust pending dag_collect fix) and make the witness run live compile +/- receipts instead of returning true.

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

#5059 owns the #5077 x #5082 skew fix; keep the DSL gate PR scoped to dsl/.
@gunbai-bot

gunbai-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Verified both dashboard reviews on e372dbdc against current code — no fix commits needed.

cursor/composer-2.5 (29813) — APPROVE: Confirmed gate matches sibling patterns (func main -> ProcessExit like emit_host_gate / layering_imports_gate), SCAFFOLD dissolution trigger is present in dsl_compile_clean_gate.dag, witness runs live GREEN/RED via transport (not return true), Option backlog uses Present/Absent/none, and emit_ingest_type_decl_round_trip_test.dag uses ^grammar_relation_field_tokens like every sibling round-trip test.

claude/opus (29814) — APPROVE: Confirmed RED receipt deliberately plants illegal Some/None arms against a Present scrutinee (dsl_compile_clean_transport.dag:19). Advisory on stringly shell transport is noted for a future handler refactor; not in scope for this PR (parent already flagged same).

Merge readiness: 2 distinct approvals (claude + cursor), 0 REQUEST_CHANGES, mergeable=MERGEABLE, CI green on e372dbdc. Ready for operator merge.

— sent from tidy-ferret-144

@gunbai-bot

gunbai-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

claude/opus review 29814 (e372dbdc) — verified, no commit.

  1. Option rename consistency: Spot-checked touched modules; Present/Absent/none migration is uniform. RED receipt at dsl_compile_clean_transport.dag:19 deliberately plants Some {…} / None => arms against a Present-constructed scrutinee on String? — compile fails as required. Already exercised by gate main and witness --claim-run in CI.

  2. Stringly shell transport (advisory): Confirmed dsl_compile_clean_transport.dag:11,19 embed bash as \n-escaped literals. Reviewer marked this non-blocking ("not actionable for this PR"); parent session flagged the same as future handler refactor when a second consumer arrives. No change in this PR.

Verdict APPROVE stands — no blocking findings to fix.

— sent from tidy-ferret-144

@gunbai-bot

gunbai-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Took over #5089 — tidy-ferret-144 was archived after its closeout, so PR ownership moved to zesty-lark-54 (parent). Verified both dashboard reviews against e372dbdcc3; no fix commits needed.

  • cursor/composer-2.5 (29813) — APPROVE, no blocking findings.
  • claude/opus (29814) — APPROVE. Its one advisory is valid and accurate: dsl/tools/dsl_compile_clean_transport.dag:11,19 embeds the whole shell program as a \n-escaped string literal — the §3 stringly-transport smell. It is non-blocking for this PR (the gate executes green-by-execution with a planted RED control, meeting §5), and the reviewer agrees it's "not actionable for this PR." Tracked as a follow-up: fold into the extdeps §3 transport-handler work — model the compile as a shape with shell as one of N handlers (shell.Exec argv from Node-tree parts) when a second consumer arrives.

The gate also ships with a documented dissolution trigger to flip --target rust → --target dag once the v1.compiler.dag_collect identity-key collision is fixed (root-caused: span-based key collides on span-less scaffold nodes; fix = key synthetics by their structural fingerprint, §4 content-addressing).

Merge readiness: 2 distinct approvals (claude + cursor), 0 REQUEST_CHANGES, mergeable=CLEAN, CI green on e372dbdcc3. Ready for operator merge.

— sent from zesty-lark-54

@gunbai-bot

gunbai-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main and resolved the #5101 floor-consolidation conflict (ci.yml + DESIGN.md).

#5101 collapsed the floor into two composed passes, so rather than re-adding a separate
gunbc run line for the compile-clean gate (which would re-introduce the redundant resolve
#5101 just removed — DESIGN §2), I integrated this PR's gate into the new structure:

  • the witness (dsl_compile_clean_witnesses) is now a claim_batch --entry, alongside the
    other hand-enrolled Bool witnesses;
  • the effectful gate (dsl_compile_clean_gate.run_gate) is composed into
    tools/ci_floor_gates.dag as the 4th ProcessExit gate (one resolve, one process).

Full two-pass floor verified green by execution: claim_batch 208 discriminating witnesses
(incl. dsl_compile_clean_witnesses, with its planted Present/Some-mismatch RED receipt)

  • ci_floor_gates ExitSuccess (all four gates). mergeable=CLEAN against current main.

— sent from zesty-lark-54

@briansrls
briansrls merged commit 33ed128 into main Jun 17, 2026
1 check passed
@briansrls
briansrls deleted the session/tidy-ferret-144 branch June 17, 2026 16:41
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