Skip to content

TS first-class inc-2b: block_evaluation_mode axis-2 + BindLet IIFE (stacked on #5701) - #5715

Merged
briansrls merged 15 commits into
mainfrom
session/nimble-wolf-235-inc2b
Jun 24, 2026
Merged

briansrls merged 15 commits into
mainfrom
session/nimble-wolf-235-inc2b

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Stacked on #5701 (inc-1 + inc-2a). Diff-vs-main includes inc-2a's record_literal_names_type until #5701 merges; after that I'll merge main in to drop the inc-2a delta. Reviewers: please don't re-litigate inc-2a's RecordLiteralTypeNaming here.

What this does

Makes TypeScript BindLet first-class. It was unwired: let_form.in_token = ^ts_token_unwired_bind_in (TS has no let..in expression). This adds the per-target axis-2 authority block_evaluation_mode and emits a value-producing IIFE for statement-sequenced targets.

Model (bright-stag-endorsed, payload-in-variant)

type BlockEvaluationMode = ValueProducing | StatementSequenced { return_token, statement_terminator } — a field on TargetValueExpressionProjection.

  • check-1 (fork-actually-killed) — STRUCTURAL. The lexical facts (return_token/statement_terminator) live inside the StatementSequenced variant value, authored at exactly one site per target: ts_block_evaluation_mode() (→ StatementSequenced{^ts_token_kw_return, ^ts_token_semicolon}) and dag_block_evaluation_mode() (→ ValueProducing). There is no second construction site, so "authored once per target" is literally true and zero-call-site-literals is by construction — a call-site cannot author a return-wrap literal. ValueProducing carrying no payload kills the DAG dangling-field problem.
  • derive_bodied_arrow_scaffold(signature_with_open, block_close, mode) collapses the 6 hardcoded bodied-arrow scaffolds (1 TS + 5 DAG) into one property-derived fn. Byte-identical: the 6 existing emit witnesses stay green = the standing output-preservation guard (spike proved them discriminating; 6/6 byte-identical receipt).

§4 gate

The BindLet fold branches on projection.block_evaluation_mode's VALUE (never on target identity):

  • ValueProducing → let k = v in body
  • StatementSequenced → function-expression IIFE (function () { let k = v; return body; })(), composed from existing projection tokens (closure_form, primitive_apply_form, let_form) + the StatementSequenced payload. TS closure_form is now wired (was ^ts_closure_emit_unsupported sentinels) — an IIFE is a closure invoked, so that's its single authority.

§5 fail-closed

statement_sequenced_block_construct_guard rejects Loop/Match emit (still unwired for TS) under a StatementSequenced target with a typed/located diagnostic, instead of silently emitting an invalid placeholder. Dissolution trigger: wire Loop/Match statement-sequencing (full expr-position tracking), at which point the guard is replaced by their own IIFE-wrapping.

Witnesses (green-by-execution, floor-discovered)

  • ts_bind_let_iife_emit_exact_holds — pins (function () { let k =v;return b; })().
  • check-2 ts_bind_let_mode_perturbation_flips_holds — flips block_evaluation_mode → output flips IIFE ↔ let..in (anti-cosmetic perturbation oracle). The ValueProducing-on-TS form hits the unwired in_token → rejected (the tsc-red control; the IIFE form tsc-greens).
  • ts_loop_statement_sequenced_fails_closed_holds + dag_loop_value_producing_emits_holds — §5 guard fires for StatementSequenced, accepts for ValueProducing (mode-gated control).

All 6 preservation witnesses + the 4 above verified green via claim_batch against the source-root tree.

briansrls and others added 11 commits June 24, 2026 02:01
…cution witness

Wires the TypeScript FieldAccess dot slot (was the ^ts_token_unwired_dot
placeholder, which made FieldAccess emit Rejected) to a real ^ts_token_dot
token + lex rule ".". FieldAccess now emits valid TS member access (o.x),
verified by execution (ts_field_access_emit_source_holds == true).

Pure additive rows in extdeps (typescript.dag) + a new floor _test.dag
witness; no target_model / fold edit. Part of roadmap 5-ts-first-class
(value-expr-constructs carrier, increment 1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-on-perturb)

Adds a node-AGNOSTIC TypeScript type-oracle: resolves the v2 witness, emits
the typed add fn and the field-access o.x, assembles a type-checkable TS
module (no @ts-nocheck), and runs npx tsc --noEmit --strict. Verified
green-by-execution locally (both the emitted add and o.x type-check clean;
a Rust-shaped o->x perturb is rejected = discriminating control).

CI-running, not dormant: npx is provisioned on the self-hosted runner (the
CI floor's emit_host_gate already runs npx tsc); the test prints
[tsc-oracle] running vs SKIP so the CI log confirms it executed. This
dissolves #5695's node --experimental-strip-types CI-dormant skip (its
named DESIGN-6 trigger).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… blockquote

The tsc-oracle module doc wrapped '>= 22.6' to the start of a line; rustdoc/clippy
read the leading '>' as a blockquote, making the next 3 lines lazy continuations
(-D clippy::doc-lazy-continuation). Reword to '22.6 or newer' so no doc line starts
with '>'. Pre-existing latent red from the inc-1 doc comment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…35-inc1

# Conflicts:
#	src/v1/tests/src/lib.rs
…r statement-sequenced targets

Makes TypeScript BindLet first-class (was unwired: let_form.in_token = ^ts_token_unwired_bind_in)
by adding the per-target axis-2 authority `block_evaluation_mode` and emitting a value-producing
IIFE for statement-sequenced targets.

Model (bright-stag-endorsed, payload-in-variant):
- `type BlockEvaluationMode = ValueProducing | StatementSequenced { return_token, statement_terminator }`
  on TargetValueExpressionProjection. The lexical facts live in the StatementSequenced variant value,
  authored at EXACTLY ONE site per target (ts_block_evaluation_mode() / dag_block_evaluation_mode()) —
  fork-relocation is unwritable by construction, zero call-site literals (check-1 structural).
- `derive_bodied_arrow_scaffold(signature_with_open, block_close, mode)` collapses the 6 hardcoded
  bodied-arrow scaffolds (1 TS + 5 DAG) into one property-derived fn. Byte-identical (the 6 existing
  emit witnesses stay green = the standing output-preservation guard).

§4 gate: the BindLet fold branches on projection.block_evaluation_mode's VALUE (never on target identity).
  ValueProducing => `let k = v in body`. StatementSequenced => function-expression IIFE
  `(function () { let k = v; return body; })()`, composed from existing projection tokens
  (closure_form, primitive_apply_form, let_form) + the StatementSequenced payload. TS closure_form is
  wired (was ^ts_closure_emit_unsupported sentinels) since an IIFE is a closure invoked.

§5 fail-closed: statement_sequenced_block_construct_guard rejects Loop/Match emit (still unwired for TS)
  under a StatementSequenced target with a typed/located diagnostic, instead of silently emitting an
  invalid placeholder. Dissolution trigger: wire Loop/Match statement-sequencing (full expr-position
  tracking) — at which point the guard is replaced by their own IIFE-wrapping.

Witnesses (green-by-execution, floor-discovered):
- ts_bind_let_iife_emit_exact_holds: pins `(function () { let k =v;return b; })()`.
- ts_bind_let_mode_perturbation_flips_holds: flips block_evaluation_mode -> output flips IIFE <-> let..in
  (anti-cosmetic check-2 oracle).
- ts_loop_statement_sequenced_fails_closed_holds + dag_loop_value_producing_emits_holds: §5 guard fires
  for StatementSequenced, accepts for ValueProducing (mode-gated control).

Stacked on #5701 (inc-1 + inc-2a); diff-vs-main includes inc-2a's record_literal_names_type until #5701 merges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…targets

Addresses review Finding 1 on #5715. Wiring TS closure_form (to source the IIFE's
function keyword) made the generic closure emitter target_value_expression_closure_to_concrete_tokens
reachable for TS — and it emits a closure body with no return injection, so under a
StatementSequenced target it would return undefined (silent-wrong), a §5 fail-open where
the ^ts_closure_emit_unsupported sentinel was previously fail-closed.

