Skip to content

test(windows): await native progress in surface reclamation - #277

Merged
hyperb1iss merged 1 commit into
mainfrom
nova/windows-reclaim-fixture
Sep 8, 2026
Merged

test(windows): await native progress in surface reclamation#277
hyperb1iss merged 1 commit into
mainfrom
nova/windows-reclaim-fixture

Conversation

@hyperb1iss

@hyperb1iss hyperb1iss commented Sep 8, 2026

Copy link
Copy Markdown
Owner

The Windows GPU-surface pressure test could fail while both slots had already queued their release fences. Two CI runs reported the same state: no external owners, release queued, and neither producer-ready nor release fence completed. The test's 64 one-millisecond polling attempts made native GPU scheduling part of a reclamation correctness assertion.

The fixture now waits for the relevant native fence event between publication attempts. Three attempts cover the two pending transitions: producer readiness, then abandoned release. The helper never signals a fence, changes a slot state, or flushes the context, so production reclamation must still do that work. A stalled fence fails with its target and slot diagnostics. Production capture behavior, slot capacity, and concurrency are unchanged.

Validation: Windows-target test compilation and Clippy with warnings denied pass. Independent design review passed. Native Windows run 34244453268 passed all 3,998 selected shared tests, 32 capture/input fixtures, allocation contracts, and 1,808 daemon integration tests. The separate Intel macOS fixture failure in that run is reproduced and addressed in #278; this PR changes no macOS code.

The pressure fixture could exhaust its polling attempts while WARP had
not completed either queued fence. Wait for native fence events between
the two reclamation transitions instead of counting scheduling chances.

Keep production reclamation, slot capacity, and concurrency unchanged.
A stalled native queue still fails with its fence and slot diagnostics.
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: dd8e4ca9-b8e1-4eb4-955a-747e6b6169d8

📥 Commits

Reviewing files that changed from the base of the PR and between d7f9c85 and fa58a7b.

📒 Files selected for processing (3)
  • crates/hypercolor-windows-capture/Cargo.toml
  • crates/hypercolor-windows-capture/src/duplication/gpu_surface.rs
  • crates/hypercolor-windows-capture/src/duplication/tests.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Windows fence-progress waiting for GPU surface slots. The abandoned-surface reclamation test uses this helper between limited publication retries.

Changes

GPU Surface Progress

Layer / File(s) Summary
Fence progress waiting
crates/hypercolor-windows-capture/Cargo.toml, crates/hypercolor-windows-capture/src/duplication/gpu_surface.rs
The Windows dependency enables threading APIs. wait_for_surface_progress waits for producer-ready or consumer-release fences and reports timeout diagnostics.
Reclamation retry flow
crates/hypercolor-windows-capture/src/duplication/tests.rs
The abandoned-surface reclamation test limits each publication sequence to three attempts and waits for surface progress when publication is unavailable.

Priority: ⬇️ Low — Defer this change because it is limited to Windows GPU-surface reclamation tests and leaves production behavior unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to fa58a

Windows GPU-surface reclamation tests now wait for relevant fence progress instead of repeatedly polling, improving reliability without changing production reclamation behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: updating the Windows surface reclamation test to await native progress.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@hyperb1iss
hyperb1iss merged commit 6d56086 into main Sep 8, 2026
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant