feat(resolver): resolve iteration-callback edges for for-of, Set, and Array.from (JS)#1397
Conversation
… Array.from (JS) Fixes more1 jelly-micro benchmark from 0% → 100% recall (10/10 named edges). The PTS resolution for for-of, Set+for-of, Array.from, and spread patterns was already fully implemented. The 0% recall was caused by a naming mismatch in the fixture: _iterPlain/_iterSet (underscore-prefixed) vs the expected-edges.json which referenced iterPlain/iterSet (without prefix). Renaming the fixture functions to match the expected edges exposes all four PTS patterns resolving correctly. Closes #1378
|
Claude finished @carlos-alm's task —— View job PR Review: feat(resolver): resolve iteration-callback edges for for-of, Set, and Array.from (JS)Tasks:
Root Cause AnalysisProblem Being Solved: The Why This Approach: Renaming the fixture functions to align with Risk Assessment: Very low. This is a test fixture rename in a benchmark subdirectory. It does not touch production code, the resolution engine, or any shared utilities. The only risk would be if something else depended on the Backlog Compliance
Code ReviewThe diff is exactly 2 lines: One minor observation worth noting: No concerns with test integrity: no assertions were weakened, no expectations were lowered, and no production code was changed. This is a clean fixture correction. Final Recommendation
|
Greptile SummaryThis PR fixes a naming mismatch in the
Confidence Score: 5/5Safe to merge — the change is a two-line rename in a test fixture with no impact on production code. Only two function names are changed in a single benchmark fixture file. The fix directly and verifiably closes the gap between the fixture and its expected-edges definition. No resolver logic, test harness, or other benchmarks are touched. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["more1.js fixture\n(before PR)"] -->|"_iterPlain, _iterSet\n(underscore prefix)"| B["Resolver extracts\nfunction names"]
B --> C["Compare vs expected-edges.json\n(iterPlain, iterSet)"]
C -->|"Names don't match"| D["0 / 10 edges recalled\n0% recall"]
E["more1.js fixture\n(after PR)"] -->|"iterPlain, iterSet\n(no underscore)"| F["Resolver extracts\nfunction names"]
F --> G["Compare vs expected-edges.json\n(iterPlain, iterSet)"]
G -->|"Names match"| H["10 / 10 edges recalled\n100% recall"]
Reviews (3): Last reviewed commit: "fix: sync with main (#1397)" | Re-trigger Greptile |
Codegraph Impact Analysis2 functions changed → 0 callers affected across 0 files
|
Summary
more1jelly-micro benchmark from 0% → 100% recall (10/10 named edges)_iterPlain/_iterSetvs theexpected-edges.jsonwhich referencediterPlain/iterSet— renamed to align themPatterns verified working
for (const f of arr) { f() }pts-for-ofiterPlain → fn1, fn2new Set(arr)+for-ofpts-setiterSet → fn3, fn4Array.from(arr, mapCallback)pts-array-frommapCallback → fn5, fn6f(...arr)pts-spreadconsumer1 → fn7, fn8Test plan
jelly-micro.test.ts:more1→ 10/10 recall (was 0/10)resolution-benchmark.test.ts: 171/171 pass (no regressions)Closes #1378