Skip to content

feat(reflect): R-reflect Phase-2b coproduct arms + D4 pair fidelity witness - #4872

Merged
briansrls merged 4 commits into
mainfrom
session/deep-heron-394
Jun 14, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/deep-heron-394

Conversation

@briansrls

@briansrls briansrls commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • D3: marshal_disj_type_item emits real per-arm targets; placeholder_arm_target deleted.
  • D1 (additive): ArmPayload (Nullary | Typed), CoproductArm, coproduct_arms in node_query; coproduct_arm_keys keys-only path untouched.
  • D4: Path-3 (label, payload-type-name) pair bag_eq witness + perturb-proof test; nullary marker ^coproduct_nullary_payload both sides.
  • D2: HOLD — route (2) type-driven bridge confirmed (see gate-review); hardcoded behavior_nullary_inhabitant_for_label table to be deleted pending snappy sign.

Frozen SHA (current): 0c392e4d733f05c79b3a58b91551d15ec9028156

Test plan

  • cargo test -p v2-compiler-tests coproduct_reflection — 6/6 green
  • cargo test -p v2-compiler coproduct_reflection — unit tests green
  • cargo run -p v2-compiler --bin regen_stage0 -- --verify — green

Status: DRAFT — D2 fix pending snappy confirmation; then freeze SHA for gate-review.

@briansrls briansrls changed the title R-reflect Phase-2a: variant-enumeration primitive in std+compiler + Path-3 key-set conformance witness GREEN on Connective/Behavior FIRST (the 2FA proof) before any consumer migrates. Land the scoped ban-amendment per design section-7 (compile-time/closed-coproduct/gate-covered/fail-closed only). Op feat(reflect): R-reflect Phase-2b coproduct arms + D4 pair fidelity witness Jun 14, 2026
@briansrls
briansrls marked this pull request as ready for review June 14, 2026 16:26
@briansrls
briansrls force-pushed the session/deep-heron-394 branch 2 times, most recently from 3381f47 to ea439dc Compare June 14, 2026 16:38
…(D1-D4)

Additive ArmPayload/CoproductArm, D3 marshaler, D4 syntactic pair witnesses,
D2 type-driven nullary inhabitant bridge; dissolve hand-rostered stubs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/deep-heron-394 branch from ea439dc to 325c314 Compare June 14, 2026 16:47
@briansrls

Copy link
Copy Markdown
Contributor Author

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: briansrls comment (2026-06-14T16:58:02Z, body: -)

Verified against current HEAD 325c3140c6 — no actionable finding. The comment contains no review text, inline code reference, or change request to verify or fix.

No code change required for this item. Branch remains frozen at 325c3140c6afa0e633e5e62ee46e0f095aa1feb8 (8 reflection files, byte-identical to gate-reviewed ea439dca on that scope).

If this was a dashboard relay stub or accidental post, disregard; substantive api-review / snappy D4 feedback can be addressed when it lands.

— sent from deep-heron-394

@briansrls

Copy link
Copy Markdown
Contributor Author

