You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
makefile + ada: never routed off Mode_B_Braces slicer — functions_found is 0 despite func_start matching (13-14 hits each) #2648
Found by the #2560 rosetta classification sweep (makefile tracking issue #2586): makefile records functions_found = 0 corpus-wide while its func_start regex correctly fires 14 times.
Cause
detector.py (~line 2392) special-cases assembly/agc_assembly/cobol/fortran/abap/dockerfile/jcl/m4/yacc into Mode_A_Labels because they lack brace-delimited bodies. Makefile was never added to that tuple despite the identical shape (target: deps is structurally the same as yacc's rule_name : or a jcl label). It falls through to Mode_B_Braces, which requires a literal {/} a Makefile recipe essentially never contains — _slice_by_braces finds zero bodies even though func_start matches.
This is the same mechanism as the already-fixed jcl/m4/yacc/dockerfile/abap cases (the code's inline comments document each as this bug class — #1975 lineage).
Evidence
Rosetta corpus (keyword-rosetta/data/makefile/): func_start signal = 14, file_data.function_count = 0 on every file (galaxyscope --db-only --debug WORKER-TRACE shows no extracted functions).
Fix shape
Add "makefile" to the Mode_A_Labels tuple in detector.py — one line, direct precedent to copy. Then the ci-push-checklist gauntlet: golden-master re-bless (makefile function counts rise corpus-wide) + strict tests.
Found via keyword-rosetta classification; cause-key mode-b-fallthrough-no-braces.
The ada/fortran classification agent independently confirmed ada has the identical defect, with a complete evidence chain:
ada's func_start regex matches 13/13 real procedures across the rosetta corpus when tested standalone (ada.py:83-90).
galaxyscope --db-only --debug shows [WORKER-TRACE] extracted functions for main.adb: [] — the live pipeline drops 100%.
Root cause: _function_slice's dispatcher — "ada" is absent from Mode_A_Labels, Mode_C_Indentation, ScopeParsingRegistry, and the column_sensitive family check; ada's lexical_family is line_exclusive_dash, so it falls through to Mode_B_Braces. Ada's procedure X is begin ... end X; syntax contains zero braces.
Fix options per the agent: add "ada" to the Mode_A_Labels tuple (simplest; the greedy-to-next-func_start heuristic works for non-nested procedures, consistent with cobol/fortran) or build a proper begin/end keyword-depth tracker (more correct for real-world nested Ada, more work). Either way this issue should cover both makefile and ada — same tuple, one PR.
Follow-up once fixed: ada's manifest claim that "ada procedures are not orphan-tracked by design" should be re-verified — it may be a symptom of this bug (orphan→api conversion depends on the function-slicer output that is currently empty for ada).
changed the title [-]makefile: never routed to Mode_A_Labels slicer — functions_found is 0 despite 14 func_start matches[/-][+]makefile + ada: never routed off Mode_B_Braces slicer — functions_found is 0 despite func_start matching (13-14 hits each)[/+]on Sep 2, 2026
Activity
squid-protocol commentedon Sep 2, 2026
The ada/fortran classification agent independently confirmed ada has the identical defect, with a complete evidence chain:
func_startregex matches 13/13 real procedures across the rosetta corpus when tested standalone (ada.py:83-90).galaxyscope --db-only --debugshows[WORKER-TRACE] extracted functions for main.adb: []— the live pipeline drops 100%._function_slice's dispatcher —"ada"is absent from Mode_A_Labels, Mode_C_Indentation,ScopeParsingRegistry, and the column_sensitive family check; ada'slexical_familyisline_exclusive_dash, so it falls through toMode_B_Braces. Ada'sprocedure X is begin ... end X;syntax contains zero braces.Fix options per the agent: add
"ada"to the Mode_A_Labels tuple (simplest; the greedy-to-next-func_start heuristic works for non-nested procedures, consistent with cobol/fortran) or build a proper begin/end keyword-depth tracker (more correct for real-world nested Ada, more work). Either way this issue should cover both makefile and ada — same tuple, one PR.Follow-up once fixed: ada's manifest claim that "ada procedures are not orphan-tracked by design" should be re-verified — it may be a symptom of this bug (orphan→api conversion depends on the function-slicer output that is currently empty for ada).
[-]makefile: never routed to Mode_A_Labels slicer — functions_found is 0 despite 14 func_start matches[/-][+]makefile + ada: never routed off Mode_B_Braces slicer — functions_found is 0 despite func_start matching (13-14 hits each)[/+]fix(core-engine): Rosetta sweep batch 2 — nine slicer/regex/DAG fixes…