Repository navigation
Description
Why
gitgalaxy/standards/language_standards.py defines 2,182 compiled regex rules across 58 languages — the Structural Signature Analysis Engine that is the core of how GitGalaxy parses code without an AST. This epic originally started from the premise that 6 languages (C, C++, C#, COBOL, Rust, TypeScript) already had dedicated correctness/ReDoS testing (tests/core_engine/test_language_standards_strict.py) and so were out of scope. Every other language's rules were exercised only by a blanket "does it compile" fuzzer (test_global_regex_syntax_integrity) — which proves the regex is syntactically valid Python, not that it matches (or correctly excludes) what its own documented semantics say it should.
Update (2026-07-29): that premise was checked and doesn't hold up. Auditing what those 6 languages actually have in the test file: each one has only a handful of isolated regression tests (test_c_knr_ambiguity_trap, test_csharp_iron_wall_redos, test_cpp_macro_multiline_spiral, test_c_pointer_ambiguity_overlap, test_cobol_ghost_satellite_prevention, test_thermodynamic_operator_collisions), each one hard-coded to a single specific bug someone already found — not the full per-signature template (positive/negative case + ambiguity sweep + ReDoS scaling sweep for every non-None signature) every other language in this epic has now received. Coverage was roughly 2-12% of each language's actual non-None signature count (e.g. COBOL: 1 of 46 signatures touched; TypeScript: 1 of 58). Filed as 6 new sub-issues (#773-778).
Update (2026-07-30): epic complete — all 6 newly-filed languages closed
Every one of the 6 languages found to have thin coverage now has the full per-signature template, in the same style as the other 48:
- typescript (Strict parsing tests:
typescriptstructural signatures #778 → Fix #778: Strict parsing tests for typescript structural signatures #779): 58 signatures, 8 real bugs. - rust (Strict parsing tests:
ruststructural signatures #777 → Fix #777: Strict parsing tests for rust structural signatures #781): 51 signatures, 12 real bugs — the largest single-language count in the epic at the time, driven almost entirely by one root cause repeated across 10 rules (!-suffixed macro invocations likeprintln!/panic!/asm!sharing a trailing\bwith word-ending siblings). - cobol (Strict parsing tests:
cobolstructural signatures #776 → Fix #776: Strict parsing tests for cobol structural signatures #783): 46 signatures, 4 real bugs + a missingimportschema key found via a full key-list diff, not a pattern defect. - c (Strict parsing tests:
cstructural signatures #773 → Fix #773: Strict parsing tests for c structural signatures #785): 49 signatures, 4 real bugs, the 8th independent hit of aspec_exposureReDoS shape that recurred across the whole epic. - cpp (Strict parsing tests:
cppstructural signatures #774 → Fix #774: Strict parsing tests for cpp structural signatures #787): 51 signatures, 14 real bugs — the largest count in the epic, includingencapsulationnever having matched anything in any C++ file ever scanned (all 3 alternatives shared a boundary with no word-ending sibling at all), a genuine newfunc_startReDoS, and two correctness bugs (an over-broadexplicit_castsfalse-positive, a false-positive onif constexpr) found only by writing the negative-case tests. - csharp (Strict parsing tests:
csharpstructural signatures #775 → Fix #775: Strict parsing tests for csharp structural signatures #790): 50 signatures, 7 real bugs, including a new bug class (case-sensitivity mismatched against the language's real naming convention —cleanup/listenerswere lowercase-only against PascalCase-only C# idioms).
Across all 6: ~40 real, previously-undetected bugs fixed (boundary defects, ReDoS, comment-style completeness, schema completeness, and outright false-positives), every one verified against the real language-crucible corpus via the Differential Scan before merging, not just unit-tested in isolation.
Two real architectural/pipeline gaps were found along the way and deliberately not fixed inline, matching this epic's established pattern of keeping per-language issues scoped to the rules-dict regexes and filing pipeline-level findings separately: #789 (csharp's func_start never counts expression-bodied methods, and can hallucinate bare calls as functions with no enclosing brace).
gitgalaxy/standards/how_to_add_a_language.md was also updated with the accumulated lessons from this whole epic: 4 brand-new numbered engine rules (13: re.M completeness, 14: adjacent overlapping quantifiers, 15: a documented exclusion must actually exclude, 16: identifier classes must match the language's real grammar) plus expanded guidance on 2 existing rules and 3 new items on the Strict Testing Prompt checklist — so future language work, in or outside this epic, inherits the full recurring-bug-class checklist without needing to rediscover it.
Epic #518 is now fully complete: all 48 originally-scoped languages plus all 6 languages added by the premise-check are closed.
What
This epic tracked bringing every language's structural signatures up to the same bar, organized per language — one issue per language, covering every structural signature that language actually defines.
4 languages were skipped entirely (csv, pbtxt, plaintext, xml) — they have zero non-None structural signatures defined; there was nothing to test.
Reference doc
gitgalaxy/standards/how_to_add_a_language.md is the canonical spec for what every signature captures/excludes, the 5 lexical parsing families, the full recurring-bug-class checklist (16 numbered engine rules as of this epic's completion), and how to add a new language.
Test Template (used in every sub-issue)
For each of a language's non-None structural signatures: (1) a positive-match test against its documented includes; (2) a negative-match test against its documented excludes; (3) a cross-rule ambiguity test wherever this language shares a token between two rules; (4) a ReDoS-immunity test sized to that rule's actual quantifiers, using the assert_redos_immune harness in tests/core_engine/test_language_standards_strict.py. A rule being None for a language is not a gap — that's the doc's Strict Feature Parity rule (#4) working as intended.
Sub-issues — ALL CLOSED
- Strict parsing tests:
typescriptstructural signatures #778 —typescript(58 signatures) → Fix #778: Strict parsing tests for typescript structural signatures #779 - Strict parsing tests:
cppstructural signatures #774 —cpp(51 signatures) → Fix #774: Strict parsing tests for cpp structural signatures #787 - Strict parsing tests:
ruststructural signatures #777 —rust(51 signatures) → Fix #777: Strict parsing tests for rust structural signatures #781 - Strict parsing tests:
csharpstructural signatures #775 —csharp(50 signatures) → Fix #775: Strict parsing tests for csharp structural signatures #790 - Strict parsing tests:
cstructural signatures #773 —c(49 signatures) → Fix #773: Strict parsing tests for c structural signatures #785 - Strict parsing tests:
cobolstructural signatures #776 —cobol(46 signatures) → Fix #776: Strict parsing tests for cobol structural signatures #783
- Strict parsing tests:
javascriptstructural signatures #589 —javascript(65 signatures) - Strict parsing tests:
pythonstructural signatures #606 —python(64 signatures) - Strict parsing tests:
haskellstructural signatures #585 —haskell(56 signatures) - Strict parsing tests:
objective-cstructural signatures #601 —objective-c(56 signatures) - Strict parsing tests:
perlstructural signatures #602 —perl(56 signatures) - Strict parsing tests:
dartstructural signatures #578 —dart(55 signatures) - Strict parsing tests:
gostructural signatures #583 —go(55 signatures) - Strict parsing tests:
rubystructural signatures #607 —ruby(55 signatures) - Strict parsing tests:
scalastructural signatures #608 —scala(55 signatures) - Strict parsing tests:
swiftstructural signatures #613 —swift(55 signatures) - Strict parsing tests:
javastructural signatures #588 —java(54 signatures) - Strict parsing tests:
kotlinstructural signatures #592 —kotlin(54 signatures) - Strict parsing tests:
luastructural signatures #594 —lua(54 signatures) - Strict parsing tests:
phpstructural signatures #603 —php(54 signatures) - Strict parsing tests:
powershellstructural signatures #604 —powershell(54 signatures) - Strict parsing tests:
embedded_pythonstructural signatures #580 —embedded_python(53 signatures) - Strict parsing tests:
matlabstructural signatures #598 —matlab(52 signatures) - Strict parsing tests:
livecodestructural signatures #593 —livecode(51 signatures) - Strict parsing tests:
sqlitestructural signatures #612 —sqlite(51 signatures) - Strict parsing tests:
abapstructural signatures #571 —abap(48 signatures) - Strict parsing tests:
zigstructural signatures #618 —zig(48 signatures) - Strict parsing tests:
apexstructural signatures #573 —apex(47 signatures) - Strict parsing tests:
fortranstructural signatures #581 —fortran(47 signatures) - Strict parsing tests:
groovystructural signatures #584 —groovy(47 signatures) - Strict parsing tests:
shellstructural signatures #610 —shell(46 signatures) - Strict parsing tests:
assemblystructural signatures #574 —assembly(45 signatures) - Strict parsing tests:
dockerfilestructural signatures #579 —dockerfile(45 signatures) - Strict parsing tests:
schemestructural signatures #609 —scheme(44 signatures) - Strict parsing tests:
soliditystructural signatures #611 —solidity(44 signatures) - Strict parsing tests:
agc_assemblystructural signatures #572 —agc_assembly(41 signatures) - Strict parsing tests:
htmlstructural signatures #587 —html(41 signatures) - Strict parsing tests:
makefilestructural signatures #596 —makefile(41 signatures) - Strict parsing tests:
tclstructural signatures #614 —tcl(41 signatures) - Strict parsing tests:
yaccstructural signatures #616 —yacc(35 signatures) - Strict parsing tests:
cssstructural signatures #577 —css(34 signatures) - Strict parsing tests:
m4structural signatures #595 —m4(33 signatures) - Strict parsing tests:
yamlstructural signatures #617 —yaml(33 signatures) - Strict parsing tests:
jclstructural signatures #590 —jcl(10 signatures) - Strict parsing tests:
blpstructural signatures #576 —blp(4 signatures) - Strict parsing tests:
glslstructural signatures #582 —glsl(4 signatures) - Strict parsing tests:
markdownstructural signatures #597 —markdown(4 signatures) - Strict parsing tests:
protostructural signatures #605 —proto(4 signatures) - Strict parsing tests:
tdstructural signatures #615 —td(4 signatures) - Strict parsing tests:
jsonstructural signatures #591 —json(3 signatures) - Strict parsing tests:
hlostructural signatures #586 —hlo(2 signatures) - Strict parsing tests:
mlirstructural signatures #599 —mlir(2 signatures) - Strict parsing tests:
nixstructural signatures #600 —nix(2 signatures) - Strict parsing tests:
batchstructural signatures #575 —batch(1 signatures)
Activity
[-]Epic: Strict & exact regex test coverage for all structural signatures across all languages[/-][+]Epic: Strict & exact regex test coverage for all structural signatures, per language[/+]docs: document the AI/ML and literate-programming extension packs (#619)
Remove dead _line_anchor/_inline_comment/_block_start/_block_end rule…
Close #589: strict tests for javascript, fix 3 real regex bugs found …
Close #606: strict tests for python, fix a real comprehensions bug fo…
Close #585: strict tests for haskell, fix 2 real regex bugs found alo…
Close #601: strict tests for objective-c, fix 13 real symbolic-\b bugs (
Document recurring bug patterns and add a strict-testing framework to…
Strict tests for yaml, fix 5 real bugs (1 ReDoS) (#681)
Fix/597 markdown strict parsing (#689)
Strict tests for yacc, fix 6 real bugs (1 ReDoS) (issue #616) (#700)
Strict tests for livecode, fix 7 real bugs (issue #593) (#707)
2 remaining items
Fix #579: Strict parsing tests for dockerfile structural signatures (#…
Fix #580: Strict parsing tests for embedded_python structural signatu…
Fix #590: Strict parsing tests for jcl structural signatures (#731)
Fix #587: Strict parsing tests for html structural signatures (#734)
Fix #577: Strict parsing tests for css structural signatures (#737)
Fix #618: Strict parsing tests for zig structural signatures (#739)
Fix #614: Strict parsing tests for tcl structural signatures (#741)
Fix #572: Strict parsing tests for agc_assembly structural signatures (…
Fix #574: Strict parsing tests for assembly structural signatures (#745)
Fix #571: Strict parsing tests for abap structural signatures (#750)
squid-protocol commentedon Jul 30, 2026
Closing — all 6 remaining sub-issues (#773-778) are merged, and every one of the original 48 plus these 6 is now closed. Final tally for the 6 languages this epic's premise-check added:
tests/core_engine/test_language_standards_strict.pynow has full per-signature coverage (positive/negative/ambiguity/ReDoS) for every one of the 54 languages that define at least one structural signature, andgitgalaxy/standards/how_to_add_a_language.mdcarries forward the 16-rule recurring-bug-class checklist this epic accumulated. Two pipeline-level findings were spun out as their own issues rather than fixed inline: #789 (csharpfunc_startvs expression-bodied methods).Test-suite documentation and the root README's testing/verification story are being updated separately to reflect this.
docs: document the strict-parsing suite and golden-master crucible te…
docs: add language-status skill and docs/language_status/ (Python wor…