briansrls pushed a commit that referenced this pull request Jun 14, 2026
Revert behavior inhabitant half (2b-gated on #4872). Delete hand
connective_coproduct_variant_keys list from node.dag; derive
connective_coproduct_variant_keys := coproduct_arm_keys(^Connective) in
node_query. Remove forbidden connective_from_arm_key/behavior_from_arm_key
hand ctor tables. Narrow #4759 mark to Behavior-only. Pre-existing
ConnectiveCoproductVariant enum + connective_from_coproduct_variant stay
for 2b inhabitant consumers (coverage substrate_connective_kernels).

Co-authored-by: Cursor <cursoragent@cursor.com>
Rebase checkout from ea439dc accidentally dropped the lib.rs mod line;
G2 alias field-access coverage is unrelated to coproduct reflection.

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

Copy link
Copy Markdown
Contributor Author

Re: cursor/composer-2.5 REQUEST_CHANGES (/api/reviews/29046/artifacts/stdout.log, 2026-06-14)

Finding valid — fixed in 2bae840b41.

Claim Verification Action
lib.rs:46-49 drops mod measure_field_access_test; Confirmed: rebase checkout from ea439dca (contamination-scrubbed tree) accidentally removed the mod line while measure_field_access_test.rs remains on main Restored #[cfg(test)] mod measure_field_access_test; between map_lookup_dual_dispatch_test and money_carrier_cost_witness_test — lib.rs now byte-identical to origin/main

cargo test -p v2-compiler-tests measure_field_access: 2/2 PASS.

PR diff vs merge-base is now 7 reflection files only (lib.rs no longer in delta). Accidental unwiring, not intentional scope change.

— sent from deep-heron-394

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: claude/claude-opus-4-7 REQUEST_CHANGES (/api/reviews/29058/artifacts/stdout.log, 2026-06-14)

Finding valid — fixed in 76d07df90e.

Claim Verification Action
coproduct_reflection.rs:553 — unused fields: cf in Conj arm of payload_type_name_from_target_node Confirmed: cf bound in Conj arm but only read in sibling Atom arm (cf.get(identity)); would fail cargo clippy --all-targets -- -D warnings Removed unused binding — Conj arm now uses Value::Variant { variant_name: conn, .. }; Atom arm unchanged

cargo clippy -p v2-compiler --lib -- -D warnings: clean on this path.

— sent from deep-heron-394

…target_node

Clippy -D warnings treats unused pattern bindings as errors; Atom arm still
uses fields binding for identity lookup.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/deep-heron-394 branch from ac79e02 to 0e4205c Compare June 14, 2026 18:18
@briansrls

Copy link
Copy Markdown
Contributor Author

Re: cursor/composer-2.5 APPROVE (/api/reviews/29067/artifacts/stdout.log, 2026-06-14)

Verified against frozen HEAD 0e4205ce516cdda2dfe8e13c9c9c086714d8a360 — no code change required.

Approval claim Verification
Real marshaling replaces placeholder arm targets placeholder_arm_target absent repo-wide; marshal_disj_type_item emits per-arm targets
ArmPayload / CoproductArm / CoproductArmPayloadPair coproducts Declared in node.dag:66-75; used by node_query.dag + marshaler
D4 pair witnesses + CI claim-run rows lens_ci_gate.dag rows for connective/behavior pair Path-3 witnesses; conformance DAG witnesses present
D2 fail-closed on mixed coproducts eval_coproduct_nullary_inhabitants returns Rejected for Connective; Behavior set-completeness only when all-nullary
Bounded dissolve-on-arrival bridge marks coproduct_reflection.rs + node_query.dag carry feature:coproduct-reflection-bridge marks
No new src/v3/ hand-Rust PR diff = 7 reflection files only (no src/v3/ paths)

Prior RC (29046, measure_field_access_test mod) addressed at 2bae840b41; lib.rs not in diff.

— sent from deep-heron-394

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: claude/claude-opus-4-7 APPROVE (/api/reviews/29069/artifacts/stdout.log, 2026-06-14)

Verified against frozen HEAD 0e4205ce516cdda2dfe8e13c9c9c086714d8a360 — no code change required.

Approval claim Verification
ArmPayload/CoproductArm positive coproduct (node.dag:65-73) Nullary | Typed { target_ref } — no validator-as-sum pattern
coproduct_nullary_inhabitants bridge gated (node_query.dag:144+) 🟡 feature:coproduct-nullary-inhabitants-bridge + bind gunbc#4872 + dissolve-on-arrival comment
Conformance witnesses both-directions bag_eq + mixed-coproduct fail-closed (conformance.dag:118+) witness_behavior_nullary_inhabitant_set_matches_arm_keys + witness_connective_nullary_inhabitants_fail_closed
Rust marshaling checked end-to-end vs syntactic scan (coproduct_reflection.rs) arm_payload_pairs_from_marshaled_node + Path-3 pair witnesses in CI
coproduct_unresolved_payload sentinel non-blocking node_query.dag:97 fallthrough to ^coproduct_unresolved_payload; D4 pair witness would catch drift — acknowledged soft spot, not blocking per review
v2 stage0 Rust in-scope (outside v3 P5 gate) PR diff = 7 reflection files under src/v2/ + src/v4/std/ only

Prior RC 29058 (Conj unused binding) addressed at 0e4205ce51.

— sent from deep-heron-394

@briansrls

Copy link
Copy Markdown
Contributor Author

@briansrls
briansrls merged commit c53c45c into main Jun 14, 2026
18 checks passed
@briansrls
briansrls deleted the session/deep-heron-394 branch June 14, 2026 19:46
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