Skip to content

record_emit: format-opaque record serialization via ConfigFormat - #6045

Merged
briansrls merged 10 commits into
mainfrom
session/still-wolf-292
Jul 1, 2026
Merged

briansrls merged 10 commits into
mainfrom
session/still-wolf-292

Conversation

@briansrls

@briansrls briansrls commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Collapses 3 forked knob models (OutputFormat, FormatModel, RecordSyntax) into the SerializationKnobs residue after decomposing OutputFormat by re-homing each field: name → ConfigFormat.name, comment_prefix → CommentSyntax.line_prefix, indent_unit → LayoutProtocol.indent_unit. Adds serialize_record → Doc (recursive: ScalarValue | RecordValue) in a new std.serialize module. Migrates the runner manifest byte-identically to the new API. Proves format-opacity on the real projection via a JSON swap on the same manifest_host_fields.

Changes

std/languages.dag

  • Deleted dead FormatModel (uninhabited, zero data instances, zero refs)
  • Replaced RecordSyntax with SerializationKnobs { assign, entry_separator, open, close, quote_keys, value_quote }
  • Added SerialField { key, value: SerialValue } and SerialValue = ScalarValue | RecordValue (mutual recursion — same pattern as YamlKeyValue ↔ YamlValue)
  • ConfigFormat.record: SerializationKnobs? — all 5 format rows updated
  • Added json_record_knobs data, plus value_quote_escape_dissolution_trigger (§5 honesty: value_quote is a wrap-char concat(q,t,q), NOT RFC-8259 escaping; current manifest values contain no quotes/newlines so no live bug; dissolution = real string-escape authority citing RFC 8259 §7 and TOML v1.0 §String)

std/serialize.dag (new module)

  • serial_scalar, serial_field constructors
  • serialize_field_doc, serialize_fields_doc (intersperse by entry_separator, no leading/trailing), serialize_record_doc (wrap with open/close) → all produce Doc; recursive via RecordValue → serialize_record_doc

std/render.dag

  • Removed RecordSyntax import, removed serialize_config_record_entry
  • Added output_format_dissolution_trigger (OutputFormat.name/comment_prefix/indent_unit re-home; one live consumer extdeps.git.gitignore → follow-on child)

gunbc/runner_deploy_emit.dag (real consumer — byte-identical)

  • Added manifest_record_knobs: SerializationKnobs (assign="=", entry_separator=" ", no quoting)
  • Replaced manifest_host_text → manifest_host_fields + manifest_host_doc; session_host_text → session_host_fields + session_host_doc; operating_row_text → operating_row_fields + operating_row_doc
  • Added expected_runner_deploy_manifest_json() — renders ACTUAL host records via manifest_host_fields(h) through json_record_knobs (same business logic, knobs swapped)

test/claim/config_record_emit_test.dag — witnesses using new API, plus JSON swap:

  • witness_manifest_knobs_space_separated, witness_json_knobs_produce_quoted_record, witness_same_fields_differ_across_knobs (discriminating: same List → different output under each knob)

test/claim/runner_placement_witness_test.dag — real-projection swap acid test:

  • witness_real_manifest_fields_drive_both_formats: uses actual runner_deployment_plan() hosts; for each real host h, asserts manifest_host_doc(h) and serialize_record_doc(json_record_knobs, manifest_host_fields(h)) produce different text from the same fields, identity present in format-appropriate form in each
  • Restored starts_with teeth in witness_sound_manifest_line_is_populated

Real swap output (verified on live deployment plan)

Same manifest_host_fields(h) projection — only the knobs value swapped:

text: runner-deploy host=srv1 runner_count=10 ... labels=self-hosted,linux,arm64 cpu_weight=100
json: runner-deploy {"host": "srv1", "runner_count": "10", ..., "labels": "self-hosted,linux,arm64", "cpu_weight": "100"}

Known boundary: expected_runner_deploy_manifest_json() keeps the per-line "runner-deploy " prefix → prefixed-NDJSON, not a consumable JSON document. That is correct for the swap demonstrator (proves record-spelling opacity). A real .json artifact dropping the prefix and rendering hosts as a JSON array is a follow-on C-series concern, not this PR.

Execution receipts

$ gunbc run --source-root dsl --source-root src/v2 --claim-run \
    --entry dsl/test/claim/config_record_emit_test.dag \
    --function config_record_emit_keystone_holds
running config_record_emit_keystone_holds()...
true

$ gunbc run --source-root dsl --source-root src/v2 --claim-run \
    --entry dsl/test/claim/runner_placement_witness_test.dag \
    --function runner_placement_holds
running runner_placement_holds()...
true

$ gunbc compile --source-root dsl --source-root src/v2 --target dag \
    --dependency-pool-index primary-precedence --dry-run
indexed 1510 modules from 2 source roots
resolved 684 sources
0 diagnostics

Independently verified green by parent session (clever-raven-585) on cd316ad.

@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 30, 2026 22:04
Brian Searls and others added 4 commits June 30, 2026 22:35
…itness

migrate config_record_emit_test to new serialize API (SerializationKnobs,
SerialField, serialize_field_doc, serialize_record_doc) with JSON swap witness;
update runner_placement_witness_test to use manifest_host_doc + session_host_doc
instead of deleted manifest_host_text + session_host_text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DocText is not imported; use the doc_text helper from std.layout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Brian Searls and others added 5 commits June 30, 2026 23:04
…issolution trigger