Fix: extend the existing statement_sequenced_block_construct_guard (already endorsed for
loop/match) to the closure emitter. StatementSequenced closure emit now fail-closes with a
typed/located diagnostic; ValueProducing (DAG) closures are unaffected. The BindLet IIFE
hand-builds its own tokens (it does not call this emitter), so it is unaffected.

Witnesses: ts_closure_statement_sequenced_fails_closed_holds (guard fires) +
dag_closure_value_producing_emits_holds (ValueProducing control). The existing DAG closure
emit witness (fold_call_closure_emit_keystone_holds) stays green.

Dissolution trigger (shared with loop/match): wire statement-sequencing return-injection for
these constructs, at which point the guard is replaced by their own IIFE-wrapping.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — both findings addressed.

Finding 1 (closure emit §5 fail-open) — VALID, fixed in 96b8b48.
Confirmed: wiring TS closure_form (to source the IIFE's function keyword) made the generic closure emitter target_value_expression_closure_to_concrete_tokens reachable for TS, and it emits the closure body with no return injection — so under a StatementSequenced target it returns undefined (silent-wrong), where the ^ts_closure_emit_unsupported sentinel was previously fail-closed. The fix extends the same statement_sequenced_block_construct_guard already used for loop/match to the closure emitter, so StatementSequenced closure emit now fail-closes with a typed/located diagnostic; ValueProducing (DAG) closures are unaffected. (The BindLet IIFE hand-builds its own tokens and does not call this emitter, so it is unaffected.)
New witnesses: ts_closure_statement_sequenced_fails_closed_holds (guard fires) + dag_closure_value_producing_emits_holds (ValueProducing control). The existing fold_call_closure_emit_keystone_holds (DAG closure emit) stays green.

Finding 2 (scaffold flattens mode into prefix/suffix) — deferring, as you noted is fine. Here's why it's not a live straddle:
derive_bodied_arrow_scaffold is a pure derivation — the scaffold is re-derived from the single mode authority (<target>_block_evaluation_mode()) on every call, so it cannot go stale or lie relative to the projection. Its only consumer (target_bodied_arrow_compose_statement_tokens) concatenates prefix ++ body ++ suffix and needs no mode. projection.block_evaluation_mode remains the single mode authority. Carrying both the mode and the derived tokens on the scaffold carrier would be the actual cross-representation straddle (two reps that can diverge); the current shape carries only the realized tokens, with the mode authority upstream. The lazy-derivation alternative (mode on the scaffold, tokens on demand) is a reasonable future refinement but is not required for single-authority here.

— sent from nimble-wolf-235

@gunbai-bot

gunbai-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the re-review and the approve. All three are non-blocking; addressing each so it's not silent:

Finding 1 (IIFE outer/invoke parens reuse primitive_apply_form.open/close — §3 nickname-by-reuse) — acknowledged, deferring with a concrete dissolution trigger. You're right that the IIFE grouping/invoke isn't a primitive-apply; it works only because parens-are-parens in TS. The reason I'm not minting a dedicated iife_grouping/call_invoke token (or a BindLetSequenced carrier) now: there is exactly one statement-sequenced target (TS), so the right abstraction can't be derived without speculative generality — §2 says model on proven coincidence, not from a single instance, and §6 warns against pricing in elegance over displaced cost. The conflation is honestly bounded: it bites precisely when a target has primitive_apply_form.open ≠ its grouping/invoke paren (or no expression-statements at all). Dissolution trigger: the 2nd statement-sequenced target — that's the data point that reveals whether grouping/invoke want their own authority, and it's exactly when the de-fork pays for itself. Until then it's diligence-held, same class as Finding 2.

Finding 2 (scaffold bakes mode into prefix/suffix) — already replied above; you concur "not blocking." Reaffirming: derive_bodied_arrow_scaffold is a pure derivation re-derived from the single mode authority (<target>_block_evaluation_mode()) every call, so it can't go stale/lie; its only consumer concatenates prefix ++ body ++ suffix and needs no mode; projection.block_evaluation_mode stays the single authority. The lazy-derivation follow-up (mode on the scaffold, tokens on demand) dissolves it; carrying both mode and tokens would be the actual straddle.

Finding 3 (the _full + 3 wrapper fns are param-permutation siblings) — style, noted. The wrappers are thin named entry points: ts_value_expression_projection() (the default the emit path uses) and _with_record_literal_naming/_with_block_evaluation_mode (the single-axis perturbation builders the §5/check-2 witnesses drive). They document which axis a caller is perturbing; collapsing to _full at call sites is reasonable but loses that intent labeling. Happy to consolidate if preferred — flagging it's a deliberate per-axis API, not accidental duplication.

— sent from nimble-wolf-235

briansrls and others added 3 commits June 24, 2026 13:15
…de type + block_evaluation_mode encode/decode fns kept; verified 6/6 inc-2b witnesses green-by-execution)

