fix(fqn): keep the extension in __file__ QNs so sibling files stay distinct Refs 769#1104
fix(fqn): keep the extension in __file__ QNs so sibling files stay distinct Refs 769#1104LA-10 wants to merge 2 commits into
Conversation
…stinct cbm_pipeline_fqn_compute() stripped the extension unconditionally. For sibling component files that is the only distinguishing part, so badge.component.ts/.html/.scss all produced the same __file__ QN and cbm_gbuf_upsert_node() merged them into one File node. cbm_store_list_files() then returned 8 paths for 12 files, and write_scoped_filelist() handed that short list to grep, so search_code never opened the merged-away siblings and silently returned incomplete results. Not Angular-specific: it is stem equality after one strip. spec.ts/stories.ts survive because their stems differ. Same class as DeusData#495. Skip the strip for the __file__ sentinel. Symbol and module QNs are unchanged, and the 27 __file__ construction sites all recompute through this same function. Verified against the repro repo @ 5e39bf9 (mode=full): File nodes 8/12 -> 12/12, every extension matches its file_path, search_code reaches all markers (grep -rln parity). Also fixes the extension-corruption follow-up, which came from pass_githistory upserts landing on the merged node. Refs DeusData#769 Signed-off-by: LA-10 <leenshuhail1@gmail.com>
4cb3014 to
b79f397
Compare
|
Thanks for the focused diagnosis and for linking the public #769 repro. I have triaged this as a high-priority 0.9.1-rc parsing/search correctness fix. The current diff has no dependency, workflow, network, credential, prompt-injection, or supply-chain concern. The present unit coverage is not sufficient for this change:
CI is still running. The identity compatibility decision remains a blocker even if it turns green. |
|
Maintainer decision: the File-QN direction is accepted, and we will use an automatic one-time full-reindex compatibility boundary rather than an in-place migration. Please update this PR with the following scope:
This resolves the maintainer-owned compatibility decision. Merge review will resume against the new exact head after these correctness and upgrade-path tests are present and CI is green. |
What does this PR do?
cbm_pipeline_fqn_compute()stripped the extension unconditionally. For siblingcomponent files that's the only distinguishing part, so
badge.component.ts/.html/.scssall produced the same
__file__QN andcbm_gbuf_upsert_node()merged them into oneFile node.
cbm_store_list_files()then returned 8 paths for 12 files, andwrite_scoped_filelist()handed that short list to grep — sosearch_codenever openedthe merged-away siblings and silently returned incomplete results.
Not Angular-specific: it's stem equality after one strip.
spec.ts/stories.tssurvivebecause their stems differ. Same class as #495.
Fix: skip the strip for the
__file__sentinel. Symbol and module QNs unchanged.Verification
Repro repo @
5e39bf9,mode=full:extensionvsfile_pathsearch_codemarkersAlso fixes the extension-corruption follow-up (
pass_githistoryupserts landing on themerged node).
Known gaps
Module QNs still collide; File nodes still have
start_line/end_line0 so.scssmatchesland in
raw_matches. Happy to addrepro_issue769.cfor end-to-end search coverage if wanted.