Skip to content

Test-strengthening loop: batch cases (#4049) - #4077

Merged
squid-protocol merged 1 commit into
mainfrom
feat/strengthen-batch-4049
Oct 1, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
feat/strengthen-batch-4049

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4049, adding batch cases to the loop from #4071.

A batch input is a fixed-width record, and the model never writes one. It names an existing record of an input dataset (based_on) and the DISPLAY fields to change (set). The record is encoded from the dataset's layout, which the tool finds from the program itself: SELECT ... ASSIGN TO gives the file, READ ... INTO gives the record, and the record's 01 is in a copybook or the program. It found layouts for all 13 input datasets of the three batch cases.

Each round targets the surviving mutants (the boundaries a batch proof misses) and judges them again afterwards.

Guards, all with the reason recorded:

  • a record that makes the step abend where the original data does not is rejected. All records share one run, so it would hide the rest; an error path is a fault plan's job;
  • a value with more decimals than its PICTURE is refused, not rounded;
  • a duplicate key in a keyed file is refused;
  • only DISPLAY fields may change, so the input file stays text.

To support this, the harness accepts an absolute input path for a candidate's data.

Results (claude-sonnet-5-5, 2 rounds each)

program branches survivors killed records
CBTRN02C (POSTTRAN) 94/96 -> 95/96 (the expired-account reject) 2 of 7 (expiry date = transaction date; an off-by-one date slice) 7
CBACT04C (INTCALC) 82/86 -> 85/86 (a zero rate; a later account forcing a rewrite) 0 of 5 11
CBTRN03C (TRNRPT) 81/82 0 of 11 12

Every strengthened case is proven, fault runs included. The survivors left are mostly equivalent:

  • a rounding mode on a value already at its scale;
  • a width the report truncates anyway;
  • defensive file handling the COBOL has no counterpart for.

Some sit in the status display of non-numeric 9x file statuses, which only a fault plan reaches (the loop's next kind of proposal). Two are open: TRNRPT's account-total add/subtract and its line counter.

The strengthened data is not committed. Each run leaves a candidate_case.json and its input files for a person to review.

Tests: test_strengthen_loop.py has 8 tests, including record building, refusals, and over-precise values. audit_check is clear.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

…sting one and its layout (#4049)

The model names an existing record of an input dataset and the DISPLAY
fields to change; the record is encoded from the dataset's layout, found
from the program (SELECT ... ASSIGN TO, READ ... INTO, the record's 01 in
a copybook or the program). Each round targets the surviving mutants and
re-judges them; a record that makes the step abend where the original data
does not is rejected (one shared run: it would hide the rest), a value with
more decimals than its PICTURE is refused rather than rounded, a duplicate
key in a keyed file is refused. The harness takes an absolute input path
for the candidate's data.

POSTTRAN 94 -> 95/96 branches, 2 of 7 survivors killed; INTCALC 82 ->
85/86; TRNRPT unchanged. The survivors left are mostly equivalent, some
need a fault plan (non-numeric 9x status display), two are open.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
Comment thread tests/tools/strengthen.py
Comment on lines +554 to +556
"Each is a small change to the program's Java port that still gives the same output on today's data. A "
"record that makes the original and the changed code behave differently exposes it (a boundary value, an "
"equal date, a digit 9, a record that takes another path).",
Comment thread tests/tools/strengthen.py
Comment on lines +568 to +573
'Each proposal is one new record: {"name": "kebab-case-name", "dataset": DD, "based_on": the number '
'of an existing record of that dataset to copy, "set": {FIELD: new value, ...}, "targets": [mutant ids '
'or branches], "why": "one sentence"}. Change only DISPLAY fields; in a keyed dataset give the record a '
"key no other record has. Every record goes into the same run: a record that makes the program ABEND ends "
"the run for all the others and is rejected -- aim at paths the run continues through. At most 8 "
"proposals, in one JSON array in a ```json block, nothing else.",
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit ce83815 into main Oct 1, 2026
30 checks passed
@squid-protocol
squid-protocol deleted the feat/strengthen-batch-4049 branch October 1, 2026 11:46
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.

2 participants