Repository navigation
δ - #536
δ#536
Conversation
|
ChatGPT review in progress... (view conversation) Check back in ~30 minutes for the full review. |
|
✅ Ready to merge. Clean refactor of variant-payload handling across all three emitters, lifts the structural choice into substrate per the E-5 clean-emission-contract discipline. What's new structurally
Substrate audit
Per-target fail-closed check
Each rejection names the constraint structurally. No silent accepts; no "unknown variant" panics. ✅ C-8. TestsFour per-target regression tests with structural assertions (not substring matches on rendered output):
Asserting the NEGATIVE (what must NOT appear) is particularly good — catches regressions where the renderer goes back to synthesizing intermediate bindings. Spec-comment disciplineEach target's
Matches the convention from the Stage 1c pilot (PR #494/#496/#509). Merge-readyNo blockers. Good example of substrate growth via the E-5 rule-class expansion pattern — authoring a new rule, picking per-target variants, consuming in all three emitters in the same PR (E-6 compliance). Stage 1c consumption list advances without a spec-authoring/consumption gap. |
ChatGPT ReviewPrinciple audit. Fail-closed. This looks good. The new rule is threaded as a required Illegal states unrepresentable. Improved. The new Facts flow forward. Strongly satisfied. The new fact is introduced once in Coproduct dissolution. I don’t see a problem here. The only new substrate coproduct is Single authority. Better than before. The new API-level enforcement. Mostly satisfied. The useful part is structural: target specs must now declare the rule, and invalid rule/target combinations are rejected at parse time. The less-strong part is still the bootstrap cache resolution by declaration name in Design question. Is What’s at stake is that this PR very cleanly solves downstream Path to convergence. I don’t see anything here that must change before merge. As follow-up debt, I would make one thing explicit: either add a regression showing that direct whole-payload consumption for named Rust payloads fails closed with a targeted emitter error, or broaden the contract from “field access” to full payload-binding semantics if whole-payload uses are intended to be supported. Everything else in this PR looks like real convergence work: one new declared fact, one shared helper, three target consumers, and matching regressions. Verdict. APPROVE. This is a clean cross-layer fix that matches both the thesis and the active modeling discipline: the target-specific behavior is declared in spec, consumed mechanically, and tested in each backend rather than recovered through backend-local heuristics. LOOP HEALTH: converging — this round dissolves prior per-emitter ad hoc behavior into one declared contract plus shared payload helpers, and it adds real consumer coverage instead of shifting debt sideways. |
briansrls
left a comment
There was a problem hiding this comment.
codex · gpt-5.4 · cfe54d12
BLOCKING (2)
Root Cause
src/v3/compiler/src/emit_go.rsThe new shared payload-binding abstraction models how downstream reads are answered but not whether the match site must emit a binding at all -> keep binding-site emission separate for Go or reject EmitBindingAlways until that path is implemented.src/v3/compiler/src/emit_rust.rsClean-emission tests replace the whole structural contract record instead of preserving untouched fields, so adding any new required field invalidates focused fixtures -> patch the existing record in tests or add a helper that overwrites one contract field while carrying the rest forward.
| self.indexes.clean_emission.pattern_bindings, | ||
| PatternBindingRuleBinding::EmitUnderscoreWhenUnused | ||
| ) && !self.port_is_consumed_from(path.output, binding.payload_port); | ||
| if !elide { |
There was a problem hiding this comment.
BLOCKING: Facts flow forward is broken here: the new path no longer emits any payload binding for the accepted EmitBindingAlways contract, so Go silently drops a supported clean-emission state and can still generate an unused v compile error.
| @@ -898,7 +903,24 @@ impl CleanEmissionContractBinding { | |||
| })?; | |||
There was a problem hiding this comment.
BLOCKING: This makes variant_payload_field_access mandatory without updating clean_emission_rejects_rust_invalid_pattern_binding_variants, so that focused fail-closed test now stops on a missing-field error before it reaches the intended invalid-pattern assertion.
|
BLOCKING (2) Root Cause
|
Opened from session-dashboard for session
smart-crane-443.