contract-coherence-zero
Every remaining test-all failure is one shape: the post-AIMS realization
ContractCoherenceViolation. The VF-3 oracle (ori_arc::aims::verify::oracle::verify_coherence)
re-derives MemoryContract from subject-independent realized evidence and disagrees with the
inferred contract. Every disagreement is in the SAME direction: the inferred contract is
optimistic, the realized evidence is conservative.
Measured baseline
Source: test-all run 1785046490971773359-7aecd20f, snapshot 45b912e37480,
Infrastructure failures: 0 (the harness is sound; every failure is compiler-side).
| Metric | Reading |
|---|---|
| passed | 24964 |
| failed | 380 |
| lcfail (LLVM compile fail) | 334 |
| failure records | 401 |
| infrastructure failures | 0 |
Mismatch taxonomy
| Occurrences | Mismatch | Inferred source | Cure surface |
|---|---|---|---|
| 458 | EffectMismatch { field: "may_share", inferred: false, realized: true } | IC-5 EffectSummary | aims-rules.md IC-5 derivation vs realized sharing evidence |
| 100 | ParamAccess { inferred: Borrowed, realized: Owned } | IC-3 ParamContract.access | IC-2/IC-3 SCC fixpoint vs realized owned transfer |
| 11 | ParamMayShare { inferred: false, realized: true } | IC-3 ParamContract.may_share | IC-3 per-param may_share(OR) join |
Records by kind-set: 333 EffectMismatch only; 41 ParamAccess only;
17 EffectMismatch + ParamAccess; 10 ParamMayShare only.
Failing AOT integration tests (46)
Suite aot, failure_kind test_failure. Every one panics at
compiler/ori_llvm/tests/aot/util/compile.rs:116 with error[E5001]: LLVM module verification failed
carrying a ContractCoherenceViolation.
| Test | Mismatch kinds |
|---|---|
arc::test_arc_borrowed_param_str_concat_caller_survives | ParamAccess(Borrowed->Owned) |
arc::test_arc_borrowed_param_str_concat_not_cow | EffectMismatch(may_share), ParamAccess(Borrowed->Owned) |
arc::test_arc_opaque_closure_wrapper | ParamAccess(Borrowed->Owned) |
borrow_independence::test_borrow_nested_project | EffectMismatch(may_share) |
borrow_independence::test_borrow_then_let_alias | EffectMismatch(may_share) |
borrowed_invoke_leak::mutation_in_closure_declined_clean | EffectMismatch(may_share) |
burden_yield_identity_push_dup::test_yield_identity_borrowed_source_single_reuse_no_double_free | EffectMismatch(may_share) |
default_minmax_mono_in_generic::test_min_max_str_in_generic | ParamMayShare(false->true) |
derives::test_aot_derive_tuple_field_compare_hash | EffectMismatch(may_share) |
enum_discriminant::test_enum_rc_payload_narrowed_tag | EffectMismatch(may_share) |
error_constructor::test_error_constructor_first_class_value | EffectMismatch(may_share) |
fat_ptr_iter::control_flow::test_matrix_nested_list_two_calls | EffectMismatch(may_share) |
fat_ptr_iter::cow::test_push_element_borrowed_param | EffectMismatch(may_share) |
fat_ptr_iter::cow::test_push_element_borrowed_param_two_calls | EffectMismatch(may_share) |
fat_ptr_iter::for_yield::test_yield_identity_str_list_borrowed_param | EffectMismatch(may_share) |
fat_ptr_iter::for_yield::test_yield_identity_str_list_two_calls | EffectMismatch(may_share) |
fat_ptr_iter::nested_list::test_nested_str_list_two_calls | EffectMismatch(may_share) |
generics::test_borrow_list_int_for_yield_then_return_no_leak | ParamMayShare(false->true) |
generics::test_borrow_list_int_mixed_apply_then_return_no_leak | ParamMayShare(false->true) |
generics::test_borrow_list_int_one_borrow_apply_then_return_no_leak | ParamMayShare(false->true) |
generics::test_borrow_list_int_two_borrow_applies_then_return_no_leak | ParamMayShare(false->true) |
generics::test_borrow_list_str_for_yield_then_return_no_leak | ParamMayShare(false->true) |
generics::test_edge_consumed_and_returned_uses_return_flow_only | ParamMayShare(false->true) |
generics::test_iter_then_return_str_elements_survive_iter_consume | ParamMayShare(false->true) |
higher_order::test_closure_returned_from_function | ParamAccess(Borrowed->Owned) |
higher_order::test_multi_inst_map_lambda | EffectMismatch(may_share) |
inc_symmetry::test_inc_symmetry_borrow_then_let_alias | EffectMismatch(may_share) |
ir_checks::run_all_codegen_filecheck | EffectMismatch(may_share) |
ir_quality_attributes::test_closure_wrapper_sret_no_noundef | ParamAccess(Borrowed->Owned) |
ir_quality_attributes::test_indirect_params_have_dereferenceable | EffectMismatch(may_share), ParamAccess(Borrowed->Owned) |
ir_quality_attributes::test_indirect_params_have_nonnull | EffectMismatch(may_share), ParamAccess(Borrowed->Owned) |
ir_quality_attributes::test_indirect_params_have_noundef | EffectMismatch(may_share), ParamAccess(Borrowed->Owned) |
iterator_drop::enum_tagged_ptr_match_empty_path | EffectMismatch(may_share) |
iterators::test_for_over_range_iterator | EffectMismatch(may_share) |
journey_guard::test_journey_19_rc_lifecycle | EffectMismatch(may_share) |
match_alias::test_closure_option_none_capture_fresh_arm_no_suppress | EffectMismatch(may_share) |
match_alias::test_closure_option_str_capture_two_call_no_leak | EffectMismatch(may_share) |
match_alias::test_closure_result_err_capture_two_call_no_leak | EffectMismatch(may_share) |
match_alias::test_let_alias_struct_str | EffectMismatch(may_share) |
memory_stress::test_mem_diamond_closure_capture | EffectMismatch(may_share) |
multi_module_glue::single_module_first_class_error_still_works | EffectMismatch(may_share) |
predicate_stack_probe::probe_closure_transferred_into_struct_no_double_free_negative | EffectMismatch(may_share) |
predicate_stack_probe::probe_owned_set_int_returned_after_iter_freed_once | ParamMayShare(false->true) |
predicate_stack_probe::probe_project_borrowed_view_struct_str_field_no_double_free | EffectMismatch(may_share) |
predicate_stack_probe::probe_set_str_collect_iter_consume_then_return_param_no_leak | ParamMayShare(false->true) |
strings::test_str_in_tuple | EffectMismatch(may_share) |
Failing ori_llvm spec sources (21)
Suite ori_llvm, failure_kinds llvm_compile_fail (334) + file_error (21).
The 334 compile failures collapse onto these 21 distinct sources.
| Source | Mismatch kinds |
|---|---|
tests/aims/moved_fields_partial_move.ori | EffectMismatch(may_share) |
tests/spec/aims/symmetric_partial_move_allowed.ori | EffectMismatch(may_share) |
tests/spec/declarations/argument_punning.ori | ParamAccess(Borrowed->Owned) |
tests/spec/declarations/default_params.ori | EffectMismatch(may_share), ParamAccess(Borrowed->Owned) |
tests/spec/declarations/sum_types.ori | EffectMismatch(may_share) |
tests/spec/expressions/coalesce.ori | EffectMismatch(may_share) |
tests/spec/expressions/lambda_mono.ori | ParamAccess(Borrowed->Owned) |
tests/spec/expressions/template_literals.ori | ParamAccess(Borrowed->Owned) |
tests/spec/generics/composite_mono_enum_eq.ori | EffectMismatch(may_share) |
tests/spec/patterns/match.ori | EffectMismatch(may_share) |
tests/spec/patterns/match_patterns.ori | EffectMismatch(may_share) |
tests/spec/test_coalesce_copy.ori | EffectMismatch(may_share) |
tests/spec/test_coalesce_minimal.ori | EffectMismatch(may_share) |
tests/spec/traits/derive/comparable_hashable_wrapper_fields.ori | EffectMismatch(may_share) |
tests/spec/traits/index/definition.ori | EffectMismatch(may_share) |
tests/spec/traits/method_resolution/builtin_method_known.ori | EffectMismatch(may_share) |
tests/spec/traits/traceable/error_trace_heap_msg.ori | EffectMismatch(may_share) |
tests/spec/types/enum/niche/option_str.ori | EffectMismatch(may_share) |
tests/spec/types/sum/test_many_types.ori | EffectMismatch(may_share) |
tests/spec/types/sum/test_single_field.ori | EffectMismatch(may_share) |
tests/spec/types/sum_types.ori | EffectMismatch(may_share) |
Deliverables
- Cure
EffectMismatch { field: "may_share", inferred: false, realized: true }— 458 occurrences across 350 failure records, the dominant class. IC-5EffectSummaryderivation under-reports sharing the VF-3 oracle re-derives from realized evidence. - Cure
ParamAccess { inferred: Borrowed, realized: Owned }— 100 occurrences across 58 failure records. IC-3ParamContract.accessdisagrees with the realized owned transfer. - Cure
ParamMayShare { param_index, inferred: false, realized: true }— 11 occurrences across 10 failure records. Per-param IC-3may_shareunder-reports. - Prove each cure in the compiled Lean BEFORE implementing per
arc.md§CP-1, then sync all four surfaces per §CP-2 (compiled Lean,.proof,aims-rules.md+arc.md, Annex E §AIMS). - All 46 failing
ori_llvm::aotintegration tests green: thearc,borrow_independence,borrowed_invoke_leak,burden_yield_identity_push_dup,generics,match_alias,fat_ptr_iter,higher_order,ir_quality_attributes,ir_checks,iterator_drop,predicate_stack_probe,memory_stress,journey_guard,derives,enum_discriminant,error_constructor,strings,iterators,multi_module_glue,default_minmax_mono_in_generic, andinc_symmetryclusters. - All 21 distinct
ori_llvmspec sources compile:tests/aims/moved_fields_partial_move.oriplus the 20tests/specfiles spanning declarations, expressions, patterns, types/sum, types/enum/niche, generics, aims, and traits (derive, index, method_resolution, traceable). - TDD matrix BEFORE the cure: mismatch-kind x contract-dimension x call-shape, each cell carrying a positive pin and a reverted-fix negative pin that FAILS when the cure is backed out.
- Layer coverage per
layer-coverage.md§1: L9 cross-executor parity (evaluator vs every affected admitted executor on one corpus) and L10 resource/ownership leak-freedom, each covered or explicitlyN/Awith a stated reason. - Re-run the north-star gate to a green terminal aggregate:
python -m scripts.test_all_runtime runthen its emitted blockingstatus_command, assertingfailed=0skipped=0lcfail=0and zero leaks with the AIMS verifier gate ACTIVE.
Discipline
- Calculus-first per
arc.md§CP-1: prove the governing theorem in the compiled Lean BEFORE implementing. A failing test is first-order evidence of an IMPLEMENTATION divergence (case a), never a licence to weaken the calculus. - Four-surface sync per
arc.md§CP-2: compiled Lean,.proof,aims-rules.md+arc.md, and Annex E §AIMS move in the same change set. - The oracle is the conservative party in all three shapes. Suppressing the oracle,
widening the inferred contract to match without proof, or gating the check on the
failing inputs is
INVERTED-TDD:gated-deliverable. - Every cure carries a reverted-fix negative pin that FAILS when the cure is backed out.