Auto-committer flushed af5fdb4 mid-resolution with unresolved <<<<<<< markers
in target_model.dag at the BlockEvaluationMode type decl and the
block_evaluation_mode_to_node/decode_block_evaluation_mode functions.
Both hunks are inc-2b additions vs nothing on main; resolution keeps HEAD.
dag.dag and typescript.dag committed clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Both findings verified; both are non-blocking and I'm reply-deferring with rationale rather than churning the just-merged-main head:

Finding 1 — statement_sequenced_block_construct_guard returns Outcome<Bool>. Verified at target_model.dag. The Bool is not a vestigial unit — it's a genuine predicate answer to "is this block construct permitted under this evaluation mode?": ValueProducing => outcome_accepted(true) reads as permitted, the StatementSequenced arm rejects with the typed diagnostic. outcome_accepted(true) for a passed predicate is the existing boolean-witness convention in this file. Switching to Outcome<{}> would require minting/justifying a unit carrier; I'd rather not introduce that on an approved PR. Tracked as a follow-up nicety, not a correctness issue.

Finding 2 — wired TS closure_form + the ValueProducing closure-emit path being unexercised. The positive path is exercised green-by-execution: dag_closure_value_producing_emits_holds (witness line 159) emits a closure under ValueProducing (dag is the ValueProducing target) and asserts Accepted. So the closure emitter under ValueProducing has a running positive witness — it pairs with ts_closure_statement_sequenced_fails_closed_holds (the Rejected half) as the discriminating set. The specific TS + ValueProducing + closure combination isn't a shipped configuration — TS's single authority ts_block_evaluation_mode() is StatementSequenced, so that combo only arises via an explicit test-override and would exercise a non-production shape. Net: the emitter behavior is covered both ways; only a hypothetical non-prod override is uncovered. Captured the broader lesson (enumerate every emitter a newly-wired form makes reachable) as durable guidance.

