Repository navigation
Retire cssl parse_closure_mods onto the emitted_population manifest: the last live Rust text-parse on the seed-linked path recovers CLOSURE MEMBERSHIP by scraping the emitted lib.rs pub-mod lines, and the manifest in the same out_dir already declares that population with no Rust grammar involved - #9424
Merged
Merged
Conversation
The last live Rust text-parse on the seed-linked path recovered CLOSURE MEMBERSHIP by scraping `pub mod <name>;` lines out of the emitted `lib.rs` -- a hand-rolled reader of Rust surface syntax standing in for a fact the emitter already knows and already writes down. `emit_emitted_population_manifest` renders one line per produced path into `src/emitted_population.rs`, in the same `out_dir`, under a grammar both ends resolve from one authority (`gunbc.stage0_emitted_population_manifest`). Reading it is a split and a strip; no Rust grammar is involved on either side. The swap is a strengthening, not a rename. `lib.rs`'s mod list is rendered FROM the same module file list the writer then writes out, so the retired check compared one emit artifact against another and could only ever agree with itself on the real path -- its only reachable red came from a hand-authored `lib.rs`. The manifest declares `Cargo.toml`, `lib.rs`, `main.rs`, every module, every test file and itself, so assembly now asks the question that matters: is every path the emitter DECLARED it produced materialized in `out_dir`. `BOOTSTRAP_INLINE_MODS` is deleted with it. It named `NonEmptyVec` / `NonEmptyBTreeSet`, which exist only as inlined structs -- the manifest never declares them because they are not files, so the state that skip tolerated is not representable in the population assembly reads. Typed refusals, each with a discriminating RED enrolled: `RefusedDeclaredMember` (declared path not materialized -- the fixture deliberately keeps it out of `lib.rs`, so it went green under the retired parse), `MissingPopulationManifest` (no fall back to reading `lib.rs`), `EmptyPopulationManifest` (a file carrying no line under the grammar is ignorance, not an empty population). Also: the fixture root was keyed on the pid alone while cargo ran the cases concurrently, so every case wiped every sibling's tree. Keyed on the case name now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The last live Rust text-parse on the seed-linked path recovered CLOSURE MEMBERSHIP by scraping
pub mod <name>;lines out of the emittedlib.rs. The emitter already declares that population in the sameout_dir:v1.compiler.emit_rustemit_emitted_population_manifestrenders one line per produced path intosrc/emitted_population.rs, under a grammar both ends resolve from one authority (gunbc.stage0_emitted_population_manifest). Reading it is a split and a strip — no Rust grammar on either side, which is the property that made the artifact a file of//lines in the first place.The swap is a strengthening, not a rename
lib.rs's mod list is rendered FROM the same module file list the writer then writes out (emit_lib_rs_from_files(all_mod_files)→write_output_files), so the retired check compared one emit artifact against another and could only ever agree with itself on the real path. Its only reachable red came from a hand-authoredlib.rs.The manifest declares
Cargo.toml,lib.rs,main.rs, every module, every test file and itself, so assembly now asks the question that matters: is every path the emitter DECLARED it produced materialized inout_dir. Wider coverage obtained by deleting a parser, not by adding a check.What goes with it
BOOTSTRAP_INLINE_MODS(NonEmptyVec,NonEmptyBTreeSet) is deleted. It existed because a hand-authored shimlib.rscan carrypub modlines for wrappers the emitter inlines as barestructs. The manifest never declares them — they are not files — so the state that skip tolerated is not representable in the population assembly now reads (DESIGN §4b top rung, not the one below).Typed refusals, each with a discriminating RED enrolled
RefusedDeclaredMember— a declared path is not materialized. The fixture deliberately keeps the missing member OUT oflib.rs, so it went green under the retired parse: the refusal is evidence the manifest is the authority now, not merely that some refusal survived the change.MissingPopulationManifest— no fall back to readinglib.rs. The fixture is anout_dirwith a perfectly goodlib.rsand no manifest, exactly the state the retired parse accepted.EmptyPopulationManifest— a file at the manifest path carrying no line under the grammar is ignorance, not an empty population; answering "nothing declared, so nothing missing" would be the absorbing fallback read in the narrowing direction (DESIGN §5).Fixtures build the manifest through the same grammar authority (
write_population_manifest) rather than hand-spelling//and\n, so a change to the grammar moves both ends at once.Incidental, and a real hazard
temp_fixture_rootkeyed the fixture root on the pid alone while cargo ran the cases concurrently, so every case'sremove_dir_allraced every sibling's writes at the same<root>/out. It passed by timing rather than by construction; keyed on the case name now.Authority note
tools.self_host_curated_seed_linked_harnesscssl_closure_assembly_noteupdated to state the manifest rule (it read "dep manifest = gunbc-emitted src/lib.rs pub mod list").Measurement
cargo test -p v1-compiler --bin cssl_assemble(remote): 10 passed, 1 failed. The failure is the pre-existing environment one —normalize_stale_narrow_lib_without_namespace_graft_refuses_cargopanics withrelease bins or shim dir missing (gunbc=false, assemble=false, shims=true)because the remote runner has notarget/releasebins. Same outcome before and after this change.