finding 1: expected_runner_deploy_manifest_json was imported but unused in test;
add witness_manifest_json_entry_point_produces_json_format() that calls the function
and checks output contains json-format patterns (runner-deploy {, "host":, "cpu_weight":)

finding 2: value_quote_escape_dissolution_trigger extended to name the second gap:
ScalarValue lacks typed scalars (Int/Bool emit as quoted strings); dissolution path
= TypedScalar { kind: ScalarKind, text } where ScalarKind drives value_quote elision

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…a decls

json_record_knobs and value_quote_escape_dissolution_trigger pushed the
data_decl count 71→73 and non-format row count 64→66; update the deletion
ratchet baselines and their paired Rust unit test assertions to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ange

The 9c79e24 commit changed gunbc_ci_plan_spawn_width from int_max to
int_min to cap plan width by execution_corpus_spawn_width, but did not
update this witness. With int_min, zero-budget returns int_min(4,3)=3,
not the raw conservative_fallback_width=4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@briansrls
briansrls merged commit bcbf464 into main Jul 1, 2026
3 checks passed
@briansrls
briansrls deleted the session/still-wolf-292 branch July 1, 2026 03:49
briansrls added a commit that referenced this pull request Jul 1, 2026
… regressions

The branch had accidentally reverted #6045 record serialization and related
witnesses during prior main merges. Restore the main-line authorities so the
emitter/seed-green-integration branch tracks current main for Route-A closure.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jul 1, 2026
…#6073)

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

* fix(seed-green): restore main serialize/record_emit after stale merge regressions

The branch had accidentally reverted #6045 record serialization and related
witnesses during prior main merges. Restore the main-line authorities so the
emitter/seed-green-integration branch tracks current main for Route-A closure.

Co-authored-by: Cursor <cursoragent@cursor.com>

* test(route-a): add emit-fresh cargo-green execution witness

Reconcile emitter/seed-green-integration with main and land an ignored-by-default
test that assembles the faithful --emit-fresh crate and proves debug+release
cargo build succeed (0 rustc errors). Closes the Route-A last-mile receipt loop
alongside the existing regen --verify CI gate.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ci): align zero-budget spawn width with execution-corpus cap witness

gunbc_ci_floor_spawn_width_for_budget(0) returned the blind conservative
fallback (4) while witness_floor_spawn_width_zero_budget_falls_back expected
min(4, execution_corpus_spawn_width()) = 3. Apply the same int_min at the
authority site and update the envelope witness to match.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jul 1, 2026
…#6099)

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

* fix(seed-green): restore main serialize/record_emit after stale merge regressions

The branch had accidentally reverted #6045 record serialization and related
witnesses during prior main merges. Restore the main-line authorities so the
emitter/seed-green-integration branch tracks current main for Route-A closure.

Co-authored-by: Cursor <cursoragent@cursor.com>

* test(route-a): add emit-fresh cargo-green execution witness

Reconcile emitter/seed-green-integration with main and land an ignored-by-default
test that assembles the faithful --emit-fresh crate and proves debug+release
cargo build succeed (0 rustc errors). Closes the Route-A last-mile receipt loop
alongside the existing regen --verify CI gate.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ci): align zero-budget spawn width with execution-corpus cap witness

gunbc_ci_floor_spawn_width_for_budget(0) returned the blind conservative
fallback (4) while witness_floor_spawn_width_zero_budget_falls_back expected
min(4, execution_corpus_spawn_width()) = 3. Apply the same int_min at the
authority site and update the envelope witness to match.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(self-host): mark Route-A cargo-green landed (#5777/#5873)

Re-verified cool-ant-875: regen_stage0 --emit-fresh → cargo build
debug+release is 0 errors. Sync v2_self_hosting plan bullets that still
claimed the last mile was open; note emitter/seed-green-integration absorbed.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(docs): regen v2-self-hosting.md from plan authority

v2_self_hosting.dag is enrolled in PlanArtifact (generated_artifact
registry); committed docs/plans/v2-self-hosting.md must match
artifact_generate. Regen via main_wet after cargo-green bullet sync.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(docs): finish v2-self-hosting plan sync for #5873 wiring

Address cursor REQUEST_CHANGES: regen-verify is wired via RegenVerifyGate
(#5873, not closed #5325); forced-precondition step 1 marks Track A cargo-green
done in lockstep with Track A bullet 2. Regen committed .md from .dag authority.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(plans): land TypeScript gap census as generated Plan (Lane C step A)

Discriminating audit-first record: 9 VEP source-string GREEN families,
2 FAIL-CLOSED, 8 FAIL-OPEN (#13–#20) with named witness/authority sites.
Clarifies bar (b) vs bar (c) — tsc/emit_host oracle red even for add (#19).
Enrolled in plan_registry; regen docs/plans/typescript-gap-census.md via main_wet.

Co-authored-by: Cursor <cursoragent@cursor.com>

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

* fix(docs): name .dag authority in typescript gap census plan

Address cursor REQUEST_CHANGES (#34390): status line no longer says "This
file is the authority" in generated .md — names typescript_gap_census.dag
explicitly (DESIGN §3/§6). Regen committed projection via main_wet.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(docs): bind typescript-gap-census into doc graph

CI failed doc_graph_has_no_orphan_docs — new PlanArtifact md had no
reachability root. Add bind: provenance on typescript_gap_census.dag
(mirror commit_workflow / accelerator_demo_plan pattern).

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.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