Skip to content

Ground truth: blind census of the fact-channel key sections (#3445) - #3467

Merged
squid-protocol merged 1 commit into
mainfrom
feat/census-channel-sections
Sep 24, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
feat/census-channel-sections

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3445.

The six answer-key sections added by the epic matched the engine exactly, but they were only the drafting model's reading:

  • SQL table access
  • CICS task control and async children
  • MQ calls
  • units of work and handlers
  • job submissions
  • TD trigger starts

This PR gets them read a second time, blind.

Tool: tests/tools/cross_verify_sections.py

It runs the cross_verify.py census over per-file sections:

  • Every COBOL file is asked, including files the key lists nothing for. That checks recall as well as precision.
  • The brief is blind: it states each channel's contract and never the key's answers.
  • Canonical comparison: the reviewer's structured facts are put into the same canonical strings as the key's, then compared per file.
  • Same workflow as cross_verify.py: grade, rulings and sign work the same way. Signing sets the section's *_validated flag and tier cross_verified, and records the batch under the key's section_census.
  • Round-trip check first: before any reviewer ran, the key's own rows were graded as if they were a reviewer's. Every batch came out with 0 disagreements.

Census result

  • 11 batches, one fresh-context reviewer each, covering 187 COBOL files: 100% coverage on zopeneditor, CBSA and CardDemo.
  • 509 facts compared, 18 disagreements. All 18 were reviewer formatting slips; no key or engine errors.
    • 12: verb left null on HANDLE_ABEND rows. The grader now fills in a verb the kind already fixes, following the CICS-name-padding precedent.
    • 4: a HANDLE ABEND label shifted into target_kind. Ruled key_correct from the source: COACTVWC.cbl:264 and COCRDSLC.cbl:250 are both HANDLE ABEND LABEL(ABEND-ROUTINE).
    • 2: the brief's DD placeholder copied literally where the ddname SYSUT2 belongs. Ruled key_correct, and the brief now says <ddname>.
  • No key fix was needed. The ledger now labels every populated section cross_verified.

Agreed limitation, from a reviewer's note: COSGN00C tests its RESP against the numbers 0 and 13 rather than DFHRESP(...) names, so the engine and the key both call it "untested".

The mainframe-ground-truth skill now documents the section census, including the reviewer slips seen and how each was handled. 475 mainframe and tool tests pass, and the ruff and mypy audits show no new findings.

🤖 Generated with Claude Code

https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g

The six answer-key sections drafted by epic #3445 (SQL table access, CICS
task control + async children, MQ calls, units of work and handlers, job
submissions, TD trigger starts) matched the engine exactly but were only the
drafting model's reading. They have now been read a second time, blind.

tests/tools/cross_verify_sections.py: the cross_verify census for per-file
sections. It asks EVERY COBOL file of a corpus (files with no key entry too,
so recall is checked, not just precision), packed into batches by fact count,
with the corpus-wide questions (job submissions, TD triggers) in batch 1. The
brief states each channel's contract and never the key's answers; reviewer
facts are put into the same canonical strings as the key's and compared per
file. grade / rulings / sign as in cross_verify.py; signing sets the section's
*_validated flag with tier cross_verified and records the batch under the key's
section_census. A round-trip check (the key's own rows as the reviewer grade
to 0 disagreements on every batch) was run before any reviewer.

Census: 11 batches, one fresh-context reviewer each, 187 COBOL files, 100%
coverage on all three corpora. 509 facts compared, 18 disagreements, every one
a reviewer formatting slip, not a key or engine error:
- 12: `verb` left null on HANDLE_ABEND rows. Kinds whose verb the kind fixes
  are now normalised in the grader (the CICS-name-padding precedent).
- 4: a HANDLE ABEND label shifted into target_kind (ruled key_correct:
  COACTVWC.cbl:264, COCRDSLC.cbl:250 are HANDLE ABEND LABEL(ABEND-ROUTINE)).
- 2: the brief's `DD` placeholder copied literally for SYSUT2 (ruled
  key_correct; the brief now says <ddname>).
No key fix was needed. The ledger now labels every populated section
cross_verified.

A reviewer note worth keeping: COSGN00C tests its READ's RESP against the
numbers 0 and 13, not DFHRESP names, so it reads as "untested" to both the
engine and the key. That is an agreed limitation, not a disagreement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

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