Skip to content

Replace resolved Optional cardinality with canonical owner applications - #11387

Closed
gunbai-bot[bot] wants to merge 1 commit into
mainfrom
session/crisp-carp-634-optional-root
Closed

gunbai-bot[bot] wants to merge 1 commit into
mainfrom
session/crisp-carp-634-optional-root

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Draft preserved for operator wind-down; no further implementation is running. This is the accepted Optional representation migration B, not a merge-ready candidate. It must compose/rebase on landed B0 #11354 before regeneration. #11277 remains parked at cb9529347fe and recomposes only after B lands. The original namespace work (#11267 prerequisite, then #11264) remains downstream.

This draft commits existing source work only. Its generated mirrors are deliberately NOT installed: the committed seed is still the pre-B seed. Do not treat CI on this checkpoint as a fixed-point proof or admit it for landing. The source-only draft is the explicit wind-down preservation requested by eager-raven; normal source+adjudicated-mirror atomicity resumes at the next implementation transaction.

Observed draft CI: run 34868932927 build job 104059723933 fails in the Rust semantic witness with E0432/E0425 for make_optional_type, kernel_optional_type_node, and apply_optional_owner; the new .dag declarations have no installed B seed mirrors yet. Dependent inference diagnostics follow. Build log. This is the documented incomplete source/mirror checkpoint, not a passing bootstrap. Resolve through the pending B0 composition and atomic B regeneration; do not add Rust stubs or remove controls to make this draft green.

Accepted ruling and scope

Side-chat turn 832a0c6e approves canonical resolved/inferred Optional as an application of the existing v2.std.optional.Optional<T> = Absent | Present { value: T } owner, with its instantiated payload and Required cardinality. Authored T? is ingested once at resolve_node_bounded before dispatch. Producers stop constructing resolved/inferred CardOptional; consumers read the canonical owner and ordered argument. Syntax/identity transport may preserve authored cardinality as syntax. There is no comparator equivalence bridge, emitter-site wrapping workaround, or #11277-only helper dependency.

B is a standalone replacement migration from main. Its falsifier remains: if the actual main/B0-seed transaction requires #11277-only literal/generic canonicalization or an intermediate representation, B is falsified and the gatekeeper must rule on composed A. No alternate older seed may hide that failure. Attainable rung is mechanically prevented at the resolved-type producer boundary, NOT structurally impossible: Node still carries Cardinality. The next-rung trigger is a distinct resolved/inferred carrier unable to contain CardOptional.

Two bounded divergences are declared. Only lookup_field_type_node and map_lookup_result_type retain main's idempotent flatten when their element is already Optional; nested Optional is admitted there once pattern elimination and emitter consumers are proven on the nested shape. The production collect_item_inductive_fields route over unresolved module items retains authored-cardinality analysis yielding RecursionShape; this admission is call-path-specific, not a claim that classify_field_recursion never sees inferred evidence. A future syntax/resolved carrier split puts that route on syntax by construction.

Pending work — not claims of completion

  • Compose/rebase this source work on landed B0 Preserve whole-value reads across ownership branch joins #11354. B0 contains the ownership Read-preserving join; this draft excludes its obsolete direct .dag fixture and does not independently repair ownership.
  • Reconcile fixture enrollment with the final B0 ruling. The draft's Optional .dag claims import v1 producers; B0 proved that floor roots exclude src/v1 and the changed-witness gate rejects newly added off-discovery claims. This draft retains the previous in-progress fixture/expected-red enrollment unchanged for review; it is NOT an admitted required route. Harness work item node://adhoc-babdd2de-8db owns required seed-rooted same-identity candidate-bound terminals. No root widening, marker removal, or per-claim exemption is authorized.
  • Run the atomic B0/main seed → generation 1 → install/rebuild → generation 2 → fixed point transaction, adjudicate every changed mirror, then commit sources+mirrors together. No B fixed point exists yet.
  • Execute the authored Optional, wrong-arity/malformed-owner, bounded lookup-flatten, recursive generic field, and general comparator controls on the regenerated native seed. Prior interpreter Map controls passed; Optional controls encountered the pre-existing OptionalUnwrap value-representation fork. The fork is OUT of B by ruling and is recorded in interpreter_optional_value_representation_fork; the native route owes positive evidence. Do not patch the interpreter or add comparator unwrapping.
  • Close the 12 real-corpus Optional joins below, then prove zero remaining after Canonicalize seed type arguments and preserve semantic child roles #11277 recomposes. Obtain native/corpus and required closure receipts, gatekeeper review, exact-head CI and final review before requesting landing.

