Skip to content

#3804: POSTTRAN, account view and a no-data estate prove on generated inputs - #4492

Closed
squid-protocol wants to merge 1 commit into
mainfrom
feat/3804-generated-inputs
Closed

squid-protocol wants to merge 1 commit into
mainfrom
feat/3804-generated-inputs

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #3804.

Remaining "done when" items of #3804, on top of #3808 (@generate, INTCALC):

  • POSTTRAN (carddemo-posttran-generated, batch CBTRN02C): generated accounts, cross-references, category balances and 100 daily transactions. All four reject reasons (100/101/102/103) and the posting paths run; every output equal, RETURN-CODE 4 on both sides.
  • Account view (carddemo-acctview-generated, CICS COACTVWC): generated files and 24 generated scenarios (below). Proven, runTask and java-facade, on the hand-written port. Hand-written cases are untouched.
  • A no-data estate (mortgage-mlist-generated; the dbb-mortgage-application estate ships no data): the ESDS and 12 COMMAREAs are generated, nothing from @case. No hand port exists, so it is proven through the det port (det_port.py run: runTask 12/12 scenarios equal); the java-facade half fails for the known det-facade stub (det translator: CICS facades are stubs (handleLink throws, void handleTransaction does nothing), not the region-run facade #4465), so it joins that baseline entry.
  • CICS COMMAREA and map input (the issue asks for it): equivalence_inputs.prepare_cics_case. "input": "@generate" works for CICS files (record length and key from the program's file; an ESDS is unkeyed), and a scenario_generate block makes scenarios: a map field is typed as a value on file, one not on file (miss), or not a number (bad: letters, blanks, signs, a decimal point), and COMMAREA fields take values, edge (the PICTURE's edge values) or from.
  • A digits rule (numeric text a PICTURE cannot say) and dotted dataset names as from sources.

Finding, filed as #4491: the acct-view port Long.parseLongs the cross-reference card number, which COBOL's MOVE X(16) TO 9(16) does not; the first generated run failed there. Real data is all digits, so the case steers XREF-CARD-NUM to digits and says so.

Ratchets: det_sweep_baseline.json gets the two CICS cases (#4465, same cause as their hand-written siblings). pr_gates --ratchets: estate, fact-crosscheck, completeness, ground-truth pass; ports could not run (the cics-crucible checkout here is off-pin, not touched). New unit tests in test_equivalence_inputs.py, plus E2E tests (EQUIVALENCE_E2E=1) that passed locally.

Touches equivalence_cics.py in 8 lines only (an import, generated files at load, one call in run_case); equivalence.py is not touched.

🤖 Generated with Claude Code

… inputs

- carddemo-posttran-generated: CBTRN02C on generated accounts, cross-references, category balances and daily
  transactions (all four reject reasons, the posting paths).
- carddemo-acctview-generated: COACTVWC on generated files and 24 generated COMMAREA / map-input scenarios,
  typed account ids that are on file, not on file, or not numbers.
- mortgage-mlist-generated: EPSMLIST on generated inputs alone (the estate ships no data).
- equivalence_inputs.prepare_cics_case: `@generate` CICS files (key and length from the program's file) and
  `scenario_generate`; a `digits` rule for numeric text; dotted dataset names as join sources.
- det_sweep_baseline: the two CICS cases join the #4465 facade entries.
- Found: the acct-view port throws on non-digit card numbers where COBOL's MOVE does not (#4491).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the legacy-modernization COBOL refractor, dead-code extraction, and JCL forging label Oct 5, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

Report (#3804, PR #4492, draft)

Cases added (all run locally):

Done-when item 3: the issue does ask for CICS COMMAREA and map input including non-numeric input; implemented (prepare_cics_case, scenario_generate).

Issue filed: #4491 (bug, legacy-modernization, milestone 19): the acct-view port Long.parseLongs the xref card number, which COBOL's MOVE does not; the case steers card numbers to digits and says so.

CI (one check, right after push): ruff, mypy, dead-key, golden-flag, Vault Sentinel, X-Ray green; full-suite, det, crosscheck, crucible, ground-truth, ports compile still in progress; smoke matrix queued. Local pr_gates --ratchets: estate, fact-crosscheck, completeness, ground-truth PASS; ports not run (cics-crucible checkout off-pin; left alone).

Cannot yet generate inputs for:

  1. Programs whose input is a record with REDEFINES alternatives chosen by another field (GenApp's CA-REQUEST-SPECIFIC), a typed non-numeric value in a COMMAREA numeric field (the port DTO is typed), or semantic formats a PICTURE cannot say (card numbers need a digits rule; the rest need hand rules).
  2. Non-VSAM inputs: DB2 table rows, IMS/DL-I segments, MQ/TS/TD queue contents, GDG/variable-length (RECFM V) files.
  3. Cross-record business rules (balances that must sum, status transitions across a file, multi-step pseudo-conversations); from joins are single-field only.

import cobol_coverage as cov # #4023
import equivalence_common as common
import equivalence_db2
import equivalence_inputs # #3804
gen = case.get("scenario_generate")
if not gen:
return case
import equivalence_cics as cx
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

Superseded by the merge train #4524 (merged as 8137353), which carries this PR's commits plus a single regeneration of the generated files on top of main.

🤖 Generated with Claude Code

squid-protocol added a commit that referenced this pull request Nov 8, 2026
…proven"

- 05-19 retitled "Ported COBOL-to-Java Programs and Their Evidence" (mkdocs nav, index and
  in-wiki link text follow); its 2026-10-02 counts are labelled a snapshot under the L1-L5 levels,
  the holes rule, the progress page and the burned-estate / blind-trial (#8073) note; containers,
  WEB, DOCUMENT and counters are now described as modelled (checked in cics_task_*).
- 05-20 and the equivalence cookbook: the blind trial began 2026-11-07; the PR #4492 notes now
  point at the *-generated cases on main.
- scaffold cookbook, 01-04 legacy bridge, the five forge cookbooks, map-cobol-monoliths:
  "guarantees", "100%", "perfectly", "byte-for-byte without hallucinations" and "mathematically
  proven" become what the tools do; the decoder and build forges have no CLI, so their pages say
  they run inside cobol-to-java; invalid COMP-3 throws PackedDecimalDataException (S0C7) rather than
  decoding to zero; the service forge leaves TODOs for unresolved calls.
- translator README: the decoder handles EBCDIC and COMP-3 (no zoned decoding in that forge).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
squid-shepherd Bot pushed a commit that referenced this pull request Nov 8, 2026
…8107)

* docs(media): animated "one scan, every language" flow from a real scan

Replaces the hand-drawn SankeyMATIC diagram (docs/wiki/assets/sankey_v4.3.1.png) with a film generated
from a real scan of language-crucible/data at 197cbc5:
- the pip install + galaxyscope terminal, with log lines appearing on the scan's own clock;
- one tile per file, grouped by folder, coloured by the language the engine read it as (grey = left out);
- a flow through the three stages that leave files out (path/extension rules, content guards,
  statistical audit), one band per language, one engine, then the 7 reports written;
- a bottom bar running the real wall clock (log timestamps), ending at 100% in 42.4 s.

scripts/media/scan_flow_explainer.py refuses to render if an exclusion reason has no stage, if read +
left out != files on disk, if the master database disagrees with the audit, or if the log lacks
PIPELINE_SUCCESS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(media): rainbow cut, bolus timed to the clock, 7 s final hold

- --style rainbow: one equal stripe per language (64, red -> violet, names staggered in three
  columns with real counts), grey branch opened into reason families, and a gold branch for what
  still checks left-out files (X-Ray 63 anomalies, API map 377 shadow / 10 ghost APIs; repo-level
  counts in the audit, database and brief; SARIF = read files only; model weights audited and put back).
- Both cuts: the reveal is linear like the clock, the dots travel as one bolus behind the front and
  land on the reports the frame before the clock reads 100%, the reports ring once, and the final
  screen holds 7 s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(media): hold the scan-flow final screen 15 s (was 7 s)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(media): hold the scan-flow final screen 35 s (was 15 s)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* README: rainbow scan-flow film as the hero (what it does), function film second (how it does it)

The made-up fingerprint illustration leaves the hero; its caption link to the measured
copy-finding (OpenSSL inside BoringSSL) moves into the function film's caption.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: README_MOCKUP.md, the redesigned top of the README for review

Hero, What it does (scan-flow film), How it does it (function film), Where it came from (the
BLAST origin story), How we validated it (functions, graphs, Rosetta, the pre-registered null
result, read as an upper bound). The live README is unchanged beyond the hero films.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: how-it-works page of the films, wiki "(continued)" links, translator wiki reading list

- docs/how-it-works.md: every docs/media film in story order (one scan, one function, call graph,
  function shapes, copy-finding, DOOM, three AI models, COBOL to Java), a line or two each with its
  caveats, and a "(continued ->)" link to the wiki deep-dive for each.
- README_MOCKUP.md: "(continued ->)" links per section (gates, prism/detector, the BLAST philosophy
  claim, the Museum of Code index, methodology/graph accuracy/blind spots), a short CICS-to-Java
  teaser with four wiki links; drops the BLAST teardown link (overclaims "absolutely flawless").
- gitgalaxy/tools/cobol_to_java/README.md: "Further reading (wiki)" table; each row says what is
  stale in that page (2026-10-02 snapshot, older ticket format, compile check only). No status
  numbers (#5280).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: white scan-flow films, Apollo 11 teardown rescanned, engine wiki pages brought in line

- scan_flow_explainer --theme light (default): white surface like the README's other charts; the
  terminal window stays dark; _brand.brand takes an optional mark colour. Both films re-rendered.
- museum-of-code/teardown-of-apollo-11.md: redone from a fresh scan (Apollo-11 247dd7d, engine
  3bb2250): 171 AGC files, 4,786 labelled routines, 4,270 links; how routines are found by position;
  what was left out and why (incl. Luminary's Pinball); retired risk/drift scores removed; a
  "what it can't tell you" and a reproducible "check my work". The history exhibit is kept.
- 01-01, 01-03, 01-06, 03-01, 03-06, 03-08, 03-10, teardown-of-blast: throughput, language counts,
  Kubernetes size and graph-accuracy claims now match the README; risk framing -> surface readings
  that describe, not predict; "blAST" expanded one way everywhere (Bypassing LLMs and ASTs, a nod
  to BLAST); dead link and placeholder removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(wiki): COBOL-to-Java pages report evidence levels, not blanket "proven"

- 05-19 retitled "Ported COBOL-to-Java Programs and Their Evidence" (mkdocs nav, index and
  in-wiki link text follow); its 2026-10-02 counts are labelled a snapshot under the L1-L5 levels,
  the holes rule, the progress page and the burned-estate / blind-trial (#8073) note; containers,
  WEB, DOCUMENT and counters are now described as modelled (checked in cics_task_*).
- 05-20 and the equivalence cookbook: the blind trial began 2026-11-07; the PR #4492 notes now
  point at the *-generated cases on main.
- scaffold cookbook, 01-04 legacy bridge, the five forge cookbooks, map-cobol-monoliths:
  "guarantees", "100%", "perfectly", "byte-for-byte without hallucinations" and "mathematically
  proven" become what the tools do; the decoder and build forges have no CLI, so their pages say
  they run inside cobol-to-java; invalid COMP-3 throws PackedDecimalDataException (S0C7) rather than
  decoding to zero; the service forge leaves TODOs for unresolved calls.
- translator README: the decoder handles EBCDIC and COMP-3 (no zoned decoding in that forge).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: dark house style for every README chart and film

Owner direction (2026-11-08): everything dark, like the docs/media films.
- scan_flow_explainer: --theme dark is the default again; both films re-rendered dark.
- progress_slide (progress.svg): the dark palette always applies, on the films' #0f1117 surface.
  GitHub shows the SVG through <img>, where prefers-color-scheme follows the viewer's OS, so the
  light variant (and its scheme switch) is gone; the test now asserts the dark house style.
- tri_comparison_chart / graph_coverage_chart: neutrals mapped to the dark palette (series colours
  unchanged). The committed SVGs are re-coloured only, with no data change; their history workflows
  regenerate them on the next run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* README_MOCKUP: show this branch's dark chart copies in the draft

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* README_MOCKUP: origin story in 'we'; 'at this scale'

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: the README draft moves to docs/readme-redesign-mockup.md

Keeps a second README-shaped file out of the repo root; its links are rewritten relative to docs/
(all resolve). The swap into README.md is a follow-up once the text is final.
The chart generators' house-style comments no longer spell a docs/ path, which the
docs-read-by-tests scan read as a dependency.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: mockup links relative to docs/; chart comments drop the docs/ path

The previous commit carried only the rename. The mockup's links are rewritten relative to docs/
(all resolve). The chart generators' house-style comments no longer spell a docs/ path, which the
docs-read-by-tests scan (tests/tools/change_classifier.py) read as a dependency.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* scan_flow_explainer: argument checks CodeQL can follow; GIF filter as one constant

CodeQL py/uninitialized-local-variable: scan_dir/log looked unbound after ap.error() (it never
returns, but CodeQL cannot tell), so the checks now run first and the branch is a plain if/else.
py/implicit-string-concatenation-in-list: the ffmpeg palette filter is one GIF_FILTER constant.
Output unchanged (final frame re-rendered identical).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

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

legacy-modernization COBOL refractor, dead-code extraction, and JCL forging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Equivalence harness: generate test inputs from record layouts (any estate testable, edge cases included)

2 participants