startup: scope zlib stream cache to queued continuation entries #1235
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1235
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1235/head"
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?
@lambirou on GitHub · 2026-11-24 04:48 UTC · original
lambirou:submit/pr-1214-cache-identity→main· +1121 −34 · 4 files · 6 commits · closed without mergingChange
This is stacked on #1214 at
bb35f045. Review only the last commit,0846d914; the earlier commits are #1214.The queue-local stream cache still answered any aligned offset within the cached range when the file, compressed size and chunk size matched. A later independent request at a matching continuation offset could therefore receive the first stream's bytes.
Submitcannot inherit a stale chain.dstoragecontrol now enqueues a valid chunked submission, then a separateSubmitwith a zlib-marked request at the exact matching offset. The request must fail and leave its0xCCsentinel unchanged.Verification
Windows 10.0.26300.10075, MSVC 19.44.35228.0, Ninja, Release.
startup_stubspasses 1/1.inflated (slice from stream cache)instead of failing.git diff --check,tests/docs_links_check.py(16 files, 269 links) andtests/bidi_controls_check.py(1005 files) pass.No game files, dumps or private logs were used. AI-assisted (Codex).
@lambirou on GitHub · 2026-11-24 04:48 UTC · original
@R0Y00 This is the remaining cache-identity case from #1214. It is stacked on #1214 at
bb35f045; review only the last commit,0846d914.The queue cache now records the exact entry ids of the following queued requests that form the continuation chain, and a lookup requires the current entry id to be in that chain. The new source-built control does a valid chunked submission, then a separate
Submitwith a zlib-marked request at the exact matching offset; the request fails and its0xCCsentinel stays unchanged. Against the previous head, the same control is answered byinflated (slice from stream cache).Windows Release
startup_stubspasses 1/1. Kept as a draft until #1214 lands. AI-assisted (Codex).@lambirou on GitHub · 2026-11-24 04:51 UTC · original
CI is green on
0846d914:Windows checksrun 3038 passed (Windows build/tests, Linux Python checks, gfx1013 fixtures). The PR is ready for review, still stacked on #1214 atbb35f045; review only the last commit.Local Release
startup_stubspasses 1/1, and the separate-Submitcontrol fails against the previous head, so the regression is covered. AI-assisted (Codex).@tedin7 on GitHub · 2026-11-24 05:05 UTC · original
Tested on Windows Server 2025 (Build 26100, MSVC 14.44.35207) at commit
0846d914:--preset dev):cmake --preset dev && cmake --build out/build/dev -j 6 --target startup_stub_consumer startup_stub_acphal startup_stub_chad startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs startup_stub_gameinputctest --test-dir out/build/dev -R "^startup_stubs$" --output-on-failure-> 1/1 passed (0.49s, total0.52s)/O2(--preset release):cmake --preset release && cmake --build out/build/release -j 6 --target startup_stub_consumer startup_stub_acphal startup_stub_chad startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs startup_stub_gameinputctest --test-dir out/build/release -R "^startup_stubs$" --output-on-failure-> 1/1 passed (0.54s, total0.57s)@R0Y00 on GitHub · 2026-11-24 05:22 UTC · original
The continuation-entry ID approach from this PR is on main through #1214 (
0fa43ad6), with the original contribution credited. The merged version also verifies the submission ID and has an event-gated two-batch control. Thanks for supplying the original separate-Submit regression and independent verification.@tedin7 on GitHub · 2026-11-24 04:58 UTC · original · reviewed
Reviewed commit
0846d914on Linux (Windows build/tests were not run locally).Stacking & diff audit
#1214atbb35f045(note#1214is currently open at9570cec4).src/startup_stubs/xcrdapi.cpp:Entrygains a monotonicu64 idassigned inpush()underwork.mutex(++work.next_entry_id).following_chunk_ids()scanswork.submitted(after the current entry has already been popped in the worker loop) andwork.waiting, skippingstatus_entryitems and stopping at any non-continuation or mismatched request. Unsigned overflow is guarded both on initialoffset + destination_size(expected < offset) and per step (expected > UINT64_MAX - destination_size).CachedStreamstorescontinuation_ids, and cache lookup inexecute_request()requiresentry_idto be present incontinuation_idsin addition to matchingsource,compressed_size, and alignedoffset > base_offset.tests/startup_stub_consumer.cpp: expands the temp file to 16 MiB and adds a separate-Submitcontrol at the matching continuation offset (chunk_dest_size) verifying non-zero status and untouched destination (0xCC).docs/startup-runtime.md: documents stream-cache identity. 100% title-neutral.Linux checks (
0846d914)docs_links_check.py: passed (16 Markdown files, 269 links).bidi_controls_check.py: passed (1005 files).form_coverage_check.py: passed.git diff --check: clean.startup_stub_check.py/startup_stub_consumer.cpp: Windows-only executable checks, not run locally.Pull request closed