Repository navigation
Repair the derived stage0 partition: three unrostered modules and one inverted crate tier - #9243
Conversation
… inverted crate tier
`cargo build --release` at the workspace root -- the first item under
DESIGN's own Building & checks bullet -- fails on main. Two module rosters
stand over one file set: `src/v1/stage0/src/lib.rs` (complete, 160 mods) and
the seven partition-crate `lib.rs` files, which share those same sources
through `#[path]` includes. Nothing decides that the two agree, so a module
added to the monolith is invisible to the split crates until someone runs a
build the required lanes never run.
MEASURED, not inferred. The reported specimen was one module; cargo stopped
at the first failing crate and never reached the one above it. A per-crate
visibility scan (own `pub mod` plus the transitive `pub use <pkg>::*` chain,
against every included file's `crate::X` references) finds three:
stage0_extdeps_languages extdeps_languages_rust_capabilities
stage0_v1_infer v1_compiler_coercion, v1_compiler_type_head_exposure
The prediction was confirmed by execution before this change was written: a
build carrying only the first fix failed on exactly the second crate.
The second half is not two more roster lines. `v1_compiler_infer_emit_info`
imports `crate::v1_compiler_artifact`, owned by `stage0_v1_artifact` -- which
DEPENDED ON `stage0_v1_infer`. `v1_compiler_coercion` reaches artifact too, so
it could not join infer while artifact sat above it. Measured deps show the
edge pointed the wrong way: `v1_compiler_artifact` needs only
{std_types, v1_rt, v1_std_core} and `v1_compiler_languages` needs no infer
module at all. The tiers are swapped -- artifact BELOW infer -- in the
authority rows, the generated mirror, the manifests, the `pub use` chains and
the workspace member order, and the four real import edges the module DAG was
missing are added.
WHY NOTHING CAUGHT IT. `claim_executor` is a bin of the monolith, whose roster
is complete, so every required phase builds a crate that compiles. The
partition crates are workspace members nothing in CI builds; the Rust suite
and clippy left CI by operator ruling in July.
WHAT THIS DOES NOT FIX, stated so it is not mistaken for closed. The producer
exists and has no caller: `v1.compiler.stage0_crates` renders both the
partition `lib.rs` and its `Cargo.toml` from the authority rows, and
`stage0_crate_boundary_emit_outcome` is named by nothing outside its own
module, its mirror, and `workspace_members`. `--required-regen` does not cover
these crates. So this repairs the instance and leaves the class: the same
omission lands again with the next module.
RUNG: unchanged, and low. The rosters stay hand-authored and no mechanism
refuses a fourth omission -- previous rung mitigatable, current rung
mitigatable, bounded residue the three modules and one tier edge repaired
here. NEXT-RUNG TRIGGER: give the producer a live entry point AND a required
phase that FAILS on a partition crate that does not compile, landed together
-- a producer with no route is the defect this commit diagnoses, so producing
without routing would relocate it rather than close it. Deriving the
assignment itself (a new module rostered with no human edit) is blocked on
the declared `stage0_module_dag_interface_grounding` debt, dissolving on
`v2.compiler.source_authority` `ModuleStorageIndex`; that is this class's
own next trigger, not effort withheld.
EVIDENCE. RED: `cargo build --release`, remote, main efc880a --
E0433/E0432 on `extdeps_languages_rust_capabilities`. Intermediate, with only
that fix: E0433/E0432 on `v1_compiler_artifact`, `v1_compiler_coercion`,
`v1_compiler_type_head_exposure`, as predicted. GREEN: `Finished release
profile in 6m 01s`, exit 0, one remote dispatch.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012WJNiTYqhzCcWJM6o5L5fQ
|
Status on the reds, and one of them is real. Three runs exist on Two are killed steps, not failures. Jobs One is a genuine failure, and it is a real gap in this PR: This PR edits How it was found, because the route matters more than the fix. Not from this red — from the follow-up work. I built the producer entry point for the partition boundary files and ran it read-only: 14 files, 9 byte-for-byte matches, 5 drifted, the 5 being exactly the files this PR hand-edits. The 9 matches are the positive control: they establish the producer is faithful, so the 5 are a finding rather than a broken renderer. Running it with Two independent instruments then agreed on the same file by name — that local run, and this CI lane. That agreement is the result; had they disagreed, that would have outranked both. Fix in progress: install the regenerated mirror from a — sent from neat-pike-374 |
`--required-regen` refuses this branch: required-regen: first_generation_equal=false planned=135 executed=135 declared_divergent=1 required-ci: regen FAIL generated surface drift: gunbc_stage0_crate_partition_generated.rs The parent commit edits `dag/gunbc/stage0_crate_partition_generated.dag` and did not carry that file's own emitted Rust mirror. So the branch INTRODUCED a disagreement between a generated authority and its projection, which is worse than the state it inherited: on main the two agree while both being stale, here they disagreed. This installs the mirror the emitter produces, from a `--required-regen` candidate tree rather than by hand -- hand-editing a generated file is the sin that produced this whole class. The diff is 26 lines and every one is this branch's own authority change projected: `extdeps_languages_rust_capabilities` into the extdeps roster, the `v1-stage0-v1-artifact` and `v1-stage0-v1-infer` rows swapped, the two new modules into infer, and the reexport chains flipped. No unrelated drift rides along, which is what made it safe to install. HOW IT WAS FOUND, because the route matters more than the fix. Not from the red -- from the follow-up work. The partition-boundary producer entry point was run read-only against the tree: 14 files, 9 BYTE-FOR-BYTE MATCHES, 5 drifted, the 5 being exactly the files the parent commit hand-edits. The 9 matches are the positive control: they establish the producer is faithful, so the 5 are a finding rather than a broken renderer. Running it with `--write` then REVERTED the parent commit's repair -- because the binary's embedded rows come from the stale mirror. Two independent instruments then named the same file: that local run, and this branch's CI build lane twenty minutes later. Had they disagreed, that would have been the larger finding. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012WJNiTYqhzCcWJM6o5L5fQ
The tier swap in this branch's first commit reordered `stage0_module_bearing_crate_rows`. The emit-shell crate's path dependencies are rendered by iterating those rows IN ORDER, so the authority now derives `v1-stage0-v1-artifact` before `v1-stage0-v1-infer` while the committed manifest still carried the old order. One line, and cargo does not care -- dependency order is cosmetic to it -- but the derived file disagreed with the authority it is derived from. WHY IT IS HERE AND NOT IN THE FOLLOW-UP. This branch changes the authority, so it owes every projection of that authority. Landing the projection separately would leave main holding exactly the authority-versus-mirror disagreement this branch's second commit exists to remove, which is the state this whole change argues is worse than either coherent one. WHY IT WAS INVISIBLE UNTIL NOW, which is the part worth recording. The pre-mirror-fix run of the producer reported this file as MATCHING, because the binary was rendering from the STALE mirror and therefore reproduced the old row order on both sides. The staleness was masking its own downstream consequence. It became visible only once the regenerated mirror was in the tree being measured -- so this file is a consequence of the previous commit's fix, not an omission it should have caught. AND IT COMPLETES A SYMMETRY THE FOLLOW-UP DEPENDS ON. The defect that opened this branch had drift ZERO across four projection links and a crate that did not compile: a drift check cannot see a stale authority. This file is the mirror image -- real drift, and a compile that passes: a compile cannot see a drifted projection. Neither check subsumes the other, and there is now an executed specimen of each failing where the other succeeds. Bytes installed from the producer's own `--write` output, diffed before committing: the two path dependencies swap position and nothing else moves. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012WJNiTYqhzCcWJM6o5L5fQ
`witness_v1_infer_unit_members_holds` asserts `(unit.members |> count) == 7`. This branch takes `stage0_v1_infer` to nine members -- `v1_compiler_coercion` and `v1_compiler_type_head_exposure` -- so the witness goes red BY CONSTRUCTION on this head. One number, not a witness rewrite. AUDITED RATHER THAN ASSUMED, because a count assertion is rarely alone. Every other pin in that file is unaffected and each for a stated reason: `witness_runtime_unit_members_holds` (== 1) and `witness_v1_artifact_unit_members_holds` (== 2) pin units this change does not resize -- artifact keeps both members THROUGH the tier swap, since the swap moves the row's position and not its contents. `witness_resolve_partition_explicit_returns_assignment_holds` compares a count to another measured count, so it is self-relative and cannot pin a size. `witness_partition_physical_crate_count_holds` and `..._module_bearing_unit_count_holds` pin CRATE and UNIT totals, which are unchanged: no crate is added or removed here. No assertion in the file is order-sensitive, which was the other thing worth checking given the swap touches authority rows, manifests, `pub use` chains and workspace member order. NOT RE-DERIVED BY CI, DELIBERATELY. This was decidable by reading, the fleet has been saturated, and spending a runner to confirm an assertion whose subject is a literal in the diff would measure nothing the source does not already say. WHAT THIS DOES NOT CHANGE: the residue this branch already declares. The producer still has no caller, `--required-regen` still does not reach the partition crates, and this repairs the INSTANCE while leaving the CLASS -- which regressed once already in this same crate three weeks ago. The follow-up carries the phase; this commit only stops a stale literal from failing a correct change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012WJNiTYqhzCcWJM6o5L5fQ
stage0_module_dag_edge(from: "v1_compiler_artifact", to: "v1_compiler_languages")
asserts the reverse of the source. `partition_unit_dep_from_edge_fold`
(`v2.std.compilers.compilation_unit`) reads an edge as: if `edge.from` is in the
unit and `edge.to` is outside it, the unit depends on `edge.to`'s unit -- so
FROM IS THE CONSUMER AND TO IS THE DEPENDENCY. The row therefore claimed
artifact depends on languages.
The source says the opposite, and the two files are unambiguous:
`v1.compiler.languages` opens with `import v1.compiler.artifact { RenderTarget }`,
while `v1.compiler.artifact` imports `v1.std.core` alone and names languages
nowhere. Direction verified by reading the fold rather than inferred from the
field names, because `from`/`to` do not say which way dependency runs.
INERT TODAY, AND THAT IS THE ARGUMENT FOR FIXING IT HERE RATHER THAN AGAINST.
Both modules sit in one crate, so no build can observe the lie -- the same shape
as the emit-shell manifest earlier in this branch, where cargo does not care and
the authority is wrong anyway. A branch whose subject is repairing this
authority should not leave a false edge in it for a later derived partition to
trust. The four edges this branch ADDS were checked by the same rule and all
point consumer to dependency: infer_emit_info -> {infer_items, artifact,
coercion}, infer_env -> type_head_exposure, coercion -> artifact, each matching
its module's own imports.
A NARROWER STATEMENT OF WHAT THE TIER SWAP ESTABLISHES, which is the accurate
one: the CURRENT SOURCE DEPENDENCY GRAPH requires the artifact partition to
precede the infer partition. That is not a claim that artifact semantics belong
permanently below inference. Extracting `RenderTarget` into a smaller
target-vocabulary authority, so inference need not acquire the whole
artifact/languages package, remains open as a partition-GRANULARITY question --
and the strong phrasing would have foreclosed it rhetorically while adding
nothing this branch needs.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012WJNiTYqhzCcWJM6o5L5fQ
cargo build --releaseat the workspace root — the first item under DESIGN's own Building & checks bullet — fails onmain. This repairs it, verified by execution.The class
Two module rosters stand over one file set.
src/v1/stage0/src/lib.rs(the monolith, 160pub mod) is complete; the seven partition-cratelib.rsfiles share those same sources through#[path]includes and carry their own rosters. Nothing decides that the two agree, so a module added to the monolith is invisible to the split crates until someone runs a build no required lane runs.This is DESIGN's parallel-representation failure, and its decision-continuity twin one layer out: an artifact derived from a roster, whose derivation stopped running, while consumers kept trusting the artifact.
It is three modules, not one — and a tier inversion
The reported specimen was one module. That was a prefix, not a total: cargo stops at the first failing crate, so the printed count is where the compiler happened to stop. A per-crate visibility scan (own
pub modplus the transitivepub use <pkg>::*chain, against every included file'scrate::Xreferences) finds three:stage0_extdeps_languagesextdeps_languages_rust_capabilitiesstage0_v1_inferv1_compiler_coercion,v1_compiler_type_head_exposureThe second half is not two more roster lines.
v1_compiler_infer_emit_infoimportscrate::v1_compiler_artifact, owned bystage0_v1_artifact— which depended onstage0_v1_infer.v1_compiler_coercionreaches artifact too, so neither could join infer while artifact sat above it. Measured deps show the edge pointed the wrong way:v1_compiler_artifactneeds only{std_types, v1_rt, v1_std_core}, andv1_compiler_languagesneeds no infer module at all.So the tiers are swapped — artifact below infer — in the authority rows, the generated mirror, the manifests, the
pub usechains and the workspace member order, and the four real import edges the module DAG was missing are added.Why nothing caught it
claim_executoris a bin of the monolith, whose roster is complete, so every required phase builds a crate that compiles. The partition crates are workspace members nothing in CI builds; the Rust suite left CI 2026-07-11 and clippy 2026-07-08 by operator ruling.What this does NOT fix
The producer exists and has no caller.
v1.compiler.stage0_cratesrenders both the partitionlib.rs(render_stage0_layered_core_lib/_foundation_lib/_emit_core_lib_outcome) and itsCargo.toml(emit_stage0_crate_manifest) from the authority rows — andstage0_crate_boundary_emit_outcomeis named by nothing outside its own module, its emitted mirror, andworkspace_members.--required-regendoes not cover these crates. Modeled derivation, zero executed route.So this repairs the instance and leaves the class: the same omission lands again with the next module. That is stated rather than hedged, because this class has regressed once already (#7641, same crate, three weeks ago).
Rung — unchanged, and low
stage0_module_dag_interface_groundingdebt (resolve_partition_outcomeanswersPolicyResolverUnimplemented; the cross-unit import edges are themselves a hand roster), dissolving onv2.compiler.source_authorityModuleStorageIndex. That is the class's own trigger, not effort withheld.Evidence
cargo build --release, remote,mainefc880aef43:E0433/E0432onextdeps_languages_rust_capabilities; theE0282beside it is downstream of the resolution failure, not a fourth defect.E0433/E0432onv1_compiler_artifact,v1_compiler_coercion,v1_compiler_type_head_exposure. Predicted by the scan before the run, then confirmed by it.Finished \release` profile [optimized] target(s) in 6m 01s`, exit 0, one remote dispatch.🤖 Generated with Claude Code
https://claude.ai/code/session_012WJNiTYqhzCcWJM6o5L5fQ