Repository navigation
regen_stage0: verify hand-maintained files against a fresh emit (§5 inert-gate hole #1) - #6311
Conversation
|
Agreed that gating-on-MATCH is the right §5 endpoint (construction over validation) — and thanks for flagging it as an observation, not a blocker. The deferral is deliberate, not just later-polish: a hard-fail on MATCH forces the HAND→GENERATED flip the instant an emitter gap closes, but the flip itself — removing the file from Concretely today the tree is 0 MATCH / 1 DRIFT (main.rs, the known #6053 gap) / 7 NO-CANDIDATE, so nothing is being silently deferred — the report would go loud the moment a hand file becomes flippable, which is exactly the trigger to do the gated flip. Captured in the PR body's non-goals. — sent from loyal-dove-903 |
… (unblock pure-.rs PRs) floor_diff_edits_from_line_ranges refused (Err) when a diff changed only non-.dag files (saw_non_dag && !saw_dag) — reddening the discovery-corpus batch for every pure-.rs PR (seed hand-syncs, Rust-only changes). That conflated a structural-∅ .dag frontier with an ignorance state. Per the operator's arity ruling: a successful git-diff observation whose .dag subset is empty is NOMINAL (present, empty) — the SAME outcome as an empty diff (every row takes the not-affected skip). The only ignorance state is a FAILED observation (UnifiedDiffFail, floor_diff_observe.dag), refused upstream in floor_git_diff_range. This mirrors the function's own departed-.dag-path arm, which already distinguishes structural-∅ (continue) from ignorance (refuse). Fix: drop the saw_non_dag/saw_dag refusal; a non-.dag-only diff falls through to the empty frontier. Observation layer (Ok/Fail + exit code) and the shell docs-only shortcut are unchanged (already correct / downstream- safe). Red control: non_dag_only_diff_is_structural_empty_frontier_not_refusal (was Err, now Ok empty). Also fixes the compile error at 32fac2e (auto-commit captured this edit mid-flight: declarations removed, refusal block not yet dropped). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d by broken regen); keep source_root_ingest V2Tree fix The #6289 witness ownership_movable_test.dag emits test_claim_ownership_movable.rs, which references v1.compiler.ownership symbols (merge_branch_licenses, MoveLicenseAccum, LiveState, move_site_key, ...) that are NOT in the committed v1_compiler_ownership.rs seed. Registering it as a GENERATED file therefore breaks the seed crate's compile (E0432/E0425/E0061) -- 'just register it' cannot land in isolation. Measured blast radius: the fresh self-compile drifts from the committed seed across 33 files (the known-broken regen, emitter bugs #6298), so pulling in the fresh v1_compiler_ownership.rs cascades into the whole regen. Not a scoped fix; parked for the regen project (or exclude the off-auto-path witness from the emit closure). KEPT: the source_root_ingest_gate_passes main-red fix -- emit_source_root_ingest_manifest now imports v2.std.cross_tree.import_model { DagTree, V2Tree }. The manifest emitter hardcodes its import block and missed this when source_root became a grounded SourceRootRef (#5473/#5486), so every witness importing the manifest failed with 'undefined variable V2Tree'. Verified locally: all 3 real_ingest witnesses + the 2 runnable closure witnesses now return true (were compile errors). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
manifest_imports_grounded_source_root_constructors: asserts the emitted manifest imports v2.std.cross_tree.import_model whenever it emits a grounded source_root value -- deleting the import line reddens this test (paired with the CI witness program_assembly_real_ingest_module_roots_parse_holds as the execution oracle). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The auto-committer flushed the in-progress merge with conflict markers (0b74fe4); this resolves both: - floor_diff_edits_from_line_ranges: keep #6269's v1_attribution_index + added_paths handling; keep the structural-∅ fix (no saw_non_dag/saw_dag refusal -- a non-.dag-only diff is a nominal empty frontier). The two are orthogonal and compose. - emit_source_root_ingest_manifest: take #6269's emit_source_root_ref_import (derives the referenced SourceRootRef constructors from records) over the earlier hardcoded both-constructors line -- same source_root_ingest V2Tree fix, more precise form. Kept both red-control tests; retargeted the structural-∅ test off a src/v1/ path (which #6269 now eagerly resolves via the real workspace tree, unavailable from the unit-test cwd) onto a path-agnostic non-.dag path. Both green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…import) The type_env_for_import specific_names filter was auto-committed to this PR but is a no-op: lookup_binding_by_name reads ancestry_str_bindings, which build_type_env fills from union_parent_type_env_caches (04_infer.dag:5507) and the single-import path (:133) -- both merge each import's full parent.type_env_cache, bypassing type_env_for_import (which only feeds the unused 'parents' field). Measured: dag_collect still resolves un-imported ErrorNode with the filter built in. Reverting so #6311 does not carry a fail-closed illusion; the real fix belongs in the ancestry-cache seam. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
CI |
Pick up #6311 source_root_ingest_gate fix so CI floor runs on a green base.
Pick up #6311 (source_root_ingest gate fix) so CI floor runs on a green base.
regen_stage0: verify hand-maintained files against a fresh emit (don't just trust them)
Closes §5 inert-gate hole #1:
RegenVerifyGatecopies theHAND_MAINTAINED_STAGE0_FILESverbatim into the fresh crate and only ever verifies them against themselves, never against what the emitter would produce. Those are exactly the files people hand-edit, so a bad hand-sync — or an emitter that has quietly caught up and made the hand entry a dead scaffold — is invisible.What this adds
verify_hand_maintained_candidatesruns in the--emit-freshpath (which the CIRegenVerifyGateand the manual cutover both use). For each hand file it diffs the committed content against the emitter's fresh candidate — both pushed through identical standalone rustfmt so the comparison isolates content drift from formatting — and classifies:GENERATED_STAGE0_FILES..dagsource, or a module the closure doesn't reach) → only cargo-green covers it.It never overwrites the hand files (they stay authoritative for the buildable crate); it only reports. The report is printed, counted, and located — a typed diagnostic, not a silent skip (DESIGN §5: a failure arm must refuse/report, never widen or hide).
Current tree result
0 match / 1 drift / 7 no-candidate:main.rs— the emitter emits a candidate but it differs, i.e. the known dag_collect emitter split: 05_emit_rust standalone emit for dag_collect{,_support}.rs #6053 dag_collect-split gap (dropped Ci-subcommand /extract_module_pathemission). Correctly justifies its hand-maintenance, and will flip to MATCH the moment that gap closes.cli_run.rs,coproduct_reflection.rs,recorded_fixture.rs,resolved_graph_cache.rs,v1_interpreter.rs,phase_profile.rs,module_path_index/— genuinely not in the emit closure (host-physics pins).No hand file is a dead scaffold today, so all remain justified — but now that's verified each run, not assumed.
Scope / non-goals
route_a_emit_fresh_cargo_green_testis#[ignore]'d, so fresh-emit cargo-green doesn't run in CI) is left as-is — it's the open ROADMAP "make cargo-green continuous (or cheap)" decision, gated on the same compile-wall.Verified by execution
regen_stage0 --emit-fresh <dir>prints the report; classification confirmed correct after fixing the emitted-map key (keyedsrc/<name>.rs, not bare).