Executed 12-site corpus census

Instrument: regenA.ei3TxS, cb952 plus the accepted instantiated-owner payload correction, emitted by the 7de7 seed state and rebuilt. It closed all five prior method-surface refusals and exposed twelve Optional if-join refusals (seven previously visible, five newly reached). This is a diagnostic for the representation fork, NOT a B fixed point. Authoritative instrument. Locations are cited by the declaring symbols below; multiple sites in a declaration remain distinct obligations.

v1.compiler.emit_rust declaration Join sites owed
effective_variant_parent_from_enum_lookup 1
effective_variant_parent_from_resolved 1
emit_rust_expr_record_lit 2
contextual_variant_parent_absent 1
rc_grouped_arm_plan 1
emit_typed_match_arm_strs 1
rust_struct_field_type_node_variant_aware 1
emit_field_value_with_context 2
operation_response_200_resolved_type 1
compiler_pipeline_entry_decl 1

Refusal preservation

Gatekeeper ruling msg_1406f4c4 admits the general application comparison within B. The main reduction records the refusal previously supplied accidentally by CardOptional recursion: Int?/String? is incompatible. Applied Optional/Optional and Map<String,Int>/Map<String,String> are compatible on main because the comparison falls through to their shared name. Applied Optional/Optional is also unequal on main: equality lacks its ordinary application path.

The replacement uses type_application_arguments_match for both node_type_compatible and node_type_equals_core. It checks arity before walking all ordered arguments and applies the relation recursively. The old List and Map-specific comparison walks are deleted, including the Unit-element wildcard acceptance. No Optional spelling branch or CardOptional equivalence is introduced. Unexpected corpus refusals are defects to diagnose, never permission to restore acceptance.

This is a declared §3b divergence from the original accepted plan: simply deleting the marker branches would erase a required refusal. The minimum replacement must carry it through canonical arguments instead.

Main's make_container_type/make_map_type and resolve_node_bounded still transport collection arguments in named slots. The shared walk uses their existing child_type_node projection; other applications carry direct arguments. That is preservation of main's pre-existing producer protocol, not an intermediate Optional representation. There is no separate collection comparison policy. The later collection argument-carrier cut can delete this projection once those producers change together. Compatibility retains main's declared container alias head normalization; equality retains its authored-head relation.

Permanent controls exercise Optional mismatch/identity/arity, Map value mismatch/identity, List mismatch and nested Optional mismatch in both relations. The .dag comparison claim module uses real producers and is being run on the interpreter route; native semantic controls await regenerated mirrors. See comparator-main-matrix.log for exact-main baseline observations. No candidate GREEN is claimed by this checkpoint.

Producer disposition roster

Authority: existing v2.std.optional.Optional = Absent | Present { value: T }.

Declaration Replacement
v1.compiler.infer_resolve.resolve_node_bounded Ingest authored T? before dispatch, resolve its Required inner type, construct one canonical application. Alias grounding forwards diagnostics.
v1.compiler.infer_types.instantiate_algebra_type OptionalOf produces the same application through make_optional_type.
v1.compiler.infer_types.apply_type_substitution OptionalOf produces the same application after substitution.
v1.compiler.infer_types.infer_literal_node LitNull produces Optional of its unconstrained element variable; no Unit/CardOptional coercion.
v1.compiler.infer_access.check_index_access_node List and map indexing produce a canonical Optional of the determined element. No flatten here.
v1.compiler.infer_method.builtin_function_registry Optional builtin returns use make_optional_type; no marker results.
v1.compiler.infer.infer_tier2b_builtin_with_kernel_diags Optional builtin result uses the canonical constructor.
v1.compiler.infer_lookup.lookup_field_type_node Canonical application; bounded idempotent lookup divergence as declared.
v1.compiler.infer_lookup.map_lookup_result_type Canonical application; bounded idempotent lookup divergence as declared.
v1.compiler.infer.expand_alias_chain_for_field_access Peel canonical Optional element, expand alias, reconstruct canonical application.
v1.compiler.infer.variant_reference_inferred_node Main's actual bare-variant producer checks the selected Optional owner's arity and instantiates its payload. Other coproducts retain main's behavior. No variant_owner_application borrowed from #11277.
v1.compiler.infer.infer_record_lit_structural Main's Present route uses the same checked Optional application; forwards producer diagnostics. No separate Present payload convention.

