Skip to content

README: per-language evidence matrix replaces the function and call-graph charts - #9144

Merged
squid-protocol merged 1 commit into
mainfrom
language-sheets-readme
Nov 23, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
language-sheets-readme

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

What this does

Follow-up to #9142 (the per-language evidence sheets).

Matrix

  • Languages are grouped by how many of the six stats are measured: 4 or more ("well measured", 28 languages) and fewer than 4 (sparsely measured, 45, three of them with nothing measured yet), each A to Z, each its own SVG (matrix.svg, matrix_sparse.svg). This describes how much evidence exists, not how good the engine is. A decoy-only keyword result does not count as a measurement.
  • Rows are about 30% tighter; a row grows only when it carries a keyword bar. Rosetta is one line.
  • Each row says how many of the six stats it has.

README, "How we validated it"

  • New per-language block with the well-measured matrix open and the sparse one collapsed.
  • Removed: the function/class/argument agreement chart (tri-comparison) and the call-graph coverage chart.
  • Kept visible: the keyword-family chart and the Rosetta chart.
  • Collapsed into <details>: the function numbers, the call-graph and import-graph numbers (with the GIF), and the keyword-family bullets.

COBOL ground truth (second commit)

  • The cobol sheet's functions, call links and imports now come from the CICS/COBOL answer keys (tests/cobol_mainframe/ground_truth_ledger.json): 9 keyed corpora, 168 programs, new method answer-key.
  • Functions: paragraphs and sections, 2,527 units, 100% / 100%. Imports: copybook paths, 503, 98.1% precision, 100% recall. Call links: PERFORM and GO TO edges, 2,608, 100% precision, 92.6% recall.
  • Each row names the weakest verification tier behind it. The call-link row is draft because some corpora's edges are not yet cross-verified. The reviewers are LLMs, not people; no field has a human sign-off.
  • A tree-sitter or analyser measurement is never replaced. cobol moves to the well-measured group (29 well, 44 sparse).

Read before merging

  • The cutoff of 4 is a choice: there is a gap in the data there (counts of languages measured on 6/5/4/3/2/1/0 stats are 15/11/2/5/17/20/3). COVERAGE_MIN in language_sheets.py changes it.
  • The well-measured matrix is still tall (about 1,340 px) and is shown open in the README. Flip <details open> to <details> to collapse it.
  • The removed charts' generators and docs/self_scan SVGs are untouched; only the README stopped embedding them. Their text numbers remain in the collapsed blocks.
  • Matrix images use relative paths, like the existing GIFs, so they will not render on PyPI.

Checked

  • pytest tests/tools/test_language_sheets.py: 11 passed
  • ruff_audit.py --ci, doc_refs_audit.py --ci: no new findings; language_sheets.py --check: current
  • Rendered both matrices in headless Chrome and read the top of each. I did not preview the README on GitHub.

🤖 Generated with Claude Code

https://claude.ai/code/session_018srRvhLsKhsTZmCyX36Qem

…raph charts

The language sheets now group by how many of the six stats are measured: a
well-measured group (4 or more, A to Z) and a sparsely measured group (A to Z),
each its own matrix. Rows are tighter, and a row grows only when it carries a
keyword bar.

README "How we validated it": the new matrix sits where the function-agreement
and call-graph charts were, both of which are removed. The keyword-family chart
and the Rosetta chart stay visible. The function numbers, the call and import
graph numbers, and the keyword-family bullets move into collapsible blocks; the
sparsely measured matrix is collapsed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol
squid-protocol marked this pull request as ready for review November 23, 2026 20:29
@squid-protocol
squid-protocol merged commit 88d3d7f into main Nov 23, 2026
56 checks passed
@squid-protocol
squid-protocol deleted the language-sheets-readme branch November 23, 2026 22:07
squid-shepherd Bot pushed a commit that referenced this pull request Nov 24, 2026
* Language sheets: answer-key column and a legacy/mainframe group (plus the COBOL ground truth that missed #9144)

The engine's strongest evidence for the legacy languages is the hand-built answer keys in
tests/cobol_mainframe/ground_truth_ledger.json, and the sheets showed almost none of it. This adds an
"Answer key" stat and a legacy/mainframe group.

Answer key: each ledger field is assigned to the language it is evidence for (JCL job flow, resolved
datasets, runner programs and DD names to jcl; BMS screen fields and symbolic maps to bms; CSD resources
to csd; the four PL/I fields to pli; Db2 table access and columns to db2_sql; everything else, COBOL and the
CICS, IMS and MQ calls inside it, to cobol). The cell shows the engine's agreement with the key summed over
the keyed corpora, and a bar of how many facts sit at each verification tier (cross-verified, LLM-verified,
sample-verified, draft), because the tier is what says how far the number can be trusted. `dead` and
`dead (non-trivial)` are listed on the sheet but not in the aggregate: the engine's flag means
unreferenced by name, the key's means unreachable (ledger cause engine_dead_is_unreferenced_by_name).

What it shows: bms 9,945 facts, jcl 2,792, csd 501, db2_sql 127 and cobol 40,694 all agree at 99.5% to 100%,
but only 56%, 68%, 91%, 89% and 17% of those facts are cross-verified, and pli's 16,513 facts have none
(all sample-verified or draft). clist, easytrieve, hlasm and rexx have no answer key.

Legacy group: a hand-set context (legacy/mainframe) in docs/language_sheets/notes keeps cobol, pli, hlasm,
jcl, rexx, clist, bms, csd, easytrieve and db2_sql together in matrix_legacy.svg whatever their coverage
count. The README block gains the legacy matrix and states that the reviewers are LLMs and no field has a
human sign-off.

Also included: the COBOL commit from the #9144 branch (cobol's functions, call links and imports from the
same ledger, method `answer-key`, its note and tests). It was pushed after #9144 was squash-merged, so it
never reached main; main's cobol sheet still said "not measured" for those three stats. It is cherry-picked
here with the conflicts resolved, and the answer-key stat builds on it.

Tests: the field-to-language mapping, the by-design exclusion, the tier mix and cell text, the legacy
grouping, and each language landing in exactly one matrix.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018srRvhLsKhsTZmCyX36Qem

* Answer key: show how much of each key was re-read by blind reviewers, with the error bound

The tier bar says how much of a language's evidence was read in full, but for the large fields the keys
are verified by a seeded sample, and the answer keys already record what that sample found: items
asked, key errors, and a 95% upper bound. This surfaces it, pooled per language with the same formula
as tests/tools/cross_verify_sections.py (a test pins it to the key's own figure: 2 errors in 315 is
0.019).

Pooled over the keyed corpora: pli 1,350 items re-read, 3 key errors, at most 0.6%; bms 932 and 0
errors, at most 0.3%; jcl 365 and 0, at most 0.8%; cobol 2,787 and 103, at most 4.3%. The COBOL figure
is mostly one reader defect found and fixed in a review of record fields (86 of the 103), so it bounds
the key as first drafted. The sheets say so: the counts are findings against the key as first drafted,
the bound is conservative for the key as it is now, and a sample bounds the error rate but does not
prove the unsampled facts correct. A section whose result is nested (no direct `asked`) is skipped.

The matrix cell gains a line ("sample: key error <= 0.6% (95%)"), each sheet a "How much of the key was
re-read" table, and the README block a sentence. Also fixes "1 fields".

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018srRvhLsKhsTZmCyX36Qem

* Merge origin/main; regenerate the language sheets from the reviewed answer keys

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018srRvhLsKhsTZmCyX36Qem

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant