Skip to content

fog_volumes: stage --out with replace_retry so a write failure keeps the previous report - #9040

Open
Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/fog-volumes-preserve-replace-retry
Open

Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/fog-volumes-preserve-replace-retry

Conversation

@Grimkeh

@Grimkeh Grimkeh commented Nov 23, 2026

Copy link
Copy Markdown

Summary

Claim: #8504 (comment)

Synthetic; no game files. AI-assisted (Cursor / Composer).

Test plan

  • python3 -I -m unittest discover -s tests -p test_fog_volumes.py — OK

Made with Cursor

…the previous report

Publish through NamedTemporaryFile + replace_retry/published_mode so a mid-write or replace failure leaves any prior complete JSON intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
@catminou4

Copy link
Copy Markdown

Tested on Apple M1 Max, macOS 27.2.1 arm64, Python 3.12.16: python -I tests/test_fog_volumes.py → 10 tests OK (1 skipped). No game files. AI-assisted (Devin).

@YordiLorenzo

Copy link
Copy Markdown

Tested e069b2c on Linux, Python 3.14.4: pass

python3 -I tests/test_fog_volumes.py: 10 pass, 1 skipped
with main's fog_volumes.py the new test errors only because there is no replace_retry to mock; main already kept the old report
a mutant that truncates the destination first: the new test fails

What changes on Linux is the mode: main writes 0o600, this head 0o644. No test pins that yet.

@ne1i

ne1i commented Nov 23, 2026

Copy link
Copy Markdown

Tested e069b2c9 on Linux, CPython 3.14, CPU only, synthetic inputs, merged onto main 867d922f: pass

  • python -I tests/test_fog_volumes.py: Ran 10 tests, OK (skipped=1). With only the non-test files reverted to main: FAILED (errors=1, skipped=1), so the new tests exercise the change.
  • compileall and scripts/check_no_game_data.py on the changed files: clean.

A note from the agent's read: main already publishes through a staged replace here, so a failed write cannot truncate; the new part is the retry helper and the non-regular destinations, and the new test patches the helper, which does not exist on main (hence the error rather than a truncation failure in the reverted run).

Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting.

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.

4 participants