Skip to content

Prove crucible ports through their deployed entry points (Spring facades) (#4343) - #4425

Merged
squid-protocol merged 2 commits into
mainfrom
feat/4343-facade-proofs-v2
Oct 5, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
feat/4343-facade-proofs-v2

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Draft. Fixes #4343. Builds on #4349 (merged), which added the region hook (CicsTask.region() / join / deploy, with a javac runtime test). Files #4427 for what the facade proofs found.

Problem

In a deployment, traffic enters a crucible port through its Spring facades. The crucible proved only runTask. The 17 committed ports still carried the facades the generator wrote before #4342/#4349: executeX that only logs or throws, handleTransaction / handleLink that ran runTask on a task they built themselves (HXEXT's never ran the program at all), and render / submit that rebuilt screens outside runTask.

Fix

  1. Ports regenerated, surface only (tests/tools/port_surface.py, new). Each facade is taken verbatim from a fresh generation. Facades the generator no longer writes are dropped, unless runTask itself calls them (HXEXT renderHxm2, PCDETL renderPcdt, PCMENU renderPcmn stay). Private helpers only the old facades used go with them (HCMAIN seed / bridgeHcsub, CAXB / PCWIZ returnedCommarea). runTask and the logic it runs are untouched, and all 44 java-ported cells still pass. Each change is recorded in provenance.json as a resurfaced history event, and edited_after says so. Every committed port compiles against the current generator.
  2. Harness: the java-facade side (cics_crucible.py). It runs the ported project again and enters each task through handleTransaction, and each LINK / XCTL target through handleLink, with a FacadeRegion joined. The region hands the facade the scenario's own task or level and refuses any other, so a facade that builds its own task, or never runs its task in the region, fails the scenario. The fixture's log-only facades fail exactly this way, and the E2E test pins that. Results are compared exactly, as runTask's are.
  3. Proof = both paths. --report-dir is proven only when java-ported and java-facade both pass, and it lists the program's facades its passing scenarios entered by (entries). evidence.py prove and crucible_port_provenance.py reprove run both sides, so entry_points now names the facades. reprove --needs puts the stated reason on a stale mark.
  4. Docs: evidence_records.md says what "proven" covers (which entry points).

Results (cics-crucible v0.2.0, JDK 17)

port facade proof entered by
CALINK, CAXA, GTSTART, GTWORK, GTSHOW, GTTERM, HCMAIN, HCQREAD, HXATTR, HXEXT pass, proven, unapproved handleTransaction
CASUB, HCSUB pass, proven, unapproved handleLink
CAXB pass, proven, unapproved handleTransaction + handleLink
PCCONF, PCWIZ, PCMENU, PCDETL fail (6 cells), not proven #4427

#4427 (generator): the generated handleTransaction types the COMMAREA as the program's own DTO. A pseudo-conversation carries it across programs: PCWIZ RETURN TRANSID(PC03) hands PCCONF a PcwizWsState, and PCMENU's option 2 RETURNs PCDETL's record. So the deployed facade refuses it, or throws in returned(). runTask passes all of these. The cells are ledgered in baseline.json, and the four provenance records carry a stale mark citing #4427.

Regenerated by the tools: baseline.json, coverage.json and cics_crucible.md (--update-baseline); the evidence records and pages (evidence.py prove / render); provenance (reprove).

proof_reach survivor floor: the 15 unreachable survivors were all in the crucible ports' old facades. Every crucible port changed, so its mutation run is skipped until it is re-judged, and the test now asserts that in place of the floor. Re-running mutation on the 17 ports is a follow-up.

Checks: ruff_audit --ci, mypy_audit --ci; tests/cics_crucible (incl. EQUIVALENCE_E2E fixture), test_evidence, test_proof_reach, test_porting_loop_tooling.

🤖 Generated with Claude Code

…t_surface.py (#4343)

The 17 committed CICS crucible ports kept the entry points the generator wrote before
#4342/#4349: log-only or throwing executeX, handleTransaction / handleLink that ran
runTask on a task of their own (or nothing: HXEXT), render / submit rebuilding screens
outside runTask. port_surface.py takes each facade verbatim from a fresh generation,
drops the ones the generator no longer writes (unless runTask itself calls them) and the
private helpers only they used, and records a 'resurfaced' event in provenance.json.
runTask and the logic it runs are untouched; all 44 java-ported cells still pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@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

…a-facade side (#4343)

The CICS crucible runner gains a java-facade side: the ported project again, each
task entered through its program's Spring facade -- handleTransaction, and
handleLink for a program a LINK / XCTL reaches -- with the scenario's region joined
(CicsTask.join), so the facade's task is the scenario's own (same events, TS,
COMMAREA, screens, abend plumbing) and is compared with the expected log exactly. A
facade that builds a task of its own, or does not run its task in the region, fails.

A port proof (--report-dir) now needs both sides and lists the facades its passing
scenarios entered by (entries); evidence.py prove and crucible_port_provenance.py
reprove run both, so the evidence records' entry_points include the facades.

Results (cics-crucible v0.2.0): 13 ports proven, unapproved through runTask and their
facades. 6 java-facade cells fail on a generator defect, filed as #4427: the
generated handleTransaction types the COMMAREA per program, but the pseudo-
conversations of pc-wizard (PCWIZ -> PC03 -> PCCONF) and pc-aid-menu (PCMENU ->
PC12) carry it across programs. PCCONF, PCWIZ, PCMENU, PCDETL are not proven; their
provenance carries a stale mark citing #4427, and the cells are ledgered in
baseline.json.

Baseline, coverage and cics_crucible.md regenerated by --update-baseline; evidence
records and pages by evidence.py prove / render; provenance by reprove.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol squid-protocol changed the title WIP: Prove crucible ports through their deployed entry points (Spring facades) (#4343) Prove crucible ports through their deployed entry points (Spring facades) (#4343) Oct 5, 2026
@squid-protocol
squid-protocol marked this pull request as ready for review October 5, 2026 10:51
@squid-protocol
squid-protocol merged commit e7d55fa into main Oct 5, 2026
30 checks passed
@squid-protocol
squid-protocol deleted the feat/4343-facade-proofs-v2 branch October 5, 2026 10:51
squid-protocol added a commit that referenced this pull request Oct 5, 2026
…4439)

* Mutation re-run of the 13 non-PC crucible ports after #4343 (#4047)

#4425 regenerated the crucible ports' facades, so their recorded mutation
results judged old code. Re-run mutation_crucible.py (seed 0, 24 mutants per
port, cics-crucible v0.2.0) for CALINK, CASUB, CAXA, CAXB, GTSTART, GTWORK,
GTSHOW, GTTERM, HCMAIN, HCSUB, HCQREAD, HXATTR, HXEXT: 201 killed, 90
survived, every survivor triaged (34 case gap, 4 harness gap, 35 equivalent,
17 unreachable). The four PC* ports wait for #4427.

The 4 harness gaps: mutation_crucible.py runs the java-ported side only, so
facade-body mutants are never run; the java-facade side kills all four.

test_proof_reach: the stale-ness assertion now covers only the PC* ports;
re-run ports get exact flagged-survivor counts, the four harness gaps pinned
by id, and an exact killed / survived floor per port.

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

* mutation_crucible: prove mutants on java-ported and java-facade (#4047)

A facade-body mutant is never run by the java-ported side, so four survived
for that reason. Prove on both sides; re-run CASUB, CAXB, GTSTART, GTWORK
(seed 0, 24): 205 killed / 86 survived over the 13 ports, 0 harness gaps.
mutation_scores.py build gets --keep-others so the file is written by the
tool. test_proof_reach: original harness_gap assertion restored, floor updated.

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

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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.

Prove crucible ports through their deployed entry points (Spring façades), not only runTask

1 participant