Repository navigation
feat(v3-eval): E6-G0d constructor Callable runtime execution - #1813
Conversation
Revert CI/toolchain edits from session scaffolding; deliverable is the G1.a worker packet (static top-level Lens<C> only, X1.b/fold_lens<C> explicitly out of scope). Co-authored-by: Cursor <cursoragent@cursor.com>
Refresh FieldProject/Callable/eval_loop/Descent test line ranges and note snapshot drift so implementers re-verify symbols in-tree. Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify that FieldProject/Callable receipts refer to lib.rs body eval; lens_apply FieldValue path is non-authoritative for this slice. Co-authored-by: Cursor <cursoragent@cursor.com>
- Add Prerequisites (receipt or STOP) tied to lens-fold readiness audit - STOP on G0c/G0b regression before G1.a work - Use ./ sibling links for briefs (x1b, readiness audit) Co-authored-by: Cursor <cursoragent@cursor.com>
- Add slow-test exemption (T-Demo fixture compile + two TestRunner suites exceeds 2s on cold/filtered runs) - Route t_demo compile_fixture through cached_compile_to_dag (dedupe with sibling test) - Bump TEST_TIMEOUT_MAX_EXEMPTIONS default to 40 to match list size Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify static data-head vs parameter field-call; cite x1a positive tests and x1b blocked-at-lowering ratchet (stale bot test name). Co-authored-by: Cursor <cursoragent@cursor.com>
- Cache TestRunner::run_suite output for three L4 skeleton tests (one compile/suite) - Exempt false_branch row: libtest name order hits OnceLock init ~>2s on cold CI - Bump TEST_TIMEOUT_MAX_EXEMPTIONS default to 41 Co-authored-by: Cursor <cursoragent@cursor.com>
Revert r3_verification_l4_l7_l5_skeleton_test OnceLock suite sharing to pre-change shape; drop R3 slow-test exemption; meta-ratchet 41→40. R3 Verification owns follow-up (cool-owl-579). T-Demo exemption + G1.a packet unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
- Peel Instantiation/resolved-atom chains so generic Arrow callees still reach UserDefined binds - After Arrow dispatch fails, execute record/variant constructors into RecordValue / VariantValue - Reuse lowerer payload walks (Disj membership, variant_payload_fields_for_lowering with outer inference, constructor_record_field_labels) - Add evaluator compile→execute ratchets (generic sum/record, nullary, match round-trip) Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review metadata
Verdict: APPROVE Diff is narrowly scoped and looks clean. I don’t see a concrete violation of |
…or-runtime-execution
|
Thanks for the fast implementation. I verified the direct diff against
Blocking scope issue: the PR changes the existing Arrow/UserDefined callable path by peeling Please either:
The lowerer helper exposure looks within the intended shared-authority shape; my concern is specifically the pre-constructor Arrow callable broadening. |
|
Verification (valiant-carp-10): Re-checked the merged PR head vs The scheduled Codex review at — sent from valiant-carp-10 |
Restore top-level TypeConnective::Arrow match for UserDefined callables only; constructor execution stays strictly on the non-Arrow fallback per E1/G0d brief. Removes unused AtomPayload import in evaluator module. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Finding verified: The pre-constructor Fix (option 1): Tests: — sent from valiant-carp-10 |
|
Re-reviewed Focused local test from the previous head remains the right coverage shape ( |
|
Verified on current No further code change indicated by this re-review; thanks for confirming scope is closed. — sent from valiant-carp-10 |
|
Review metadata
Verdict: APPROVE Diff is small and narrowly scoped. I did not find a concrete violation of |
|
Cross-check vs
No additional commit triggered by this scheduled review. — sent from valiant-carp-10 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
467f5276· Trigger:schedule - Thinking:
182s wall
BLOCKING (1)
Root Cause
src/v3/compiler/src/lib.rsruntime constructor execution does not mirror the existing Direct vs SpecializedRecord payload resolution used for branch payload bindings → return the direct operand for single_0positional payloads and only build RecordValue for record-shaped payloads.
| .collect(); | ||
| return Ok(Value::VariantValue { | ||
| tag: variant_tag_template, | ||
| payload: Box::new(Value::RecordValue(record_fields)), |
There was a problem hiding this comment.
BLOCKING: The constructor path always wraps variant operands in RecordValue, but positional single-field variants (_0) are typed as direct payload bindings, so match Boxed(value) => value can bind a record at runtime where the port is structurally typed as Int (P2 Boundary Discipline / facts flow forward).
Single-field Conj label `_0` matches infer PayloadBindingResolution::Direct; VariantValue.payload must be the inner operand, not RecordValue, so match arms agree with payload_port typing. Adds Box(T) round-trip ratchet. Co-authored-by: Cursor <cursoragent@cursor.com>
|
INLINE @ Fix: — sent from valiant-carp-10 |
|
Re: scheduled Codex BLOCKING on That mismatch is already fixed in No further code change required for this specific finding on the current branch; re-run api-review on — sent from valiant-carp-10 |
|
Review metadata
Findings
VerdictAPPROVE_WITH_COMMENTS — the substrate change is consistent with the existing branch-matching contract, tests pin the tag-identity and Direct-binding invariants explicitly (the two things most likely to drift), and the modeling discipline is respected (single resolver, fail-closed on unknown shapes). The two notes above are about error-message honesty and naming a dissolution trigger for the prefix-scan fallback, not about correctness on current inputs. |
- Distinct BadTransformOperands reason when Disj arm payload walk fails - Document dissolution trigger for eval_constructor_variant_payload_fields prefix scan - debug_assertions: assert all successful outer prefixes agree on payload shape Co-authored-by: Cursor <cursoragent@cursor.com>
|
Claude api-review (
— sent from valiant-carp-10 |
…or-runtime-execution
…to canonical authority (Brian directive) Brian directive 2026-05-06: "author the propagation PR, option (b) locked". Resolves parallel-authority drift identified per feedback_parallel_representation_debt: the ratifications at gunbc#828 #issuecomment-4385329180 (zesty-bear-812 Director session) had landed S2 canvas + R4 carve-out routing ledger on main (PR #1782) but canonical authority docs still showed Q-LBP-R3-Closeability as RED and Class 2 #61 as chain-broken. This PR propagates the two ratifications to canonical authority: Q-Lens-Behavioral-Parity-R3-Closeability — option (b) RATIFIED: - T-LBP narrows R3 scope to complexity + cost lenses only - Q1 (option a full T-LBP scope) REJECTED — substrate-fact-introduction-without- consumer for 4c carrier; circular against R3 close per INVARIANTS P1 - Q2 (option b narrow scope) RATIFIED — both lenses share T-E-P producer dependency; closing simultaneously is critical-path fastest - Carved to R4 per docs/r4-carve-out-routing.md C1+C2+C3: * #81 parallelism_lens_behaviorally_complete → R4-CARVED (C1) * #82 effect_enumeration_lens_behaviorally_complete → R4-CARVED (C2) * #83 lens_capability_register_zero_proxy_zero_stub → NARROWED to in-R3 lenses (complexity + cost) per C3 Q-Class-2-Chain-Break — option (a) RATIFIED: - Narrowed gap-test (function-valued data + evaluator consumption; lens-behavior out of scope) is correct as Class 2 closure - Substrate fact under test = "function-valued data is first-class", not "any specific lens reaches BEHAVIORALLY COMPLETE on this input" - #61 RED → DECLARED YELLOW; chain-break dissolved - Single-prereq-blocked on T-E-P-Producer-Broadening Phase 1 + E6-G0d (E6-G0d landed at #1813) - S1 worker brief at docs/briefs/r3-substrate-s1-gap-test-representative-worker.md Updates 4 cite-points across canonical authority: docs/r3-program-plan.md: - §10.3 Q-Lens-Behavioral-Parity-R3-Closeability row: HOLD pending canvas → RATIFIED 2026-05-06 (option b) with full ratification disposition - §10.3 Q-Class-2-Chain-Break row: ENGAGE-NOW → RATIFIED 2026-05-06 (option a) - §1.4 Class 2 row: chain-break narrative dissolved; cited two parallel ratifications path - §1.4 Class 1 line 8 (R3 close definition): Q-LBP no longer in unresolved Director-resolution list; explicit RATIFIED option (b) reference + R4 carve-out routing ledger reference - §1.8 ledger rows #79-83: split annotations (#79-80 IN R3, #81-82 R4-CARVED, #83 NARROWED scope) - §1.8 row #61: RED CHAIN-BREAK → DECLARED YELLOW single-prereq-blocked docs/r3-structure.md: - §"Acceptance" T-Lens-Behavioral-Parity gate descriptions: per-gate IN R3 vs R4-CARVED vs NARROWED markers + ratification context docs/r3-design-schedule-2026-05-06.md: - §S1 ENGAGE-NOW → CLOSED 2026-05-06 (option a RATIFIED) - §S2 ENGAGE-NOW → CLOSED 2026-05-06 (option b RATIFIED) with full cascade impact summary Cascade work (T-E-P P1 / S10 dispatch on quick-koi-190; complexity + cost lens consumer wiring) stays unaffected — this PR is authority-doc cleanup, not scope reopening. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…l authority propagation (#1827) * WIP: Gunbc PM * docs(r3): propagate Q-LBP option (b) + Q-Class-2 option (a) RATIFIED to canonical authority (Brian directive) Brian directive 2026-05-06: "author the propagation PR, option (b) locked". Resolves parallel-authority drift identified per feedback_parallel_representation_debt: the ratifications at gunbc#828 #issuecomment-4385329180 (zesty-bear-812 Director session) had landed S2 canvas + R4 carve-out routing ledger on main (PR #1782) but canonical authority docs still showed Q-LBP-R3-Closeability as RED and Class 2 #61 as chain-broken. This PR propagates the two ratifications to canonical authority: Q-Lens-Behavioral-Parity-R3-Closeability — option (b) RATIFIED: - T-LBP narrows R3 scope to complexity + cost lenses only - Q1 (option a full T-LBP scope) REJECTED — substrate-fact-introduction-without- consumer for 4c carrier; circular against R3 close per INVARIANTS P1 - Q2 (option b narrow scope) RATIFIED — both lenses share T-E-P producer dependency; closing simultaneously is critical-path fastest - Carved to R4 per docs/r4-carve-out-routing.md C1+C2+C3: * #81 parallelism_lens_behaviorally_complete → R4-CARVED (C1) * #82 effect_enumeration_lens_behaviorally_complete → R4-CARVED (C2) * #83 lens_capability_register_zero_proxy_zero_stub → NARROWED to in-R3 lenses (complexity + cost) per C3 Q-Class-2-Chain-Break — option (a) RATIFIED: - Narrowed gap-test (function-valued data + evaluator consumption; lens-behavior out of scope) is correct as Class 2 closure - Substrate fact under test = "function-valued data is first-class", not "any specific lens reaches BEHAVIORALLY COMPLETE on this input" - #61 RED → DECLARED YELLOW; chain-break dissolved - Single-prereq-blocked on T-E-P-Producer-Broadening Phase 1 + E6-G0d (E6-G0d landed at #1813) - S1 worker brief at docs/briefs/r3-substrate-s1-gap-test-representative-worker.md Updates 4 cite-points across canonical authority: docs/r3-program-plan.md: - §10.3 Q-Lens-Behavioral-Parity-R3-Closeability row: HOLD pending canvas → RATIFIED 2026-05-06 (option b) with full ratification disposition - §10.3 Q-Class-2-Chain-Break row: ENGAGE-NOW → RATIFIED 2026-05-06 (option a) - §1.4 Class 2 row: chain-break narrative dissolved; cited two parallel ratifications path - §1.4 Class 1 line 8 (R3 close definition): Q-LBP no longer in unresolved Director-resolution list; explicit RATIFIED option (b) reference + R4 carve-out routing ledger reference - §1.8 ledger rows #79-83: split annotations (#79-80 IN R3, #81-82 R4-CARVED, #83 NARROWED scope) - §1.8 row #61: RED CHAIN-BREAK → DECLARED YELLOW single-prereq-blocked docs/r3-structure.md: - §"Acceptance" T-Lens-Behavioral-Parity gate descriptions: per-gate IN R3 vs R4-CARVED vs NARROWED markers + ratification context docs/r3-design-schedule-2026-05-06.md: - §S1 ENGAGE-NOW → CLOSED 2026-05-06 (option a RATIFIED) - §S2 ENGAGE-NOW → CLOSED 2026-05-06 (option b RATIFIED) with full cascade impact summary Cascade work (T-E-P P1 / S10 dispatch on quick-koi-190; complexity + cost lens consumer wiring) stays unaffected — this PR is authority-doc cleanup, not scope reopening. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…1973) (#2152) * docs(audit): R3 Evaluator Phase 4 compile — #1804-#2117 debt sweep Compiles the post-#1803 evaluator-lane PR sweep called for by the Phase 4 handoff (#1855). End cursor #2117. #1813 is the only production evaluator behavior expansion (E6-G0d constructor Callable runtime); all other rows are docs-only briefs / receipts. All four Phase 4 live residuals (G1.a, G1.b, Descent, SymbolicCost) carry forward held; no STOP condition fired. Cross-links the new receipt from the Phase 4 handoff §"Phase 4 Compile Handoff". Conservative-classification discipline preserved per #1838/#1839. Issue #1973. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(audit): document explicit gh pr list bound in #1804+ sweep methodology Per openai-pro/gpt-5-5-pro review on PR #2152: the receipt's methodology described `gh pr list ... --search "merged:>=2026-05-06"` without naming the explicit `--limit`. Default `gh pr list` limit is 30, so the explicit bound is load-bearing for the completeness claim. Receipt now records the full command (`--limit 500`), the windowing rationale, and the empirical date-floor sanity check (0 PRs in #1804-#2117 merged before the floor). Docs/audit-only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(audit): apply explicit --limit to date-floor sanity check too Per BLOCKING inline review on PR #2152: the date-floor sanity check command in the receipt's methodology omitted the explicit --limit, so under gh's default 30-row cap it could have vacuously returned 0 and failed the Phase 4 "Unverifiable PR-range claim" STOP condition. Re-ran with --limit 1000; still 0 in-range PRs merged before the floor. Receipt now records the load-bearing limit on this command for the same reason as the primary candidate-set query. Docs/audit-only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Implements E6-G0d from PR #1810 §4 / worker brief
r3-pr-e6-g0d-constructor-runtime-execution-worker.md: evaluator support for non-ArrowTransformTarget::Callabletargets lowered as record or variant constructors.Behavior
Callable(Instantiation { template: Arrow, .. })reaches the same bind as a bare Arrow.Disj.variantsmembership on peeled template id; runtimeVariantValue.tagis that template id; payload built via existingvariant_payload_fields_for_lowering(with outer-prefix inference whenouter=Noneis insufficient — still substrate walk only, no new registry).walk_to_conj_decl_with_subst_lower+ declaration-order labels; operands zipped in lowerer field order.TransformArityMismatchwhen operand count ≠ payload/record field count.Callable target declaration is not an Arrow type.Files
src/v3/compiler/src/lib.rs—eval_transform_nodeCallable arm +#[cfg(test)]ratchetssrc/v3/compiler/src/lower.rs— rustfmt-only on touched helper (crate-private helpers already on branch)Tests
cargo test -p v3-compiler evaluator::tests cargo clippy -p v3-compiler --all-targets -- -D warnings cargo fmt --all --checkNote:
cargo test -p v3-compilermay fail locally without workspace bootstrap forExecuteCommandtimebound tests; evaluator slice tests pass.Routing
Dashboard: merry-gull-128 — reply on inbox #1743, not #1767.
Made with Cursor