Skip to content

conformance: reject duplicate keys in renderer manifests - #6858

Merged
shayderrr merged 1 commit into
ItsNotRexed:mainfrom
Solthodox:fix/conformance-duplicate-json-keys
Nov 23, 2026
Merged

shayderrr merged 1 commit into
ItsNotRexed:mainfrom
Solthodox:fix/conformance-duplicate-json-keys

Conversation

@Solthodox

@Solthodox Solthodox commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: item 4 of the four CPU workflow claims. Tracker group: PROC-375.

What and why

A renderer manifest could contain two values for the same pixel channel. JSON decoding silently kept the last one, so expect could report PASS despite conflicting declarations. The shared loader now rejects repeated object keys before expect or diff reads pixels, naming the manifest and field. Distinct keys and ordinary unknown metadata are unchanged.

Tested

Ubuntu 26.04 LTS x86_64, CPython 3.12.13. CPU only; GPU and driver not used. Verified 5b7fd816be changes locally.

AI-assisted: yes.

Checklist

  • No game data, keys or decryption, including in logs or reports quoted here.
  • Not applicable: no translator rule changed.

- Reject ambiguous pixel expectations before comparing images and identify the repeated key.

@shayderrr shayderrr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: tools/conformance/compare.py load_manifest() now parses JSON through an object_pairs_hook that raises ToolError on any repeated key, including a repeated channel inside a pixel check, instead of silently taking the last value. tools/conformance/COMPARE.md documents the contract. step_expect_missing_and_invalid() adds fixtures for a duplicate top-level renderer key and a duplicate nested r key, asserting that the manifest path and key appear in the error.

Why merge: A duplicated declaration could quietly override a scene check; treating it as an input error keeps conformance manifests trustworthy. Documentation and tests match the behavior.

Verdict: Approve

@shayderrr

Copy link
Copy Markdown
Collaborator

Summary: tools/conformance/compare.py load_manifest() now parses JSON through an object_pairs_hook that raises ToolError on any repeated key, including a repeated channel inside a pixel check, instead of silently taking the last value. tools/conformance/COMPARE.md documents the contract. step_expect_missing_and_invalid() adds fixtures for a duplicate top-level renderer key and a duplicate nested r key, asserting that the manifest path and key appear in the error.

Why merge: A duplicated declaration could quietly override a scene check; treating it as an input error keeps conformance manifests trustworthy. Documentation and tests match the behavior.

Verdict: Approve

@shayderrr
shayderrr merged commit 6e44990 into ItsNotRexed:main Nov 23, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants