manifest_verifier: accept a flat entry named files #2403
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2403"
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 ubiquitarianism/leonida. Originally posted by bimo0o on 2026-11-26T20:18:01Z.
Claimed in the coordination issue as: VERIFY-FLAT-FILES
What and why
The verifier treated every top-level
fileskey as a wrapper. Accept a flat entry namedfileswhen its value is a SHA-256 digest string or an object with an integer size and a SHA-256 string. Preserve wrapped manifests that list files namedsha256orsize.Tested
fac8b4b) and pass with the fix.git diff --checkpassed.GPUs tested: n/a. Synthetic fixtures only.
AI-assisted: yes (Codex).
Checklist
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-26T20:43:08Z.
Review: COMMENTED
On Windows 11 with Python 3.12.1, the manifest verifier suite had 68 passes and 2 skips. I ran the two new cases again with only the verifier loaded from the parent commit. Both flat forms raised
ManifestError, while the wrapped manifest with entries namedsha256andsizestill passed.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by tiguan26 on 2026-11-27T04:43:25Z.
Review: APPROVED
Approving
2b738d3ba.A flat entry named
filesis taken as a file only when it looks like one (a 64-hex digest, or an object with an integersizeand a stringsha256). A real wrapper cannot look like that: itssizemember would be a file entry, not an integer, so a wrapped manifest that lists files calledsizeorsha256still reads as wrapped. The digest check now shares one compiled pattern.Merged onto
maind1dff7949together with #2410, #2299, #2297, #2330 and #2286 (no conflicts), on Linux with Python 3.13.tests/test_manifest_verifier.py: 68 passed, 2 skipped (main: 66 passed). AI-assisted (Claude Code, Claude Opus 5.5).Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T10:23:46Z.
#2403 | head
2b738d3ba5(merged cleanly with main901b6c1bf) |python -I tests/test_manifest_verifier.py| red on main:FAILED (errors=2, skipped=4)(ManifestError: entry 'size' must be an object or digest stringandManifestError: 'files' must be a JSON objecton flat manifests naming a filefiles) | green on PR+main:70 tests OK (skipped=4)| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
load_manifestintools/manifest_verifier.py(SHA256_HEX.fullmatchdisambiguation for flat"files"digest strings and{"size": <int>, "sha256": <str>}entry objects while preserving wrapped{"files": ...}manifests whose entries are themselves named"sha256"or"size", withtype(files_value.get("size")) is intrejectingbool). Also passedtests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK),tests/test_runner_calls_all_tests.py(3 OK), andscripts/check_no_game_data.pyon the merged tree.Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-28T23:38:05Z.
Tested
2b738d3bamerged (no commit) withmainaa918e5d9: Python 3.12.4, Windows 11 10.0.26300, CPU only.check_no_game_data.pyis clean.tests/test_manifest_verifier.py, 78 tests pass (3 skipped).tools/manifest_verifier.pyback tomain,test_flat_manifest_verifies_a_file_named_fileserrors twice ('files' must be a JSON object).No blocker from my side.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T23:47:44Z.
Merged after TheGeogeo's red/green check (check) (Windows, Python tests, no GPU needed) and a local re-check here. Merged after local re-verification: this PR merged onto
main717bd20dfwithout conflict, and its test file(s) (tests/test_manifest_verifier.py) pass there. Earlier today the same tests failed onmainwithout the PR (red/green) and a bundle with other open PRs showed no new failures.check_no_game_data.pyis clean. Windows 11, Python 3.14; no GPU needed for these tests.AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.