fix(javascript): keep exports out of write relations

Project writes only from write-role references. Export references remain distinct facts and genuine assignments still traverse writes-only traces.

Validation: source semantic controls and public CLI/MCP writes-only traces.

Fixes #3207
This commit is contained in:
morluto
2026-10-14 16:53:16 +08:00
parent 7e5cffa2ae
commit 81f7638203
3 changed files with 118 additions and 3 deletions
@@ -648,7 +648,7 @@ function* projectDefinitionsAndReferences(
resolution: "resolved",
evidence: inferredSemanticEvidenceAt(context.file, reference.location),
});
else
else if (reference.role === "write")
addRelation(context.state, {
source: expression,
target: binding,