Skip to content

rsc8_audio: send archive scan progress to stderr - #6776

Merged
shayderrr merged 1 commit into
ItsNotRexed:mainfrom
Solthodox:fix/rsc8-summary-stdout
Nov 23, 2026
Merged

shayderrr merged 1 commit into
ItsNotRexed:mainfrom
Solthodox:fix/rsc8-summary-stdout

Conversation

@Solthodox

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: four media-tool items on #6603, rsc8_audio item.

What and why

Small scans printed a JSON summary, but at 2 GiB the progress line was also written to stdout. A consumer could not parse the same command’s output on a larger archive without knowing it needed --quiet. Send progress to stderr and keep the JSON summary on stdout. The progress interval and quiet-mode behavior are unchanged.

Tested

AI-assisted: yes.

Checklist

  • No game data, keys or decryption, including in logs or reports quoted here. All fixtures were synthetic.
  • Translator-rule contract: not applicable; no translator changes.

Keep the progress indicator on stderr so piping a long archive scan works with or without --quiet.
@tikD1337

Copy link
Copy Markdown
Contributor

Tested 47bc1af1f on Windows 11 Home (Build 26200 x64), Python 3.13.0: pass

  • git diff --check HEAD~1..HEAD: clean
  • python -I -m compileall -q make_game.py tools scripts tests: exit 0
  • python -I make_game.py --help: exit 0
  • python -I tests/test_rsc8_audio.py -v: 38/38 OK (1.908s, including test_progress_does_not_interrupt_the_json_summary)
  • python -I scripts/check_no_game_data.py: clean, exit 0

AI-assisted. No game files.

@shayderrr shayderrr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

tools/rsc8_audio.py sends progress() output to stderr via file=sys.stderr and introduces PROGRESS_BYTES (2 GiB) for the reporting interval; the --quiet help now states stdout holds the JSON summary. tests/test_rsc8_audio.py patches the interval and asserts stdout parses as JSON while progress appears on stderr (and is empty under --quiet).

Why merge

On large archives the progress line was printed to stdout beside the JSON summary, so consumers could not parse one command's output without knowing to pass --quiet. With this change stdout is always clean JSON regardless of archive size.

Verdict: Approve

@shayderrr

Copy link
Copy Markdown
Collaborator

Summary

tools/rsc8_audio.py sends progress() output to stderr via file=sys.stderr and introduces PROGRESS_BYTES (2 GiB) for the reporting interval; the --quiet help now states stdout holds the JSON summary. tests/test_rsc8_audio.py patches the interval and asserts stdout parses as JSON while progress appears on stderr (and is empty under --quiet).

Why merge

On large archives the progress line was printed to stdout beside the JSON summary, so consumers could not parse one command's output without knowing to pass --quiet. With this change stdout is always clean JSON regardless of archive size.

Verdict: Approve

@shayderrr
shayderrr merged commit 1f4d841 into ItsNotRexed:main Nov 23, 2026
0 of 2 checks passed
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.

3 participants