Skip to content

fix(abap): named class list and class-scope-end truncation (found regenerating the chart) - #1908

Merged
squid-protocol merged 1 commit into
mainfrom
chart/regen-abap
Aug 20, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
chart/regen-abap

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

Found while regenerating docs/self_scan/tri_comparison_chart.svg after #1898/#1899 merged: "Functions Found" correctly jumped to 124, but "Classes Found" stayed blank despite struct_class_start already showing 2 per file. Root-caused two more real, independent bugs.

Verification

Both bugs live in the SQLite recorder's named-class-list path (class_data), which golden_master_audit.json doesn't exercise at all -- crucible_check.py passes with zero drift both before and after this change, verified instead via tri_comparison_gatherer.gather_language() and a direct --db-only scan. Regenerated tri_comparison_chart.svg/tri_comparison_ledger.json -- abap now shows Functions Found: 124, Classes Found: 12 (DEFINITION+IMPLEMENTATION pairs, matching the engine-wide convention already established for objective-c). Diff confirmed scoped to abap's own row only; no other language changed (ledger diff is timestamp/anonymous-placeholder-hash noise from the full re-gather, not content changes).

Test plan

  • tests/extraction/languages/ (6128 tests) pass.
  • Full suite: python -m pytest tests/ -- 7004 passed, 2 skipped, 11 xfailed, 3 xpassed.
  • python tests/tools/crucible_check.py -- both modes pass, zero drift (expected -- these bugs aren't in the fixtures' coverage).
  • python tests/tools/audit_check.py -- ruff/mypy/dead-key/ast-accuracy all clear.
  • docs/language_status/abap.md §9 updated with both fixes' evidence.
  • tri-comparison-ledger-sweep's SKILL.md updated with a "re-verify after every fix" gotcha -- this investigation found 4 independent bugs total by re-checking each fix against real output instead of stopping at the first green result.

🤖 Generated with Claude Code

…hart

Found while regenerating docs/self_scan/tri_comparison_chart.svg after
#1898/#1899 merged -- Functions Found correctly jumped to 124, but Classes
Found stayed blank despite struct_class_start already showing 2 per file.

Fixes #1904: detector.py's named-class extraction only reuses a language's
own class_start rule when it's listed in _CLASS_START_NAMED_EXTRACTION_LANGS
(epic #1295) -- every other language falls through to a generic legacy
regex (class|struct|interface|trait|enum, no re.I). ABAP was never added,
likely because the epic's own verification method
(tree_sitter_accuracy_audit.py against tree-sitter ground truth)
structurally can't run for a language with no tree-sitter grammar. Real
ABAP classes are always uppercase (CLASS <name> DEFINITION), so the
case-sensitive fallback could never match regardless of #1898's fix --
class_data stayed permanently empty. Added abap to the allowlist, using
the verification already done in docs/language_status/abap.md (100%
precision, direct source cross-check) in place of the epic's tree-sitter
method.

Fixes #1907: found while verifying #1904's fix -- zcl_abapgit_objects has
30 real methods but its class entry showed method_count=2. splice()'s
class-boundary resolver tries a brace-delimited body search first and
only falls back to the flat "next class match" boundary if no brace is
found. ABAP has no brace-delimited bodies, but DOES have string-template
interpolation syntax (|Object { name }|) containing real braces that
_build_brace_safe_stream doesn't know to shield -- the search mistook the
interpolation brace for the class's real body opener and truncated the
scope after the first couple of methods. Since ABAP classes are never
nested, the existing flat fallback is always correct -- skip the brace
search entirely for abap.

Both bugs live in the SQLite recorder's named-class-list path
(class_data), which golden_master_audit.json doesn't exercise at all --
crucible_check.py passes with zero drift both before and after, verified
instead via tri_comparison_gatherer.gather_language() and a direct
--db-only scan. Full extraction suite (6128 tests) and full test suite
(7004 tests) both pass clean.

Regenerated docs/self_scan/tri_comparison_chart.svg and
tri_comparison_ledger.json -- abap now shows Functions Found: 124,
Classes Found: 12 (DEFINITION+IMPLEMENTATION pairs, matching the
engine-wide convention already established for objective-c). Diff
confirmed scoped to abap only; no other language's row changed.

Updated docs/language_status/abap.md with both fixes' evidence, and added
a "re-verify after every fix, not just once" gotcha to
tri-comparison-ledger-sweep's SKILL.md -- this session found 4 independent
bugs by re-checking each fix against real output instead of stopping at
the first green result.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 706059d into main Aug 20, 2026
29 checks passed
@squid-protocol
squid-protocol deleted the chart/regen-abap branch August 20, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant