Skip to content

Prepare for EigenScript's boolean type (EigenScript#1637) - #122

Merged
InauguralPhysicist merged 1 commit into
mainfrom
bool-migrate
Oct 6, 2026
Merged

InauguralPhysicist merged 1 commit into
mainfrom
bool-migrate

Conversation

@InauguralPhysicist

Copy link
Copy Markdown
Contributor

Prepare for EigenScript's boolean type (EigenScript#1637)

Under EigenScript#1637 has_key/contains/write_text/rm and every
comparison return a bool, and bool == num raises. Each site now
tests truthiness, which behaves identically on v0.44.0 (1/0) and on
the bool-typed runtime.

Patterns:

  • (P of ..) ==|!= 0|1 -> (P of ..) / not (P of ..) (24 lines)
  • lib/bench.eigs:1470,1472,1483 wrote != 1, wrote == 1, removed == 1
    (write_text / rm results) -> not wrote, wrote, removed
  • tests/test_solver.eigs:650,661,867 assert_eq of [label, X, 1] ->
    assert_true of [label, X] where X is a bool (found by an
    instrumented assert_eq that reports bool-vs-num instead of raising)
  • tests/test_active_learnts.eigs:83,88 require_* != 0 -> require_*
    (a caller passes compact_mode != "lazy")

Changed hunks (file: start lines):

  • lib/bench.eigs 452,757,1470,1472,1483,1499
  • lib/dimacs.eigs 63
  • lib/solver.eigs 881,883,885,1192,1196,1200,1204,1206,1210,1214,1218,1222,1226,1230,1234,1249,1258,1262,1268
  • tests/test_active_learnts.eigs 83,88
  • tests/test_solver.eigs 650,661,810,867

Before: on the bool binary (PR #1647, 79e800aa) run_smoke.sh,
run_proof_check.sh and the proof-shape benchmark failed (first at
lib/solver.eigs:1192, has_key != 0). After: all four CI steps exit 0
on v0.44.0 and on the bool binary. Output differs only in timings and
in the informational bench line, which prints wrote=true removed=true
instead of wrote=1 removed=1 (no golden pins it).

Claude-Session: https://claude.ai/code/session_01KC99CmwatKssQYggkBCgwF


Prepares this repo for the boolean type in EigenScript#1637 (PR EigenScript#1647). Every edit is dual-compatible: this repo's real CI command was run on both the v0.44.0 release binary and the PR#1647 binary, with matching results except for the bump-phase golden items listed in EigenScript#1637's consumer report. This PR lands on the current v0.44.0 pin; the golden/C-API changes land with the later pin bump.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KC99CmwatKssQYggkBCgwF

Under EigenScript#1637 has_key/contains/write_text/rm and every
comparison return a bool, and `bool == num` raises. Each site now
tests truthiness, which behaves identically on v0.44.0 (1/0) and on
the bool-typed runtime.

Patterns:
- `(P of ..) ==|!= 0|1` -> `(P of ..)` / `not (P of ..)` (24 lines)
- lib/bench.eigs:1470,1472,1483 `wrote != 1`, `wrote == 1`, `removed == 1`
  (write_text / rm results) -> `not wrote`, `wrote`, `removed`
- tests/test_solver.eigs:650,661,867 `assert_eq of [label, X, 1]` ->
  `assert_true of [label, X]` where X is a bool (found by an
  instrumented assert_eq that reports bool-vs-num instead of raising)
- tests/test_active_learnts.eigs:83,88 `require_* != 0` -> `require_*`
  (a caller passes `compact_mode != "lazy"`)

Changed hunks (file: start lines):
- lib/bench.eigs 452,757,1470,1472,1483,1499
- lib/dimacs.eigs 63
- lib/solver.eigs 881,883,885,1192,1196,1200,1204,1206,1210,1214,1218,1222,1226,1230,1234,1249,1258,1262,1268
- tests/test_active_learnts.eigs 83,88
- tests/test_solver.eigs 650,661,810,867

Before: on the bool binary (PR #1647, 79e800aa) run_smoke.sh,
run_proof_check.sh and the proof-shape benchmark failed (first at
lib/solver.eigs:1192, has_key != 0). After: all four CI steps exit 0
on v0.44.0 and on the bool binary. Output differs only in timings and
in the informational bench line, which prints wrote=true removed=true
instead of wrote=1 removed=1 (no golden pins it).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KC99CmwatKssQYggkBCgwF
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@InauguralPhysicist
InauguralPhysicist merged commit 2808072 into main Oct 6, 2026
1 check passed
@InauguralPhysicist
InauguralPhysicist deleted the bool-migrate branch October 6, 2026 18:20
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.

1 participant