Skip to content

qa: Python-builtin + kotlin.Any LSP fixes; false-guard audit (honest #581 known-red)#673

Merged
DeusData merged 5 commits into
mainfrom
qa/bug-repro-suite
Jun 28, 2026
Merged

qa: Python-builtin + kotlin.Any LSP fixes; false-guard audit (honest #581 known-red)#673
DeusData merged 5 commits into
mainfrom
qa/bug-repro-suite

Conversation

@DeusData

Copy link
Copy Markdown
Owner

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)

  • fix(calls): Python builtin calls (len/str/range/...) were dropped by the keyword filter before the LSP resolution could attach, so no CALLS edge formed (callable=0). Add cbm_is_resolvable_builtin() and keep those callees in call extraction only (usage/semantic extraction unchanged). Un-skips repro_lsp_py_builtin / repro_lsp_py_builtin_constructor.
  • fix(kotlin): inject kotlin.Any universal-method nodes so the lsp_kt_any fallback (x.toString() on an unknown-typed receiver) has a target node to form the edge. Un-skips repro_lsp_kt_any; grammar-label golden updated to match (as python's already includes its injected builtins).

False-guard audit (board honesty)

  • repro_issue581 → honest RED / TODO(Memory leak: process grows to 50+ GB virtual memory over hours/days, crashes Windows #581): the query-path memory leak is an OPEN bug, and a 3-node fixture cannot move RSS (factor=1.00), so the old RSS-ratio assertion passed even on the leaking build. Now a tracked, whitelisted known-red TODO rather than a vacuous green. (Board is non-gating; reds are the expected state — repro_main.c.)
  • repro_issue431 verified actually FIXED (install_vscode_profile_configs scans Code/User/profiles/); hardened its dead detection-unmet branch from a vacuous PASS to SKIP_PLATFORM.
  • 9 assert_no_resolvable_edge tests hardened with an exercised-edge check + a resolvable control call per fixture, so they can no longer pass when extraction silently produces nothing.

Verification

DeusData added 5 commits June 28, 2026 18:47
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>
@DeusData DeusData merged commit aedb979 into main Jun 28, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant