Commit Graph

21 Commits

Author SHA1 Message Date
9231063348 fssm_unpack: validate DXBC magic and 24-byte XBCH header, guard empty --carve-index and write errors, and preserve index symlinks/mode 2026-11-25 08:24:05 +01:00
87e19b960e test_fssm_unpack: an empty or non-string stage is stage unknown too (BL-5)
The carve-index case covered an entry with no stage field only, so a
change of shader_stages' "a non-empty string" test to "a string or
anything truthy" went unseen (review of #882). The case now has an
entry with an empty stage and one with a number, checks shader_stages'
answer for all five, and that the breakdown has one line for them.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 01:33:30 +08:00
1f3f4ba3bb fssm_unpack: count containers and programs apart, per stage (BL-5)
The corpus is 26,503 carved containers holding 26,698 tag-0x0D payloads:
195 vertex-shader containers carry two. fssm_unpack.py now prints both
counts and, given the carve index, a line per stage. shader_library.md
records the two counts and why 195 equals the geometry-shader count.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 22:54:07 +08:00
e721383231 Merge pull request #3996 from bbareth
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:10:15 -05:00
ffeb09636c Report unreadable DXBC inputs during FSSM unpacking 2026-11-22 23:48:58 +01:00
b23779d6a9 tests: pass errors=replace to subprocess pipes capturing python -I tools 2026-11-23 00:42:37 +02:00
c6916f5c72 Merge pull request #2805 from Jim123666888 2026-11-22 15:12:11 -05:00
d859daeef7 fssm_unpack: use exit 2 for output directory errors 2026-11-23 02:53:34 +08:00
23919d9548 Merge pull request #2580 from Italo Felipe 2026-11-22 13:16:20 -05:00
ad8e9d591b Merge pull request #2417 from bbareth 2026-11-22 13:15:10 -05:00
11f424b80c fssm_unpack: report output directory creation errors 2026-11-23 01:56:55 +08:00
22786239bf fix: validate DXBC and XDAT container bounds 2026-11-22 14:30:10 -03:00
6962c9a8c6 fssm_unpack: stage the completion index privately 2026-11-22 17:58:58 +01:00
c7408a1f7e Keep stale shader files out of resumed builds
Select each stage's inputs from its producer index and refresh downstream
stages when a saved cache contains obsolete shader names.
2026-11-22 23:35:45 +08:00
c3c1629c45 Bound XBCH decompression output
Validate XBCH stored size, cap output by the declared FSSM length, and reject truncated or trailing zlib data. Add synthetic regression coverage for the declared-size ceiling and malformed streams.

Addresses BUILD-342 claimed in #1218.
2026-11-22 09:46:48 +00:00
b036c3fd77 fssm_unpack: skip non-file DXBC entries 2026-11-22 04:38:49 -03:00
b3eff27528 fssm_unpack.py: a payload without FSSM magic is not published
unpack() checked the decompressed payload's size and that it holds at least a
magic and version, but not the magic itself, so a payload starting "JUNK" was
written as a .fssm and indexed. It is now a ValueError, counted with the
other per-file problems.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:28:11 +01:00
f58e9b221e fssm_unpack.py: a missing or non-folder source is one line, and nothing is created
main() made <src>/fssm before it listed <src>, so a mistyped source
folder was created, whole path included, and the run then ended with
"no shader unpacked" as if the folder were real. A file given as the
source ended in a NotADirectoryError traceback, and a folder that can't
be listed in a PermissionError one. The source is now checked first: a
missing path, a file or an unlistable folder prints one line naming it
to stderr and exits 2, and nothing is written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 01:43:38 +01:00
b4735ef6d7 fssm_unpack.py: reject a truncated FSSM header before writing output 2026-11-22 00:16:37 +01:00
65d62ffdc8 Tools: preserve duplicate XDAT payloads in fssm_unpack 2026-11-21 19:56:15 +00:00
29a4630688 test(tools): add test_fssm_unpack covering container carving, headers, alignment, and CRC bounds 2026-11-21 19:00:13 +01:00