fog_volumes: find a zlib header that starts on a scan-range boundary (carry of #2108) #3091
No reviewers
Labels
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!3091
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3091"
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?
@MoonEyes on GitHub · 2026-12-02 10:30 UTC · original
MoonEyes:carry/2108→main· +41 −2 · 2 files · 3 commits · merged 2026-12-02 13:29 UTCClaimed in the coordination issue as: FOG-VOLUMES-SCAN-BOUNDARY (the original author's item ID, claimed in #1608)
What and why
Carry of #2108 (syfyra), unchanged since 2026-11-25; branch = main + the author's head (commit kept) + conflict resolution. I added no commit of my own: the reviews on #2108 only ask for a rebase and a CI run, and raise no code defect.
tools/fog_volumes.pyscans an RPF in ranges, one per worker, and_scan_rpf_chunksearched for the 2-byte zlib header only up to the range end. A header starting atend - 1was found by no range, so that resource was missing from the report for some--jobsvalues. The search now runs toend + 1and keeps only a match that starts beforeend, so each header is counted by exactly one range.Conflict resolution:
tools/fog_volumes.pymerged cleanly.tests/test_fog_volumes.pyconflicted because main appended three report-writing tests at the end of the file and the PR appended two boundary tests at the same place; I kept all of them.Tested
Windows 11, no GPU, no game files, on main
a917c54d6plus this branch:python -I tests/test_fog_volumes.py: Ran 15 tests, OK.tools/fog_volumes.pyrestored to main's version, the same command gives Ran 15 tests, FAILED (failures=2):test_a_header_on_a_range_boundary_is_found_once(split=257) andtest_jobs_do_not_change_what_is_found(jobs=2). The file was restored afterwards.python -I scripts/check_no_game_data.py tools/fog_volumes.py tests/test_fog_volumes.py: clean.Not run: the full suite, CI.
GPUs tested: n/a (unit tests only)
AI-assisted: yes. Models: Claude Opus 5.5 in Claude Code (carry, conflict resolution, fixes, tests); separate read-only reviewer agent: Claude Opus 5.5.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)Supersedes #2108 once merged; the original stays open until a maintainer decides.
🤖 Generated with Claude Code
@Kal0s-design on GitHub · 2026-12-02 12:56 UTC · original
Ran natively on Windows 11, Python 3.13, head
9089dae4emerged into currentmain(23a51c494), no conflicts.py -3.13 -I tests/test_fog_volumes.py: 15 tests OK. With main'stools/fog_volumes.pythe same two subtests fail as in the body (split=257, jobs=2), so nothing new there.The tests check one resource and five split points. I wanted every split point, more than one resource, and more than two ranges, so I wrote throwaway RPF-like buffers (
9FPR+ padding + the test file'sbuild_synthetic_fog_0x7aoutput, zlib-compressed) and compared_scan_rpf_chunkon the whole buffer with the sum over the ranges:0x78as the very last byteOn main the misses are exactly split = header + 1 for each resource (for example split 17 loses the resource at 16, split 243 loses the one at 242), which matches the bug described. With the PR no split point changes the offsets or the complete/incomplete counts, the stream in between is never counted, and a
0x78in the last byte of the file (whereend + 1is capped at the file size) does not break anything.Not checked: real archives (no game files used), continuation pages joined by
world_census.assembleacross a boundary,--jobsabove 2.GPUs tested: n/a (CPU-only tests).
AI-assisted: yes (Claude Code).
@MoonEyes on GitHub · 2026-12-02 13:14 UTC · original
Merging. Head
9089dae4emerges cleanly withmainbf7886746and does not force a rebase of #2566. Independent check on head9089dae4e: Kal0s-design's native run on Windows 11 merged into main (on main every split at header + 1 loses the resource just before it, as the bug describes; with this head none is lost), comment 7346101754; syfyra's commit from #2108 is kept; CI green incl. no-game-data; no open review or question. Merged by MoonEyes.AI-assisted (Claude Code).