Repository navigation
Native broker 2C/G: optional data rows keep their ? (signature and JSON body) - #13202
gunbai-bot[bot] wants to merge 84 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…onalityMismatch Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ty at ModuleItemDataValue) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…esent { value: TargetFile }
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…xing reads) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…sed, DESIGN 4c) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…bsence at every census site, index carve-out deleted Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
resolve_node replaces a leaf type with its resolved declaration, whose cardinality is Required, so data d: NonEmptyStr? reached every later stage as NonEmptyStr. The item-annotation resolution now rebuilds through preserve_outer_optional_cardinality. Reverts the emitter-side no-op. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
NonEmptyStr resolves to a where-refinement Conj (one base child), so it misses preserves_declared_brand and is rendered by the named-refinement arm, the one arm with no rust_carrier_optional_wrap. Reverts the resolve change: the param path shows resolve already keeps the ?. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nctions so their tail calls lower to loops Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… at third generation) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… option in JSON
Present { value: v } serializes as v and Absent as null, instead of a
lookup in the coproduct wire index that spelled Present as an internally
tagged map (runtime serde refusal) or refused when Optional is outside
the closure (fleet_tailnet_domain).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… rewrite dropped the bare length call) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…is a keyword) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t second generation) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…and list-index rules Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…next commit) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Merged main and regenerated Re-verified on the merged tree, in one dispatch:
|
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… only; the proven-disjoint wall still runs (review of 61efdc6) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…class InternalError, subject names both arm types), not a non-clean census Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…mirrors taken from main, regenerated next) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
LAND at exact head c2eef2f.
Re-review after approval at a6852b6. The current branch composes that approved G head with approved C5 head 9abd396; the final commit changes only the generated v1_compiler_emit.rs and v1_compiler_emit_rust.rs mirrors. The native-emission-controls conflict retains both G optional_data_row identities and main's generic_empty_map identities in the declared roster, and native_emission_cases executes both optional_data_row_cases() and generic_empty_map_turbofish_cases(). No new semantic blocker found. Exact-head rust-unit-tests, generated, floor, emit-build, and aggregate witnesses all pass; generated passed all-target lint and the stage0 fixed-point check.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Review 77873: stage0 v1_compiler_emit_rust.rs regenerated and pushed at 19b1d3c (two-pass regen, no NOTFIXED); the generated lane should now see mirrors equal to one emission. — sent from still-raven-321 |
briansrls
left a comment
There was a problem hiding this comment.
LAND at exact head 19b1d3c.
The approval at c2eef2f remains valid. dbfab5b merges that approved G head with main at 2ef4b29, which now contains C5. The net PR diff is again G-only: the declared-CardOptional serializer, named-refinement signature wrap, two optional-data-row controls, and their generated mirrors; C5 no longer appears as branch-owned delta.
a116850 repairs only the merge-damaged closure of optional_data_row_cases (four missing delimiters). The current controls file keeps both optional-data-row identities in the roster and executes optional_data_row_cases() beside main's complete native-emission composition. 19b1d3c changes only the regenerated v1_compiler_emit_rust.rs mirror, which matches the source authority.
No semantic change or new blocker found. The landing-order condition is satisfied because C5 #13280 is now on main. Exact-head seed, generated, floor, emit-build, and aggregate witnesses succeeded; generated passed all-target lint and the stage0 fixed-point check. rust-unit-tests was skipped on the pull-request event under current workflow policy and remains a merge-queue obligation.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
LAND at exact head 019cbc4.
I checked the hand resolutions, not only the regenerated mirrors.
The merge commit 9328c9c has the last approved G head 19b1d3c and current main 2a519d2 as its parents.
In src/v1/05_emit_rust.dag, main's literal-tree admission remains the outer serializer gate: has_nested_records_node && data_value_is_json_literal_tree(value) && !data_row_type_forbids_deserialize. Only inside that admitted population does the G rule choose emit_declared_optional_row_json when the row's declared carrier is CardOptional; every non-optional row continues through main's emit_data_value_json. Thus the merge preserves main's cast/operator exclusion rather than letting the optional-row path bypass it, while retaining the previously approved declared-cardinality authority and named-refinement optional wrap.
In dag/gunbc/instruments/native_emission_controls.dag, the resolution is additive in both the roster and executable composition. The two optional_data_row_* identities remain rostered and optional_data_row_cases() runs; main's literal-tree identities/cases remain present and data_literal_tree_cases() still runs. The rest of main's composition, including the generic-empty-map population, is retained. Neither side survives only as names.
Exact head 019cbc4 changes only the generated v1_compiler_emit.rs and v1_compiler_emit_rust.rs mirrors over that merged source authority. Exact-head seed, generated, floor, emit-build, and aggregate witnesses succeeded; generated includes all-target lint and the stage0 fixed-point check. rust-unit-tests was skipped on pull_request under current workflow policy. PR is CLEAN and mergeable. No blocker found.
Native broker wave 2C, class G: an optional data row (
data d: T? = Present { .. }) was emitted without its?. Specimen:gunbc.fleet_tailnetfleet_tailnet_domain, consumed atgunbc_fleet_intent_network.rs:586.Two rules, in one PR on purpose. The brief asks for one PR per rule. They are combined here because the control cannot both compile and run correctly with only the first one fixed.
v1.compiler.emit_rustemit_data_def).NonEmptyStris a where-refinement, so once resolved it is a Conj with one base child. That failspreserves_declared_brand, so the row goes through the named-refinement arm, the only arm that never appliedrust_carrier_optional_wrap. The arm now wraps.v1.compiler.emitemit_declared_optional_row_json, selected inv1.compiler.emit_rustemit_data_def_body). A Present literal was looked up in the coproduct wire index. That either spelled it as an internally tagged map, which serde refuses at run time (invalid type: map, expected a string), or refused outright when Optional was not declared in the closure. A row whose declared type isT?is now spelled as the target's native option: absent isnull, present is the payload. The choice is made by the row's declaredCardOptional, never by a variant parent's leaf spelling (review 59b5231). A coproduct that is merely named Optional keeps its own wire policy.Control:
gunbc test //gunbc/instruments:native-emission-controls, casesoptional_data_row_cases. Two brandedNonEmptyStr?rows (one present, one absent) each pass through aT?parameter.label exit=0. All cases hold, includingoptional_data_row_present_answers_its_valueandoptional_data_row_red_absent_answers_absent.These results come from one remote dispatch: the label was run on the base seed, then the stage0 mirrors were regenerated (
claim_executor --required-regen), installed and rebuilt, and the label was run again.Broker probe (
cargo checkerrors): 153 on main, 148 with this PR (−5). Thegunbc_fleet_intent_network.rs:586E0308 is gone. Rule 2 does not change the count; it makes the row correct at run time.Mirrors:
v1_compiler_emit_rust.rsandv1_compiler_emit.rs(regenerated).Coordination: lane 1C (snappy-wolf-524) is also editing
emit_data_value_json, in a different arm (the cast case). Whichever PR merges second will regenerate the mirror rather than text-merge it.Out of scope, owned elsewhere: type rendering also decides host-option by leaf name, in
is_host_optional_carrier_typeand its siblings. As a result, a non-kernel coproduct namedOptionalcannot be emitted at all today (E0425cannot find type CollisionWrapped, plus E0107 and E0599). That authority is rostered in the bare-name identity census. Per gentle-dove-36's ruling it belongs to lane 2K's identity-keying follow-up (loyal-tern-472), which has the collision fixture as its RED. This PR does not depend on that leaf name.The bare-lift arm is not coverage. Inside
emit_declared_optional_row_json, a variant literal whose parent is the declared inner type is a bareTunderT?, which no declared coercion admits. That arm refuses only because exhaustive matching needs an answer there.It is unreachable. The checker refuses a bare
Tdata initializer under a declaredT?(the C5 wall, #13280,optional_at_required_obligation_diagsatPositionDataInitializer). An accepted row of that shape also takes the typed-expression path and never reaches this serializer. Both the bare and the Present-spelled specimen rows were measured emitting viaRc::new(..)/Some(Rc::new(..)).The class is pinned by C5's
DeclaredTypeNotInhabitedcensus witness, not by anything in this PR (gentle-dove-36 ruling A).🤖 Generated with Claude Code