victory: pin shader::sources (SGD5 records + raw DXBC scan) with unit tests #469
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS#469
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?
@AnastasisKon on GitHub · 2026-11-27 21:24 UTC · original
What
apps/victory/src/shader.rs'ssources()is the entry point behindvictory shaderand the pre-build: it lists an SGD5 file's packed records (sgd5::records) and every rawDXBCcontainer found by magic whoseContainer::parseaccepts it. It has no tests; the survey/prebuild counts rest on its exact behavior.What this pins
DXBCat an offset is found with that offset, and aDXBCmagic whose container does not parse (truncated size) is skipped;Source::Packed, its label carries offset and name,bytes()returnsNonefor a corrupt (non-deflate) stream, and a well-formed stored-deflate record unpacks to the container bytes;Test-only change: synthetic bytes (hand-built DXBC header, hand-built stored-deflate record), no game data, no new dependencies.
How it was tested
cargo test -p victory(new unit tests inapps/victory/src/shader.rs)cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warningscargo xtask policy@AnastasisKon on GitHub · 2026-11-27 21:24 UTC · original
/claim
@github-actions[bot] on GitHub · 2026-11-27 21:24 UTC · original
Claimed by @AnastasisKon. Open a draft pull request with
Refs #465in its description within 24 hours, or the claim expires.@AnastasisKon on GitHub · 2026-11-27 21:38 UTC · original
Work is up in draft PR #471 (branch vibe/shader-sources-tests-1705ac). Note: a second session of this account opened #472 for the same issue; I closed #472 as a duplicate — #471 covers its cases too.
@AnastasisKon on GitHub · 2026-11-28 12:43 UTC · original
/release - done without a PR (upstream is paused, so none was opened): the work is on branch
vibe/shader-sources-tests-1705acand is in my fork'smain.input_without_shaders_yields_nothinginapps/victory/src/shader.rsnow also checks that the SGD5 magic alone is no record and that a "DXBC" with no header behind it is no container (shader.rs:451-455), andan_sgd5_record_is_listed_and_unpacks_to_its_container(shader.rs:507) covers the record path.@github-actions[bot] on GitHub · 2026-11-28 12:44 UTC · original
Released. This issue is free to claim.