[pr-tests] descriptor: SAFETY comment on the watch-page sampler test's VirtualAlloc #285

Open
iBooM72 wants to merge 1 commit from iboom72/fix/descriptor-test-safety-comment into main AGit
Contributor

What it changes

  • The problem on main: read from the code only (crates/darner-gpu/src/descriptor.rs, test dirty_sampler_across_two_watch_pages_is_mirrored, added with 7a2c516b).

The test's unsafe { VirtualAlloc(..) } has no // SAFETY: comment; AGENTS.md asks for one on every unsafe block, and the other blocks of the same test have theirs. This adds the comment, in the words watch.rs uses for the same call. No code changes.

How it was tested

  • Tested revision: 1c142d36
  • Commands and results: none beyond the gates (a comment).
  • Changes a default: no
  • Gates run on that revision (the three in AGENTS.md; there is no CI): cargo clippy --workspace --all-targets --locked -- -D warnings and the same with --all-features: both passed. cargo test --workspace --locked was not run as a whole.
  • Coverage gaps: none known.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Not run in the game: a comment in a test.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #163 (merged; added the test). No open pull request was found that changes crates/darner-gpu/src/descriptor.rs.
  • Replaces or overlaps: none found

🤖 Generated with Claude Code

## What it changes - The problem on main: read from the code only (`crates/darner-gpu/src/descriptor.rs`, test `dirty_sampler_across_two_watch_pages_is_mirrored`, added with 7a2c516b). The test's `unsafe { VirtualAlloc(..) }` has no `// SAFETY:` comment; AGENTS.md asks for one on every unsafe block, and the other blocks of the same test have theirs. This adds the comment, in the words `watch.rs` uses for the same call. No code changes. ## How it was tested - Tested revision: 1c142d36 - Commands and results: none beyond the gates (a comment). - Changes a default: no - Gates run on that revision (the three in AGENTS.md; there is no CI): `cargo clippy --workspace --all-targets --locked -- -D warnings` and the same with `--all-features`: both passed. `cargo test --workspace --locked` was not run as a whole. - Coverage gaps: none known. ## Checklist - [ ] I ran this change in the game, or say below why it can't be (docs, tests only). - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none Not run in the game: a comment in a test. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #163 (merged; added the test). No open pull request was found that changes `crates/darner-gpu/src/descriptor.rs`. - Replaces or overlaps: none found 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The test added with 7a2c516b calls VirtualAlloc in an unsafe block without a
SAFETY comment; every unsafe block has one (AGENTS.md). Comment only.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Author
Contributor

Follow-up to "How it was tested": the description says cargo test --workspace --locked was not run as a whole. It has now been run, together with five other small pull requests of mine, on one local branch.

  • Tested revision: main f3840d73 with these six commits picked on top, no conflicts: 98a3c911 (#265), 5799f84a (#270), c782a6e2 (#283), e69c0f77 (#284), 1c142d36 (#285), 5eae3d19 (#286). Not run on this pull request's branch alone.
  • cargo clippy --workspace --all-targets --locked -- -D warnings: passed.
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passed.
  • cargo test --workspace --locked: one test failed, in darner-shader: emit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shaders ("DXIL validation failed ... Not all elements of output SV_Depth were written"). The same test fails the same way on main f3840d73 without these commits, none of the six changes darner-shader, and #227 (open) fixes it. darner-shader's other tests: 557 passed, 16 ignored.
  • Cargo stops at the first package that fails, so the rest was run with cargo test --workspace --locked --no-fail-fast --exclude darner-shader: passed, all packages and the doc tests (darner-gpu: 1,773 passed, 81 ignored).

Still not run in the game.

Follow-up to "How it was tested": the description says `cargo test --workspace --locked` was not run as a whole. It has now been run, together with five other small pull requests of mine, on one local branch. - Tested revision: `main` f3840d73 with these six commits picked on top, no conflicts: 98a3c911 (#265), 5799f84a (#270), c782a6e2 (#283), e69c0f77 (#284), 1c142d36 (#285), 5eae3d19 (#286). Not run on this pull request's branch alone. - `cargo clippy --workspace --all-targets --locked -- -D warnings`: passed. - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: passed. - `cargo test --workspace --locked`: one test failed, in `darner-shader`: `emit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shaders` ("DXIL validation failed ... Not all elements of output SV_Depth were written"). The same test fails the same way on `main` f3840d73 without these commits, none of the six changes `darner-shader`, and #227 (open) fixes it. `darner-shader`'s other tests: 557 passed, 16 ignored. - Cargo stops at the first package that fails, so the rest was run with `cargo test --workspace --locked --no-fail-fast --exclude darner-shader`: passed, all packages and the doc tests (`darner-gpu`: 1,773 passed, 81 ignored). Still not run in the game.
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/285/head:iboom72/fix/descriptor-test-safety-comment'
git switch 'iboom72/fix/descriptor-test-safety-comment'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'iboom72/fix/descriptor-test-safety-comment'
git switch 'iboom72/fix/descriptor-test-safety-comment'
git rebase 'main'
git switch 'main'
git merge --ff-only 'iboom72/fix/descriptor-test-safety-comment'
git switch 'iboom72/fix/descriptor-test-safety-comment'
git rebase 'main'
git switch 'main'
git merge --no-ff 'iboom72/fix/descriptor-test-safety-comment'
git switch 'main'
git merge --squash 'iboom72/fix/descriptor-test-safety-comment'
git switch 'main'
git merge --ff-only 'iboom72/fix/descriptor-test-safety-comment'
git switch 'main'
git merge 'iboom72/fix/descriptor-test-safety-comment'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
TrustNo1/Darner!285
No description provided.