HLE: reject saves whose committed container lacks a manifest #570

Closed
github-bot wants to merge 1 commit from gh-pr/570/head into gh-pr/570/base
Owner

@⁠Quat3rnion on GitHub · 2026-11-24 05:04 UTC · original
Quat3rnion:victory-save-manifest → main · +33 −1 · 1 files · 1 commits · closed without merging

What

current() reported a missing manifest with NotFound, the same error as a
container that does not exist. An update then treated that as a fresh
container, committed a new v1 and returned S_OK, while readers still chose
the malformed newest version and the main flow deleted the new v1. A version
directory that exists must have a readable manifest; anything else is now
InvalidData, which both readers and submit map to NO_ACCESS.

An AI tool wrote part of this change.

Tested

  • Linux: cargo test --workspace: 165 passed, 0 failed, 3 ignored. A tempdir regression commits two versions, removes the newest manifest, submits an update and checks NO_ACCESS with no third version created.
  • Windows cross-build: cargo check --target x86_64-pc-windows-gnu --workspace --tests passes. No Windows host here.
  • cargo xtask policy passes (150 files ok). No game files or data from them were added.

Checklist

  • Workspace tests and Windows cross-check pass.
  • cargo xtask policy passes. No game files or data from them were added.
  • AI authorship is disclosed above.
**@⁠Quat3rnion** on GitHub · 2026-11-24 05:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/570) `Quat3rnion:victory-save-manifest` → `main` · +33 −1 · 1 files · 1 commits · closed without merging ## What `current()` reported a missing manifest with `NotFound`, the same error as a container that does not exist. An update then treated that as a fresh container, committed a new v1 and returned `S_OK`, while readers still chose the malformed newest version and the main flow deleted the new v1. A version directory that exists must have a readable manifest; anything else is now `InvalidData`, which both readers and submit map to `NO_ACCESS`. An AI tool wrote part of this change. ## Tested - Linux: `cargo test --workspace`: 165 passed, 0 failed, 3 ignored. A tempdir regression commits two versions, removes the newest manifest, submits an update and checks `NO_ACCESS` with no third version created. - Windows cross-build: `cargo check --target x86_64-pc-windows-gnu --workspace --tests` passes. No Windows host here. - `cargo xtask policy` passes (150 files ok). No game files or data from them were added. ## Checklist - [x] Workspace tests and Windows cross-check pass. - [x] `cargo xtask policy` passes. No game files or data from them were added. - [x] AI authorship is disclosed above.
current() reported a missing manifest as NotFound, the same error as no container at all. An update then committed a fresh v1 and returned success while readers still selected the malformed newest version. A version directory that exists must have a readable manifest; anything else is InvalidData, which both readers and submit map to NO_ACCESS. Add a tempdir regression that removes the newest manifest and checks no new version is committed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:08:44 +00:00
github-bot closed this pull request 2026-11-26 04:08:44 +00:00
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 12:22 UTC · original

Independent verification & code review on Windows 11 x64 MSVC (merged onto main ffe310e):

Checks Run

  • cargo xtask policy: PASS (154 files ok)
  • cargo clippy -p victory-hle --all-targets --locked -- -D warnings (default + --features diagnostics): PASS (0 warnings)
  • cargo test -p victory-hle --locked -- xgamesave: PASS (8/8 tests, including a_committed_container_without_its_manifest_is_rejected)

Review

Looks clean and ready to merge — once a committed v<n> directory exists, failing to read its manifest now produces InvalidData instead of propagating NotFound into current_named, preventing updates from treating a corrupted container as empty and committing a stray v1.

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 12:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/570#issuecomment-7131350525) Independent verification & code review on Windows 11 x64 MSVC (merged onto `main` `ffe310e`): ### Checks Run - `cargo xtask policy`: **PASS** (`154 files ok`) - `cargo clippy -p victory-hle --all-targets --locked -- -D warnings` (default + `--features diagnostics`): **PASS** (0 warnings) - `cargo test -p victory-hle --locked -- xgamesave`: **PASS** (`8/8` tests, including `a_committed_container_without_its_manifest_is_rejected`) ### Review Looks clean and ready to merge — once a committed `v<n>` directory exists, failing to read its `manifest` now produces `InvalidData` instead of propagating `NotFound` into `current_named`, preventing updates from treating a corrupted container as empty and committing a stray `v1`. *AI-assisted; synthetic tests only, no game files.*
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:25 UTC · original

Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #1729. A version folder without a manifest is refused instead of being taken for a missing container; #1729 changes the same lines and fixes more (falls back to the newest readable version, never prunes below an unreadable one).

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/570#issuecomment-7148490234) Automated triage for the maintainers. Closing because another open pull request covers the same change. See #1729. A version folder without a manifest is refused instead of being taken for a missing container; #1729 changes the same lines and fixes more (falls back to the newest readable version, never prunes below an unreadable one). If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

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/Marvisak--VIctory!570
No description provided.