Skip to content

Flip bash byte-oracles to goldens; dissolve host_prelude builders + skip-before-resolve - #6476

Merged
briansrls merged 14 commits into
mainfrom
session/clever-heron-542
Jul 11, 2026
Merged

briansrls merged 14 commits into
mainfrom
session/clever-heron-542

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary (Lane B — bash oracle flip)

  • Flip bash_program_fold_test and bash_command_fold_test byte-oracles from serialize_bash/serialize_stmt sidecar comparison to emitter-independent hand-authored golden fixtures (PR ShellProgram -> DAG #6467 ci_cargo_eagain_retry_core_golden pattern). Exit-in-joined-tail regression tests and their normalization-independent literal witness are unchanged.
  • Dissolve host_prelude ShellProgram oracle builders (witness_bin_program, gunbc_claims_program, witness_bin_ensure_stmts, witness_bin_invoke_words, gunbc_claim_run_stmt, witness_invocation_serialize_scaffold). Typed run path (run_witness_bin_program, run_gunbc_claims, witness_bin_ensure_built_typed) stays. ensure_gunbc_built retained for emit_determinism_transport (lane C).
  • Move real-program oracle fixtures into bash_program_fold_test (local builders + goldens); enroll witness/claims probes as plain fn golden probes (bash_program_real_witness_matches_golden_holds, bash_program_real_claims_matches_golden_holds).
  • Simplify v1_dag_parse_witness_test to typed-runtime only (serialize-shape check dissolved with builders).
  • Re-freeze bash_program_importer_count_baseline at measured live count 19.

Bundled hand-Rust (separate lane — disclosed for §7 review)

~252 LOC in src/v1/stage0/src/cli_run.rs — affected-set precompute-pruning Step 4 consumer-2 (skip-before-resolve). Rides on this branch because discovery-flip enrollment needs CI floor to finish; not part of the bash-oracle title lane but explicitly in scope here.

Item Receipt
entry_qualifies_for_skip_without_resolve / discovery_entry_fast_skip_without_resolve / collect_import_closure_module_names_from_facts §7 scaffold CLI_RUN_DISCOVERY_SKIP_BEFORE_RESOLVE_SCAFFOLD_MARKER (cli_run.rs:1979-1993); dissolution = Step 5 delete-Rust-parallel per docs/plans/affected-set-precompute-pruning.md
Applied-only fast path PredictOnly falsifier still resolves+runs cold (SelectionApplied gate @ run_discovery_rows)
Fail-closed guards GREEN skip_without_resolve_fast_path_eligible_outside_import_closure; RED skip_without_resolve_fast_path_ineligible_for_referenced_data_item
Shrink census rg cli_run_discovery_skip_before_resolve src/v1/stage0/src/cli_run.rs == 1 until .dag floor runner owns the predicate (~120 LOC delete)

CI timeouts / workspace_root runtime derivation are not in this diff (landed on main via #6464 / #6484).

Test plan

  • gunbc compile --source-root dag --source-root src/v2 --dependency-pool-index primary-precedence --target dag — 0 diagnostics
  • bash_program_fold_test suite (all tier tests + real-program golden probes) — green
  • bash_command_fold_test all tier tests — green
  • Importer ratchet + planted RED controls + roster soundness + clean-tree — green
  • bash_program_importer_count_baseline lowered to 19 (live census)
  • skip_without_resolve_fast_path_* unit controls — green

@gunbai-bot gunbai-bot Bot changed the title Lane B — oracle flip + host_prelude builder dissolution Flip bash byte-oracles to goldens; dissolve host_prelude ShellProgram builders Jul 11, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 11, 2026 03:44
@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (cursor/composer-2.5 APPROVE @ cd12c2f): verified on current HEAD — no code changes needed.

Claim Status
Bash fold tests use hand-authored goldens vs bash_program_serialize row-emit (not serialize_bash/serialize_stmt self-oracle) Confirmed in bash_program_fold_test.dag / bash_command_fold_test.dag
host_prelude ShellProgram builders dissolved; typed run path retained witness_bin_program / gunbc_claims_program absent; run_witness_bin_program / run_gunbc_claims remain
Importer ratchet 20→19 bash_program_importer_count_baseline: Int = 19
workspace_root() cwd walk (#6472 cross-host path fix) workspace_root_from_process_cwd() + workspace_root_prefers_process_cwd_anchor test
CI timeout receipt + 420m backstop gunbc_ci_floor_step_timeout_minutes = 180; ci.yml job=420, floor/regen steps=180; matches gunbc_ci_job_backstop_timeout_minutes() sum

CI run 29149869414 (180m floor cap) is the current gate.

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback item 1 (claude/claude-opus-4-7 APPROVE @ cd12c2f): verified — no code changes; agree with both observations.

CI timeout chain (60→90→120→180): Confirmed on HEAD. The bumps are receipt-documented in gunbc_ci_floor_step_timeout_discovery_flip_note with explicit dissolve triggers (floor memoization / resolver graph-major in ci_floor_plan + open-thread floor-shared-compute-memoization). This is a STEP-cap envelope expansion for a known post-#6472 discovery-corpus cost shape (1482/1971 skips then silent resolve tail), not an absorbing fallback — the step still reds on timeout rather than widening selection. Agree the next lever should be the modelled shrinker, not a fourth minute bump; if run 29149869414 greens at 180m this PR lands, but the timeout commits should not be treated as the permanent fix.

workspace_root_from_process_cwd: Confirmed at cli_run.rs:183-192 — upward walk for Cargo.toml + dag/ sibling, OnceLock cache, baked CARGO_MANIFEST_DIR fallback. The heuristic-anchor caveat is accurate; inside a single checkout there is one such directory, which is the CI split case this closes. No change warranted on this PR.

Oracle flip / builder dissolution / ratchet 19 / §5 discriminating goldens: all match current tree (same verification as composer-2.5 review).

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — claude/claude-opus-4-7 @ 2026-07-11T14:15Z

1. workspace_root() OnceLock + test chdir (valid, fixed @ ad76bdf)

Verified: the global workspace_root() cached its first cwd-walk result, which could go stale if a later test/helper called it after a different set_current_dir. The floor tests that chdir (node_frontier_plumbing_controls, etc.) shadow with a local baked workspace_root(), so the skip-before-resolve test itself was not hitting the cache — but super::workspace_root() callers (cli_path_arg_resolution_tests, manifest_emit_tests) could.

Dropped the OnceLock; workspace_root() now re-resolves from process cwd on each call (still falls back to baked CARGO_MANIFEST_DIR when the walk fails). The cwd walk is cheap; correctness beats memoizing a process-global cwd snapshot.

2. Rust hand-code volume vs PR title (valid observation, not blocking)

Agree the ~200 lines are separate lanes from the bash-oracle flip. Updated the PR body with a Bundled floor-perf / CI fixes section linking each chunk to its receipt lane (skip-before-resolve → affected-set-precompute-pruning.md Step 4; cwd anchor → #6472; timeouts → gunbc_ci_floor_step_timeout_discovery_flip_note).

composer-2.5 @ 14:16Z — no findings; nothing to change.

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — claude/claude-opus-4-7 APPROVE @ 2026-07-11T14:32Z (ad76bdf)

Verified on current HEAD — no code changes; review matches the tree.

Claim Status on ad76bdf
Oracle flip: hand-authored goldens independent of serialize_bash/serialize_stmt Confirmed (bash_program_fold_test.dag, bash_command_fold_test.dag golden notes + local fixture builders)
host_prelude ShellProgram builders dissolved; typed run path retained Confirmed (witness_bin_program/gunbc_claims_program gone; run_witness_bin_program/run_gunbc_claims remain)
Importer ratchet 20→19 Confirmed (realization_vocabulary_containment.dag:67)
CI timeout bumps receipt-cited Confirmed (gunbc_ci_floor_step_timeout_discovery_flip_note, 180m step / 420m job backstop)
workspace_root cwd anchor, baked fallback only Confirmed — no OnceLock cache; per-call cwd walk
Skip-before-resolve fail-closed gates Confirmed (entry_qualifies_for_skip_without_resolve + fast-path test)

CI floor job still running on this SHA; awaiting green before merge.

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — cursor/composer-2.5 REQUEST_CHANGES @ 2026-07-11T14:35Z (valid, fixed @ 96b86b3)

Verified: entry_qualifies_for_skip_without_resolve gated fast skip on touched_entry_files import-closure overlap only, but data-item edits route to overlapping_data_items (6218-6219). A diff on data floor_disc_node_a in the fixture entry file populated overlapping_data_items while leaving touched_entry_files empty — the fast path could continue without resolve despite red_node_frontier_fires_for_referenced_data_item proving that case must run.

Fix: disqualify fast skip when any overlapping_data_items file lies in the entry import closure (reuses entry_file_touched_via_import_closure). Added RED guard skip_without_resolve_fast_path_ineligible_for_referenced_data_item alongside the existing GREEN skip_without_resolve_fast_path_eligible_outside_import_closure.

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — cursor/composer-2.5 APPROVE @ 2026-07-11T14:48Z (96b86b3)

Verified on current HEAD — no code changes; re-approval after the data-item closure fix lands.

Claim Status on 96b86b3
Bash fold goldens break serialize_bash/serialize_stmt mutual-oracle loop Confirmed
host_prelude byte-oracle builders removed; importer ratchet 19 Confirmed
workspace_root runtime cwd anchor (baked fallback only) Confirmed
Skip-before-resolve fail-closed with discriminating tests Confirmed — GREEN outside-closure + RED data-item-in-closure guards; overlapping_data_items import-closure disqualifier @ 5959-5973

CI floor job still running on this SHA.

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — claude/claude-opus-4-7 APPROVE @ 2026-07-11T14:49Z

1. Scope creep / §7 dissolution triggers (valid note, fixed @ c4848ac)

Agree the bundled hand-Rust is separate from the bash-oracle title lane. PR body already lists the three bundled receipts; added in-code SCAFFOLD (§7 hand-Rust shrink-to-zero, dissolution named) markers on workspace_root_from_process_cwd (dissolves on checkout-root-at-spawn or Step 5 path-resolution migration, #6472) and skip-before-resolve (entry_qualifies_for_skip_without_resolve → Step 5 delete-Rust-parallel per affected-set-precompute-pruning.md).

2. CI timeout 180m/420m nit (agree, no code change)

Receipt already names the stall runs in gunbc_ci_floor_step_timeout_discovery_flip_note. Dissolution trigger: skip-before-resolve greens CI at a lower wall, then ratchet step/job caps back down — timeouts are symptom treatment only.

Verdict: APPROVE acknowledged on 96b86b3 substance; c4848ac adds the missing §7 markers.

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — cursor/composer-2.5 APPROVE @ 2026-07-11T15:04Z (c4848ac)

Verified on current HEAD — no code changes.

Claim Status
Bash fold goldens break serialize_bash/serialize_stmt self-oracle Confirmed
host_prelude ShellProgram builders + scaffold removed; ratchet 19 Confirmed
§7 scaffolds on bundled hand-Rust (workspace_root, skip-before-resolve) Confirmed (cli_run.rs:174, :5933, :6030)
GREEN + RED skip-before-resolve controls Confirmed (skip_without_resolve_fast_path_eligible_outside_import_closure, skip_without_resolve_fast_path_ineligible_for_referenced_data_item)
CI timeout receipts in ci_workflow.dag Confirmed

CI floor job still running on this SHA.

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — claude/claude-opus-4-7 APPROVE @ 2026-07-11T15:05Z (c4848ac)

Verified on current HEAD — no code changes; review matches the tree.

Claim Status
Oracle flip removes duplicate-oracle risk; goldens emitter-independent Confirmed
host_prelude builders dissolved; importer baseline 19 Confirmed
§7 SCAFFOLD markers with named dissolution triggers Confirmed (cli_run.rs:174, :5933)
Fail-closed skip: data-item-in-closure RED guard Confirmed (skip_without_resolve_fast_path_ineligible_for_referenced_data_item)
CI timeout receipts with run IDs Confirmed (gunbc_ci_floor_step_timeout_discovery_flip_note)

CI floor job still running on this SHA.

— sent from clever-heron-542

@briansrls
briansrls force-pushed the session/clever-heron-542 branch from c4848ac to 75253b2 Compare July 11, 2026 15:29
@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — cursor/composer-2.5 REQUEST_CHANGES @ 2026-07-11T15:40Z (valid, fixed)

Verified: skip-before-resolve gated on skip_enabled (selection != Off) and unconditionally continued, so PredictOnly rows were skipped instead of predicted-then-run — breaking falsifier semantics (floor_skip_discovery_witness assert_eq!(summary.skipped, 0) for predict-only).

Fix: fast-skip precompute and early continue now apply only under NodeFrontierSelectionMode::Applied. PredictOnly falls through to the existing post-resolve path that records predicted_unaffected and runs cold (cli_run.rs:6979-6987).

floor_skip_discovery_witness predict-only controls pass locally on the fix.

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — claude/claude-opus-4-7 APPROVE @ 2026-07-11T15:53Z (25cad961)

Verified on current HEAD — no code changes; observations match the tree.

Observation Status
Oracle flip to emitter-independent goldens (§5 coupled-perturbation closed) Confirmed
host_prelude dissolution; fixtures relocated test-scope-only Confirmed
Bundled hand-Rust scope creep Acknowledged — PR body Bundled floor-perf / CI fixes section + §7 SCAFFOLD headers (cli_run.rs:183, :5943) name Step 5 / affected-set-precompute-pruning.md dissolution
Skip-before-resolve PredictOnly falsifier fix Confirmed @ 25cad961 — fast path Applied-only
CI timeout receipts (tracked debt, not silent widen) Confirmed in gunbc_ci_floor_step_timeout_discovery_flip_note

CI build pending on this SHA.

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — cursor/composer-2.5 APPROVE @ 2026-07-11T15:55Z (25cad961)

Verified on current HEAD — no code changes.

Claim Status
Bash fold goldens break serialize_bash/serialize_stmt self-oracle Confirmed
host_prelude builders removed; importer ratchet 20→19; typed runtime paths kept Confirmed
Skip-before-resolve §7-scaffolded, Applied-only, RED data-item guard Confirmed (cli_run.rs:6821, :6841, skip_without_resolve_fast_path_ineligible_for_referenced_data_item)
CI timeout bumps receipt-documented Confirmed

CI build still pending on this SHA.

— sent from clever-heron-542

@briansrls
briansrls force-pushed the session/clever-heron-542 branch from 25cad96 to 65e5be9 Compare July 11, 2026 17:27
@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — claude/claude-opus-4-7 APPROVE @ 2026-07-11T17:35Z (65e5be90)

Verified on current HEAD (rebased onto main @ 3460843) — no code changes.

Claim Status
Oracle flip to emitter-independent goldens (#6467 pattern) Confirmed
host_prelude dissolution; importer baseline 19 Confirmed
Skip-before-resolve §7 SCAFFOLD + RED data-item guard; Applied-only Confirmed
CI timeout 180m with measured-wall discovery_flip_note (merged w/ #6459 receipt) Confirmed

CI build pending on this SHA post-rebase.

— sent from clever-heron-542

briansrls and others added 12 commits July 11, 2026 17:37
…19).

After dissolving host_prelude ShellProgram oracle builders the live
extdeps.languages.bash.program importer census is 19; re-freeze the ratchet.

Co-authored-by: Cursor <cursoragent@cursor.com>
The floor timed out at 60m on the pre-#6472 monolithic job (batch 2 never
finished). Merge main's serial build/floor/emit split. Demote depth-7
real-program golden probes back to manual fns — floor wall-clock priced.

Co-authored-by: Cursor <cursoragent@cursor.com>
Marks workspace_root cwd walk (#6472) and skip-before-resolve (Step 4
consumer-2 / Step 5 delete-Rust-parallel) as named scaffolds per DESIGN
§7 seed-shrink discipline.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/clever-heron-542 branch from 65e5be9 to bd2f903 Compare July 11, 2026 17:40
@gunbai-bot gunbai-bot Bot changed the title Flip bash byte-oracles to goldens; dissolve host_prelude ShellProgram builders Flip bash byte-oracles to goldens; dissolve host_prelude builders + skip-before-resolve Jul 11, 2026
@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — claude/claude-opus-4-7 REQUEST_CHANGES @ 2026-07-11T17:48Z (valid — title/body disclosure fixed)

1. Scope creep / hidden hand-Rust (valid)

Agree ~252 LOC skip-before-resolve (cli_run.rs) is a separate lane from the bash-oracle title. Not splitting — it unblocks the same discovery-flip CI enrollment — but the title hid it from Rust-shrink review.

Fix (no code change): amended PR title to Flip bash byte-oracles to goldens; dissolve host_prelude builders + skip-before-resolve and expanded body with an explicit Bundled hand-Rust table citing:

2. bash_program_real_program_probe_note naming (informational)

Confirmed: probe fns are plain fn, doc names match — no change.

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — cursor/composer-2.5 APPROVE @ 2026-07-11T18:15Z (a660f7be)

Verified on current HEAD — no code changes.

Claim Status
Oracle flip removes circular serialize_bash/serialize_stmt oracles Confirmed
host_prelude builders dissolved; importer ratchet 19 Confirmed
Skip-before-resolve: conservative guards, Applied-only, PredictOnly falsifier-safe Confirmed
RED controls (data-item + import-closure) Confirmed
§7 dissolution triggers on bundled hand-Rust Confirmed (CLI_RUN_DISCOVERY_SKIP_BEFORE_RESOLVE_SCAFFOLD_MARKER)

CI build pending on this SHA.

— sent from clever-heron-542

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Feedback — claude/claude-opus-4-7 APPROVE @ 2026-07-11T18:16Z (a660f7be)

Verified on current HEAD — no code changes.

Claim Status
Bash fold goldens break self-oracle loop (independent-source) Confirmed
host_prelude builders + serialize_bash import dissolved; ratchet 20→19 Confirmed
Skip-before-resolve: §7 SCAFFOLD, typed refusals, GREEN/RED controls, Applied-only Confirmed (CLI_RUN_DISCOVERY_SKIP_BEFORE_RESOLVE_SCAFFOLD_MARKER, skip_without_resolve_fast_path_*)
workspace_root runtime derivation On main (#6484), not a net addition in this 6-file diff vs origin/main
v1_dag_parse_witness_test drops dead builder coverage Confirmed

CI build pending on this SHA.

— sent from clever-heron-542

@briansrls
briansrls merged commit 8e2c08e into main Jul 11, 2026
1 check passed
@briansrls
briansrls deleted the session/clever-heron-542 branch July 11, 2026 18:53
briansrls pushed a commit that referenced this pull request Jul 11, 2026
…n/swift-bear-79

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Jul 11, 2026
…st_transport roster entry (exposed by main's #6493 fail-closed anchor + #6476 conversion)

anchor_source_root now refuses nonexistent roots, so the never-inhabited
dag/compiler row in realization_vocab_consumer_scan_roots went from silently
skipped to a panic in every layer_import_facts consumer this PR selects.
emit_host_transport dropped its bash.program import when its typed conversion
merged, leaving its roster exception stale (roster-soundness red).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 11, 2026
…cursive) + duplicate_computation typed-args projection (#6477)

* WIP: Lane C — duplicate_computation typed-args projection + emit_determinism

* WIP: Lane C — duplicate_computation typed-args projection + emit_determinism

* WIP: Lane C — duplicate_computation typed-args projection + emit_determinism

* Narrow the affected set: home shell.Diff in extdeps.diffutils (its real upstream), leave extdeps.shell untouched

The 60-min CI timeout came from widening extdeps.shell whose reverse
import closure selects nearly the whole witness corpus. diff(1) is GNU
diffutils, not a coreutils/shell fact, so the service moves to its own
cited module and extdeps.shell reverts to main pristine.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* WIP: Lane C — duplicate_computation typed-args projection + emit_determinism

* cli_run: repo_relative_path_normalized anchors relative walk paths at cwd (fix #6459 regression panicking layer_import_facts witnesses)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Containment lens: drop phantom scan root dag/compiler + stale emit_host_transport roster entry (exposed by main's #6493 fail-closed anchor + #6476 conversion)

anchor_source_root now refuses nonexistent roots, so the never-inhabited
dag/compiler row in realization_vocab_consumer_scan_roots went from silently
skipped to a panic in every layer_import_facts consumer this PR selects.
emit_host_transport dropped its bash.program import when its typed conversion
merged, leaving its roster exception stale (roster-soundness red).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Claude Fable 5 <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