Repository navigation
SQL: record routine calls (calls_out_to) for db2_sql and postgresql (Part of #5635) - #5657
Conversation
…Part of #5635) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…e-bless goldens (Part of #5635) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #5657 @ 7a4cc8a: 2 failed check(s) == Call resolution (Level 2, vs pyan3) (failure) -- real == graph-accuracy-audit (failure) -- real |
Part of #5635
What
SQL routines now record
calls_out_tofor db2_sql and postgresql. One shared pattern,_SQL_CALLS_OUTinlanguages/db2_sql.py(postgresql reuses it), captures:CALL p(...)/CALL p(Db2, PL/pgSQL),PERFORM f(...),SELECT f(...),x := f(...),FROM f(...), schema-qualifieds.f(...)(bare name kept), and a trigger'sEXECUTE FUNCTION|PROCEDURE f().Not counted: built-ins (COALESCE, SUM, UPPER, to_tsvector, POSSTR, ...), type constructors (
numeric(10,2)), clause words (IN (,VALUES (,OVER (), DDL heads (FUNCTION f(,INTO t (,TABLE t (,KEY k (,USING gin (,COMMENT ON t (,INDEX i ON t (), CTE definitions (x(...) AS ().Class table
:=, FROM f(), trigger EXECUTE FUNCTION)CREATE_Statement), so no callee can resolve.calls_outstays unsupported; a test pins it.Evidence
CREATE FUNCTION doom_a ... doom_b(x)/ PERFORM / CALL, real scan (galaxyscope --db-only):function_data.calls_out_to=["doom_b"],["doom_c","doom_p"]; fan-in resolves.sql/mediawiki_postgresql/tables.sqlgains 2 edges (CREATE TRIGGER ts2_page_title ... EXECUTE PROCEDURE ts2_page_title()-> the function of the same name; dittots2_page_text) plus fan-in/out/PageRank of those units, and the LLM brief. Nothing else moved; db2unit's DDL/COMMENT ON/INSERT shapes were tightened out of the pattern before blessing.tests/extraction/languages/test_sql_calls_out_5635.py(23), existing db2/pg/sqlite strict suites pass.pr_gates --fast/--ratchets: see PR checks.Sibling gaps
call_site_datastill empty for SQL (separate channel fromcalls_out_to)./* ... */license header mid-comment, so words likeCopyright (C)in the cut fragment read as calls (Copyright,Casanovain db2unit). Harmless (unresolvable) but junk incalls_out_to; fix is in the slicer.CREATE TABLE /*prefix*/blobs (name hidden by a comment reads as a call.CALLinside embeddedEXEC SQLin COBOL is a different mechanism (COBOL engine:EXEC SQL CALL procis recorded as a COBOL dynamic CALL (operand = the schema qualifier) #4304).Cross-repo: none (no companion PR; no crucible pin change).
🤖 Generated with Claude Code