Context
Identified during review of PR #1495 (pre-existing issue, not introduced by that PR).
In crates/codegraph-core/src/extractors/javascript.rs, the None (class expression) branch of the field annotation handler calls push_type_map_entry which always appends without deduplication. The equivalent TS function setTypeMapEntry has first-write-wins semantics (won't overwrite a higher-confidence existing entry).
This means in the Rust engine, when multiple class expressions in a file define fields with the same name, duplicate typeMap entries can accumulate for the same bare key, unlike the TS engine. The edge builder may deduplicate by taking highest confidence, but the extraction behavior differs.
Fix
push_type_map_entry in helpers.rs (or a new variant for the 0.9 path) should implement first-write-wins semantics to match setTypeMapEntry.
Context
Identified during review of PR #1495 (pre-existing issue, not introduced by that PR).
In
crates/codegraph-core/src/extractors/javascript.rs, theNone(class expression) branch of the field annotation handler callspush_type_map_entrywhich always appends without deduplication. The equivalent TS functionsetTypeMapEntryhas first-write-wins semantics (won't overwrite a higher-confidence existing entry).This means in the Rust engine, when multiple class expressions in a file define fields with the same name, duplicate
typeMapentries can accumulate for the same bare key, unlike the TS engine. The edge builder may deduplicate by taking highest confidence, but the extraction behavior differs.Fix
push_type_map_entryinhelpers.rs(or a new variant for the 0.9 path) should implement first-write-wins semantics to matchsetTypeMapEntry.