Document remaining unsafe blocks in victory-gpu and re-enable undocumented_unsafe_blocks #11
Labels
No labels
accessibility
area: compatibility
area: docs
area: hygiene
area: infra
area: memory
area: ray-tracing
area: rendering
area: shaders
area: submission
area: textures
bug
ci
dependencies
difficulty: advanced systems
difficulty: intermediate
documentation
duplicate
enhancement
experimental
good first issue
help wanted
invalid
known issue
performance
priority: P0
priority: P1
priority: P2
proposal
question
rendering
research
testing
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/VictoryX-dev--VictoryX#11
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original
Problem
runtime/Cargo.tomlcurrently relaxes Clippy'sundocumented_unsafe_blockslint (undocumented_unsafe_blocks = "allow") because a small number ofunsafeblocks in newervictory-gpucode still lack// SAFETY:justifications. Documenting these remaining blocks lets the workspace enforce safety comments on everyunsafeblock going forward.Known Evidence
runtime/Cargo.toml(lines 63–65):unsafe_op_in_unsafe_fn = "deny"is already active workspace-wide.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings(no title files or GPU hardware required).Approaches That Did Not Work
// SAFETY: safecomments: Safety comments must state the actual invariant upheld by the caller or surrounding code (e.g., pointer alignment/lifetime, COM precondition, slice bounds, lock held).Relevant Source Modules
runtime/Cargo.toml(lines 47–65)runtime/crates/victory-gpu/src/(locate undocumented blocks by temporarily switchingundocumented_unsafe_blocks = "warn"and runningcargo clippy)Expected Contribution
undocumented_unsafe_blocks = "allow"to"warn"inruntime/Cargo.toml.cargo clippy --workspace --all-targets --lockedandcargo clippy --workspace --all-targets --all-features --lockedto list every undocumentedunsafeblock.unsafeblock and write a concise, accurate// SAFETY:comment explaining the exact invariant that makes it sound (or flag any genuinely suspect invariant in the PR for maintainer review).undocumented_unsafe_blocks = "warn"inruntime/Cargo.tomlso CI enforces it permanently.Acceptance Criteria
undocumented_unsafe_blocks = "warn"is enabled inruntime/Cargo.toml.cargo clippy --workspace --all-targets --locked -- -D warningsand--all-featurespass with zero warnings.// SAFETY:comment explains concrete preconditions rather than generic placeholders.