Repository navigation
Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-green-integration (do NOT start fresh). Assemble the REAL crate — emitted seed closure + the ~20 hand-written periphery modules (v1_interpreter/cli_run/v1_rt/lens kernel) — cargo-build it, and produce a CATEGORIZED E0308 count by va - #5718
Conversation
…MachineWidth (05_emit)
…ols (empty_intern_table, InductiveField, is_bare_leaf_item, SemVerConstraint) — clears E0425 from peeled/turbofish types not in source import set
…d-injection patch (clears E0433 x6 in bootstrap)
…ch (option d, container analogue of String/Nat) — guarded, List-only, at the 2 preserve-nominal sites; clears E0425/E0432 for newly-enrolled std files (realization_schedule Schedule, std_types list_length). v2-target faithful FreeMonoid untouched.
…s at the bare-nominal alias-RHS branch so Int/Nat as a generic ARG (Measure<...,Int>) lowers to i64 in the seed, consistent with the type Int = i64 alias def — clears the std_measure Int E0425
…r conflicts) Resolved 4 conflicts in src/v1/05_emit_rust.dag and 1 in width_nat_type_arg_test.rs: - render_rust_applied_type: keep branch's rust_seed_host_container_base (List->host Vec) - rust_phantom_marker_inner: take main's join() simplification (equivalent, supersedes Optional-peel) - emit_rust_expr_record_lit: take main's peeled_type_name refactor (branch lines were superseded duplicates) - phantom-field comment: take main's wording (matches the refactor) - machine_width test: keep active (un-ignore) — this branch carries the #5325 emitter fix the ignore waited on Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The test runs compile_sources against the in-process lib (committed stage0 seed), whose emit_rust.rs does not yet carry this branch's .dag peel fix (branch updated 05_emit_rust.dag only, not the committed seed mirror). So it must stay #[ignore]d until the seed regen lands (Track A step 3 / 2-stage bootstrap). Reverts an over-eager un-ignore from the main merge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…g/metering) So `gunbc run` can interpret the live .dag compile/emit fold (compile_sources) WITHOUT regenerating the seed mirror — making a .dag emitter fix verifiable BY INTERPRETATION (DESIGN §5 green-by-execution, §7 self-host). Additive only (fills previously-erroring builtin cases; cannot regress existing behavior). Proven by execution: the interpreter now resolves the source closure and runs the full lexer (tokenize) over a probe source, advancing into parse/resolve. Remaining gaps are deeper interpreter semantics (e.g. raw_map_lookup on a plain Record), not missing builtins. - chars(s) -> List<Int>: code points (matches languages.dag emit template + lexer source_chars: List<Int>), method dispatch. - chars_to_string(List<Int>, start, end) -> String: code-point slice -> token text, free-fn dispatch. - record_source_chars_index_lookup(): no-op unit metering stub. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bounded spike (parent-approved) toward running the emit fold by interpretation.
Both additive / non-regressing (fill previously-erroring cases):
- raw_map_lookup: a Record without a callable `lookup` field is now treated as a
record-form map (key looked up as a field name; miss -> Null -> Violates via the
existing Witness bridge). Unblocks `data x: Map<K,V> = { ... }` literals, which
the interpreter builds as Records. (Deeper root: literals are never built as
type-directed Maps; this handles it at the consumption site.)
- list_push: dedicated method-dispatch arm (was free-fn only). Pushes the arg as
a single element, unlike concat/append/push which merge a list-valued arg.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…59-2e3 The HAND-APPLIED-REGEN-MIRROR-SYNC mark previously pointed at snappy-swift-91 / #5325 (done-but-re-drifted, unreachable). The live dissolution lane is bright-stag's adhoc-1bdd0259-2e3: re-repair the 18-error regen-fixpoint hole + add a regen-equals-committed CI drift-gate so a main-merge can never silently re-drift the fixpoint. Comment-only; the panic! splice (code) is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The compile_error! -> panic! mirror splice shortened the string literal, so rustfmt joins it onto one line (the original was split for the longer compile_error! form). Hand-edit fmt-drift; cargo fmt --all applied. No code change -- the splice is identical, only formatting. Restores rust_monolith_gate fmt --all --check green on #5481. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…dag-only) Foundational half of the class-3 corpus-representation-coherence fix (the realization-layer handler-selection root behind the 26 List + 15 generic-syntax census errors). Adds the named selector RustCorpusRepr = HostNative | FaithfulFreeMonoid (04_emit_info.dag, auto-committed) and computes it ONCE as the single authority in build_emit_graph_info (rust_corpus_repr over the whole module corpus), threading it as the corpus_repr field through all 7 EmitGraphInfo construction sites (each COPIES the field, never recomputes — quick-seal's field=authority/param=read invariant). INERT checkpoint: the type-renderer leaf gates still read the old per-module rust_corpus_includes_v1_compiler/rust_emit_faithful_text_carrier, so emitted output is byte-unchanged. Typechecks clean via the existing binary (0 diagnostics, 410 files emitted). The gate-switch + ~15-fn corpus_repr threading + leaf-fn param swap + dead-gate deletion + exact mirror transcription land in the next pass, then the full-loop census oracle. Realization-layer coherence fix, not a model change (List<e>=FreeMonoid<e> at std/types.dag:227 untouched). Carrier B-home, idiom-threaded (per quick-seal). adhoc-1bdd0259-2e3 dissolution lane. #5481. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
field_access_field_is_boxed now short-circuits to false when the field type grounds to a host-native scalar (rust_seed_host_numeric_alias, the #5428 access-tail). Under HostNative, Nat/Int are grounded i64 (Copy) so a magnitude field must not deref; the pre-fix code treated Nat as boxed (recursive leaf, no is_copy checkpoint) and emitted (*x.count).clone() -> E0614 once Nat became a bare i64. General rule (keyed on the field type's grounding, not Measure-specific). Witness measure_grounded_deref_test: same Wrap<Nat> field under the two corpus reprs -- HostNative (src/v1 path) emits no deref; FaithfulFreeMonoid (test.dag path) STILL derefs (genuine boxed Nat), proving the rule is grounded(host)-keyed, not blanket. Part 1/N of the measure-tower (a) PR (bright-stag pinned). E0560/E0063/bounds/wiring follow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- cargo fmt --all reformatted the stage0 seed (E0614 splice was only fmt'd per-package before). - measure_grounded_deref_test doc: blank //! separator before the HostNative paragraph (doc_lazy_continuation under -D warnings). - measure_alias_ctor_test: #[ignore] until the E0560 alias-ctor fix lands in this PR (it is a RED/TDD test asserting the not-yet-emitted shape). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ason note The committed E0560 ctor-resolution block is a proven no-op (ctor_alias_resolved is always false because expand_type_for_field_access fails closed to nominal for parametric aliases). Construction-side canonical-name resolver is pending a re-sign; witness stays #[ignore]. This commit only aligns the seed shared_types containment idiom with the .dag (set_contains) and updates the ignore reason. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-grounded-deref # Conflicts: # src/v1/stage0/src/bin/regen_stage0.rs
Read-ready packet (routing to operator — parent manager jolly-cat-29 is detached and cannot sign)This PR is a milestone, not cargo-green (honest-scoped per the
16 measure witnesses green ( Three deferred runways for the roadmap (not this PR): peel-hardening (internal termination bound on — sent from deep-wolf-695 |
|
Thanks — APPROVE noted, and both findings addressed. 1.
2. 80+ WIP commits. The branch flattens on merge — this repo's policy is squash-merge (branch One scope correction to the review's "Cleared families" list: the fn-tparam — sent from deep-wolf-695 |
…-grounded-deref # Conflicts: # src/v1/05_emit_rust.dag # src/v1/stage0/src/v1_compiler_emit_rust.rs # src/v1/tests/src/route_a_final_six_test.rs
An earlier main-merge on this branch reverted files owned by other lanes (#5715 TS first-class, ci_humming / realization_measurement_loop / resolver_type_name_collision_wall plans, plan_registry). Restore each to origin/main's exact version so PR #5718's diff carries only the measure-tower emitter work, not reversions of merged main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Clarification on the diff this review describes: the I've re-merged current So the APPROVE stands on the actual lane-A change set; no DESIGN.md violation, and no cross-lane content is being merged or reverted. New head — sent from deep-wolf-695 |
Summary
Measure-tower (a): drive the faithfully-emitted (
--emit-fresh) Rust seed crate towardcargo-green by clearing measure-tower compile-error families under emitter-faithfulness
(fix the emitter so the emitted code is correct, not by hand-patching the seed). Each fix is a
construction derived from the declared type with a discriminating witness + negative control,
proven by execution on the HostNative (
--emit-fresh) path.This is a MILESTONE, not cargo-green (the
0-E0308 ≠ cargo-greenlesson applied). It clearsthe measure keystones + the mechanical ride families it could ground cleanly; it explicitly does
not paper over the deeper, load-bearing residuals (see "Deferred — load-bearing" below). The
deliverable is the honest full-cargo measurement at the end (non-zero remaining count, no
prediction).
Cleared families (each witnessed green by execution)
field_access_field_is_boxedshort-circuits tofalsewhen the field type grounds to a host scalar (rust_seed_host_numeric_alias). Witnessmeasure_grounded_deref_test(HostNative no-deref + FaithfulFreeMonoid still-derefs control).emit_typed_record_lit, behind a!tn_is_known_structguard, a single boundedresolve_node(resolved_type).resolvedyields the Conj struct andfind_unique_struct_name_by_fieldsrecovers the canonical NAME, fail-closed to
tnon every degenerate path (Absent / non-Conj /ambiguous → loud E0560). §3-clean: zero new peel authorities;
04_infer.daguntouched. Provenby the full-corpus regen-terminates receipt (not just unit witnesses — see note). Witnesses:
alias_ctor_resolves_to_canonical_struct_with_phantom_and_rc,direct_struct_ctor_names_struct_not_first_field(over-peel control),ambiguous_field_set_alias_ctor_fails_closed_to_alias_not_a_guessed_struct(site-level §5fail-closed).
BoundedLatticedata-def ctor. The hardcodedconstruction in
emit_data_def_bodynow appends_phantom: std::marker::PhantomDatavia thesame
struct_unused_param_namesauthority the struct DEF uses — guaranteed consistent (thebug was a §3 fork between two phantom decisions).
.length()routes BY RECEIVER through theexisting method→realization dispatch via a receiver-keyed name rewrite — collection →
count(the.len() as i64template), String →v1_rt::string_length(the registry row,pass-by-ref) — the same FreeMonoid cardinality hom over two carriers. No new dispatcher
authority (rows reused; grep-verifiable). Witnesses
collection_length_routes_to_count,string_length_routes_to_string_length.Deferred — load-bearing (NOT papered; flagged to the operator)
These are deeper than mechanical and touch load-bearing subsystems; per
model-before-implement / §5 discipline they are not forced into an emitter patch to chase
cargo-green. They remain in the measured count:
Cloneneed. The emitter has a deliberateno-synthesized-Clone-bounds invariant (
generic_fn_emits_type_params_without_synthesized_bounds,generic_fn_sig_preserves_applied_type_args): a generic fn sig emits<T>, never<T: Clone>.Two fns trip a genuine
Clonerequirement —list_length<T>lowersfoldto.iter().cloned()(the
.cloned()is spurious: the closure ignores the element, so the correct fix iscloned-elision — emit
.iter()by-ref when the fold closure drops the element, removing theCloneneed entirely), andmeasure_count<…,M>returnsm.countout of anRc-shared struct(
.clone()on a type-param field — needs Rc-field-access handling, not a bound). A blanket<T: Clone>synthesizer was tried and reverted: it violated the no-synthesized-boundsinvariant above. The right fixes (fold-cloned-elision; Rc-field move/clone discrimination) are
emitter constructions deeper than a one-line bound and are deferred rather than papered with a
bound the design forbids.
List<List<T>>emits a bareRc<List>(inner type-arg dropped). Root causeis in the parse/infer type-arg representation — the inner applied-alias node carries neither
.childrennor the__applied_type_argsproperty (which is vestigial / never set insrc/v1).Not an emitter fix; needs the type-representation layer.
SemVerConstraint×3 (extdeps_cargo.rs).data min_cargo_version: CargoToolVersionFloor(awhere brand(...)alias) peels the brand to its baseSemVerConstraintfor the emitted return type, but onlyCargoToolVersionFlooris imported →the peeled name is unimported. An import-graph / brand-peel consistency issue (a type
renderer introduces a name the authored-import set doesn't carry).
Review note —
rust_call_arg_fail_closed_unwrap.expect(dissolve-on receipt)claude-opus-4-7's review flags
05_emit_rust.dag:5094(rust_call_arg_fail_closed_unwrap): anemitted
.expect("fail-closed: an optional value flowed into non-optional parameter …")when anOptionalarg flows into a required parameter. Per §5 this is validation standing whereconstruction was available — the inferrer should refuse the cardinality mismatch at the type
layer, making the runtime panic unwritable. It ships as an emitted-seed backstop (fail-closed,
loud, located), accepted as non-blocking by the review. Because
.dagcarries no inline comments(deliberate parse wall), the receipt lives here:
Held (does not ride — operator measure-grounding thread)
E0573 (Time) ×2 + E0091 ×2 — the phantom seam (measure-Q grounding, HELD).
Deferred follow-ups (roadmap, not this PR — purity-trap guard)
peel_alias_once_for_field_accesssodivergence is unwritable at the primitive (its safety currently lives only in
expand_alias_chain's seen-map — a latent trap for the next direct caller).peel_alias_once'sOUTPUT so the emitter READS it instead of re-deriving it from the field set (the E0560 recovery
is §4-grounded + §5 fail-closed, so it ships; the construction-over-recovery root is separable).
lengthnickname(
algebra.dag) + foldString.lengthinto the one FreeMonoid-cardinality authority (canonicalsurface name
count) — model-first, sequenced after the FreeMonoid grounding is stable, off thecargo-green path.
.iter()by-reffor element-dropping folds; discriminate move-vs-clone on type-param fields read out of an
Rc.Measured result (honest, by execution — no prediction)
Full-corpus
--emit-freshregen terminates; full-cargo build of the assembled crate on themerged-with-
origin/maintree leaves 11 errors, every one in the HELD/DEFERREDcategories — zero from a mechanical family that could be grounded cleanly:
List— parse/infer type-arg repr)list_lengthspurious.cloned()— fold-cloned-elision)SemVerConstraint— import-graph/brand-peel)measure_countRc-field.clone()+list_lengthCloned-not-iterator)Reconciliation vs the earlier 8-error snapshot: that snapshot carried a blanket
<T: Clone>synthesizer which cleared E0277×1 + E0599×1 but violated the emitter's no-synthesized-bounds
invariant (two existing
generic_fn_*tests). It was reverted, so the genuine Clone needre-surfaces honestly here (E0277×1 + E0599×2) and is reclassified to DEFERRED — papering it with a
forbidden bound is not a real green.
Test plan
cargo test -p v1-compiler-tests --lib measure_— 15 measure witnesses green by execution(incl. the 2 length-routing periphery witnesses), on the tree merged with current
origin/main.cargo test -p v1-compiler-tests --lib generic_fn— the no-synthesized-Clone-bounds invarianttests green (the reverted blanket-Clone would have failed these).
cargo fmt --all --check+cargo clippy --all-targets -D warnings— clean.--emit-freshregen terminates + the full-cargo measurement above.