Skip to content

branch_solver: the rest of the solver stack in one PR (#7578, #7580, #7581, #7583, solver-more, #7584) (Part of #4175) - #7608

Merged
squid-shepherd[bot] merged 29 commits into
mainfrom
feat/solver-combined
Nov 3, 2026
Merged

squid-shepherd[bot] merged 29 commits into
mainfrom
feat/solver-combined

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

One PR instead of five (CI backlog, 2026-11-03)

This combines the stacked solver PRs, which would otherwise each need their own CI run, review and retarget one after another. #7577 (the base branch_solver) has since merged to main; this PR is the rest, and main's copy equals the base this branch already contained.

was what it adds
#7578 survivor_attack.py facts and the ladder-slice skill use branch_solver
#7580 fault plans for RESP-driven arms (RESP as a solver input); strengthen.py backend
#7581 branch_solver.py fields: WORKING-STORAGE items no reachable path reads; settles Field mutants
#7583 field_observability.py: whether any input can tell a det-port Field-declaration mutant apart
feat/solver-more (never had a PR) caller-aware check (--callers), STRING literal prefixes, one-way loop counters, SQLCODE as an input, length-only Field mutants
#7584 .github/workflows/solver-check.yml: informational solver verdicts on PRs that touch stated infeasible outcomes

File-cap exception: this is the owner-approved consolidation of five already-stacked PRs into one to save CI runs (each was its own self-contained slice); splitting it again would undo that and needs a force-push, which is forbidden.

Class / Sibling gaps

Class: the branch solver's reach and verdict surface for stated infeasible outcomes and det-port Field mutants: base check (#7577, merged), RESP/SQLCODE inputs, caller-aware check, STRING prefixes, one-way loop counters, unused-field settling, the CI summary workflow. Every member listed in the table above is handled in this PR. Sibling gaps: none: every member handled (verdicts stay informational; the det sweep remains the gate that refutes a claim).

Added since opening

  • gate_controls.NOT_GATES: solver-check is informational and never fails.
  • solver-check.yml: pull_request paths include branch_solver.py and mainframe_corpus.py; paired corpora restore/save; pip install via ci_retry.sh; ready_for_review type and the draft condition (test_workflow_draft_gate).
  • test_cics_spec: branch_solver.py registered as a spec importer (DFHRESP).
  • Merged origin/main (add/add on branch_solver.py and its test resolved to this branch's superset).

Checks

pr_gates --ratchets: 9 pass, 0 skipped. pr_gates --fast: see CI. Solver suites and the draft-gate / cics-spec tests pass locally.

Part of #4175. Supersedes #7578, #7580, #7581, #7583, #7584.

Lessons for agents

  • A new module importing gitgalaxy.standards.cics must be added to IMPORTERS in tests/core_engine/test_cics_spec.py.
  • A new pull_request workflow needs ready_for_review in types and the draft condition on every job (test_workflow_draft_gate).

🤖 Generated with Claude Code

squid-protocol and others added 22 commits November 2, 2026 18:37
…4175)

Checks stated infeasible branch outcomes (confirmed / witness /
inconclusive, sound over-approximation of everything it does not model)
and finds inputs that take an outcome, emitted in the strengthen.py /
survivor_attack.py input format. z3 is the new `solver` extra.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The claim rests on how unlikely 100 FUNCTION RANDOM failures in a row are,
not on a constant: branch_solver finds a path through the program alone
(#4175). Owner ruling 2026-11-02: refile as R.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`facts` settles an `unreachable` verdict whose reason says a paragraph is
never reached when branch_solver finds no input that enters it (attack
result `solver-unreachable`, accepted by det_mutation.py state), and prints
the reasons it questions without recording them. `packet` shows the
solver's verdict on the paragraphs a reason names. ladder-slice asks the
solver for inputs and checks infeasible entries before they are written.

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

Each EXEC CICS answers one response symbol (its RESP item and EIBRESP hold it,
one of IBM's DFHRESP values). `reach --inputs` prefers responses a scenario's
fault plan can give (equivalence_cics_faults.py's tables) and emits the
`faults` entry: command, resource, nth 1, resp, resp2. `backend CASE
PROMPT_FILE` answers strengthen.py's prompt, so `strengthen.py run
--backend-command` closes gaps with the oracle and no model.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… no reachable statement uses (#4175)

`branch_solver.py fields CASE` lists the WORKING-STORAGE items whose accessor no
reachable statement runs; anything the runtime may touch outside a statement
(LINKAGE, FILE, EIB, DFHAID, SQLCA, FILE STATUS, ODO objects, ADDRESS OF, DTO
records, numeric-edited items set at creation, BMS maps a reachable SEND/RECEIVE
names) counts as used. `facts` settles a mutant of such an item's Field
declaration as `solver-unread`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ut can see (#4175)

Three facts, every doubt left to an attack:
- dead window: X and the bytes of both windows are read by no reachable
  statement and no runtime reader (DTOs, LINKAGE, FILE, SQLCA, sent maps,
  EIBCALEN / EIBAID-under-HANDLE-AID / ADDRESS EIB);
- map subfield: an unnamed BMS attribute / length whose bytes and the
  mutant's only hold X'00', spaces or typed lengths when SEND MAP reads them
  (a walk flag proves every SEND follows a clear; protected fields without
  FSET are never keyed, IBM 3270);
- DFHAID: every key press satisfies the same EIBAID comparisons with the
  mutant as without.
Plus offset-only relocation when nothing else touches either window.
survivor_attack facts records `solver-unobservable` (det_mutation accepts it).
The walk gains flow-sensitive Boolean flags (branch_solver Walk(flags=)).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…'s own values (#4175)

A symbolic map's input field the condition reads (<map>I's <field>I) goes into
the scenario's `receive`, and a witness first tries values the case's
scenarios already use for the same field, so a data-dependent path (a READ
that must find the record) has a chance. Oracle check: with the DELETE-NOTFND
scenario of carddemo-userdel removed, strengthen.py with the solver as backend
re-covered DELETE-USER-SEC-FILE:313:WHEN@323 (30/32 -> 31/32, proven).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each EXEC SQL's SQLCODE is one symbol (free for check); reach prefers 0, the
codes the case's sql_faults already plan and the common ones, and emits
{line, nth, sqlcode}. A LINKed program's input names no AID unless the case's
scenarios do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eir start bound (#4175)

STRING ... INTO x (no POINTER): the literal pieces it starts with (each cut at
its delimiter) are x's first bytes, the rest any value. A numeric item that
holds a known number at a PERFORM UNTIL head and that the loop (its ranges to
their end, GO TO paths with fall-through) only increases (ADD / COMPUTE x = x
+ n) or only decreases stays >= / <= that number. The loop-body closure now
stops a PERFORMed range at its end instead of falling through.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rter items (#4175)

An alphanumeric item or group the program only ever reads by MOVE X TO Y, each
Y alphanumeric and no longer than the shorter window, hands Y the same leading
bytes with either length (WS-CURDATE-MM-DD-YY 8 -> 9, moved into CURDATEO).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…#4175)

estate_entry: what the estate's programs can send a program's COMMAREA (XCTL /
LINK naming it, RETURN TRANSID of its transaction), region by region (offset,
size, kind, scale), to a fixpoint over the estate: a sender's values come from
its own value sets, which see ITS entry values through whole-area moves --
copy-in from LINKAGE, through unstructured buffers (INITIALIZE fills kept),
reference modifications at a literal or LENGTH OF x + n. Every doubt is any
value. `check --callers` reports `confirmed-callers` for a witness no input
the estate sends reaches (assumption: its programs are the only callers).
`check --github` writes the report to the job summary and warns on family C
witnesses (solver-check.yml).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e outcomes (#4175)

A PR that touches tests/equivalence/infeasible_outcomes/ gets branch_solver's
verdict on every claim of the cases it touches in the job summary, and a
warning on the file for a family C claim an input of the program reaches.
Informational: never fails (the det sweep stays the gate). Not a required
check; the path filter is the selector. Hash-pinned install set
ci/requirements/solver.txt (z3-solver 4.15.4.0, tree-sitter-language-pack
1.22.1), generated with tests/tools/pin_ci_requirements.sh.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed assumption, not infeasible (#7577 rulings)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ir the corpora cache, retry the pip install

The combined solver branch failed four CI-rule tests on its new workflow:
gate_controls (every PR workflow is a gate or says why not), workflow
inputs (a path-filtered workflow triggers on what it reads), cache keys
(a corpora restore pairs with a guarded save) and ci_retry (a hash-pinned
pip install goes through ci_retry.sh).

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

squid-shepherd Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 3, 2026 17:22
@squid-shepherd squid-shepherd Bot added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md labels Nov 3, 2026
@squid-shepherd squid-shepherd Bot removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 3, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (ced45ee) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-shepherd
squid-shepherd Bot marked this pull request as draft November 3, 2026 18:46
@squid-shepherd squid-shepherd Bot added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 3, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Nov 3, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 3, 2026 18:49
@squid-shepherd squid-shepherd Bot added the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 3, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 3, 2026 18:52
@squid-shepherd

squid-shepherd Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot disabled auto-merge November 3, 2026 19:51
@squid-shepherd

squid-shepherd Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

PR #7608 @ ced45ee: 4 failed check(s)

== equivalence-e2e (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/41694785491/job/126130136273
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== full-suite (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/41694785708/job/126164819192
repro: python -m pytest -q tests
errors:
##[error]Process completed with exit code 1.
log tail:
Commit: 21505ad2541d5be6135ed84fc33697146cf75b8e
Build Date: 2026-10-21T00:45:21Z
Worker ID: {2dc0f918-ddd1-4803-9862-ea548bee8600}
Region: westus3
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261025.353.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261025.353/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261025.353
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: full-suite
##[group]Run echo "full-suite parts: $PARTS (tested-tree skip: $SKIP, suite plan: $PLAN)"
echo "full-suite parts: $PARTS (tested-tree skip: $SKIP, suite plan: $PLAN)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure.
# #6278: or when the suite plan proved the PR changes only prose no test or engine code opens (mode skip).
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && { test "$SKIP" = "true" || test "$PLAN" = "skip"; }; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
PLAN: full
##[endgroup]
full-suite parts: failure (tested-tree skip: , suite plan: full)
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== full-suite part 3/3 (failure) -- main
https://github.com/squid-protocol/gitgalaxy/actions/runs/41694785708/job/126160802772
repro: fails on main too: fix main (then merge origin/main here)
errors:
fail-on-cache-miss: false
FAIL tests/tools/test_evidence_report.py::test_check_fails_on_an_edited_report: 24.5s is over 15s and has no @pytest.mark.slow(reason=...) and no entry in tests/test_time_baseline.json
##[error]Process completed with exit code 1.
log tail:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
Multiple search paths detected. Calculating the least common ancestor of all paths
The least common ancestor is /home/runner/work/_temp. This will be the root directory of the artifact
With the provided path, there will be 2 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-3.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 941860
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 64cf6b70a95218f735ec3ea5899480949a1db3d05b838176d7c8873b980b5b8e
Finalizing artifact upload
Artifact test-times-part-3 successfully finalized. Artifact ID 13267005032
Artifact test-times-part-3 has been successfully uploaded! Final size is 941860 bytes. Artifact ID is 13267005032
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/41694785708/artifacts/13267005032
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/8b17f15f-3328-45c6-8ccc-72c218d5dce5' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

== shard ${{ matrix.group }}/${{ needs.plan.outputs.splits }} (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/41694785491/job/126130134191
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

@squid-shepherd squid-shepherd Bot added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 3, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 3, 2026 19:57
@squid-shepherd squid-shepherd Bot removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 3, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 3, 2026
@squid-shepherd
squid-shepherd Bot merged commit 8adb994 into main Nov 3, 2026
44 checks passed
@squid-shepherd
squid-shepherd Bot deleted the feat/solver-combined branch November 3, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant