Skip to content

vertex_types: stage --json so a write failure keeps the previous report - #9080

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

Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/vertex-types-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_vertex_types*.py' — 47 OK (1 skipped)

Made with Cursor

Publish the totals report through a temp file + replace so a mid-write OSError 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_vertex_types.py → 46 tests OK. No game files. AI-assisted (Devin).

@RobertAndreiGit

Copy link
Copy Markdown

Independently checked ff41b5a on macOS 15.7.3, Python 3.14.7. In addition to running python3 -I -m unittest discover -s tests -p 'test_vertex_types*.py', we injected two failures: ENOSPC after partial output had been written and flushed, and EACCES at replacement. In both cases the original CRLF JSON survived byte-for-byte and no staging file remained. Normal replacement also produced the expected JSON without leaving a staging file.

This covers the macOS failure paths; native Windows sharing and retry behavior was not exercised. Synthetic inputs only. AI-assisted review.

@ne1i

ne1i commented Nov 23, 2026

Copy link
Copy Markdown

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

  • python -I tests/test_vertex_types.py: Ran 46 tests, OK. With only the non-test files reverted to main: FAILED (errors=1).
  • compileall and scripts/check_no_game_data.py on the changed files: clean.

Same shape: the reverted run is an AttributeError on a helper the PR adds.

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