Repository navigation
dev: port restoHack's sanitizer/soak harness - #14
Merged
Merged
Conversation
check_resize() only called docrt() when the size differed from last_cols/last_rows, which the too-small loop never updates. Shrinking the terminal and restoring the same 80x24 left the warning on screen over a stale map. Found by the soak harness port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dev/lib + run-{asan,ubsan,asan-ubsan,hardened,all}.py from restoHack
master (faa0110), adapted: protoHack build flags (no PIE: CMakeLists
forces -fno-pie), no -D flag, no libFuzzer step, and a protoHack
game_runner (pyte screen, BFS stair seeking, targeted keys for the S1
fixes, save/hangup + restore, resize, new game after death).
HACK_SEED seeds the RNG in -DHACK_TEST_SEED builds only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; docs - quit reads the screen (dismiss --More--, cancel prompts, then Q): blind ' ' passed turns and new --More-- pages swallowed the Q - restore check looks only at the respawned game's output - a TERMINAL TOO SMALL screen still up after restoring 80x24 fails the run (the bug fixed in #13) - dev/README.md: lanes, what a run does, soak recipe, replay - CHANGELOG entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports restoHack's
dev/harness, as of master faa0110 (#22, #24), to protoHack, so protoHack can be soaked before the next release. Merge #13 first: this branch includes its commit, so the harness tests the fixed resize redraw.What's ported and what changed
-O2 -fstack-protector-strong -D_FORTIFY_SOURCE=3with full RELRO, and no PIE, becauseCMakeLists.txtforces-fno-pie/-no-pie--seed-offset,--only-run,--tolerate-failure-percent, failure checksHACK_SEEDwith-DHACK_TEST_SEEDmain(); test builds only-Dlib/game_runner.py, same interfaceThe protoHack runner:
>, or to the nearest unexplored edge, so runs reach levels 2–5 instead of staying on 1;oandcwith long, comma and%text;--enhanced, saves (S) or hangs up and checks the restore, and resizes below 80x24;A simulated hangup also closes the pty, as a real one does: the game's SIGHUP handler only sets a flag that it acts on at the next read.
Found while porting
Verification
run-all.py --runs 3 --steps 1500 --enhanced --seed-offset 11, all 4 lanes, with #13 included: 10/12 passed.The 2 failures were the harness's old blind quit sequence: a jackal fight's --More-- and an "eat what?" prompt swallowed the
Q. With the screen-aware quit, both runs (--only-run) pass.Not covered yet: a full overnight soak, which is the next step:
uv run ./run-all.py --runs 100 --steps 1000 --enhanced --seed-offset $(date +%s).🤖 Generated with Claude Code