Skip to content

gpu: keep queue ordering tests independent of wait deadlines - #40

Merged
fogydes merged 1 commit into
mainfrom
import/upstream-pr-82
Nov 26, 2026
Merged

fogydes merged 1 commit into
mainfrom
import/upstream-pr-82

Conversation

@fogydes

@fogydes fogydes commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Imported MiamiGame/XTP#82 for review in this fork. Original author: fogydes; opened 2026-11-26T04:37:50Z. Original commit authorship and history are preserved. Migration prepared with AI assistance (Codex); no source changes were made.

Evidence

  • Exact upstream head: c03c77a1b76573ba1d68041bf29bb4ebecd6a17f.
  • Original base branch: main; source PR contains its historical CI.
  • Upstream exact-head checks were green at import (welcome skipped).
  • Historical review requests: simnJS. No new reviewer requests were sent.
  • Copied reviews/comments are historical context, not new fork approvals or fresh test results.

Part of #28 (imported from MiamiGame#54).

Merge Danger

Door: Two-way (this is an unmerged PR).

Blast Radius: Unchanged from the original diff; no new correctness claim is made by importing it.


Original pull request

What and why

Two queue-ordering tests assert that work stays held until another queue or a present releases it. The production four-second stuck-wait fallback can expire first on a busy machine and invalidate those assertions. Set the existing test-only wait_indefinitely flag on the three fresh queues involved.

This is five added lines in two tests. Their assertions and release paths are unchanged. Production deadlines and the dedicated isolated 50 ms fallback regression are unchanged.

Fixes: none; part of #54
Depends on: none

Area

xtp-gpu, crates/xtp-gpu/src/queue.rs tests only.

Tests

  • cargo xtask pr-check passes on my machine
  • New or changed behaviour has tests that need no game files, or I explain below why it cannot
  • Ran on a title: no

WARP, CARGO_BUILD_JOBS=4, shared target:

  • Default parallel cargo test --locked -p xtp-gpu --lib: 633 passed, 14 ignored.
  • Strict serial debug-layer run: 662 unit and 3 integration tests passed, 19 ignored. XTP_TEST_ADAPTER=warp, XTP_D3D12_DEBUG=1, XTP_REQUIRE_GPU=1; serial libtest scheduling was scoped to this run.
  • Normal-threaded six-stage workspace PR check: fmt, both warnings-denied Clippy configurations, tests, asset policy and conventions passed. Test-log totals: 1,671 passed, 69 ignored. Post-commit conventions also passed for the actual commit, PR title and this body.
  • Negative controls temporarily aged both waits beyond STUCK: both original tests failed at their held-state assertions; the patched tests passed. That temporary instrumentation is removed.
  • Independent source review found no blocker. Formatting and diff checks passed.

The initial merged-main suite failed these two tests; ten isolated runs each and three full reruns then passed before this patch. Those successes did not erase the failure. The aging controls establish deadline exposure, but do not prove the exact scheduling delay in the original run. Panic-safe cleanup after failed assertions is not added here.

Provenance

  • I wrote all of this change myself for XTP, or it only moves code already in XTP.
  • Some of it comes from elsewhere. Each source, its licence and the files concerned are listed here, and every licence is compatible with GPL-3.0-or-later:

AI assistance: Codex and regular subagents diagnosed the test deadline interaction, prepared the five-line change and negative controls, reviewed the source and ran the checks. No external implementation was copied.

Checklist

  • No game data, keys, console SDK code or headers, and nothing that circumvents DRM (asset policy)
  • No code copied from xcl or AnyPS5 (references only: read them to understand, write your own)
  • I agree to license this contribution under GPL-3.0-or-later
  • Title and every commit follow <area>: <summary>; one topic; under 400 changed lines, or the reason is above
  • Docs updated where behaviour, commands or variables changed (README, docs/): no public behaviour, command or variable changes

Fork issue / PR number map.

@fogydes fogydes added area/gpu touches crates/xtp-gpu size/XS under 10 changed lines labels Nov 26, 2026
@fogydes

fogydes commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

Historical comment by fogydes on 2026-11-26T04:45:17Z. Original. Copied context, not a new statement by its author.

Independent review and maintainer verification record for exact head c03c77a1b76573ba1d68041bf29bb4ebecd6a17f (AI assisted):

  • A separate regular agent reviewed the final five-line diff and found no correctness blocker. Its review was source-only; execution evidence below was checked separately by the parent agent.
  • The three assignments affect only freshly created test queues. Both tests retain their existing output, held-state, release-path and cleanup assertions. Production wait deadlines and the isolated 50 ms fallback regression are unchanged.
  • Negative controls aged both waits beyond the production deadline: the old tests failed at the original held-state assertions, and the patched controls passed. Temporary aging was removed before publication. This establishes deadline exposure without claiming the exact delay in the initial failed suite.
  • Final parallel WARP library: 633 passed, 14 ignored. Strict debug-layer run: 662 unit plus 3 integration passed, 19 ignored. Full normal-threading workspace check: all six stages passed; 1,671 tests passed, 69 ignored. Post-commit conventions passed for the actual commit, title and body.
  • All current-head remote checks are now successful; the welcome job was skipped. No production behavior or hardware validation is claimed for this test-only change.

Residual limitation: cleanup after assertion panic has not been made panic-safe. Independent agent review is recorded here transparently; it is not a separate person's GitHub approval.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2bbad5df-5744-4578-b0c2-67788c03fcb6
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T06:13:47.099292Z c03c77a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fogydes fogydes closed this Nov 26, 2026
@fogydes fogydes reopened this Nov 26, 2026
@fogydes

fogydes commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

Final review of c03c77a1b76573ba1d68041bf29bb4ebecd6a17f: ready to merge.

The five added lines use the existing test-only indefinite-wait flag on three newly created queues. Production deadlines and original assertions remain unchanged; the dedicated 50 ms timeout regression remains active. Independent source review and a separate Standards audit found no blocker.

Fresh fork validation: the normal-threaded, six-stage local WARP PR check passed, with 1,671 tests passed and 69 ignored. Current-head fork CI is now green, including workspace tests, both Clippy configurations and strict GPU debug-layer checks: https://github.com/fogydes/XTP/actions/runs/45768621483 . Historical deterministic negative controls reproduced both old assertion failures and passed with the patch; the original intermittent baseline is retained as a failed run.

Residual limitation: assertion-panic cleanup remains unchanged. These are AI-assisted independent reviews and test evidence, not a claim of another person's GitHub approval. Manual merge will preserve the original commit.

@fogydes
fogydes merged commit 7bf8849 into main Nov 26, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/gpu touches crates/xtp-gpu size/XS under 10 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant