Skip to content

Test-migration: v1 diagnostics module (328 LOC, 12 tests) - #6213

Merged
briansrls merged 3 commits into
mainfrom
session/proud-hawk-812
Jul 3, 2026
Merged

briansrls merged 3 commits into
mainfrom
session/proud-hawk-812

Conversation

@briansrls

@briansrls briansrls commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Migrate src/v1/tests/src/diagnostics.rs to floor witness dag/test/claim/diagnostics_test.dag (exact stem diagnostics), then delete the v1 module.

Not 1:1 test-count parity — curated four high-signal floor witnesses (host-physics via diagnostics_witness + shell transport):

  1. diagnostics_import_resolution_holds — MissingExport message + span grounding + UnresolvedImport variant
  2. diagnostics_reexport_surface_holds — variant not re-exported through type-only import surface
  3. diagnostics_type_and_arity_holds — UnresolvedType + ArityMismatch on bare List but not List<Int>
  4. diagnostics_empty_list_context_holds — empty-list literal fails without collection context, passes with List<String> context

Dropped (tautological/redundant): clean-compile zero-diags sanity, multi-missing-export span bookkeeping, user-type arity false-negative, duplicate_module_detected (#[ignore] PERF).

Test plan

  • diagnostics_witness — all 4 suites pass locally
  • claim_batch --claim-run ... diagnostics_test.dag --functions diagnostics_import_resolution_holds,diagnostics_reexport_surface_holds,diagnostics_type_and_arity_holds,diagnostics_empty_list_context_holds — 4/4 PASS
  • cargo clippy -p v1-compiler --bin diagnostics_witness -- -D warnings — clean
  • No 03_resolve.dag / 04_infer.dag changes

@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 3, 2026 20:54
Brian Searls and others added 2 commits July 3, 2026 20:56
…parity.

Consolidate the 12 v1 diagnostic tests into four discriminating floor witnesses
(import resolution + span, re-export surface, type/arity, empty-list context)
and drop tautological or redundant cases per test-migration lane guidance.

Co-authored-by: Cursor <cursoragent@cursor.com>
#3.

Merge the dropped v1 unknown_type_name_no_arity_false_positive case back into
type_and_arity_discrimination alongside the List<Int> negative control.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Addressed in e8cb3aa.

Witness #3 negative controls — both asserted, not just named:

type_and_arity_discrimination in diagnostics_witness.rs now exercises three ArityMismatch axes in one suite:

  1. Positive: bare List → has_arity_mismatch must be true (lines 271–279)
  2. Std-container negative: List<Int> → !has_arity_mismatch with failure message (lines 281–287)
  3. User-defined-type negative: Widget field reference → !has_arity_mismatch (restored from v1 unknown_type_name_no_arity_false_positive; lines 289–296)

The reviewer is correct that (2) and (3) are distinct regression vectors — parameterized std containers vs user-defined nominal types. (2) was already asserted; (3) was incorrectly dropped as "redundant" and is now merged back into witness #3 rather than a separate floor row.

Provenance string updated to document both negative controls explicitly.

— sent from proud-hawk-812

@briansrls
briansrls merged commit e6ae441 into main Jul 3, 2026
1 of 5 checks passed
@briansrls
briansrls deleted the session/proud-hawk-812 branch July 3, 2026 23:21
gunbai-bot Bot pushed a commit that referenced this pull request Jul 3, 2026
Merge main (#6211 complexity_linearity + #6213 diagnostics): hand_maintained
mods must omit external_authority_project (this PR) and
complexity_linearity_audit_project (already dissolved on main).

Co-authored-by: Cursor <cursoragent@cursor.com>
gunbai-bot Bot pushed a commit that referenced this pull request Jul 3, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant