Repository navigation
audit(v3): T-ImpossibleBugs nested-optional flatten class-close - #1173
Conversation
|
Manager sign-off (acting R2 Impossible-Bugs Manager via vivid-moth-43) — LGTM for class-close. Audit receipt matches the dispatch scope:
No scope expansion, no substrate-gap escalation. (GitHub blocks self-approve since the PR shares my author identity, hence comment-not-review.) On merge I'll signal R2 Release Manager (bold-lynx-173 #1135) citing this PR's structural test as the demo per structural-acceptance-per-lane-close discipline. |
|
Review metadata
Verdict: APPROVE No concrete violations found in the diff. The added coverage is narrowly scoped to the nested-optional flatten invariant, uses existing test surfaces, and does not introduce new substrate shape or parallel authority. Verification: |
|
Review metadata
Findings: None. The diff only adds tests and a Verdict: APPROVE — Narrowly scoped audit/regression coverage for nested-optional flatten and class-close; no rubric violations spotted in the diff. |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
91d68262· Trigger:schedule - Thinking:
206s wall
✅ Test-only mixed Rust/.dag class-close covers the nested optional flatten paths with no blocking concerns.
|
Review metadata
APPROVE — diff is small and test-only: a Rust unit test guarding |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
2c18feda· Trigger:schedule - Thinking:
127s wall
Non-blocking — Strengths
src/v3/compiler/src/dag.rsThe added unit test targets the root cardinality invariant directly by proving AtMostOne does not flatten over an Exact(2) inner bound.src/v3/compiler/tests/dag/t_impossiblebugs_nested_optional_flatten.dagThe class-close TestClaim exercises the surface Int?? path as a compile-time proposition without adding new substrate types or duplicate authority.
✅ No blocking concerns; this test-only mixed Rust/.dag PR cleanly ratchets nested optional normalization coverage.
|
Review metadata
Verdict: APPROVE Diff is narrowly scoped to regression coverage for nested optional cardinality flattening. I found no concrete violations of the pinned invariants, modeling discipline, coding guide, or testing guide. Verification note: I attempted targeted |
Summary
Class-close audit for T-ImpossibleBugs nested-optional flatten.
Implementation had already landed via #890 + #962. This PR closes the audit gap found at HEAD: the non-
AtMostOnespoofing regression existed, but used a helper outside this test module's scope, so the focused lib test did not compile. The test now constructs theExact(2)cardinality declaration directly and verifiesAtMostOne(Exact(2, Int))does not collapse.Audit Receipt
Structural
.dagTestClaim gate is present and runner-backed:src/v3/compiler/tests/dag/t_impossiblebugs_nested_optional_flatten.dag:nested_optional_flatten_compile_errorsrc/v3/compiler/tests/integration/t_pb_b_1_dag_runner_test.rs:t_impossiblebugs_nested_optional_flatten_suite_passes_through_runnerCoverage confirmed at HEAD:
T??flattens:int_literal_cardinality_test::nested_optional_flatten_holds_for_surface_double_questionint_literal_cardinality_test::nested_optional_flatten_via_generic_specializationT?programs have no nestedAtMostOne:int_literal_cardinality_test::nested_optional_flatten_holds_in_bootstrap_dagAtMostOnespoof unaffected:dag::tests::cardinality_idempotence_does_not_collapse_non_at_most_one_inner_boundConstruction-path audit:
Dag::alloc_cardinality_decl:src/v3/compiler/src/lower.rsDag::alloc_cardinality_decl/cardinality_idempotent_target:src/v3/compiler/src/infer.rs,src/v3/compiler/src/dag/builder.rstype_connective_cardinality:src/v3/compiler/src/dag.rsCardinalityPayload::new_uncheckedremains private tocrate::dag; remaining generated snapshot uses are insidedagbootstrap include modules and are covered by the no-nested-AtMostOne bootstrap regression.Verification
cargo fmt --all --checkcargo test -p v3-compiler --lib cardinality_idempotence_does_not_collapse_non_at_most_one_inner_bound -- --nocapturecargo test -p v3-compiler --test integration nested_optional_flatten -- --nocapturecargo test -p v3-compiler --test integration t_impossiblebugs_nested_optional_flatten_suite_passes_through_runner -- --nocapturecargo check -p v3-grounding-engine