Loader: append crash reports as single records #2033
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2033
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2033/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@BaggyALPHA on GitHub · 2026-11-25 03:47 UTC · original
BaggyALPHA:fix/crash-log-record-append→main· +58 −4 · 1 files · 2 commits · merged 2026-11-25 21:53 UTCAddresses the crash-record interleaving in section 3 of #2025. Coordination claim.
Formatting directly into the append handle can split the timestamp, process ID, and report body across multiple writes. Build the complete record first and issue one append. The existing record format is preserved. A short write is treated as a best-effort logging failure so a retry cannot split the record around another writer.
On Windows, a synthetic regression writes 128 reports from eight threads and verifies every header, identifier, and body. Restoring the old formatted append reproduced a corrupt header. With this change all 35 loader library tests passed. Strict Clippy with all targets and features and the asset-policy hook passed. No game files were used.
AI-assisted (OpenAI Codex).
@jeremygold02 on GitHub · 2026-11-25 03:50 UTC · original
Triage verdict — Keep with #1966 (
96337cd)Evidence
Checks and limits
Next step
This verification was AI-assisted.
@AgneyaK on GitHub · 2026-11-25 03:54 UTC · original
Checked this together with #1966, which also edits
crash.rs(stderr writes that can't panic): they merge cleanly in either order, and the combined tree is fine.main940d32f+ this PR (96337cd) + #1966 (3eab67c):cargo test -p victory-loader --locked10 runs in a row, all green. That's 35 unit tests, includingconcurrent_crash_records_stay_together, plus thecrash_logtests, including #1966'sreports_reach_the_log_when_stderr_is_closed.cargo clippy -p victory-loader --all-targets --locked -- -D warnings: clean.Not tested: the title (both are crash-path changes).
AI use: Claude Code (Claude Opus 5.5) ran the checks and wrote this; the results are from the runs described.
@Marvisak on GitHub · 2026-11-25 09:18 UTC · original · edited 2026-11-25 16:48 UTC
Automated triage for the maintainers.
Merge candidate (re-checked on
c53cf0e). Incrates/victory-loader/src/crash.rs,append_recordformats a crash record's header and body into one string and writes it with a singlewriteon an append handle. Before, reports from concurrent writers could interleave (#2025 section 3). A short write is reported and not retried, so another writer's record can't land between the pieces. The record format is unchanged, and the caller still ignores errors. The testconcurrent_crash_records_stay_togetherusestempfile, which is already a dev-dependency. No new dependencies.New since the last review:
c53cf0emoves the test belowuse super::*;and thewindows_sysimport, as suggested. It is a pure move, with the test body unchanged. #1966 also editscrash.rs, and a commenter reports the two merge cleanly in either order.On your reply: confirmed. The move is the only change.
CI: passing (
check).Generated by Claude Code
@BaggyALPHA on GitHub · 2026-11-25 14:54 UTC · original
Thanks — the nit is fixed in
c53cf0e:concurrent_crash_records_stay_togethernow sits belowuse super::*;and thewindows_sysimport in the test module. Placement only; the test body is untouched, andgit diffof that commit is a pure move (the added and removed lines are the same set, 5 for 5).Re-verified on the new head:
cargo test -p victory-loader --locked35 unit tests plus the integration tests pass, including this one. Asset policy ran in the pre-commit hook (1 file ok). No change toappend_recordor the record format, so the earlier cross-process and #1966 integration results still describe this head.AI-assisted (Claude Code).