Skip to content

Fix file-scoped semantic resolution collisions - #13

Merged
Knapp-Kevin merged 2 commits into
mainfrom
fix/12-file-scoped-semantic-resolution
Aug 14, 2026
Merged

Knapp-Kevin merged 2 commits into
mainfrom
fix/12-file-scoped-semantic-resolution

Conversation

@Knapp-Kevin

Copy link
Copy Markdown
Collaborator

Closes #12.

This fixes the cross-file semantic contamination exposed by MythologIQ-Labs-LLC/agent-memory#302.

Changes:

  • scope symbol resolution by (file, name);
  • fall back across files only when a name is globally unambiguous;
  • scope caller-span lookup by (file, start_line, end_line);
  • build the span index from parsed files so file identity is retained;
  • add a two-file regression where duplicate middle symbols occupy overlapping line ranges.

The regression proves main.rs::middle -> main.rs::leaf and decoy.rs::middle -> decoy.rs::decoy_leaf remain isolated, and ambiguous non-local middle resolution fails closed.

This PR is intended to become the exact CodeGenome pin consumed by the Agent Memory component qualification harness after CI passes.

@Knapp-Kevin
Knapp-Kevin merged commit 43a6b71 into main Aug 14, 2026
6 checks passed
Knapp-Kevin pushed a commit that referenced this pull request Aug 17, 2026
…s-webpki

Validated on the merged tree: 292 tests pass, clippy -D warnings clean,
fmt clean. rustls-webpki 0.103.14 (Dependabot #6) validated locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01829nz6b5zRiCHTGty8HANd
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.

File-scope semantic resolver symbols and spans to prevent cross-file traversal contamination

1 participant