Three former kernel declaration sites (build_type_env, build_type_env_unresolved, compiler_kernel_type_env) consume kernel_optional_type_node with an authored-shaped generic parameter T. optional_application_node and apply_optional_owner share the declaration substitution used by resolve_node_bounded: substitute_type_slots/substitute_type_slots_scoped moved unchanged into infer_types to avoid an import cycle. No second substitution algorithm and no bind_type_variables special case.

Marker restorations are removed from declared_return_type_node, field_substitution_carrier, resolve_pattern_subject, bind_local_func_conformance, census_declaration_bound_formals, resolve_scrutinee_type_node_seen, resolve_scrutinee_type and preserve_nominal_brand_on_resolve. with_authored_identity copies the resolved structural cardinality. resolve_nominal_alias_rhs and rendered_use_site_type retain the canonical Optional result. Resolved scrutinee lookup preserves the application; pattern elimination reads its instantiated owner. annotate_pattern_parent_enums reads that owner instead of inventing an Optional parent from cardinality.

Node still permits authored CardOptional: this cut claims mechanical prevention at accepted resolved/inferred producer boundaries, not structural impossibility. Typed refusals remain refusals. Syntax fields/identity transports retain authored metadata only as syntax; their type evidence comes from the canonical boundary. classify_field_recursion is the explicitly admitted syntax-analysis divergence, with its caller chain and next-rung trigger in the consumer census.

Falsifier: main committed seed -> gen1 -> install/rebuild -> gen2 -> fixed point -> native observation. If this needs #11277's generic/literal canonicalization, B is falsified and the ruling switches to composed A. No mixed representation, comparator equivalence or emitter bridge may rescue B. The twelve Optional joins identified by regenA.ei3TxS must also disappear after #11277 recomposes.

Consumer disposition roster

Main-based Optional consumer disposition census

Base: ed853cf. Discovery: lexical reads of return_cardinality/CardOptional in all v1 inference modules and emit_rust; imports, comments and string literals excluded. This replaces the prior cb952 census: #11277-only declarations are absent on this base.

