Keep concurrent warm completion records readable #4959

Open
github-bot wants to merge 1 commit from github-bot/gh-4958 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 15:29 UTC · original
andrewpozdnakov7-jpg:codex2/fix/warm-done-single-append → main · +7 −2 · 1 files · 1 commits · open

What it changes

Two warm processes can use the same cache. The formatted write to warm-done.txt sends the fingerprint, name and line breaks to the file in separate writes. If a second process appends between them, the warm-up can lose both completion records and make those pipelines again on a later launch.

Format each completion record before appending it, both for regular warming and after a shared pipeline library save. The record format and reader stay compatible with existing files.

How it was tested

  • A focused Windows fixture ran the exact append and read code from 5fabb46e and 4359d5176a41dd8a8eb9dcdcdd0632a10e21c3ae with two append handles to one synthetic file. It scheduled the second logical append after the first write call. Main issued four writes for a record and recovered neither new mark. The patch issued one and recovered both. The prior record stayed readable in both runs.
  • cargo xtask policy --staged accepted the one changed file. The change combined cleanly with #4824, #4841 and the proposed worker-launch patch on #4779.
  • Main's CI check has five existing Clippy errors tracked in #4708.

Checked for overlap

  • Searched issues and PRs for warm-done.txt, warm marks and concurrent appends. #4486 handles the preload record in preloaded.txt. #4892 handles the binary pipeline book. #4824 and #4841 handle selection before warming.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 15:29 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4958) `andrewpozdnakov7-jpg:codex2/fix/warm-done-single-append` → `main` · +7 −2 · 1 files · 1 commits · open ## What it changes Two warm processes can use the same cache. The formatted write to `warm-done.txt` sends the fingerprint, name and line breaks to the file in separate writes. If a second process appends between them, the warm-up can lose both completion records and make those pipelines again on a later launch. Format each completion record before appending it, both for regular warming and after a shared pipeline library save. The record format and reader stay compatible with existing files. ## How it was tested - A focused Windows fixture ran the exact append and read code from `5fabb46e` and `4359d5176a41dd8a8eb9dcdcdd0632a10e21c3ae` with two append handles to one synthetic file. It scheduled the second logical append after the first write call. Main issued four writes for a record and recovered neither new mark. The patch issued one and recovered both. The prior record stayed readable in both runs. - `cargo xtask policy --staged` accepted the one changed file. The change combined cleanly with #4824, #4841 and the proposed worker-launch patch on #4779. - Main's [CI check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46563306780/job/142355972539) has five existing Clippy errors tracked in #4708. ## Checked for overlap - [x] Searched issues and PRs for `warm-done.txt`, warm marks and concurrent appends. #4486 handles the preload record in `preloaded.txt`. #4892 handles the binary pipeline book. #4824 and #4841 handle selection before warming. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 15:30:43 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-12-01 16:23 UTC · original · approved these changes

Reviewed pps/victory/src/warm.rs: combining each completion mark into a single write_all buffer in ppend_done_mark prevents interleaved partial lines when multiple warm processes append to the shared cache. Verified on Windows: cargo test -p victory --bin victory warm::tests -- --test-threads=1 (12 passed, 0 failed).

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-12-01 16:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4958#pullrequestreview-6135370395) · **approved these changes** Reviewed pps/victory/src/warm.rs: combining each completion mark into a single write_all buffer in ppend_done_mark prevents interleaved partial lines when multiple warm processes append to the shared cache. Verified on Windows: cargo test -p victory --bin victory warm::tests -- --test-threads=1 (12 passed, 0 failed). Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4959/head:github-bot/gh-4958'
git switch 'github-bot/gh-4958'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4958'
git switch 'github-bot/gh-4958'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4958'
git switch 'github-bot/gh-4958'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4958'
git switch 'main'
git merge --squash 'github-bot/gh-4958'
git switch 'main'
git merge --ff-only 'github-bot/gh-4958'
git switch 'main'
git merge 'github-bot/gh-4958'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4959
No description provided.