feat(livecode): tri-comparison manual verification -- class precision badge + 3 engine fixes - #2412
Merged
Conversation
… badge, 3 engine fixes livecode is a gg_only language (no tree-sitter, no ctags), so the tri-comparison tool has nothing to reconcile against -- verified by direct source cross-check against the whole ../language-crucible/data/livecode corpus (97 ingested files). ## class_start -- 57/57 precision, earns a G badge Every one of the 57 class objects GitGalaxy claims was checked against its declaration line: 24 `.livecodescript` `script "Name"` + 33 `.lcb` `module com.x.y`, zero false positives. `map.lcb` is correctly not counted (its module line is commented out). Recorded in manual_verification.json; the chart now renders `57/57**` with a GitGalaxy badge for livecode Class Precision. ## Fixes shipped 1. `args` regex was compiled `re.I` only, missing the `re.M` its structurally-identical `func_start` sibling carries. The `^`-anchored pattern therefore only matched the start of the file -- ZERO `args` matches across the entire corpus (every file has a license header before its first handler). The pattern itself was already correct on a single line, which is why every prior single-line test missed it. 2. `class_start` captured barewords only. `.livecodescript` object exports open with `script "Name"` (quoted) -- the dominant form for the Script half of the corpus (~63 files), matched by NONE of them. Added a real quoted-name capture branch as its own alternation arm; `_resolve_class_start_match` already handles the group-1-or-group-2 shape (fortran/lua/abap precedent). 3. livecode was missing from `_CLASS_START_NAMED_EXTRACTION_LANGS` in detector.py, so even with the regex fixed the named class list stayed empty (the generic fallback regex is lowercase `class|struct|interface|trait|enum`). Added. New regressions: test_livecode_args_multiline_anchor_regression (would have caught #1), and quoted-name assertions in the class_start dotted-name regression test. ## Filed, not fixed (out of scope for this pass) - #2409 -- func_start/args miss LiveCode Builder `handler` syntax entirely (0 of 471 `.lcb` handlers detected). - #2410 -- no ScopeParsingRegistry entry -> Mode B brace-slice fallthrough drops 780/781 named functions (needs its own if/then/else depth guards, design work). - #2411 -- leading UTF-8 BOM never stripped -> defeats `^`-anchored line-1 extraction; 38 more real livecode classes missed (58 BOM files across 6 languages corpus-wide, engine-wide gap). ## Verification livecode extraction gauntlet + strict (113 passed), core-engine suite (674 passed), audit_check (ruff/mypy/dead-key/ast-accuracy clean), crucible_check against the full ~80-repo corpus (all diffs livecode-only: Function Parameters 0 -> real, Class/Entity 0 -> 1, plus topological/structural-magnitude ripple recomputing from the corrected counts -- zero diffs in any other language), both golden masters re-blessed. See docs/language_status/livecode.md section 9. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
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.
What
tri-comparison-ledger-sweepskill, manual-verification fallback for livecode(a gg_only language -- no tree-sitter grammar, no ctags parser, so the
tri-comparison tool has nothing to reconcile against). Verified by direct source
cross-check against the whole
../language-crucible/data/livecodecorpus (99code files, 97 ingested).
Result: livecode earns a Class Precision G badge
class_startnamedargsfile signalfunc_startraw signalAll 57 detected classes (24
.livecodescriptscript "Name"+ 33.lcbmodule com.x.y) checked against their declaration lines.map.lcbcorrectlynot counted (its
moduleline is commented out).Engine fixes (3)
argsregex missingre.M(language_standards.py) --^-anchored perline exactly like its
func_startsibling, but compiledre.Ionly, so^matched only the file start -> 0
argsmatches corpus-wide (every filehas a license header before its first handler). The pattern was already
correct on a single line, so every prior single-line test missed it.
class_startbareword-only capture (language_standards.py) -- added areal quoted-name branch (
"([^"\r\n]{1,200})") for.livecodescriptscript "Name"object exports (~63 files, previously 0 detected). Two capturegroups now;
_resolve_class_start_matchalready handles thegroup-1-or-group-2 shape (fortran/lua/abap precedent).
_CLASS_START_NAMED_EXTRACTION_LANGS(
detector.py) -- the generic fallback regex is lowercaseclass|struct|interface|trait|enum, so the named class list stayed empty evenwith the regex fixed. Added.
New regression tests:
test_livecode_args_multiline_anchor_regression(catches#1), quoted-name assertions in the
class_startdotted-name test.Filed, deliberately not fixed here
func_start/argsmiss LiveCode Builderhandlersyntaxentirely (0 of 471
.lcbhandlers detected). Needs a dedicatedparenthesized-typed-param branch, not just a keyword add.
ScopeParsingRegistryentry -> Mode B brace-slice fallthroughproduces 1
FunctionNodefor the whole corpus. Needs its owninline-
if...then/else/next repeatdepth guards (design work), sofiled rather than fixed inline.
^-anchoredline-1 extraction; 38 more real livecode classes missed. Engine-wide gap (58
BOM files across 6 languages), not a livecode
class_startdefect.Why the golden masters churn so much
crucible_check.pyagainst the full ~80-repo corpus: all ~290 diffs arelivecode-only --
Function Parameters0 -> real,Class/Entity Declarations0 -> 1, and the topological-coordinate / structural-magnitude ripple that
recomputes from the corrected counts. Zero diffs in any other language.
livecode's global mass share rises ~6x purely because a whole language's
argssignal went from artificially-zero to real (
revliburl.livecodescriptalone:0 -> 129 function-parameter signals). Both golden master fixtures re-blessed;
update_golden_master.py --yesre-run confirms "No drift" for both modes.The tri-comparison ledger / points-of-interest regen produced only
last_reconciled_attimestamp churn (nolast_seen_count/still_reproduceschanges, and livecode has no ledger entries) -- left for the
tri-comparison-history.ymlcompanion workflow to pick up post-merge, pertri_comparison_README.md.tri_comparison_chart.svgis committed (shows theearned badge), matching the jcl manual-verification precedent (#2203).
Verification
livecode extraction gauntlet + strict (113 passed) · core-engine suite (674
passed) ·
audit_check.py(ruff / mypy / dead-key / ast-accuracy clean) ·crucible_check.pyfull corpus (livecode-only diffs) · both golden mastersre-blessed ·
tri_comparison_chart.py --all --write(livecode Class Precision->
57/57**+ G badge).🤖 Generated with Claude Code