Skip to content

world_archetypes: stage --out so a write failure keeps the previous report - #8856

Open
Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/world-archetypes-preserve-json
Open

Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/world-archetypes-preserve-json

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_world_archetypes.py — 20 OK

Made with Cursor

…eport

Publish through a temp file + replace so a mid-write OSError leaves any prior complete JSON intact.

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

@shyro29 shyro29 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested on Linux x86_64, CPython 3.14 (no game files): pass.

  • python -I tests/test_world_archetypes.py: OK at the head; FAILED (errors=1) with the same test file against main's tool — red/green confirmed.
  • Staging matches the merged #2684 template and the family's sibling PRs; the old writer's exact bytes are preserved (indent=1, sort_keys=True), destination touched only by os.replace, read-only probe retained, non-regular destinations written directly.
  • python -I scripts/check_no_game_data.py on the two changed files: clean. AI-assisted (Claude Code).

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.

2 participants