Declaration Current disposition
v1.compiler.infer_emit_info.field_value_shape_from_type_node Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer_env.qualify_borrowed_type_names Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer_env.node_with_children Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer_env.node_with_inferred Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.classify_field_recursion The production collect_item_inductive_fields route over module_items(module.module) is retained as syntax-only analysis: authored cardinality selects RecursionShape and output carries no type evidence. The helper can prefer field_node.inferred; the admission belongs to this pre-resolution call path, not arbitrary inputs. Divergence admitted in msg_9ea9a6bb; future syntax carrier owns this route.
v1.compiler.infer.variant_reference_inferred_node Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.declared_field_is_required Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.conformance_ground_kernel_scalar Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.conformance_ground_element_collection Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.declared_type_kernel_inhabitance_mismatch Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.rejects_string_for_optional_coproduct_field Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.field_type_admits_bare_none Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.field_type_is_optional_coproduct Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.record_lit_instantiated_fields Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.match_arm_types_are_disjoint_coproducts Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.equality_operand_admission Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.structured_application_lit_is_declared_optional_variant Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.declared_type_inhabitance Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.nominal_product_head_name Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.applied_type_argument_conflicts Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.coproduct_payload_where_parent_required Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.direct_call_arg_type_mismatch Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.optional_cast_diags Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.annotate_pattern_parent_enums Deleted marker-derived parent synthesis; expand_scrut_type_for_variant_lookup supplies the instantiated owner identity.
v1.compiler.infer.literal_boundary_elaboration Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.infer_expr_body Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.expand_alias_chain_for_field_access Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.infer_record_lit_structural Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer.annotate_descent Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.infer_property_values Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.infer_service_config_properties Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.infer_transport_node Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.infer_item Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.substitute_generics_apply Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.local_binding_for_item Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.transparent_alias_target_name Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.build_type_env_unresolved Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer.typecheck_module Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer_lookup.lookup_field_type_node Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer_lookup.field_summary_for_type Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer_lookup.map_lookup_result_type Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer_patterns.expand_scrut_type_for_variant_lookup Marker branch removed; follows ordinary instantiated owner/application path.
v1.compiler.infer_patterns.lookup_variant_in_type Marker branch removed; follows ordinary instantiated owner/application path.
v1.compiler.infer_patterns.resolve_scrutinee_type Marker branch removed; follows ordinary instantiated owner/application path.
v1.compiler.infer_patterns.constructor_roster_for Marker branch removed; follows ordinary instantiated owner/application path.
v1.compiler.infer_resolve.with_authored_identity Identity metadata retained; cardinality comes exclusively from the resolved structural input.
v1.compiler.infer_resolve.substitute_type_slots_scoped Moved unchanged to infer_types, shared declaration substitution; preserves syntax/identity metadata.
v1.compiler.infer_resolve.resolve_nominal_alias_rhs Authored Optional enters resolve_node; canonical Optional application is retained instead of recreating an uninstantiated RHS.
v1.compiler.infer_resolve.resolve_node_bounded Single ingestion of authored T? before dispatch; emits applied Optional. Structural-field syntax is forwarded into this boundary; alias grounding forwards diagnostics.
v1.compiler.infer_resolve.rendered_use_site_type Authored Optional returns canonical resolved result; other nominal metadata transport retained.
v1.compiler.infer_resolve.resolve_item_types Authored return marker forwarded to resolve_node boundary; module-item metadata remains syntax.
v1.compiler.infer_types.reground_alias_carrier_identity Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer_types.structural_carrier_template_name Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer_types.enrich_base_with_fields Retained identity/syntax transport or non-Optional Required check; no CardOptional construction or semantic marker test.
v1.compiler.infer_types.node_type_shape Marker branch removed; follows ordinary instantiated owner/application path.
v1.compiler.infer_types.node_type_compatible CardOptional branch deleted; no equivalence rule added.
v1.compiler.infer_types.prefer_specific_type Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.infer_types.node_type_equals CardOptional branch deleted; no equivalence rule added.
v1.compiler.infer_types.extract_optional_inner_node Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.rust_carrier_is_at_shared_layer Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.rust_carrier_optional_wrap Deleted; consumers use the instantiated Optional owner/application.
v1.compiler.emit_rust.emit_inferred_type_leaf_name Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.collect_value_emit_type_surface_names Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.needs_box_wrapping Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.inferred_expr_is_optional Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.analyze_rc_match Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.explicit_record_struct_name Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.effective_variant_parent_from_resolved Marker branch removed; follows ordinary instantiated owner/application path.
v1.compiler.emit_rust.emit_none_keyword_for_resolved_type Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.contextual_variant_parent_absent Marker branch removed; follows ordinary instantiated owner/application path.
v1.compiler.emit_rust.rust_call_arg_fail_closed_unwrap Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.emit_rust_map_method_call Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.emit_typed_method_call Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.emit_typed_match Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.is_already_optional Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.emit_typed_record_lit Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.is_optional_typed_expr Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.type_node_is_ordered_element_run Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.is_string_typed_expr Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.emit_rust_tco_match Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.emit_dry_run_branch_from_props Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.emit_shell_call Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.
v1.compiler.emit_rust.emit_cli_param_type_node Rewired recognition/elimination to applied Optional owner and ordered argument; remaining metadata copies preserve identity/non-Optional cardinality.

Observed main population: 83 declarations. This census is a review artifact, not an execution receipt.

Next-rung trigger: separate resolved/inferred evidence into a carrier that cannot contain CardOptional. Present cut is mechanically enforced by producer construction, not structural impossibility.

Bounded lookup divergence: lookup_field_type_node and map_lookup_result_type alone preserve idempotent flattening. Admit nesting there only once nested pattern elimination and emission are proven.

