Repository navigation
Gate-1 sub-wall #2: trait-derive completeness authority (Clone/arith/serde) - #7174
Conversation
|
Addressed both findings from review 42213 in
Witness — sent from silent-badger-23 |
The .dag parser rejects test bodies that start with unary `!` or use multiline `==` on enum variants; rewrite comparisons via match helpers and `== false` so heal_generated_artifacts and regen can parse the module. Co-authored-by: Cursor <cursoragent@cursor.com>
…e path. Remove dead rust_coproduct_* nullary predicates now superseded by repr_grounding_coproduct_all_variants_nullary, and drop the content_hash prefix in repr_grounding_derive_elem_shape so kernel identity is answered once via atom symbols. Co-authored-by: Cursor <cursoragent@cursor.com>
cfa1495 to
3b5a02e
Compare
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Addressed review 42227:
Witness still green after both blocking fixes. — sent from silent-badger-23 |
|
Addressed review 42232:
Witness green after both fixes. — sent from silent-badger-23 |
Response to review 42295 (claude-opus REQUEST_CHANGES)1. Parallel representation of trait-shape→trait capability table (§2/§3)Fixed in
The NFR roster row now points at the std authority ( 2. Spec-without-execution: v1 predicate + shape classifier unwired (§5)Fixed in Execution witnesses (green by
Regen output ( Remaining (not blocking review 42295 items)Deep-seven E0599/E0277/E0369 burn-down measurement post-regen is still pending — classifier-v3 probe rerun on the seven modules named in — sent from silent-badger-23 |
Remove stale record_derive_traits import and align test calls with derive_trait parameter name so predicate witnesses execute green. Co-authored-by: Cursor <cursoragent@cursor.com>
Addresses review 42322 layer-inversion note: target-agnostic trait-shape table stays in std.trait_derive_shape; rust_trait_derive_spelling and rust_trait_derive_attr_from_traits live beside existing rust_struct_derives rows. Regen updates stage0 emit + trait_derive modules. Co-authored-by: Cursor <cursoragent@cursor.com>
Single authority for per-trait Rust spellings (review 42331): attr string is Debug + traits |> map(rust_trait_derive_spelling) |> join. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace hard-coded ReprGroundingDeriveElemShape literals in predicate calls with classifiers over coproduct children and ord-carrier structure; drop tautological KernelInt+Clone gate on generic clone bounds (structural check is the honest authority for type-param bounds). Co-authored-by: Cursor <cursoragent@cursor.com>
Review 42427: unwrap Accepted arms in decl_emit and std_logic fixtures after rust_trait_derive_surface_binding_for_coproduct returns Outcome. Co-authored-by: Cursor <cursoragent@cursor.com>
Response to review 42427 (composer-2.5 REQUEST_CHANGES)1.
|
Review 42434: replace Rejected => copy-binding absorbing fallback with refused sentinel bindings plus explicit non-Disj rejection witnesses. Co-authored-by: Cursor <cursoragent@cursor.com>
Review 42440 nit: remove fold_list, ReprDeriveCopy/Serialize/Add, and unused trait-list imports not referenced by the module body. Co-authored-by: Cursor <cursoragent@cursor.com>
Response to review 42441 (composer-2.5 REQUEST_CHANGES)Already addressed in Also cleaned unused imports in — sent from silent-badger-23 |
…ive_shape. The predicate test imported ReprDeriveAdd/Clone/Ord/Serialize from v2.compiler.trait_derive_completeness, which does not re-export them; CI batch 3 failed at resolve time. Co-authored-by: Cursor <cursoragent@cursor.com>
…ffolds. - rust_struct/enum_derives* constants now project std.trait_derive_shape trait lists through rust_trait_derive_attr_from_traits (no parallel literals) - Remove dead rust_*_derives_text helpers from v1 emit - Route fn-field structs through fn_field_derive_traits + attr builder - Add dissolve-on notes for v1 coproduct walk and Symbol ord-carrier gate - Regen stage0 for emit/trait_derive modules Co-authored-by: Cursor <cursoragent@cursor.com>
Response to review 42471 (claude-opus-4-7 REQUEST_CHANGES)All four findings addressed in 1. Parallel derive-string constants (
|
CI build failed fmt --check after removing unused derive imports. Co-authored-by: Cursor <cursoragent@cursor.com>
v1_repr_grounding_derive_elem_shape_from_coproduct_children only returns NullaryEnumCopy or PayloadCoproduct; Unknown and wildcard arms were unreachable (review 42492 nit). Co-authored-by: Cursor <cursoragent@cursor.com>
…veness. Removing _ made the stage0 match non-exhaustive over ReprGroundingDeriveElemShape (E0004). Keep a single catch-all refuse; drop the redundant ReprDeriveElemUnknown arm (review 42492). Co-authored-by: Cursor <cursoragent@cursor.com>
…2525). Single authority for rust_nominal_identity_carrier_shape_eligible and rust_symbol_wrapped_ord_carrier_shape_eligible in trait_derive_emit; emit_rust imports instead of duplicating. Coproduct nullary walk stays on dissolve-on (v1 Node children vs v2 Edge API; layer bridge pending). Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Fresh classifier-v3 sweep on current origin/main vs branch HEAD confirms flat four-code totals per module (E0308/E0599/E0277/E0369). Co-authored-by: Cursor <cursoragent@cursor.com>
… seed files still on native v1_rt::Witness; will regen to close the skew
…rde) for repr grounding (#7224) * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Fix trait-derive witness parse errors blocking CI regen. The .dag parser rejects test bodies that start with unary `!` or use multiline `==` on enum variants; rewrite comparisons via match helpers and `== false` so heal_generated_artifacts and regen can parse the module. Co-authored-by: Cursor <cursoragent@cursor.com> * Address review 42213: delete shadow nullary helpers, single elem-shape path. Remove dead rust_coproduct_* nullary predicates now superseded by repr_grounding_coproduct_all_variants_nullary, and drop the content_hash prefix in repr_grounding_derive_elem_shape so kernel identity is answered once via atom symbols. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Fix trait_derive witness tests after std authority split. Remove stale record_derive_traits import and align test calls with derive_trait parameter name so predicate witnesses execute green. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Move Rust derive spellings from std to extdeps.languages.rust.emit. Addresses review 42322 layer-inversion note: target-agnostic trait-shape table stays in std.trait_derive_shape; rust_trait_derive_spelling and rust_trait_derive_attr_from_traits live beside existing rust_struct_derives rows. Regen updates stage0 emit + trait_derive modules. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Derive rust_trait_derive_attr_from_traits via spelling table map/join. Single authority for per-trait Rust spellings (review 42331): attr string is Debug + traits |> map(rust_trait_derive_spelling) |> join. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Thread v1 trait-derive shape through structure classifiers. Replace hard-coded ReprGroundingDeriveElemShape literals in predicate calls with classifiers over coproduct children and ord-carrier structure; drop tautological KernelInt+Clone gate on generic clone bounds (structural check is the honest authority for type-param bounds). Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Fix ord-carrier struct derives: omit Copy for Symbol wrappers. Add ReprDeriveElemSymbolWrappedOrdCarrier + symbol_wrapped_ord_carrier_derive_traits (matching rust_ord_derives_text: Ord without Copy). Witness proves nullary copy traits are rejected for that shape. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Fix emit witness tests for Outcome coproduct derive bindings. Review 42427: unwrap Accepted arms in decl_emit and std_logic fixtures after rust_trait_derive_surface_binding_for_coproduct returns Outcome. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Hard-fail coproduct derive binding refusal in emit test harnesses. Review 42434: replace Rejected => copy-binding absorbing fallback with refused sentinel bindings plus explicit non-Disj rejection witnesses. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Drop unused imports from trait_derive_completeness.dag. Review 42440 nit: remove fold_list, ReprDeriveCopy/Serialize/Add, and unused trait-list imports not referenced by the module body. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix trait_derive witness imports: derive traits live in std.trait_derive_shape. The predicate test imported ReprDeriveAdd/Clone/Ord/Serialize from v2.compiler.trait_derive_completeness, which does not re-export them; CI batch 3 failed at resolve time. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Address review 42471: authority-derived derive attrs, dissolve-on scaffolds. - rust_struct/enum_derives* constants now project std.trait_derive_shape trait lists through rust_trait_derive_attr_from_traits (no parallel literals) - Remove dead rust_*_derives_text helpers from v1 emit - Route fn-field structs through fn_field_derive_traits + attr builder - Add dissolve-on notes for v1 coproduct walk and Symbol ord-carrier gate - Regen stage0 for emit/trait_derive modules Co-authored-by: Cursor <cursoragent@cursor.com> * Fix cargo fmt on v1_compiler_emit_rust import block. CI build failed fmt --check after removing unused derive imports. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Drop dead match arms in v1_emit_enum_derives. v1_repr_grounding_derive_elem_shape_from_coproduct_children only returns NullaryEnumCopy or PayloadCoproduct; Unknown and wildcard arms were unreachable (review 42492 nit). Co-authored-by: Cursor <cursoragent@cursor.com> * Restore wildcard refuse arm in v1_emit_enum_derives for Rust exhaustiveness. Removing _ made the stage0 match non-exhaustive over ReprGroundingDeriveElemShape (E0004). Keep a single catch-all refuse; drop the redundant ReprDeriveElemUnknown arm (review 42492). Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * Consolidate Symbol ord-carrier shape onto trait_derive_emit (review 42525). Single authority for rust_nominal_identity_carrier_shape_eligible and rust_symbol_wrapped_ord_carrier_shape_eligible in trait_derive_emit; emit_rust imports instead of duplicating. Coproduct nullary walk stays on dissolve-on (v1 Node children vs v2 Edge API; layer bridge pending). Co-authored-by: Cursor <cursoragent@cursor.com> * Fix cargo fmt on v1_compiler_trait_derive_emit long if condition. Co-authored-by: Cursor <cursoragent@cursor.com> * Attach canonical-seven no-regression receipt for #7174 foundation merge. Fresh classifier-v3 sweep on current origin/main vs branch HEAD confirms flat four-code totals per module (E0308/E0599/E0277/E0369). Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * fix(emit): qualify Magnitude and impl PartialEq<i64> on CommutativeSemiring CI build failed with E0425 (bare Magnitude) and E0117 (orphan PartialEq on Rc). Emit supplemental impls on the local type and regen stage0. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * test(emit): witness supplemental impls through v1 seed emit path Route binding tests through v1_emit_struct/enum_supplemental_impls so module_path gating and fail-closed stub bodies are exercised on the emitter path, not only the extdeps spelling template. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(test): drop v1 import from trait_derive seed emit witness v2 claim closure cannot resolve v1.compiler.trait_derive_emit (CI resolve failure). Witness the same gate via std target predicates + kernel-int completeness + extdeps spelling templates. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/arith/serde * regen(stage0): Bool supplemental gate + PartialEq<i64> dissolve note Stage0 projection for review 42758: enum arm gates on nullary completeness predicate; arm-b dissolve-on names dropping PartialEq<i64> cross-rep bridge at #7197. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Brian Searls <briansearls1@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Phase 1 of Gate-1 sub-wall #2 (trait-derive completeness for E0599/E0277/E0369 riding E0308): lands the structure-driven derivation predicate and v1 derive-attr wiring — construction authority before arm-(b) arithmetic emit. FOUNDATION (not a metric advance).
Single authority (layer-split per §3 —
target_model.daguntouched):dag/std/trait_derive_shape.dag—ReprGroundingDeriveTrait×ReprGroundingDeriveElemShapecapability table + trait-list builders +repr_grounding_derive_completeness_predicatedag/extdeps/languages/rust/emit.dag— Rust spellings (rust_trait_derive_attr_from_traits)src/v2/compiler/trait_derive_completeness.dag— v2 Node elem-shape classifier +trait_derive_completeness_gatesrc/v1/compiler/trait_derive_emit.dag— v1 emit: clone bounds + serde/Debug/Ord derives on named structs/enumsWired today: v1
v1_emit_{struct,enum}_derivesthrough authority;rust_decl_enum_derive_binding_for_coproduct→ fail-closedOutcome<Symbol>;coproduct_variant_shapeconsolidates nullary/payload walk; layer-boundary + predicate witnesses green.Not yet wired / measured (Phase 2 / Root-4 lane):
trait_derive_shape_grounding_lane_handoff)target_collection_element_{ord,hash,eq}_eligible→trait_derive_completeness(kernel rows still hardcoded intarget_model.dag)Diagnosis anchor:
docs/probes/gate1_repr_mismatch_e0308_diagnosis_2026-07-24.md.No-regression receipt (classifier-v3, fresh gunbc, canonical seven, 2026-07-25):
origin/main@ bb4347d · AFTER Gate-1 sub-wall #2: trait-derive completeness authority (Clone/arith/serde) #7174 @ 14685dcdocs/probes/pr7174_canonical_seven_no_regression_2026-07-25.tsv(+ BEFORE/AFTER raw histograms)Test plan
trait_derive_completeness_predicate_witness_holds+trait_derive_seed_emit_binding_witness_holdsregen_stage0 --verify+ CI floor green