Skip to content

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

Closed

Description

@squid-protocol

Part of epic #3803.

Problem. The harness proves a port on the data the estate ships. CardDemo ships data files; most repositories ship none. So a fresh estate can't be tested, and one sample file covers only the paths its records reach.

Proposal. Generate each input dataset from the program's record layout, which the engine already knows: every field's PICTURE, USAGE, offset, OCCURS and REDEFINES.

  • Values per field type:
    • text: spaces, a full-width value, mixed case;
    • DISPLAY / COMP-3 / COMP numerics: zero, one, the maximum, negative where the PIC is signed, and a fraction at the PIC's scale;
    • dates-shaped fields as found.
  • Keys: unique and sorted per the VSAM define (a KSDS loads in key order); an AIX key may repeat when NONUNIQUEKEY.
  • Deterministic: seeded, so a run can be reproduced exactly.
  • Joins: where the facts say one file's field keys another (a card xref's account id, an account's customer id), some records match and some deliberately miss, so both the found and NOTFND paths run.
  • CICS scenarios: COMMAREA and map input are generated the same way, including non-numeric input for numeric fields.

Done when: a case can say "input": "@generate" (with an optional seed and record count); CardDemo INTCALC / POSTTRAN / account view run equivalent on generated inputs as well as their own data; and a new estate with no data can run the harness.

🤖 Generated with Claude Code

Activity

  1. added
    legacy-modernization
    on Sep 26, 2026
  2. added a commit that references this issue on Oct 6, 2026
  3. added
    scope:core
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    legacy-modernizationscope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions