Repository navigation
psin_psch: report missing inputs/unwritable json as ERROR + exit 2 and guard carve-dir streams - #6260
Open
Alpaca-exe wants to merge 1 commit into
Open
Alpaca-exe wants to merge 1 commit into
Alpaca-exe wants to merge 1 commit into
Conversation
…d guard carve-dir streams
This was referenced Nov 23, 2026
This was referenced Nov 23, 2026
|
Tested 95492b8 on Windows 11 (NTFS), Python 3.12.10 (CPU only, no GPU, no game files): pass What I ran:
Edge cases by hand. Synthetic PSIN from the test's
The last row only happens when the target is not an Overlap with other open PRs:
AI-assisted (Claude Code). |
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.
Improves CLI error handling and
--carve-dircollision protection intools/psin_psch.py:Changes
tools/psin_psch.py:targetand--carve-dirwithos.path.exists(...)inmain(), printing oneERROR: <path>: does not existline tostderrand exiting2.check_report_path()so--jsonis also checked against every carved<offset>.binstream listed in--carve-dir/index.json(viagm.check_report_path), not only--carve-dirandindex.jsonthemselves.ERROR:and return2for missing/unreadableOSErrorinputs,--jsoncollision errors, and unwritable--jsondestinations (returning1for malformed container payloads).tests/test_psin_psch.py:test_cli_reports_missing_inputs_unwritable_json_and_carve_dir_collisions_with_exit_2covering missing targets, missing--carve-dir, unwritable--json, and--jsoncolliding with a carved stream in--carve-dir/index.json.Checks (AI-assisted, Windows 11, no game files)
python -m compileall -q make_game.py tools tests-> exit0python -I scripts/check_no_game_data.py-> exit0python -I tests/test_psin_psch.py -v->Ran 4 tests(OK)python -I tests/test_text_write_line_endings.py -v->Ran 3 tests(OK)python -I tests/test_tool_startup.py -v->Ran 2 tests(OK)python -I tests/test_tool_stdout_encoding.py -v->Ran 4 tests(OK)