Skip to content

Pascal-case type-param references in RECORD and VARIANT field types (emit-fold follow-up to #5844) - #5865

Merged
briansrls merged 10 commits into
mainfrom
session/calm-pike-841
Jun 27, 2026
Merged

briansrls merged 10 commits into
mainfrom
session/calm-pike-841

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

05_emit_rust.dag has three record/variant field-type rendering functions that bypassed to_pascal on type-parameter references, producing lowercase Rust type params (e.g. value: ok instead of value: Ok). #5844 fixed the declaration list (<Ok, Err>) and the alias RHS, but not the field-type references inside record structs and enum variants.

Changes (.dag authority only, no seed):

  • emit_struct_field_from_child: always use render_rust_decl_type when generic_param_names |> count > 0 (was branching through render_node_type when type_node_has_value_variant_arg returned false)
  • render_rust_field_type_with_applied_binding: add generic_param_names / variant_to_enum / env params; use render_rust_decl_type when params non-empty
  • emit_variant_from_child + emit_enum_shared_accessors: thread generic_param_names through to call sites

Gen-2 oracle (out-of-band, not committed)

Two-pass regen ran locally:

  • Pass-1 (origin/main seed + fixed dag → gen-1): builds with 5 pre-existing warnings in std_types.rs/std_machine_constraints.rs (lowercase type aliases List<element>, MachineWidth<bits> — pre-existing dag drift, not caused by this fix), 0 errors.
  • Pass-2 (gen-1 binary + same dag → gen-2): 0 errors, 0 warnings.
    • std_error_primitives.rs: pub enum Result<Ok, Err> { Ok { value: Ok }, Err { value: Err } } ✓
    • std_measure.rs: pub struct Measure<Q, S, M> — no regression ✓
    • Integer tower: clean ✓

Test plan

  • type_param_casing_test.rs has 4 #[ignore] tests that prove this fix once the seed is regenerated (separate cutover PR). The #[ignore] intentionally stays — these are the discriminating witnesses for the cutover.
  • CI gates run on the .dag change (dsl_compile_clean_gate, layering-imports scan).

@gunbai-bot gunbai-bot Bot changed the title CASING FOLLOW-UP to #5844 (load-bearing emit-fold, precedent-application — NOT a new shape): the emitter pascal-cases type-param DECLARATIONS and type-ALIAS RHS (05_emit_rust.dag to_pascal at lines ~151/474/3053, why std_types.rs is clean) but DROPS to_pascal on type-param references in VARIANT/RECO Pascal-case type-param references in RECORD and VARIANT field types (emit-fold follow-up to #5844) Jun 27, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 27, 2026 02:53
@gunbai-bot

gunbai-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

Independent execution-grounded confirmation: this restores type-param casing to cargo-green

I ran a clean oracle on a tree = origin/main + ONLY this PR's 05_emit_rust.dag (sha256 df0dca0c…, verified identical to PR head ad285eebab) + the extdeps_uri_path.rs registration, then drove a faithful two-generation regen (gen-1 stale seed → rebuild → gen-2 --emit-fresh). Results at gen-2:

  • Casing fixed at the field-type position — std_error_primitives emits pub enum Result<Ok, Err> { Ok { value: Ok }, Err { value: Err } } (PascalCase type-param refs). Pre-fix this position took a render_node_type branch that bypassed pascal-casing; the fix routes variant/record field types through render_rust_decl_type when generic params are in scope.
  • No regression on the integer/measure tower — std_measure emits pub struct Measure<Q, S, M> unchanged; std_types shows 0 lowercase-param leftovers; all-files lowercase-param scan = 0.
  • Builds cargo-green under the real CI lint context — cargo build --release --features text_lookup_work_counter with RUSTFLAGS=-D warnings: 0 errors, 0 warnings. (This matches the exact rustc invocation the CI floor uses — --cfg feature="text_lookup_work_counter" + -D warnings.)

Note on the current ci red: it is sccache: Compiler killed by signal 9 — an OOM kill mid-v1_compiler rustc, i.e. the fleet floor-OOM, not this content. The killed command itself carries feature="text_lookup_work_counter" + -D warnings, confirming it was building the real workspace crate when the kernel reaped it. A re-run once fleet memory pressure clears should green.

This PR is the correct minimal .dag-authority fix for the casing pole and is cargo-green by execution. Merge is gated only on (a) a 2nd distinct-provider approval and (b) the floor-OOM clearing — neither is a content issue.

— sent from jolly-cat-29

gunbai-bot Bot pushed a commit that referenced this pull request Jun 27, 2026
…ed point

Applies #5865's casing fix (05_emit_rust.dag) and runs the 2-pass cutover regen:
pass-1 advances the self-host blob + emitter (gen-1 drops v1_rt starts_with/
ends_with/trim, the one-generation-ahead seed-cement), rebuild, pass-2 re-emits
them fresh (PascalCase). regen_stage0 --verify now exits 0 (a 3rd pass is
byte-identical = THE fixed point). Registers extdeps_uri_path.rs in
GENERATED_STAGE0_FILES (the legit unregistered-emit gap). Regenerates ROADMAP.md.
Drift checks: cargo-header reproduced via emit_cargo_toml, wire_value_serialize.rs
unchanged (hand-maintained, copy-preserved), v1_rt.rs emitted-fresh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@briansrls
briansrls merged commit 8961cdf into main Jun 27, 2026
2 checks passed
@briansrls
briansrls deleted the session/calm-pike-841 branch June 27, 2026 19:15
gunbai-bot Bot pushed a commit that referenced this pull request Jun 27, 2026
…5819)

