Skip to content

s1_closure floor panic: wrapper-retained diagnostics must inhabit the Diagnostics coproduct - #6501

Merged
briansrls merged 4 commits into
mainfrom
fix/main-floor-content-reds
Jul 11, 2026
Merged

briansrls merged 4 commits into
mainfrom
fix/main-floor-content-reds

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

The last known latent floor red. body_lower_wrapper_retained_shell constructed Accepted with a raw NonEmptyDiagnostics in the diagnostics field, whose declared type is the Diagnostics coproduct (None | Some{diagnostics}). The first downstream match over Diagnostics (diagnostics_merge in the normalize child fold) then panicked non-exhaustive pattern match on: NonEmptyDiagnostics{ reason: body_lowering_reason_wrapper_retained_emitted, … } on every file with a wrapper-retained fn body — killing the s1_closure witness whenever the affected set selected it (this is the panic seen on #6497's CI run; it hides on heads where the witness is skip-predicted).

Fix: wrap the singleton in Some. Corpus-swept the construction class: every other diagnostics: diagnostics_singleton(...) site is a Rejected (whose field IS NonEmptyDiagnostics) or already Some-wrapped — this was the only conflation.

Receipts (by execution):

  • RED: probe s1_file_parses(path: "dag/std/error_primitives.dag") on pre-fix source reproduces the exact CI panic locally.
  • GREEN: same probe post-fix → true.
  • New discriminating witness body_lowering_wrapper_retained_test.dag pins the shape through the real constructor: false on the raw form (no panic — catchall arm), true post-fix; verified both ways by stash/unstash.

Folded into #6489's branch as well (same fold-forward flow as #6498/#6500).

🤖 Generated with Claude Code

Brian Searls and others added 4 commits July 11, 2026 19:34
… the split-spanning gate universe, and the disposition-marker adjacency pin

Three content reds every completed floor now hits, all proven on clean
main (the 60m-timeout and batch-2-panic masks are gone, so the content
layer behind them is finally visible):

1. anchor_source_root panicked mid-floor on "dag/compiler" (run for
   PR #6497, cli_run.rs:365) - a DECLARED root from the
   medium-structure roster that does not exist on disk yet
   (modeled-before-implemented). The layer walk's own is_dir guard
   proves absence is a legitimate skip state there, but the anchorer
   panicked before the guard could run. New non-panicking
   try_anchor_source_root for declared-root walks: absence skips with
   a counted [layer-import] line (loud, never silent); CLI-provided
   roots keep the strict panicking contract.

2. affected_set_universe_gate_processes_match_declared_gates compared
   the Gate coproduct's 10 arms against gunbc_ci_gates - the ci JOB's
   slice (7) since the #6472 job split. The witness now unions
   floor+regen+emit_determinism (the same union its sibling
   witness_gate_roster_matches_coproduct_arms already used); probe
   receipt: the three slices partition the 10 arms exactly.

3. witness_floor_disposition_marker_initialized_before_docs_only_branch
   (landed in today's wave) pinned the stamp DIRECTLY adjacent to the
   docs-only branch, but the emitted script has a blank line between
   them - red on clean main from its first run. The pin now matches
   the emitted adjacency (stamp, blank, _ci_changed) and still proves
   the ordering it exists for.

Receipts: ci_spec_witnesses, all 4 affected_set_universe witnesses,
and the layering clean-tree witness green by execution with the fixed
binary. Remaining known main reds (predate today, tracked separately):
s1_closure_parses_holds (#6459 wrapper-retained diagnostic arm),
ci_deploy_witnesses.
…ling

witness_deploy_run_script_invokes_gunbc_wet pinned the unrooted
'--source-root dag' while gunbc_ci_deploy_invoke emits the rooted
'--source-root "$ROOT/dag"' (witness_layer_source_flags_rooted, #6453)
- red on clean main, the third masked layer of the rooted-argv family
(#6493 repinned the scheduler-argv pair). Proven by execution: suite
false -> true on the repin, conjunct-bisected first.

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

Hand-Rust expansion now carries the DESIGN §7 shape the same file
requires: authority rows (cli_run_source_root_anchor_scaffold sibling of
the workspace-root scaffold, bind to the declaration), named dissolve-on
(roots walk GENERATED via cli-run-reconcile-defork Chunk F, absence a
typed roster-layer diagnostic; or 5-dissolve-patches), checkable receipt
anchor + counted loc delta, scaffold witnesses green by execution, and a
discriminating unit pair (declared-present -> Some, declared-absent ->
None).

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

body_lower_wrapper_retained_shell constructed Accepted with a RAW
NonEmptyDiagnostics in the diagnostics field where the Diagnostics
coproduct (None | Some) is declared - the first downstream match over
Diagnostics (diagnostics_merge in the normalize child fold) panicked
non-exhaustive on every file with a wrapper-retained fn body, killing
the s1_closure witness whenever the affected set selected it. Fix wraps
the singleton in Some. Reproduced red (exact CI panic) and green by
execution via s1_file_parses on dag/std/error_primitives.dag; new
witness pins the shape and returns false (no panic) on the raw form.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@briansrls
briansrls merged commit 35e90ed into main Jul 11, 2026
1 of 2 checks passed
@briansrls
briansrls deleted the fix/main-floor-content-reds branch July 11, 2026 20:36
briansrls added a commit that referenced this pull request Jul 11, 2026
Drop the duplicate manual green witness superseded by #6501; keep only
net-new coverage via body_lower_classify_diagnostic_reason in the
compiler authority with a frontier-style unlisted-reason RED control.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot gunbai-bot Bot mentioned this pull request Jul 11, 2026
6 tasks
briansrls pushed a commit that referenced this pull request Jul 11, 2026
…uthorities (#6503)

* Main drift-gate red: home Lane D's plan-doc cross-links in the .dag authorities

generated_artifact_drift_gate_passes has been red on main since #6474
(Lane D) hand-added the provisioning-window design links directly to the
GENERATED docs/plans/emission-ingestion-inverse.md and
docs/plans/shell-emission-model.md without the backing rows - the gate
correctly refuses a doc that its .dag authority does not derive (the red
was masked behind the s1/ci_deploy/witness-pin floor reds until
#6498/#6500/#6501 cleared them). Fix keeps Lane D's intent: the two link
sentences move into dag/gunbc/plans/{emission_ingestion_inverse,
shell_emission_model}.dag, from which main_wet now regenerates the
checked-in docs byte-identically (zero doc diff after regen).
generated_artifact_drift_gate_passes: false -> true by execution on this
head.

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

* Docs-only CI shortcut: route through the executor plan path (fixes exit-2 on plan-artifact diffs)

The plan-artifact-only floor shortcut invoked claim_executor with
gunbc-run-style --entry/--function flags it does not parse - the arm
died 'unknown argument: --entry' exit 2 on the FIRST docs-only diff to
reach it (this PR's own run 29167744076; latent since the arm landed).
The gate also cannot run standalone: dag_compile_clean_gate_passes only
CONSUMES the executor's in-run whole-tree --target dag compile receipt
(standalone gunbc-run invocation refuses, proven by execution).

Fix: the shortcut is now claim_executor --plan-entry ci_floor_plan.dag
--plan-function gunbc_ci_plan_artifact_batches, where the new plan fn is
batch 1 of the existing floor schedule (the compile-clean anchor - the
plan's one structural fact) - same executor path, no parallel gate
runner. claim_executor arms the compile-clean lazy install for this plan
name alongside gunbc_ci_floor_batches. Shortcut witness repinned to the
plan-path invoke; ci.yml regenerated.

Receipts by execution: RED = run 29167744076 exit 2 + standalone refusal;
GREEN = local run of the exact new invoke (whole-tree compile receipt
ok=true, 1/1 node pass, exit 0); ci_spec_witnesses true; drift gate true.

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

* emit_determinism job: author its missing plan spawn-width fn (fatal eval, skip-masked)

claim_executor derives the spawn-width fn name from the plan-function
string (strip _batches, append _plan_spawn_width) and the eval is FATAL
when the fn is absent. ci_regen (#6393) and the falsifier got theirs;
gunbc_ci_emit_determinism_plan_spawn_width was never authored when #6472
split the job - and every green since was an affected-set SKIP, so the
job died at spawn-width eval ('no main function found', exit 1) on the
first diff to touch ci_floor_plan.dag and actually execute it (this
PR's run). Delegates to gunbc_ci_plan_spawn_width like the regen
variant. Receipt by execution: the emit-determinism plan now prints
spawn_width=4 from the derived name and enters its batch walk.

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