Up-copy check: what is known of copies that are gone is let go #369

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

@⁠DiosET3RN0 on GitHub · 2026-11-26 19:44 UTC · original
DiosET3RN0:upcheck-prune-known → main · +35 −1 · 1 files · 1 commits · open

Refs #227 (the second half of the "Texture store and upcopy check" bullet; #288 did the texture store half).

What

With VICTORY_UPCOPY_CHECK, KNOWN in host/upcheck.rs kept an entry per
copy ever declared or fetched and never let one go.

How

As the issue words it: keep only the ids still in carded_copies(). The look
at rest takes its snapshot of the copies first and prunes KNOWN with it
(forget_gone), before anything in the look that can fail, so a host whose
compare pass cannot be built is pruned too.

Why it is safe:

  • A copy's id is never given to another copy (Shadow::id: "A number no other
    copy has had"), so nothing asks again about an id that is gone.
  • at_rest runs with the submission lock held and nothing in the air, so
    nothing declares or fetches while the look runs.
  • Every reader of KNOWN asks about copies of the same snapshot.

One consequence, which the issue's wording accepts: a copy that is alive but
not on the card at the moment of a look loses what was declared of it.

Diagnostics only: nothing changes unless VICTORY_UPCOPY_CHECK is set.

Tests

New what_is_known_of_a_copy_that_is_gone_is_let_go, on a map of its own (no
device, and it does not touch the process's KNOWN).

  • cargo test -p victory-gpu --lib --locked host::upcheck: 2 passed, 10 ignored
    (the relay tests that want processes of their own; not run here).
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean
    apart from main's own watch.rs:3626 (fixed by #324).

Other open PRs edit this file (#148, #180, #206, #338, #361); none touches
KNOWN. The new test sits just above the comment #361 rewrites: no overlap,
but whichever lands second may want a trivial rebase.

Windows 11, Rust 1.98.1. No game run.

AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

**@⁠DiosET3RN0** on GitHub · 2026-11-26 19:44 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/369) `DiosET3RN0:upcheck-prune-known` → `main` · +35 −1 · 1 files · 1 commits · open Refs #227 (the second half of the "Texture store and upcopy check" bullet; #288 did the texture store half). ## What With `VICTORY_UPCOPY_CHECK`, `KNOWN` in `host/upcheck.rs` kept an entry per copy ever declared or fetched and never let one go. ## How As the issue words it: keep only the ids still in `carded_copies()`. The look at rest takes its snapshot of the copies first and prunes `KNOWN` with it (`forget_gone`), before anything in the look that can fail, so a host whose compare pass cannot be built is pruned too. Why it is safe: - A copy's id is never given to another copy (`Shadow::id`: "A number no other copy has had"), so nothing asks again about an id that is gone. - `at_rest` runs with the submission lock held and nothing in the air, so nothing declares or fetches while the look runs. - Every reader of `KNOWN` asks about copies of the same snapshot. One consequence, which the issue's wording accepts: a copy that is alive but not on the card at the moment of a look loses what was declared of it. Diagnostics only: nothing changes unless `VICTORY_UPCOPY_CHECK` is set. ## Tests New `what_is_known_of_a_copy_that_is_gone_is_let_go`, on a map of its own (no device, and it does not touch the process's `KNOWN`). - `cargo test -p victory-gpu --lib --locked host::upcheck`: 2 passed, 10 ignored (the relay tests that want processes of their own; not run here). - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings`: clean apart from `main`'s own `watch.rs:3626` (fixed by #324). Other open PRs edit this file (#148, #180, #206, #338, #361); none touches `KNOWN`. The new test sits just above the comment #361 rewrites: no overlap, but whichever lands second may want a trivial rebase. Windows 11, Rust 1.98.1. No game run. AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
KNOWN (VICTORY_UPCOPY_CHECK) kept an entry per copy ever declared or
fetched. The look at rest now keeps only the ids still in
carded_copies(), before anything in it that can fail. A copy's id is
never given to another copy, and nothing declares or fetches while the
look runs (the submission lock is held).

Refs #227.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:47:02 +00:00
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/369/head:github-bot/gh-369'
git switch 'github-bot/gh-369'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-369'
git switch 'github-bot/gh-369'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-369'
git switch 'github-bot/gh-369'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-369'
git switch 'main'
git merge --squash 'github-bot/gh-369'
git switch 'main'
git merge --ff-only 'github-bot/gh-369'
git switch 'main'
git merge 'github-bot/gh-369'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.