qa: Python-builtin + kotlin.Any LSP fixes; false-guard audit (honest #581 known-red)#673
Merged
Conversation
The call extractor dropped any callee matched by cbm_is_keyword(), and the Python keyword set lists builtins (len, str, range, int, list, dict, print) to suppress them as bare usages. That also dropped the textual CALL, so the LSP resolution to the injected builtins.<name> node (py_builtins.c) had no call to attach to and no CALLS edge formed (callable=0) for free-function and constructor builtins. Method builtins (s.upper) were unaffected because method names are not in the keyword set. Add cbm_is_resolvable_builtin() — the builtins we mint a real graph node for — and keep those callees in call extraction only; the keyword filter still applies to usage and semantic extraction (its four other call sites are unchanged). Every un-filtered builtin has a target node, so the new edge is always callable-sourced, never Module-sourced. Un-skips repro_lsp_py_builtin and repro_lsp_py_builtin_constructor. Repro suite 311/0, unit suite 5693/0. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
The Kotlin LSP resolves a method call on an unknown-typed receiver whose member is a universal kotlin.Any method (toString/equals/hashCode) to kotlin.Any.<m> and emits lsp_kt_any, but no kotlin.Any node existed in the graph, so pass_calls had no target node and dropped the call (callable=0). Add kotlin_builtins.c (mirror of py_builtins.c): inject kotlin.Any plus its three universal methods into result->defs during cbm_run_kotlin_lsp, before the pipeline mints def nodes. The lsp_kt_any call now targets the injected node and forms a CALLS edge. Update the kotlin grammar-label golden to include the 4 injected nodes, exactly as python's golden already includes its injected builtins. Un-skips repro_lsp_kt_any. Repro suite 312/0, unit suite 5693/0. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
repro_issue581 was a FALSE GUARD. A 3-node fixture over 150 search_graph calls cannot move process RSS (observed factor=1.00), so rss_end <= 3.0x rss_warmup passed even on the leaking build, and an explicit PASS() escape fired when RSS read 0. #581 is OPEN: there is no SQLITE_CHECKPOINT_TRUNCATE anywhere and cbm_mem_collect is never called in the query path (only after index/delete). The green was a lie. Replace the vacuous assertion with an honest FAIL that documents the leak is unfixed and not reproducible in this tier (needs a real WAL/committed-pages reproduction tier plus the fix). repro_issue431 is actually FIXED: install_vscode_profile_configs (cli.c:3211) scans Code/User/profiles/ and plans a per-profile mcp.json, and the test passes via the real assertion. Its detection-unmet branch returned a VACUOUS PASS that would hide a future regression; change it to SKIP_PLATFORM so a host where detection cannot fire is honestly inconclusive, not falsely green. Repro board: 311 passed, 1 failed (the honest #581 RED). Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
The 9 no-resolvable-edge tests asserted only that no CALLS edge targets the unresolvable callee via inv_no_calls_edge_to_qn, which returns PASS when the fixture produces ZERO edges for any reason — so a green did not prove the unresolvable call was actually extracted and correctly dropped (a vacuous-pass false-guard risk, unlike the sibling assert_lsp_strategy which checks callable_sourced > 0). Add an exercised-check to all four helper copies (c_cpp/java_cs/go_py/ts): require at least one callable-sourced CALLS edge. Give each of the 9 fixtures a resolvable in-fixture control call (known / Helper.Known / c.Inc) so a real edge forms. The no-edge-to-callee invariant is unchanged; the tests stay green but can no longer pass when extraction silently produces nothing. Repro board: 311 passed, 1 failed (the honest #581 RED) — no regressions. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
#581 (query-path memory leak) is an OPEN bug the unit-scale fixture cannot yet reproduce, so the test stays honestly RED rather than vacuously green. The bug-repro board is a non-gating status board where reds ARE the expected state (repro_main.c), so this is a tracked known-red TODO, not a hidden skip. Tag it TODO(#581) for tracking; turning it green needs a real WAL/committed-pages reproduction tier plus the query-path compaction fix. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two genuine LSP extraction fixes plus a false-guard audit pass that restores the bug-repro board's green-⟺-fixed honesty.
Fixes (un-skip → genuinely green)
False-guard audit (board honesty)
Verification