Repository navigation
Emitted lib.rs: derive module membership from emitted files, order macro providers first - #8222
Conversation
…cro providers first emit_lib_rs_from_files fused two facts and got one of them wrong. It derived the module list from the files this emit actually produced, filtered the generated dispatch module OUT of that list, then appended `pub mod v1_interpreter_dispatch_generated;` back UNCONDITIONALLY from a hand-authored string. For the stage0 crate that module is real -- a different emitter co-produces it -- so the seed compiled and the fork stayed invisible. Every OTHER emitted crate got a declaration for a module nobody materialized, which rustc answers with E0583. Where it surfaced: the falsifier's wet lane, red since 2026-08-03. namespace_import_closure_receipt_holds and self_host_logic_behavioral_receipt_holds each emit a crate whose lib.rs is about a dozen lines; both died on `error[E0583]: file not found for module v1_interpreter_dispatch_generated` before reaching the behaviour they exist to measure, so two witnesses reported false for a reason unrelated to their subject. Neither transport touches the curated CSSL harness -- both invoke `gunbc compile --target rust` directly -- so the emitter is the shared root, not the harness. The two dimensions are now separate: membership = the emitted file population order = macro providers before their consumers Order is not cosmetic here. The dispatch module defines macro_rules! arms that v1_interpreter invokes unqualified from another module, and textual macro scope begins at the definition point and runs forward, so the provider must be declared first. The stage0 block already places it ahead of v1_interpreter; a partial crate that genuinely emits it now renders it first via order_partial_lib_rs_mod_names. That is why the non-stage0 append is DELETED rather than made conditional: a conditional append would have fixed the E0583 while preserving the latent ordering defect underneath it, since it still placed the provider last. Stage0 is untouched -- same filter, same generated_pub_mod_block, same position -- so the full lib.rs is intended byte-identical and the regen drift gate is what holds that. emit_lib_rs_mod_decl remains the sole renderer of the `#[macro_use]` spelling; its previously dead arm becomes reachable on a partial crate that actually emits the module. The dispatch file is NOT fabricated to satisfy a declaration -- that would reverse the authority; a real dependency should bring it into all_module_files through closure derivation. Witness: a discriminating pair. A small crate's lib.rs must not contain the dispatch module, and the same lib.rs must declare the probe's own module -- the second is the non-vacuity half, without which the exclusion would pass on an unread file. The ORDER dimension is deliberately not covered there and says so: compile_dag_rust_emit_check tests substring presence, which cannot express position, so ordering is held by the stage0 byte-identity gate instead. NOT CLAIMED: that this clears either witness. The emitter fix is necessary for the E0583; whether it is sufficient needs the targeted wet run, and the namespace witness also failed a `test -f src/lib.rs` check that may be a distinct defect. The .dag is inert until v1_compiler_emit_rust.rs is regenerated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J55x1eBhedYXr9ofj5Lncg
The .dag authority change alone left the executing path (cli_run -> compile_sources -> emit_rust) on the old hand-authored append, so the fix and its witness were specification without execution (DESIGN 5) and the seed no longer followed the .dag truth (DESIGN 7). Bytes are the stage0 self-compile output regen printed on run 31703924598; CI regen re-derives and verifies them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Fixed, not disputed — cursor/composer-2.5 (review 51613) is right: the Pushed 3ad2196: the stage0 regeneration of — sent from silent-bee-502 |
…fier Two review findings, both real. 1. order_partial_lib_rs_mod_names was unwitnessed. Stage0 takes the other branch, so the regen byte-identity gate never calls it, and identity would have stayed green everywhere -- including under the deferral this witness file previously wrote, which named that gate as the covering consumer. The new claim emits a crate that materializes the provider and anchors its declaration to the fixed preamble, so position is asserted, not membership. Discrimination measured: PASS as written, FAIL with the function replaced by the identity and rebuilt. An adjacency oracle was tried first and refuted by execution; the file records that. 2. emit_lib_rs_mod_decl repeated the provider comparison independently of is_lib_rs_macro_provider, so rendering and ordering could drift apart. It now consumes the predicate. Emitted bytes unchanged -- the two membership claims still pass against the regenerated seed. Seed regenerated locally with regen_stage0 (141 files written, one changed). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Both findings from the ChatGPT review are fixed in Ordering control. The suggested direct-import test is not reachable: the executed witness source roots are Discrimination is measured, not argued. In this worktree, release Classifier de-fork. The seed was regenerated locally this time ( Not claimed: that the two wet receipts are repaired. This clears their observed phantom-module blocker; whether something else sits behind it is for their next execution to say. — sent from silent-bee-502 |
What this repairs
emit_lib_rs_from_filesfused two facts and got one of them wrong. It derived the emittedlib.rsmodule list from the files this emit actually produced, filtered the generated dispatch module out of that list, then appendedpub mod v1_interpreter_dispatch_generated;back unconditionally from a hand-authored string.For the stage0 crate that module is real — a different emitter co-produces it — so the seed compiled and the fork stayed invisible. Every other emitted crate got a declaration for a module nobody materialized, which rustc answers with
E0583.Where it surfaced
The falsifier's wet lane, red since 2026-08-03.
namespace_import_closure_receipt_holdsandself_host_logic_behavioral_receipt_holdseach emit a crate whoselib.rsis about a dozen lines. Both died on:before reaching the behaviour they exist to measure — so two witnesses reported
falsefor a reason unrelated to their subject.Neither transport touches the curated CSSL harness (
grep -c csslis 0 for both); both invokegunbc compile --target rustdirectly. The emitter is the shared root.The shape of the fix
Two dimensions, previously fused, now separate:
Order is not cosmetic here. The dispatch module defines
macro_rules!arms —eval_builtin_inner_arm,eval_algebra_method_inner_arm,eval_call_native_intercept_arm,try_parse_table_memo_dispatch_arm— and every one is invoked unqualified from a different module,v1_interpreter.rs. Textual macro scope begins at the definition point and runs forward, so the provider must be declared first.generated_pub_mod_blockalready places it immediately ahead ofpub mod v1_interpreter;.That is why the non-stage0 append is deleted rather than made conditional. A conditional append fixes the
E0583while preserving the latent ordering defect underneath it, because it still places the provider last.order_partial_lib_rs_mod_names(providers first).generated_pub_mod_block, same position. Intended byte-identical; the regen drift gate is what holds that.emit_lib_rs_mod_declremains the sole renderer of the#[macro_use]spelling. Its previously dead arm becomes reachable on a partial crate that genuinely emits the module.The dispatch file is not fabricated to satisfy a declaration — that reverses the authority. A real dependency should bring it into
all_module_filesthrough closure derivation.Witness
A discriminating pair over the existing
compile_dag_rust_emit_checkoracle:lib.rsmust not containv1_interpreter_dispatch_generated— the wall;lib.rsmust declare the probe's own module — the non-vacuity half, without which the exclusion would pass on an unread file.Correction, and it was a real defect in this PR (raised in review, fixed in
fea1ab4396d): an earlier revision of this section said the order dimension was held by the stage0 byte-identity gate. Stage0 takes the other branch — it has compiler tests, so it callsorder_lib_rs_mod_namesand gets the dispatch declaration from the admitted hand block — so that gate never reachesorder_partial_lib_rs_mod_namesat all. The function could have been replaced by the identity with every check in this repository still green. A deferral naming the wrong consumer reads exactly like coverage.A third claim now covers it. The suggested direct-import unit test is not reachable — the executed witness source roots are
dagandsrc/v2, and the emitter lives insrc/v1— so the control goes through the emission path: a probe crate that genuinely materializes the provider (so the partition is non-empty), with its declaration anchored to the fixeduse im::…preamble. Anchoring is how a substring oracle expresses position: it asserts the provider is the first declaration, which membership cannot say.Discrimination is measured, not argued: the claim passes with the function as written and fails with it replaced by the identity and rebuilt. An adjacency oracle (provider immediately followed by
pub mod std_types;) was written first, run, and refuted — other closure modules sit between them.Not claimed
E0583; whether it is sufficient needs the targeted wet run. The namespace witness also failed atest -f src/lib.rscheck that may be a distinct defect.Executed evidence. Nothing here has run.Superseded. That was true of the first commit, and it was the review's blocking finding:compile_dag_rust_emit_checkinvokes the compiled seed, so the.dagchange was inert and the witness asserted omission against an emitter that still appended the block.v1_compiler_emit_rust.rsis now regenerated and committed (3ad2196e07f, thenfea1ab4396dvia a localregen_stage0), so the executing path matches the.dagauthority. All three claims pass against that regenerated seed, and exact-head CI —build,regen,heal_generated_artifacts,ci— is green.Review focus
lib.rsgenuinely byte-identical after regen? Answered by execution:regenis green on the head, and the localregen_stage0wrote 141 files of which exactly one changed.order_partial_lib_rs_mod_namesthe right home for the ordering constraint, or should provider-before-consumer be modeled as a declared edge rather than a partition on one known name?Also landed under review
emit_lib_rs_mod_declindependently repeated the== "v1_interpreter_dispatch_generated"comparison thatis_lib_rs_macro_providerwas introduced for, so provider rendering and provider ordering could drift apart — a smaller copy of the disagreement this PR removes. It now consumes the predicate. Emitted bytes are unchanged, and that is checked rather than assumed: the two membership claims still pass against the regenerated seed.