feat(p3_stream): LS-R-11 layer-2 per-edge precise type-mismatch#196
Conversation
Mythos delta-pass requiredThis PR modifies one or more Tier-5 source files (per Before merge, run the Mythos discover protocol on the
Why this gate exists: LS-A-10 The gate check on this PR will pass once the label is |
LS-N verification gate
Approved Failed LS entries(none) Missing regression tests
Updated automatically by |
Mythos delta-pass (auto)✅ NO FINDINGS across 1 Tier-5 file(s)
Auto-run via |
Promotes the v0.13.0 stream-typed-import heuristic to a per-edge
precise check for the common path.
New `export_stream_elements` walks
`comp.component_func_defs[export.index]` to resolve a Func export
to its underlying type:
- `Import` reuses the importer-side typeref walker
- `Lift` looks up CanonicalEntry::Lift's type_index and walks the
function signature directly
- `InstanceExportAlias` is deferred → falls back to the layer-1
heuristic (LS-R-11 limits block updated)
For each resolved import edge where both endpoints resolve to non-
empty stream-element lists, multisets are compared directly;
mismatches emit TypeMismatch keyed to the exact
(producer_component=exporter, consumer_component=importer) pair
with real element types from each side's signature.
Layer-1 still fires for connections not precisely checked; the
v0.13.0 heuristic remains the safety net.
4 new regression tests:
- export_stream_elements_walks_lift_function_signature
- export_stream_elements_returns_empty_for_alias_export
- ls_r_11_per_edge_lift_export_mismatch_raises
- per_edge_matching_lift_export_does_not_raise
Tier-5 registration of provenance.rs split out to a follow-up PR
because anthropics/claude-code-action requires
.github/workflows/mythos-auto.yml to be byte-identical to main for
PR runs (workflow self-reference would break the AI scan auth flow
even though my edit doesn't touch its logic).
Tests: 285 lib + 22 p3_stream tests all green. Clippy clean.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
af3de77 to
87e86b8
Compare
v0.14.0's component-provenance section emitter (meld-core/src/provenance.rs) shipped but wasn't in the Mythos auto-scan registry. Future changes to the section format, the origin-tuple plumbing, or the fused_func_idx arithmetic now get the AI-driven delta-pass scan on PR. Split from PR #196 (LS-R-11 layer-2) because anthropics/claude-code-action requires this workflow file to be byte-identical to main for PR runs — a workflow self-reference breaks the action's auth flow. This PR touches no Tier-5 source, so its own scan is a no-op and the identity check passes. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
LS-R-11 layer-2 per-edge precise stream type-mismatch (#196) — promotes the v0.13.0 heuristic to a per-edge precise check via export-side type-graph resolution through component_func_defs. Plus provenance.rs registered as Tier-5 in the Mythos auto-scan registry (#197). Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Promotes the v0.13.0 stream-typed-import heuristic to a per-edge precise check for the common path. New `export_stream_elements` walks `comp.component_func_defs[export.index]` to resolve a `Func` export to its underlying type:
For each resolved import edge where BOTH endpoints resolve to non-empty stream-element lists, multisets are compared directly; mismatches emit `TypeMismatch` keyed to the exact `(producer_component=exporter, consumer_component=importer)` pair with the real element types from each side's signature.
Layer-1 still fires for connections not precisely checked; the v0.13.0 heuristic remains the safety net.
Scope change
Originally bundled with a Tier-5 registration of `provenance.rs` in `.github/workflows/mythos-auto.yml`. Split out to a follow-up PR after CI revealed that `anthropics/claude-code-action` requires the workflow file to be byte-identical to main for PR runs (workflow self-reference breaks the AI scan auth flow even though the edit doesn't touch the action's logic). The Tier-5 registration will ship as a tiny separate PR after this merges.
4 new regression tests
Test plan
🤖 Generated with Claude Code