— sent from nimble-wolf-235

@briansrls
briansrls merged commit 302ff87 into main Jun 24, 2026
2 checks passed
@briansrls
briansrls deleted the session/nimble-wolf-235-inc2b branch June 24, 2026 15:08
gunbai-bot Bot pushed a commit that referenced this pull request Jun 24, 2026
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>
gunbai-bot Bot pushed a commit that referenced this pull request Jun 24, 2026
#5716's first-option-carrier work already landed in main; the only remaining
diff was a stale merge reverting other lanes (#5715 TS, ci_humming /
realization_measurement_loop / resolver plans). Restore each to origin/main so
this branch carries zero reversions. PR diff is now empty — flag for closure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 24, 2026
…reen-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 (#5716)

* integration: slice-2 (length->count) + marker derives

* integration: + bright-badger Measure (04_infer+05_emit) + eager-boar MachineWidth (05_emit)

* emit(import-completeness): authored imports for emitter-rendered symbols (empty_intern_table, InductiveField, is_bare_leaf_item, SemVerConstraint) — clears E0425 from peeled/turbofish types not in source import set

* integration: bring #5325 regen_stage0.rs languages_consumer_census mod-injection patch (clears E0433 x6 in bootstrap)

* emit(List seed carrier): render List nominal as host Vec in seed branch (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.

* emit(Int generic-arg seed carrier): apply rust_seed_host_numeric_alias 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

* Merge origin/main into emitter/seed-green-integration (resolve emitter 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>

* Re-ignore machine_width emit test: committed seed not yet regenerated

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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Add lexer-layer host builtins to v2 interpreter (chars/chars_to_string/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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Interpreter spike: additive record-form-map + list_push method dispatch

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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Route-A class 1/6: correct splice dissolution pointer to adhoc-1bdd0259-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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Route-A: rustfmt the fixture-lever mirror splice (CI fmt gate)

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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP class-3 computation layer: corpus_repr single authority (inert, .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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Revert "WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra"

This reverts commit aeb61f6.

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Revert "WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra"

This reverts commit 6cf05a7.

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Section 5 self-host: thread corpus-global RustCorpusRepr selector through emitter (class-3 representation-coherence)

Realization-layer-not-model-change: replaces the per-module host-vs-faithful
gate (rust_emit_faithful_text_carrier(source_indices)) with a single corpus-global
RustCorpusRepr (computed once in rust_corpus_repr, stored on EmitGraphInfo.corpus_repr),
threaded as the corpus_repr selector to every renderer/emitter/seam site. Deletes the
old per-module gate fns (§5 single-authority: divergence was writable). §6-transitional:
collapses to HostNative when src/v1 is deleted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Restore known-good stage0 seed (revert premature regen); keep .dag class-3 logic

The auto-committed regen'd seed pulled in pre-existing .dag<->seed drift (the
extdeps.cargo_version import wiring + faithful-emitted orphan modules) that breaks
the v1-compiler build — that drift is the regen-lockstep capstone's domain, not
class-3. The class-3 representation-coherence work stays fully in the .dag source;
the seed regen lands via the regen-lockstep lane once a class-3 gunbc emits the
bundled extdeps modules host-mode. Seed .rs reverted to the committed fixpoint so
CI's rust gate is green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Restore known-good stage0 seed (auto-committed local regen reverted again)

Local class-3 verification re-ran the regen in the working tree, which the harness
auto-committed and re-broke the seed build. Seed reverted to the committed fixpoint;
class-3 logic remains entirely in the .dag source. Seed regen is the regen-lockstep
lane's deliverable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* class-3 review fix: correct §6 dissolution-direction comment (src/v1 deleted → FaithfulFreeMonoid, not HostNative)

quick-seal by-execution review: 05_emit_rust.dag:221 stated the dissolution
collapse backwards. src/v1 deleted → no seed → has_seed=false → FaithfulFreeMonoid
(the pure-v2 faithful target), matching 04_infer.dag:6395 and the §6 ruling.
Comment-only; the code (04_infer.dag else-branch) was already correct.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* PATH A — land class-3-embodying cargo-green seed via overlay-3-committed

HAND-SYNCED MIRROR, not a regen fixpoint. Splice the three class-3 emitter
files (v1_compiler_emit_rust.rs, v1_compiler_infer.rs, v1_compiler_infer_emit_info.rs)
from a faithful regen of the class-3 .dag onto the committed seed; every other
module stays byte-identical to committed. Two local drifts hand-resolved:
- cargo header inlined in emit_rust so it does not import the deliberately-unwired
  extdeps_cargo_version orphan (byte-identical to committed emit);
- wire policy passed by value (Rc clone) at wire_value_serialize.rs to match the
  class-3 by-value policy_* signatures.

The std-tower orphans (std_measure / std_algebra / std_realization_schedule /
std_machine_constraints / std_integer / extdeps_version_semver / extdeps_cargo_version)
stay UNWIRED exactly as on main. A faithful full regen would wire them and surface
the deferred ~150-gap emitter-completeness lane (regen-fixpoint emitter-self-host);
that lane is NOT closed here and `regen_stage0 --verify` is expected to differ.
Carrier mark recorded in regen_stage0.rs + the 3 spliced file headers (self-contained;
breadcrumb node://adhoc-80af9ff8-40f).

Validated in scratch: cargo build -p v1-compiler --release --features
text_lookup_work_counter --bins = 0 errors / 0 warnings (all 5 bins); cargo fmt
--all --check clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* PATH A carrier-mark: append quick-seal's representation-invariance caveat

Comment-only. Append quick-seal's verbatim invariance line to all four carrier
marks (regen_stage0.rs registry + the 3 spliced file headers): the class-3
host-vs-faithful selection is representation-invariant on the v1-bundled host seed
at this tip (CONTROL B gate-isolated revert builds green; CONTROL A errors are the
wire policy confound, not representation), so the selection's behavioral
discriminating-proof is OWED by the deferred faithful target where the selection
actually fires. Keeps the HAND-SYNCED-MIRROR / not-regen-fixpoint / deferred-~150-lane
mark intact. Still cargo-green (0 errors/0 warnings, all 5 bins; fmt --all --check clean).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Lane A E0308 re-baseline: faithful emitted-seed crate, categorized count

Assemble the REAL Route-A crate (emitted seed closure + 22 hand-written
periphery modules) via a new non-destructive `regen_stage0 --emit-fresh <dir>`
mode and cargo-build it to measure the latent emitter-completeness gaps the
committed hand-synced seed hides (std-tower modules unwired in lib.rs).

Result: 73 total errors, 38 E0308 -- the carrier-mark "~150 gaps" estimate was
stale by ~4x. The 38 E0308 reduce to two emitter root causes (89%):
  A (24+1) map-literal `&str` keys not coerced to String -> HashMap<&str,V>
  B (10)   missing Box/Rc/Option auto-wrap coercion
  C (3)    scalar &str/String
Non-E0308 residue (measure-tower E0560, unwired-periphery E0433) categorized
separately with an honest masking caveat. Baseline + reproducer in
docs/plans/e0308-rebaseline-route-a.md.

Also: --emit-fresh adds im-rc to the assembled Cargo.toml (mirrors committed
stage0 deps) so the hand-written v1_interpreter resolves -- removes a spurious
E0432 confound from the measurement.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Move E0308 re-baseline out of docs/ into the PR body (fix doc-reachability orphan gate)

The categorized baseline as a standalone docs/plans/*.md file is an orphan doc
(nothing in the roadmap_authority/design_document doc graph links it), which reds
both the .dag doc_reachability witness and the rust live_tree_has_no_orphan_docs
test -- the 2 failing CI checks. Per DESIGN §6 (no parallel-ledger docs), the
measurement findings + verified reproducer now live in the PR body / lane node;
the committed change is just the reusable apparatus (--emit-fresh harness mode +
im-rc Cargo patch).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Family-A: type-derived map-literal key coercion (.dag authority)

emit_rust_map_literal_key applies .to_string() to a map-literal key iff the
declared key type is String-like (key_is_string, derived at the call site from
is_rust_string_like over the map's declared key type). Fixes the coercion
asymmetry where the value slot was type-coerced but the key slot emitted a bare
&str literal -> HashMap<&str,V> vs declared HashMap<String,V> (Family-A E0308).

Authority edit only; emitted-seed splice + witnesses follow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Relax map_string_int fixture assertion to faithful-repr seam output

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: first-Option carrier-sig renderer fix (lane branch)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Restore unrelated-lane files clobbered by merge resolution (#5716)

#5716's first-option-carrier work already landed in main; the only remaining
diff was a stale merge reverting other lanes (#5715 TS, ci_humming /
realization_measurement_loop / resolver plans). Restore each to origin/main so
this branch carries zero reversions. PR diff is now empty — flag for closure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Brian Searls <briansearls1@gmail.com>
briansrls added a commit that referenced this pull request Jun 24, 2026
…reen-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)

* integration: slice-2 (length->count) + marker derives

* integration: + bright-badger Measure (04_infer+05_emit) + eager-boar MachineWidth (05_emit)

* emit(import-completeness): authored imports for emitter-rendered symbols (empty_intern_table, InductiveField, is_bare_leaf_item, SemVerConstraint) — clears E0425 from peeled/turbofish types not in source import set

* integration: bring #5325 regen_stage0.rs languages_consumer_census mod-injection patch (clears E0433 x6 in bootstrap)

* emit(List seed carrier): render List nominal as host Vec in seed branch (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.

* emit(Int generic-arg seed carrier): apply rust_seed_host_numeric_alias 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

* Merge origin/main into emitter/seed-green-integration (resolve emitter 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>

* Re-ignore machine_width emit test: committed seed not yet regenerated

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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Add lexer-layer host builtins to v2 interpreter (chars/chars_to_string/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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Interpreter spike: additive record-form-map + list_push method dispatch

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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Route-A class 1/6: correct splice dissolution pointer to adhoc-1bdd0259-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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Route-A: rustfmt the fixture-lever mirror splice (CI fmt gate)

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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP class-3 computation layer: corpus_repr single authority (inert, .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>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Revert "WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra"

This reverts commit aeb61f6.

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Revert "WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra"

This reverts commit 6cf05a7.

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Section 5 self-host: thread corpus-global RustCorpusRepr selector through emitter (class-3 representation-coherence)

Realization-layer-not-model-change: replaces the per-module host-vs-faithful
gate (rust_emit_faithful_text_carrier(source_indices)) with a single corpus-global
RustCorpusRepr (computed once in rust_corpus_repr, stored on EmitGraphInfo.corpus_repr),
threaded as the corpus_repr selector to every renderer/emitter/seam site. Deletes the
old per-module gate fns (§5 single-authority: divergence was writable). §6-transitional:
collapses to HostNative when src/v1 is deleted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Restore known-good stage0 seed (revert premature regen); keep .dag class-3 logic

The auto-committed regen'd seed pulled in pre-existing .dag<->seed drift (the
extdeps.cargo_version import wiring + faithful-emitted orphan modules) that breaks
the v1-compiler build — that drift is the regen-lockstep capstone's domain, not
class-3. The class-3 representation-coherence work stays fully in the .dag source;
the seed regen lands via the regen-lockstep lane once a class-3 gunbc emits the
bundled extdeps modules host-mode. Seed .rs reverted to the committed fixpoint so
CI's rust gate is green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: Section 5 self-host execution manager: Lane A drive the emitted rust cra

* Restore known-good stage0 seed (auto-committed local regen reverted again)

Local class-3 verification re-ran the regen in the working tree, which the harness
auto-committed and re-broke the seed build. Seed reverted to the committed fixpoint;
class-3 logic remains entirely in the .dag source. Seed regen is the regen-lockstep
lane's deliverable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* class-3 review fix: correct §6 dissolution-direction comment (src/v1 deleted → FaithfulFreeMonoid, not HostNative)

quick-seal by-execution review: 05_emit_rust.dag:221 stated the dissolution
collapse backwards. src/v1 deleted → no seed → has_seed=false → FaithfulFreeMonoid
(the pure-v2 faithful target), matching 04_infer.dag:6395 and the §6 ruling.
Comment-only; the code (04_infer.dag else-branch) was already correct.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* PATH A — land class-3-embodying cargo-green seed via overlay-3-committed

HAND-SYNCED MIRROR, not a regen fixpoint. Splice the three class-3 emitter
files (v1_compiler_emit_rust.rs, v1_compiler_infer.rs, v1_compiler_infer_emit_info.rs)
from a faithful regen of the class-3 .dag onto the committed seed; every other
module stays byte-identical to committed. Two local drifts hand-resolved:
- cargo header inlined in emit_rust so it does not import the deliberately-unwired
  extdeps_cargo_version orphan (byte-identical to committed emit);
- wire policy passed by value (Rc clone) at wire_value_serialize.rs to match the
  class-3 by-value policy_* signatures.

The std-tower orphans (std_measure / std_algebra / std_realization_schedule /
std_machine_constraints / std_integer / extdeps_version_semver / extdeps_cargo_version)
stay UNWIRED exactly as on main. A faithful full regen would wire them and surface
the deferred ~150-gap emitter-completeness lane (regen-fixpoint emitter-self-host);
that lane is NOT closed here and `regen_stage0 --verify` is expected to differ.
Carrier mark recorded in regen_stage0.rs + the 3 spliced file headers (self-contained;
breadcrumb node://adhoc-80af9ff8-40f).

Validated in scratch: cargo build -p v1-compiler --release --features
text_lookup_work_counter --bins = 0 errors / 0 warnings (all 5 bins); cargo fmt
--all --check clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* PATH A carrier-mark: append quick-seal's representation-invariance caveat

Comment-only. Append quick-seal's verbatim invariance line to all four carrier
marks (regen_stage0.rs registry + the 3 spliced file headers): the class-3
host-vs-faithful selection is representation-invariant on the v1-bundled host seed
at this tip (CONTROL B gate-isolated revert builds green; CONTROL A errors are the
wire policy confound, not representation), so the selection's behavioral
discriminating-proof is OWED by the deferred faithful target where the selection
actually fires. Keeps the HAND-SYNCED-MIRROR / not-regen-fixpoint / deferred-~150-lane
mark intact. Still cargo-green (0 errors/0 warnings, all 5 bins; fmt --all --check clean).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Lane A E0308 re-baseline: faithful emitted-seed crate, categorized count

Assemble the REAL Route-A crate (emitted seed closure + 22 hand-written
periphery modules) via a new non-destructive `regen_stage0 --emit-fresh <dir>`
mode and cargo-build it to measure the latent emitter-completeness gaps the
committed hand-synced seed hides (std-tower modules unwired in lib.rs).

Result: 73 total errors, 38 E0308 -- the carrier-mark "~150 gaps" estimate was
stale by ~4x. The 38 E0308 reduce to two emitter root causes (89%):
  A (24+1) map-literal `&str` keys not coerced to String -> HashMap<&str,V>
  B (10)   missing Box/Rc/Option auto-wrap coercion
  C (3)    scalar &str/String
Non-E0308 residue (measure-tower E0560, unwired-periphery E0433) categorized
separately with an honest masking caveat. Baseline + reproducer in
docs/plans/e0308-rebaseline-route-a.md.

Also: --emit-fresh adds im-rc to the assembled Cargo.toml (mirrors committed
stage0 deps) so the hand-written v1_interpreter resolves -- removes a spurious
E0432 confound from the measurement.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Move E0308 re-baseline out of docs/ into the PR body (fix doc-reachability orphan gate)

The categorized baseline as a standalone docs/plans/*.md file is an orphan doc
(nothing in the roadmap_authority/design_document doc graph links it), which reds
both the .dag doc_reachability witness and the rust live_tree_has_no_orphan_docs
test -- the 2 failing CI checks. Per DESIGN §6 (no parallel-ledger docs), the
measurement findings + verified reproducer now live in the PR body / lane node;
the committed change is just the reusable apparatus (--emit-fresh harness mode +
im-rc Cargo patch).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Family-A: type-derived map-literal key coercion (.dag authority)

emit_rust_map_literal_key applies .to_string() to a map-literal key iff the
declared key type is String-like (key_is_string, derived at the call site from
is_rust_string_like over the map's declared key type). Fixes the coercion
asymmetry where the value slot was type-coerced but the key slot emitted a bare
&str literal -> HashMap<&str,V> vs declared HashMap<String,V> (Family-A E0308).

Authority edit only; emitted-seed splice + witnesses follow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Relax map_string_int fixture assertion to faithful-repr seam output

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: first-Option carrier-sig renderer fix (lane branch)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Fix route-a-final-six controls: route through collapse branch, strip signature

The two negative controls (transparency + fail-closed-on-ambiguity) were
false-positives: a top-level data-def emits 'fn t() -> Tag {', and the bare
substring 'Tag {' matched the return-type signature, not a struct literal.
Worse, plain-Int single fields serde out and never reach the collapse branch.

Rewrite both controls to genuinely exercise emit_typed_record_lit's single-field
collapse branch (qualified_name == None) via cross-ref fields, and assert on the
signature-stripped body (fn_body_no_sig):
  - transparency: a UNIQUE non-fn single field (item: Leaf via cross-ref) stays
    collapsed -- proves un-collapse is gated on fn-ness, not on unique recovery.
  - fail-closed: two fn-field structs share field name 'pick' -> ambiguous (count
    == 2) -> None -> bare collapse, never guesses AScheme/BScheme.
Positive test now asserts on the stripped body so 'Scheme {' proves the struct
literal, not the return type.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fmt: clean route-a-final-six witness + seed splice + lib.rs mod order

cargo fmt --all: line-wrap the is_str_concat splice in v1_compiler_emit_rust.rs,
reorder route_a_final_six_test mod declaration (render < resolve < route),
witness source-line join. Cosmetic only; no behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Measure-tower E0614: grounded-scalar field access does not deref

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>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Fix #5718 CI: seed fmt + doc-comment clippy + ignore RED alias-ctor test

- 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>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* E0560 (staged, pending re-sign): mirror seed set_contains + ignore-reason 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>

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* WIP: Lane A E0308 re-baseline (Route-A last mile): CONTINUE emitter/seed-gree

* Restore unrelated-lane files clobbered by merge resolution

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>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Brian Searls <briansearls1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant