Skip to content

Preserve barycentric helpers when a later batch entry fails - #6161

Open
kacper-serewis wants to merge 1 commit into
ItsNotRexed:mainfrom
kacper-serewis:fix/bary-output-publication
Open

kacper-serewis wants to merge 1 commit into
ItsNotRexed:mainfrom
kacper-serewis:fix/bary-output-publication

Conversation

@kacper-serewis

@kacper-serewis kacper-serewis commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claim 7102306284 on coordination board #6089. Tracker item BUILD-2030. No PR dependencies. #5196 and #5197 concern metadata and interface consumers.

Keep each helper's staging directory alive until every selected entry has assembled and passed validation. Then replace the destination files in the existing order. A failure during final replacement can still leave partial output, and concurrent readers can observe individual replacements.

On Windows, the isolated batch CLI ran against two valid synthetic entries with a synthetic assembler failing on the second. On the parent, two existing files changed in the seeded case and two new files appeared in the empty case. With this change, both runs exit 1 with zero destination changes. Both retries exit 0 and publish four files.

With real SPIRV-Tools (Vulkan SDK 1.4.363.0), eight private cached fallback entries yielded 16 byte-identical output files against the parent and the same ordered list of eight binaries. The isolated helper suite passed all 29 tests, including paired output and late assembler and validator failures. Compileall, isolated make_game.py --help and git diff --check passed.

AI-assisted with Codex. Windows CPU only. No GPU or driver exercised and no raw archives read. Only synthetic regression code and aggregate results are included.

Full semantic suite: 6,245 tests, 3 failures, 2 errors, 4 skips and 1 expected failure. The run reported divergent-loop wave64 interpreter and control-flow failures outside the edited helper. Current-board PR receipt.

@Jadiac5

Jadiac5 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested 2ff60a5 on Windows 11, Python 3.12 (CPU only): pass

  • python -I tests/test_bary_fallback_gs.py with the Vulkan SDK 1.4.363.1 Bin on PATH: 29 tests, OK, 0 skipped. Without the SDK on PATH: 29 tests, OK, 1 skipped.
  • Negative control: the PR's test file against the merge base's tools/bary_fallback_gs.py: 29 tests, 4 failures, all in test_late_tool_failure_preserves_batch_until_successful_retry (spirv-as and spirv-val, seeded and not).
  • Note, outside what the PR claims: the publish loop for staged, destination in pending: os.replace(...) in build_for_index runs after all tools pass. If an os.replace itself fails part way (hand-made case: a read-only existing .spv for the second helper on Windows, PermissionError), the first helper is already published and the second has a new .spvasm next to the old .spv. Tool failures are fully covered; a failure of the final replace is not.
  • Not done: no make_game.py run.

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