Repository navigation
estate-crucible scorer: diff every fact channel against the generated key (#4317 phase 0) - #4324
Merged
Merged
Conversation
… key (#4317) tests/_estate_crucible_pin.py pins squid-protocol/estate-crucible v0.1.0; tests/tools/estate_crucible.py scans its estate/, reads the master DB through GalaxyIR (plus calls_out_to / transfers_to, synthetic units, raw_imports) and scores 14 channels per fact: pass / fail / missing / phantom / unscored, with a per-horror verdict. Not a CI gate yet (#4317 phase 5). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
Contributor
squid-protocol
marked this pull request as ready for review
October 4, 2026 15:54
This was referenced Oct 4, 2026
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
Phase 0 of #4317, gitgalaxy side: a scorer for squid-protocol/estate-crucible
v0.1.0. That repo is a synthetic z/OS estate whose answer key is written by the generator that writes the code. This PR does not gate CI (no workflow; #4317 phase 5) and does not touchgitgalaxy/.tests/_estate_crucible_pin.py:PINNED_REF = "v0.1.0", modelled ontests/_cics_crucible_pin.py: one sed-readable line,ESTATE_CRUCIBLE_PATH, else../estate-cruciblebeside the main checkout, and an off-pin guard withESTATE_CRUCIBLE_ALLOW_UNPINNED=1.tests/tools/estate_crucible.py: scans<crucible>/estatewith galaxyscope, loads the master DB throughGalaxyIR, and reads directly the columns GalaxyIR does not carry (calls_out_to,transfers_to,synthetic_unit_data,raw_imports,excluded_artifacts). It then diffs 14 channels per fact: programs, unit extents, PERFORM / GO TO / CALL edges per owning unit, call sites, COPY imports (raw + edge), data items, record layouts (GalaxyIR.record_layoutoffsets / lengths), SQL statements / tables, JCL steps / DDs, BMS fields, CSD resources, transactions. Each check is pass / fail / missing / phantom / unscored. Each horror gets a verdict, and a failure caused by another horror is listed under it as a cascade (depends_on). Options:--jsonand--md.tests/estate_crucible/test_estate_crucible_scorer.py: unit tests for each channel's projection with hand-made engine facts, which need no checkout. Also an end-to-end test that skips cleanly when no checkout is present.Run:
python tests/tools/estate_crucible.py [--crucible PATH] [--md out.md].Scorecard: origin/main
ca88a6bbvs estate-cruciblev0.1.0Per channel
Per horror
0000-MAIN -perform-> 2000-APPLY-UPDATES @20; missing edges0000-MAIN -goto-> 9999-ABEND @23; missing edges0000-MAIN -call-> ACCTLOG @26; missing edges0000-MAIN -call-> WS-AUDIT-PGM @28(+10 more)(main line); missing edges(main line) -perform-> 1000-INITIALIZE @52; missing edges(main line) -perform-> 2000-PROCESS-TRAN @53; missing edges(main line) -perform-> 9000-TERMINATE @54RPTHDR @21; missing copiesRPTTOT @22; missing copiesRPTCNT @22; fail layoutsWS-RPT-HEAD @21(+1 more)2000-REFRESH-BALANCE.calls_out_to CUSTAUDT; phantom edges2000-REFRESH-BALANCE.calls_out_to PRODPROC; phantom call_sitesCALL PRODPROC @39; phantom call_sitesCALL CUSTAUDT @422000-DETAIL.calls_out_to 3; phantom edges2000-DETAIL.calls_out_to TEST; phantom edges2000-DETAIL.calls_out_to WS-N; phantom edges2500-SCAN-HISTORY.calls_out_to 005800(+2 more)SCHEMA; phantom unitsIDMS-CONTROL; phantom unitsPROTOCOLLNCALC; missing programsLNRATE; cascade: 2 check(s) elsewhereVerdict on each seed
002100,002400,002700,002900, raw import001400). Both CALL sites are dropped. Knock-on:copy_members = 001400, so the record layout is unresolved.d89bf68b, issue closed)1155f6bf: fails on all three shapes. CUSTINQ0000-MAINends at 28 (key 42),RETURN-TO-MENUat 48 (key 53),4000-FIND-BLANKat 69 (key 72), and 8 PERFORM edges are missing. So the plant does catch the bug.01 X. COPY Y.and two COPYs on one line give no raw import or edge.record_data.copy_membersdoes see them, but the layouts cannot expand.EXEC SQL CALLbecomes a COBOL CALL site and a callee (PRODPROC, the schema, andCUSTAUDT).sql_statement_datais right.TEST,WS-N,3, and afterEXIT PERFORMthe next token:END-IF, or in a numbered member the next line's sequence number005800(#4300 compounding).IDMS-CONTROLandPROTOCOLare units. New shape: the DATA DIVISION's IDMSSCHEMA SECTIONis a unit too (not listed in #4306).LNRATE(padded, no period) andLNCALC(PROGRAM-ID LNCALC.) are missing. Cascade:CALL 'LNCALC'and JCLEXEC PGM=LNRATEdo not resolve. Note: the padded shape passes when anAUTHOR.paragraph follows the PROGRAM-ID line. The plant has none, as in CBLDB22.Mismatches outside the seeds (engine wrong, key checked)
usage = DISPLAYfrom the PROCEDURE DIVISION'sDISPLAYverb. Examples: ACCTUPD01 WS-MSG PIC X(40).(followed by... TO WS-MSG/DISPLAY WS-MSG) and ACCTAUD01 LK-UPD-CONTROL.Inmainframe_boundary.py(~l.1034),_USAGE_CLAUSE.search(window)runs onwindow, which extends to the next level number or_ENTRY_LIMIT. It should run onentry(cut at the period), as the NATIONAL check beside it already does.01 WS-COMMAREA./COPY CUSTCOMM./COPY CUSTMS./COPY DFHAID.givescopy_members = CUSTCOMM,CUSTMS,DFHAID. CUSTMS (a symbolic map) and DFHAID each begin with their own 01, so the layout of WS-COMMAREA becomes unresolved (bytesNone; key 50). IBM: an 01 in copied text starts a new record.Projection choices (documented in the scorer, not findings): the engine excludes the BMS symbolic-map copybook
CUSTMS.cpyas machine-generated (excluded_artifacts) and resolvesCOPY CUSTMSto the BMS mapset, so the key lists the mapset as analternativeand that member's facts areunscored. SYSOUT DDs areunscored, becausejob_flow_datarecords only DSN DDs (core/job_flow.py). REDEFINES overlays in layouts areunscored, becauserecord_layoutskips them by design. EXEC SQL CALL procedure names areunscored, because there is no column for them.Seen while probing, not scored yet (phase 1): a JCL
raw_importsentry forDSN=PROD.ACCT.MASTER(+1)is truncated toPROD.ACCT.MASTER(((0)keeps its generation). In a numbered member, a sequence number on an otherwise blank line extends the preceding unit's extent.Local checks
python tests/ruff_audit.py --ci,tests/mypy_audit.py --ciandtests/dead_key_audit.py --ciall pass.pytest tests/estate_crucible: 9 passed (end-to-end included, with the checkout at the pin).Cross-repo
Companion: squid-protocol/estate-crucible
v0.1.0(already tagged; generator, key, 8 seed horrors, GnuCOBOL compile check green). Merge order: none needed, since the crucible tag exists. Nothing re-runs after merge: this is not a gate.🤖 Generated with Claude Code
https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo