watch: lock-free clean/held mirrors for guard() and publish() #212

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

@⁠Androtim on GitHub · 2026-11-30 06:29 UTC · original
Androtim:feat/iter209-watch-guards-lockfree → main · +96 −6 · 1 files · 1 commits · closed without merging

Summary

  • Mirror Guards::clean and Guards::held into atomic lock-free bitsets (CLEAN_BITS and HELD_BITS) via Blocks::mirrored(...), keeping mirror updates synchronized on insert / remove.
  • Add guards_lockfree() (enabled by default; VICTORY_GUARDS_LOCKFREE=0 opts out to the locked path) so guard() and publish() inspect clean/held/beside/unsettled bitsets without acquiring the GUARDS mutex on clean fast paths.
  • Ensure cover() clears PUBLISHED after removing uncovered blocks from clean (matching every other clean.remove path so lock-free publish() re-checks stay race-free).
  • Add unit tests guards_lockfree_defaults_on_and_honors_zero_opt_out and mirrored_blocks_stay_in_sync_across_insert_remove_and_ranges.

Verification

  • cargo run -p xtask -- policy (asset policy: 311 files ok)
  • cargo test -p victory-gpu --lib watch:: -- --test-threads=1 (54 passed; 0 failed)
  • cargo test -p victory-gpu --features diagnostics --lib watch:: -- --test-threads=1 (57 passed; 0 failed)
  • cargo clippy --workspace --all-targets -- -D warnings (exit 0)
  • cargo clippy --workspace --all-targets --features diagnostics -- -D warnings (exit 0)
  • Live 75s GPU verification (-PlayParity -AutoNudgeMenu):
    • Series S: median 12.8 fps (77.9 ms, preparing 35.2 ms), 6521 / 6836 MB (over=0 MB), 0 crashes, lit=18/24, luma=104.75, edge_energy=7.04, magenta=0.0%; latest frames visually verified crisp.
    • Series X 1440p: median 10.6 fps (94.5 ms, preparing 39.45 ms), 6729 / 6873 MB (over=0 MB), 0 crashes, lit=18/24, luma=106.91, edge_energy=6.96, magenta=0.0%; latest frames visually verified crisp.
**@⁠Androtim** on GitHub · 2026-11-30 06:29 UTC · [original](https://github.com/Androtim/MiniVI/pull/212) `Androtim:feat/iter209-watch-guards-lockfree` → `main` · +96 −6 · 1 files · 1 commits · closed without merging ## Summary - Mirror `Guards::clean` and `Guards::held` into atomic lock-free bitsets (`CLEAN_BITS` and `HELD_BITS`) via `Blocks::mirrored(...)`, keeping mirror updates synchronized on `insert` / `remove`. - Add `guards_lockfree()` (enabled by default; `VICTORY_GUARDS_LOCKFREE=0` opts out to the locked path) so `guard()` and `publish()` inspect clean/held/beside/unsettled bitsets without acquiring the `GUARDS` mutex on clean fast paths. - Ensure `cover()` clears `PUBLISHED` after removing uncovered blocks from `clean` (matching every other `clean.remove` path so lock-free `publish()` re-checks stay race-free). - Add unit tests `guards_lockfree_defaults_on_and_honors_zero_opt_out` and `mirrored_blocks_stay_in_sync_across_insert_remove_and_ranges`. ## Verification - `cargo run -p xtask -- policy` (`asset policy: 311 files ok`) - `cargo test -p victory-gpu --lib watch:: -- --test-threads=1` (`54 passed; 0 failed`) - `cargo test -p victory-gpu --features diagnostics --lib watch:: -- --test-threads=1` (`57 passed; 0 failed`) - `cargo clippy --workspace --all-targets -- -D warnings` (exit 0) - `cargo clippy --workspace --all-targets --features diagnostics -- -D warnings` (exit 0) - Live 75s GPU verification (`-PlayParity -AutoNudgeMenu`): - Series S: median `12.8 fps` (`77.9 ms`, `preparing 35.2 ms`), `6521 / 6836 MB` (`over=0 MB`), `0` crashes, `lit=18/24`, `luma=104.75`, `edge_energy=7.04`, `magenta=0.0%`; latest frames visually verified crisp. - Series X 1440p: median `10.6 fps` (`94.5 ms`, `preparing 39.45 ms`), `6729 / 6873 MB` (`over=0 MB`), `0` crashes, `lit=18/24`, `luma=106.91`, `edge_energy=6.96`, `magenta=0.0%`; latest frames visually verified crisp.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:18:52 +00:00
github-bot closed this pull request 2026-12-01 20:18:52 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 08:12 UTC · original

GitHub reports merge conflicts against current \main\ (\98c171). Please rebase on \main\ so we can test it in the next wave.

**@⁠Androtim** on GitHub · 2026-11-30 08:12 UTC · [original](https://github.com/Androtim/MiniVI/pull/212#issuecomment-7272609341) GitHub reports merge conflicts against current \main\ (\98c171\). Please rebase on \main\ so we can test it in the next wave.
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 10:02 UTC · original

Automated triage for the maintainers (not an approval).

Verdict: needs-rebase · CI (check): passing

This PR no longer merges cleanly into main.

To change the verdict: Rebase onto current main and resolve conflicts; CI and triage will run again automatically.


Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-11-30 10:02 UTC · [original](https://github.com/Androtim/MiniVI/pull/212#issuecomment-7275043194) <!-- minivi-triage v1 head=da6a38ddf9aecbd884d7dcc61995e48360b5c4ca verdict=needs-rebase ci=passing at=2026-11-30T10:03:28Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-rebase` · **CI (`check`):** `passing` This PR no longer merges cleanly into `main`. **To change the verdict:** Rebase onto current `main` and resolve conflicts; CI and triage will run again automatically. --- _Generated with Antigravity CLI (`agy`)._
Author
Owner

@⁠Androtim on GitHub · 2026-12-01 01:39 UTC · original

Closing stale/conflicted backlog PR per #276. Superseded by the active root-architecture replacement pillars with isolated plain --release A/B verification.

**@⁠Androtim** on GitHub · 2026-12-01 01:39 UTC · [original](https://github.com/Androtim/MiniVI/pull/212#issuecomment-7297743187) Closing stale/conflicted backlog PR per #276. Superseded by the active root-architecture replacement pillars with isolated plain --release A/B verification.

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/Androtim--MiniVI!212
No description provided.