tooling: report malformed PSO pipeline JSON as validation errors #1523
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1530"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-24T13:43:22Z.
Change
tools/pso_readiness.pyvalidates pipeline input with specificValueErrormessages, but none of them(duplicate/empty ID, invalid root signature status, repeated stage, no shader references, short SHA-256, and the
CLI
PSO report:exit) was asserted intests/pso_readiness_check.py. Separately,report()raised a bareTypeError("string indices must be integers" / "'int' object is not iterable") when a pipeline'sshaderswasa dict, string or int, when a shader reference was not an object, or when a pipeline entry was not an object.
report()andshader_key()now raiseValueErrorfor those wrong-type cases, in the same style as theneighbouring checks (
pipeline <id> shaders must be a list,pipeline entries must be JSON objects, and theexisting shader-reference message for non-object references). 6 added lines, no restructuring.
check_invalid_input()intests/pso_readiness_check.py: a table of 15 rejected inputs asserting the exactmessage, two CLI runs asserting exit 1, empty stdout and
PSO report: <message>, and the valid fixture ascontrol (still
needs_evidence).The CLI already caught
TypeError, so a CLI user sawPSO report: string indices must be integers...; thechange mainly gives API callers and the CLI a consistent, descriptive message.
Verification
Windows 11, Python 3.14.5, base
origin/main1ca0dec1.python -B tests/pso_readiness_check.pyon this branch: passes (mesh, compute, new input validation, census).TypeError: string indices must be integers, not 'str'.identity in ids, the root statuscheck,
stage in stages, the empty-shaders check, the digest regex ({64}to{1,64}) andparser.exit(1to
parser.exit(0each make the new test fail on the named case.Evidence and follow-up
Not run: the
pso_CTests and any C++ build. Not changed: a non-object record inside the extraction manifest anda non-list top-level
pipelinesvalue still raiseTypeError; the manifest is tool output, not hand-writteninput. Missing keys still raise
KeyError, as before.AI-assisted.