Durable evidence and transaction history

Patch-only relay session/crisp-carp-634-optional-relay retains all earlier inputs and receipts. regenB.hkdakp refused generation one for duplicate ownership use of normed; source corrected. regenB.EdGCFA produced generation one but its candidate rebuild refused E0382 in rendered_use_site_type. regenB.o70L6U with the ownership source correction repeated E0382 because generation one was still emitted by the old seed, motivating standalone B0. Those are refusals, not successful B transactions. B0 subsequently reached its own fixed point, but B has not yet been regenerated with that seed. Latest complete source checkpoint before draft commit is the relay's optional-root-latest.patch; all reductions and producer/consumer rosters remain there.

Operator wind-down checkpoint: preserve accepted B source work as an explicitly incomplete draft. Generated mirrors are not installed; compose on landed B0 #11354 and regenerate to fixed point before readiness. Fixture route and native evidence remain pending as documented in the draft PR.
@briansrls
briansrls marked this pull request as ready for review September 14, 2026 16:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-14T16:52:08.154440Z 7ffe73b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ffe73b1a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/v1/04_lookup.dag
let resolved = resolve_scrutinee_type_node(env: env, n: base_type)
let normed = normalize_access_type_node(n: resolved)
let normed_opt = normed.return_cardinality == CardOptional
let normed_opt = node_is_optional_type(n: normed)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Unwrap canonical optionals before recursing

When accessing any field other than value through an optional record (for example, item?.name), node_is_optional_type now selects this branch for the canonical Optional<T> application, but the following with_required_cardinality is a no-op because that application is already Required. field_summary_for_type consequently recurses with the identical node until inference overflows the stack instead of examining T; this branch needs to pass extract_optional_inner_node(n: normed) as the other migrated lookup path does.

Useful? React with 👍 / 👎.

Comment thread src/v1/04_resolve.dag
if (n.return_cardinality == CardOptional) {
let inner = resolve_node_bounded(n: with_required_cardinality(n: n), env: env,
module_name: module_name, depth: depth + 1, masked: masked)
return NodeResolveResult { resolved: make_optional_type(element: inner.resolved), diagnostics: inner.diagnostics }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Migrate Go emission before changing the resolved shape

For any authored optional parameter, field, or return type emitted to Go, this conversion replaces CardOptional with a Required Optional<T> application. The Go emitter still sends these nodes to v1.compiler.emit.render_node_type, whose optional branch recognizes only CardOptional, so it emits Optional[T] rather than the language specification's *T; the generated Go therefore references an undefined or non-generic Optional type and fails to compile. The target-generic/Go consumers need to recognize and peel the canonical application as part of this migration.

Useful? React with 👍 / 👎.

@gunbai-bot

gunbai-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

review 66317 read against 7ffe73b. Finding 1 (mirrors not installed; no executing seed) is the declared wind-down checkpoint state — this draft is deliberately source-only until B0 (#11354) lands and the full atomic B regeneration installs its mirrors; it is not being landed. Finding 2 is a real defect independent of that and is recorded as the first resume item: at 04_infer.dag the gate still admits the residual peeled.name == "Optional" && count == 1 spelling branch while extract_optional_inner_node now peels only via optional_type_application and returns the node unchanged on Absent — a second recognition path beside the canonical owner test this PR claims as sole authority (§3), and one that can recurse on the same node to the depth wall instead of refusing (§5). On resume the spelling disjunct is dropped (or rewired through optional_type_application so it cannot diverge), with a RED for the non-peeling case, before any landable B transaction. — sent from swift-bat-902

@gunbai-bot

gunbai-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Closed under the operator wind-down (2026-09-16): this draft's remaining work is repair, not integration, and it is not being carried into the namespace integration branch. The branch is kept; the resume items (review findings, model checkpoints, the admitted scaffold ruling where applicable) are recorded in the comments above and in the roadmap authority. Reopen or re-cut from the then-current main when the seed inference chain resumes. — sent from swift-bat-902

@gunbai-bot gunbai-bot Bot closed this Sep 16, 2026
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.

0 participants