Operator ruled Path B for the #5864 parser seed-cement: v1_compiler_parse.rs
moves to HAND_MAINTAINED_STAGE0_FILES (copy-preserved, so #5864's O(N) cursor
optimization survives the regen instead of being reverted to the O(N^2) baseline
that 02_parse.dag still models). Named dissolution trigger marked on the carrier.
Re-regenerated the two-generation cutover against fresh main (incl #5865 casing,
#5818 Uri grounding, #5819 ci.yml thin-shim). regen_stage0 --verify exit 0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 28, 2026
… into executable RegenVerifyGate (cargo-green self-host fixed point, ONE PR) (#5873)

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* Part B: dissolve parked regen_verify_gate plan into executable RegenVerifyGate

Adds RegenVerifyGate to the CI floor (ci_spec type Gate + gunbc_ci_floor_gates),
wires all exhaustive Gate matches (ci_floor_plan gate_node/gate_runnable/
gate_is_heavy_resolve/gate_spawns_host_compiler, ci_gates.run_spec_gate,
floor_effect_gate_witness). New dsl/tools/regen_verify_{gate,transport}.dag run
regen_stage0 --verify (the §7 self-host fixed-point wall) via a new
ensure_regen_stage0_built host-prelude helper. Deletes the parked plan, its
empty plan_registry_batch_a, the generated required-facts md, and repoints the
roadmap carrier.

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

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* Part A: two-generation cutover regen to the cargo-green self-host fixed point

Applies #5865's casing fix (05_emit_rust.dag) and runs the 2-pass cutover regen:
pass-1 advances the self-host blob + emitter (gen-1 drops v1_rt starts_with/
ends_with/trim, the one-generation-ahead seed-cement), rebuild, pass-2 re-emits
them fresh (PascalCase). regen_stage0 --verify now exits 0 (a 3rd pass is
byte-identical = THE fixed point). Registers extdeps_uri_path.rs in
GENERATED_STAGE0_FILES (the legit unregistered-emit gap). Regenerates ROADMAP.md.
Drift checks: cargo-header reproduced via emit_cargo_toml, wire_value_serialize.rs
unchanged (hand-maintained, copy-preserved), v1_rt.rs emitted-fresh.

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

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* Path B: parse.rs hand-maintained + re-regen against fresh main (#5818/#5819)

Operator ruled Path B for the #5864 parser seed-cement: v1_compiler_parse.rs
moves to HAND_MAINTAINED_STAGE0_FILES (copy-preserved, so #5864's O(N) cursor
optimization survives the regen instead of being reverted to the O(N^2) baseline
that 02_parse.dag still models). Named dissolution trigger marked on the carrier.
Re-regenerated the two-generation cutover against fresh main (incl #5865 casing,
#5818 Uri grounding, #5819 ci.yml thin-shim). regen_stage0 --verify exit 0.

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

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* Fix stage0_core crate membership + hand-test for the faithful fixed point

The full-workspace build (the broadened oracle CI rust_tests uses) exposed two
more pre-existing main non-fixed-points that the cutover surfaces:

1. stage0_core E0432/E0433: the faithful regen emits use crate::extdeps_uri /
   extdeps_external_authority in the extdeps_languages_* modules and
   use crate::std_realization_schedule/std_decl_ref in std_effects/std_emit_model,
   but stage0_crates.dag's CoreCrate modules list omitted them. Added the full
   transitive closure (9 modules: extdeps_external_authority, extdeps_uri,
   std_decl_ref, std_lens_verdict, std_magnitude, std_measure, std_nat,
   std_pareto, std_realization_schedule) so stage0_core is closed under crate:: deps.

2. effects.rs (hand-test) imported parse_path_template/PathTemplateParseResult from
   std_http_path, but #5818 moved them to extdeps_uri_path in the authority (main
   never regenerated, so its stale seed + test still pointed at std_http_path).
   Repointed the imports to the fixed-point location.

regen_stage0 --verify exit 0; cargo build --workspace --all-targets -D warnings 0/0;
parse.rs still byte-identical to origin/main (#5864 preserved).

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

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* Merge origin/main (#5874/#5878/#5880) into cutover branch; seed reset to main (re-regen reconciles), Path-B HAND_MAINTAINED re-applied for main.rs/parse.rs

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

* Restore compilable pre-regen interim: all source authoring (reg-2 A1+S5, reg-3, both grounded witnesses, extdeps_uri_path reg) on main seed; regen HELD pending #5878 empty_node_list ruling

The faithful regen is blocked: #5878's empty_node_list thread_local singleton is an
ungrounded seed-cement (hand-edited into v1_std_core.rs seed, not in any .dag); a regen
drops the definition while 2 HAND_MAINTAINED files (parse.rs/dag_collect_support.rs)
still call it. Escalated to manager (empty_node_list grounding option + #5878-documented
emitter non-determinism vs RegenVerifyGate bit-identity premise). Seed kept = origin/main
(compilable) until the ruling.

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

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

* WIP: Two-generation regen cutover + dissolve parked regen_verify_gate plan in

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.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