Skip to content

tooling: cics_census blockers -- rank gaps by programs made whole (#4270) - #4587

Merged
squid-protocol merged 1 commit into
mainfrom
tooling/4270-cics-blockers
Oct 6, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
tooling/4270-cics-blockers

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4270 (direction change: pick the next slice by programs made whole, not by keyword frequency).

What

  • tests/tools/cics_census.py blockers DIR [--label before] [--all-programs] [--top N] [--json] reads a whole-estate det survey (survey with no --verb) and, for every distinct gap class (line numbers and data / map / class names stripped; CICS command / option, EXEC SQL, grammar det translator: 32 programs refused across the keyed corpora and estate-crucible (code pages, free format, multi-program sources, grammar gaps); KYUYJP crashes #4462, missing copybook X, refused: <error kind>, any other statement hole), counts:
    • only gap: programs for which it is the ONLY remaining gap class (fixing it makes them whole), split burned / non-burned;
    • one away: programs it leaves one gap class from whole;
    • touched: every program with it.
      Plus programs whole / total and a histogram of distinct gap classes per program. Programs with an EXEC CICS command only, unless --all-programs. Ranked by only-gap, then non-burned only-gap, then one-away, then touched. Reuses load_surveys / whole / the hole dedupe.
  • det_survey.py: the refactor controller sys.exit(0)s on "No executable COBOL files found" (seen on the Cobol-DB2-Cursor census clone); that ended the WHOLE survey with status 0 and no survey.json. It is now a per-corpus result. cics_census.py survey now reports a run that wrote no survey.json instead of exiting 0.
  • Tests in tests/tools/test_cics_census.py (normalisation, ranking, CLI; fixture surveys, no translator needed).

The ranking (before survey, blockers)

Before survey, every CICS program (no --verb): burned corpora + 7 non-burned census clones with CICS programs.

  • translated whole: 69 / 125 (non-burned 13 / 31); refused whole: 19
  • distinct gap classes per program: 0: 69, 1: 33, 2: 4, 3: 8, 4: 5, 5: 1, 6: 1, 7: 1, 9: 1, 10: 1, 18: 1
# gap only gap (B / NB) one away (B / NB) touched
1 refused: LayoutError: national / DBCS text (…) is not modelled: the translator reads a single-byte code page * 6 (0 / 6) 0 (0 / 0) 6
2 COMPUTE FUNCTION RANDOM 6 (6 / 0) 1 (1 / 0) 7
3 refused: ExprError: the PROCEDURE DIVISION does not parse * 5 (0 / 5) 0 (0 / 0) 5
4 refused: LayoutError: DATA DIVISION does not parse near expanded line(…) * 2 (1 / 1) 0 (0 / 0) 2
5 missing copybook CMQGMOV * 2 (2 / 0) 0 (0 / 0) 2
6 EXEC CICS FORMATTIME RESP 1 (0 / 1) 0 (0 / 0) 1
7 missing copybook BAQRINFO * 1 (0 / 1) 0 (0 / 0) 1
8 refused: ExprError: paragraph_header does not parse * 1 (0 / 1) 0 (0 / 0) 1
9 EXEC CICS RETURN IMMEDIATE 1 (1 / 0) 0 (0 / 0) 9
10 EXEC CICS not a data area: Length of <name> 1 (1 / 0) 0 (0 / 0) 2
11 dynamic CALL 1 (1 / 0) 0 (0 / 0) 2
12 EXEC CICS (no reason given) 1 (1 / 0) 0 (0 / 0) 1
13 EXEC CICS ASKTIME NOHANDLE 1 (1 / 0) 0 (0 / 0) 1
14 EXEC CICS READ GENERIC GTEQ 1 (1 / 0) 0 (0 / 0) 1
15 EXEC CICS RECEIVE MAP ASIS 1 (1 / 0) 0 (0 / 0) 1
16 missing copybook CEEIGZCT * 1 (1 / 0) 0 (0 / 0) 1
17 missing copybook CMQODV * 1 (1 / 0) 0 (0 / 0) 1
18 EXEC CICS LINK SYNCONRETURN 0 (0 / 0) 1 (1 / 0) 10
19 SET: NULL: pointers are not modelled 0 (0 / 0) 1 (1 / 0) 5
20 <name>: no such item 0 (0 / 0) 1 (0 / 1) 3
21 EXEC CICS READ GTEQ 0 (0 / 0) 1 (1 / 0) 3
22 EXEC CICS FETCH 0 (0 / 0) 1 (0 / 1) 2
23 EXEC CICS RUN CHANNEL 0 (0 / 0) 1 (0 / 1) 2
24 EXEC CICS no generated screen for map <name> 0 (0 / 0) 1 (0 / 1) 2

* refuses the whole program (no statements translated): fixing it reveals that program's holes, so its count is an upper bound.

34 more gap classes unlock nothing alone and leave no program one away; most touched of them: EXEC CICS INQUIRE (7), EXEC CICS BIF DEEDIT (5), COMPUTE FUNCTION NUMVAL in a floating-point expression (4), EXEC CICS WEB CLOSE (4), EXEC CICS WEB CONVERSE (4), EXEC CICS WEB OPEN (4), EXEC CICS DOCUMENT CREATE (3), EXEC CICS DOCUMENT RETRIEVE (3).

Not CICS verbs among the top: the national / DBCS refusal (one non-burned estate: an em dash in source), COMPUTE FUNCTION RANDOM (burned), PROCEDURE / DATA DIVISION parse refusals (#4462), missing system copybooks (MQ CMQGMOV / CMQODV, LE CEEIGZCT, z/OS Connect BAQRINFO), dynamic CALL. The first CICS option that unlocks a non-burned program alone is FORMATTIME RESP (1).

Run notes: the census repos were re-cloned into scratch (INELIGIBLE_FOR_BLIND_ESTATE.md minus burned; read only through translator output; nothing committed). The three census clones with no CICS program (the two martinluc DB2 repos and cobol-db2-refatorado) were left out of the rerun after the det_survey abort above; dsf / zopeneditor-sample were surveyed but have no CICS program.

Checks

  • pytest tests/tools/test_cics_census.py: 31 passed.
  • ruff format / ruff check clean on cics_census.py; mypy tests/tools/cics_census.py clean apart from a pre-existing pr_gates.py:111 error it imports.

🤖 Generated with Claude Code

https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6

)

`cics_census.py blockers DIR [--label before]` reads a whole-estate det survey and ranks every
gap class (CICS command / option, EXEC SQL, grammar #4462, missing copybook, refusal) by the
programs fixing it would make translate WHOLE: programs for which it is the only gap class left
(burned / non-burned), programs it leaves one gap class from whole, and all it touches; plus
programs whole / total and a histogram of distinct gap classes per program. CICS programs only
unless --all-programs.

det_survey: a refactor-controller sys.exit() ("No executable COBOL files found") ended the whole
survey with status 0 and no survey.json; it is now a per-corpus result. `survey` reports a run
that wrote no survey.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
@squid-protocol squid-protocol added enhancement New feature, sensor, or structural signature testing Unit, integration, and E2E pipeline verification legacy-modernization COBOL refractor, dead-code extraction, and JCL forging labels Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 6, 2026 22:17
@squid-protocol
squid-protocol merged commit 9fda765 into main Oct 6, 2026
18 checks passed
@squid-protocol
squid-protocol deleted the tooling/4270-cics-blockers branch October 6, 2026 22:17
squid-protocol added a commit that referenced this pull request Oct 7, 2026
…on, unmask, pr_check (#4270, 1 of 2) (#4596)

* tooling: blocker baseline cache, history, provision, unmask (#4270)

- cics_census survey --baseline: one survey per main SHA with that commit's
  own translator, cached at <root>/census-cache/<sha>/ (a no-op once cached,
  locked); blockers --baseline and compare --before-baseline read it.
- cics_census history append/show: docs/language_status/blockers_history.jsonl,
  seeded with #4587 / #4590 / #4592 (approximate SHAs, noted) and #4593.
- equivalence_env --provision: private cics-crucible at the pin + census
  clones (INELIGIBLE_LIST minus burned; estate4 candidate names refused),
  provision.json with SHAs, the exports; --check WARNs on an off-pin shared
  checkout.
- blockers --unmask GAPKEY: what-if re-translation of the programs one
  whole-program refusal stops, with that check off via det.source.survey_unmask
  (survey-only; det_survey.py is its only caller).

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

* cics_census: --no-census reads no $CICS_CENSUS_CORPORA either (survey, usage, compare, blockers) (#4270)

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

* cics_census: --no-census with --census-corpora is an error; regression test over survey, usage, compare (#4598)

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

---------

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

Labels

enhancement New feature, sensor, or structural signature legacy-modernization COBOL refractor, dead-code extraction, and JCL forging testing Unit, integration, and E2E pipeline verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant