Repository navigation
Pkg7d 1b: emitter use-line edges returned typed, admitted against the stage0 crate partition - #12171
Conversation
…nst the stage0 crate partition v1.compiler.emit_rust returns SemanticSourceReference edges beside the use-lines it renders (emit_imports, reference_derived_use_line_plan, service imports); they ride EmitResult and PipelineResult out to required-regen, where gunbc.stage0_emitted_edge_admission refuses an edge whose target crate the source crate does not reach (E0432 class) and names a module outside the seed as NotCovered. gunbc_rust_emitted_edge moves into the std-core unit, which the first partition build demanded. v1 touched as v2 self-host work (v1_seed_standing). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t_core_support names it at the crate root Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ed-module row) The REDs and controls execute over fixtures on every required run; the admission over the real seed emission still runs only at author regen, under gunbc.rung_drop witness_floor_off_the_required_gate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…urces Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # src/v1/05_emit_rust.dag # src/v1/stage0/src/emitted_population.rs # src/v1/stage0/src/v1_compiler_emit_rust.rs
… origin/main Import edges were taken before dedupe_rust_import_lines, so a line dedupe dropped still reached the partition as an edge -- measured as EmitterReverseEdge std_content_hash -> v2_std_node over the v2.compiler.compile closure, with no such line in the emitted file. rust_use_line_edges_surviving keeps a typed edge only when a surviving line names its target module. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Review 70805's receipt advisory: the receipt is in the PR body under Seed-growth receipt (host Rust). The 24 lines sit inside the existing — sent from stern-lynx-90 |
|
Follow-up: a regen bootstrap deadlock this check introduces, found while landing #12185 (which adds one new seed module, extdeps_ietf_http_semantics).
Workaround used for #12185: seed the one row in the compiled mirror in a working copy, rebuild, regenerate, and require the regenerated file to be byte-identical to the seed, so the committed bytes are the regenerator's output. The structural fix belongs to this check's owners: admit against the partition rows the round is regenerating (the .dag's rows, or the candidate's), not the binary's compiled-in copy. Otherwise every new seed module repeats this. — sent from stern-gull-564 |
Pkg7d 1b: emitter use-line edges are returned typed and admitted against the stage0 crate partition
v1 admission. This change touches v1 (
v1.compiler.emit_rust,compile,emit_core_support,stage0_crates). It is admitted only as v2 self-host work undergunbc.v1_maintenance_standingv1_seed_standing: it builds the crate partition of the emitted compiler (Pkg7d/7e). It changes no emitted bytes.Producer: typed use-line edges
gunbc.rust_emitted_edgegainsSemanticSourceReferenceandsemantic_source_reference_edge.v1.compiler.emit_rust,emit_specific_import_use_linesreturnsRustUseLine { target_module, text }.emit_specific_import_blockis now its text projection, so the bytes are unchanged; the regenerated mirrors show no emitted-output drift.emit_importsreturnsRenderedUseLines { text, edges }.reference_derived_use_line_plancarriesedgesfrom the same typed lines: the provider blocks, the export-proven fallback, and the qualifiedCandidateSurvivedrows.emit_module_fullcarry their target too.ModuleEmission.emitted_edges= prelude rows + import edges + reference edges + service edges. These are threaded throughEmitResult.emitted_edgesandPipelineResult.emitted_edges. Every other target, and every refused emission, carries[].Consumer: stage0 admission at emit time
gunbc.stage0_emitted_edge_admissionstage0_emitted_edge_admission(edges, host_shell_modules):stage0/src/lib.rs) lists it. OtherwiseStage0EmittedModuleNotCovered.gunbc.stage0_partition_package_graph).Stage0EmittedEdgesAdmitted { edge_count }Stage0EmittedEdgesRefused { crossings }: each crossing names from/to module, from/to package and provenance (the E0432 class).Stage0EmittedEdgesNotCovered { uncovered }: an explicit typed arm for a closure that is not the seed. It never passes.v1.compiler.stage0_cratesstage0_lookup_module_owner_package_namenow readsstage0_partition_module_owner_packages, so the lookup is not forked.stage0_cratesimportsemit_rust, so the emitter can't call it without a cycle. The edges therefore ride out onEmitResult, and the seed emission calls the admission. The logic lives underdag/so claims (dag+src/v2roots) can reach it.required_regen_hostcompile_stage0runs the admission on every seed emission and refuses on any arm but Admitted, printingrequired-regen: emitted-edge admission admitted edges=N. That isclaim_executor --required-regen/ the build lane'sgenerated-artifactphase, which is off the required gate: run 35913737962 printsphase generated-artifact ROUTED to lane build (not this job). This residual rides the existing dropgunbc.rung_dropwitness_floor_off_the_required_gate, and nothing more is claimed for it.test.claim.stage0_emitted_edge_admission_witnessis a row ofv2.workflow.required_floorrequired_gate_authored_modules(named-module subtree admission, not a textual prefix; parent ruling). So the gate executes the admission over supplied edges and the committed partition rows on every required run: the two REDs, the controls, NotCovered and the located message.The consumer fired on this change first
EmitResultlives inv1_compiler_emit_core_support, which sits in thev1-stage0-v1-inferpartition crate. CarryingEmittedEdgethere broke the first partition build with exactly this class:E0432 unresolved import crate::gunbc_rust_emitted_edge. The module was host-shell-owned. The fix movesgunbc_rust_emitted_edgeinto the std-core unit (v2.workflow.rust_crate_partition, where it depends only onstd_types) and adds its two DAG edges. The partition rows, the std-corelib.rsand the hostlib.rswere regenerated from that authority.Evidence (by execution)
claim_executor --required-regenover the whole seed passed the admission. The round reached adjudication, and the only remaining drift is main's pre-existing set: emitted_population (gunbc_rust_crate_package_identline), std_integer, std_machine_constraints, v1_compiler_infer_resolve, and the 3 stale pub-use lines in v1_compiler_emit_rust. Only my own hunks are installed.test.claim.stage0_emitted_edge_admission_witness, all PASS locally), over the committed rows:NotCovered.--emit-partition-cratesread-only: 14/14 match.Seed-growth receipt (host Rust)
What grows.
src/v1/stage0/src/required_regen_host.rsgains 24 lines. All of them sit inside the existingcompile_stage0: reading the shell roster, one admission call, oneeprintln!, and the refusal mapped toErr. It adds zero new declarations, so under the census convention ingunbc.declaration_index_seed_growthits disposition isExistingSeedItemModified, not an addition. Nopub modline is added to the emitted lib.rs by hand. Thelib.rschanges are regenerated: the edge module moves out of the host shell into std-core.Why it is admitted. It is admitted by purpose under
gunbc.v1_maintenance_standingv1_seed_standing: the admission guards the crate partition of the self-host seed.Classified against the five refused classes:
NewLanguageBehavior: no. Emitted bytes are unchanged.NewCompatibilityObligation: no.NewEscapeHatchOrAdmissionRow: no. It adds a wall with no skip.SeedFeatureCompletion: no. The compiler compiles exactly what it compiled before.PublicSurfaceGrowth: no. The new.dagmodule's mirror is an emitted module, not hand Rust.What retires it. The glue lives in the host for the same reachability reason
required_regen_hostdoes: the regen is a host-effect phase. It retires with that host file when the regen driver becomes a.dagfold.Not modeled by this admission
The emit-core crate compiles its own
#[path]copies of some modules, includingv1_compiler_emit_core_support. Owner rows don't describe those copies, so this admission can't see an edge from one of them. CI clippy caught exactly that (E0432 inv1-stage0-emit-core). It is fixed inde37e00by addinggunbc_rust_emitted_edgetostage0_r3_emit_reexport_surface_modules. Extending the admission to#[path]copies is open work.Not in this PR (named, not dropped)
EmitterHelper { realized_type }: its only producer is unreachable. DEAD CODE ON THE SEED, a finding in its own right, routed separately:v1.compiler.emit_rustmodule_needs_faithful_carrier_importsisif true { false } else { ... }, soemit_faithful_text_carrier_import_linesnever runs. The sameif true { false }shape stands inmodule_renders_faithful_text_carrier, and ontype_node_is_faithful_string_leaf(returnsfalseunconditionally), which makesnode_tree_has_faithful_string_leaf/module_item_has_faithful_string_leafconstant. Adding the arm now would be a provenance with no producer (review 70556). The dead block should be deleted separately.ServiceRuntimeSurface: thecrate::dry_run/crate::cli_runpaths are inline paths inside item and whole-file renderers (service structs,compiler_tests_rust, cli dispatch), not use-lines. They belong with theemitted_inline_crate_path_edges_unreturned_stallclass. That class stays a stall per the operator ruling (no restructuring of emit_typed_expr/render_rust_type).dedupe_rust_import_lines, and I called the over-approximation loud. It was a real false refusal: over thev2.compiler.compileclosure the Pkg7e plan refusedEmitterReverseEdge std_content_hash -> v2_std_nodefor a line dedupe had dropped.rust_use_line_edges_survivingnow keeps a typed edge only when a surviving final line names its target module. After merging main, the whole-seed regen is a fixed point, and the admission admits 1023 edges.🤖 Generated with Claude Code