Skip to content

Add shadow semantic replay for direct named ESM imports #521

Description

@jununfly

This was generated by AI during triage.

Parent

  • Roadmap node: 1-3-2. Reference disambiguation semantic migration slices
  • Plan: docs/plans/2026-06-25-rust-hybrid-direct-named-import-semantic-replay-plan.md

What to build

Add a shadow-only semantic replay slice for direct ESM named import/export bindings. The replay path should compare protocol/Rust-owned direct named binding decisions against the existing TypeScript final reference-resolution result, while keeping TypeScript as the final graph-output owner.

This slice is limited to repo-local direct named ESM bindings such as import { foo } from "./x" resolving to a direct exported foo in the target file. It must not change final reference disambiguation semantics, graph output, SQLite schema, or package resolution behavior.

Acceptance criteria

  • rust-hybrid profile artifacts include a semanticReplay diagnostic bucket.
  • The bucket reports eligible, compared, equivalent, mismatch, and skipped counts.
  • Direct named import/export replay records mismatch reasons using: import-target-unresolved, export-symbol-missing, multiple-export-candidates, ts-unresolved-rust-resolved, ts-resolved-rust-unresolved, different-target-node, and different-resolution-method.
  • A matching direct named import/export fixture records equivalent replay evidence.
  • At least one taxonomy failure path is covered by a deterministic test.
  • GraphStats/final graph output remain unchanged for the covered fixture.
  • Replay state is not written to SQLite.
  • Roadmap node 1-3-2 is updated with the implementation result.

Blocked by

None - can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified and ready for an AFK agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions