Skip to content

feat(livecode): tri-comparison manual verification -- class precision badge + 3 engine fixes - #2412

Merged
squid-protocol merged 1 commit into
mainfrom
livecode-tri-comparison-manual-verification
Aug 29, 2026
Merged

feat(livecode): tri-comparison manual verification -- class precision badge + 3 engine fixes#2412
squid-protocol merged 1 commit into
mainfrom
livecode-tri-comparison-manual-verification

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

What

tri-comparison-ledger-sweep skill, 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/livecode corpus (99
code files, 97 ingested).

Result: livecode earns a Class Precision G badge

Signature Before After Verdict
class_start named 0 57 57/57 precision, 0 false positives -- badge
args file signal 0 442 signal alive (per-function count blocked on #2410)
func_start raw signal 781 781 correct; named extraction blocked on #2410

All 57 detected classes (24 .livecodescript script "Name" + 33 .lcb
module com.x.y) checked against their declaration lines. map.lcb correctly
not counted (its module line is commented out).

Engine fixes (3)

  1. args regex missing re.M (language_standards.py) -- ^-anchored per
    line exactly like its func_start sibling, but compiled re.I only, so ^
    matched only the file start -> 0 args matches corpus-wide (every file
    has a license header before its first handler). The pattern was already
    correct on a single line, so every prior single-line test missed it.
  2. class_start bareword-only capture (language_standards.py) -- added a
    real quoted-name branch ("([^"\r\n]{1,200})") for .livecodescript
    script "Name" object exports (~63 files, previously 0 detected). Two capture
    groups now; _resolve_class_start_match already handles the
    group-1-or-group-2 shape (fortran/lua/abap precedent).
  3. livecode missing from _CLASS_START_NAMED_EXTRACTION_LANGS
    (detector.py) -- the generic fallback regex is lowercase
    class|struct|interface|trait|enum, so the named class list stayed empty even
    with the regex fixed. Added.

New regression tests: test_livecode_args_multiline_anchor_regression (catches
#1), quoted-name assertions in the class_start dotted-name test.

Filed, deliberately not fixed here

Why the golden masters churn so much

crucible_check.py against the full ~80-repo corpus: all ~290 diffs are
livecode-only
-- Function Parameters 0 -> real, Class/Entity Declarations
0 -> 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 args
signal went from artificially-zero to real (revliburl.livecodescript alone:
0 -> 129 function-parameter signals). Both golden master fixtures re-blessed;
update_golden_master.py --yes re-run confirms "No drift" for both modes.

The tri-comparison ledger / points-of-interest regen produced only
last_reconciled_at timestamp churn (no last_seen_count / still_reproduces
changes, and livecode has no ledger entries) -- left for the
tri-comparison-history.yml companion workflow to pick up post-merge, per
tri_comparison_README.md. tri_comparison_chart.svg is committed (shows the
earned 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.py full corpus (livecode-only diffs) · both golden masters
re-blessed · tri_comparison_chart.py --all --write (livecode Class Precision
-> 57/57** + G badge).

🤖 Generated with Claude Code

… 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>
@squid-protocol squid-protocol added bug Unintended behavior or logic failure in the engine core-engine Modifications to the central physics and parsing engine labels Aug 29, 2026
@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 2ec303c into main Aug 29, 2026
54 checks passed
@squid-protocol
squid-protocol deleted the livecode-tri-comparison-manual-verification branch August 29, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unintended behavior or logic failure in the engine core-engine Modifications to the central physics and parsing engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant