Repository navigation
Codex/release 2.0.0 - #58
Conversation
) * Refresh Explore on launch and revalidate expired rankings * Refresh packaged sources for Explore changes --------- Co-authored-by: Jordan Lahmi <[email protected]>
* Unify game preparation and Activity across PS5 and server * Limit FPKG magnet hints to decoded display names * Ignore non-owning attempts when removing adopted import tracking --------- Co-authored-by: Portablelle <[email protected]>
Co-authored-by: Portablelle <[email protected]>
* Add standalone Switch emulation, verified imports and full configuration * Update package contract tests for split corresponding sources * Run Switch regressions in CI and use stable names for native action tests --------- Co-authored-by: Portablelle <[email protected]>
Co-authored-by: Portablelle <[email protected]>
* Add per-game UltraCam configuration for BOTW * Keep native updater fixtures aligned with the current release --------- Co-authored-by: Portablelle <[email protected]>
* Show Switch library names, versions, DLC, mods and artwork * Refresh emulation library release packages and corresponding sources * Synchronize display caches and aggregate title relationships once * Decode Switch artwork outside the service-wide lock --------- Co-authored-by: Portablelle <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| if(available<512ULL*1024*1024||total>available-512ULL*1024*1024)throw std::runtime_error("Not enough space for ZIP extraction plus 512 MiB reserve"); | ||
| if(!fs::create_directory(destination))throw std::runtime_error("ZIP staging already exists; partial files retained"); | ||
| Progress p{"Extracting ZIP and checking CRC","",0,total}; | ||
| std::array<unsigned char,1024*1024> output{}; |
There was a problem hiding this comment.
🟡 R1 — 1 MiB inflate buffer on the worker-thread stack
std::array<unsigned char,1024*1024> output{} is a local in extractZip. On the PS5 this runs inside the detached preparation worker: SwitchPreparationCoordinator::start → startPreparationWorker (std::thread) → prepareSwitchFiles → unpack → extractZip. The call can also be nested up to depth 3 through unpack, but each ZIP returns before the next one starts. The rest of the service code avoids large stack buffers: the biggest one in homebrew/botty/src is 16 KiB in rtorrent.hpp, and the native transaction code has a botty-131-stackfix backup marker. The repository doesn't establish the default PS5 pthread stack size, and host tests run on Linux with an 8 MiB main-thread stack, so they can't catch an overflow.
Failure scenario: someone prepares a Switch release packed as .zip on the PS5. If the libkernel default thread stack is smaller than about 1 MiB plus the caller frames, the manager crashes during extraction. The job is left as extracting and recovers as interrupted, so the user can't import any ZIP-packed Switch release locally.
Suggested fix: allocate the buffer on the heap, matching the read() helper above:
std::vector<unsigned char> output(1024*1024);(output.data() / output.size() already work unchanged.)
| @@ -0,0 +1,67 @@ | |||
| import json | |||
There was a problem hiding this comment.
🟡 R2 — The source-part tests never run in CI
scripts/botty-host-checks.sh only discovers tests/test_*.py, infra/ci-runner, component test folders and Makefile targets. Nothing references scripts/test_source_parts.py (git grep test_source_parts matches nothing). The same applies to homebrew/botty-native/emulation/tests/test_sources.py. The native Makefile only discovers homebrew/botty-native/tests.
These are the only tests for publish() (replacing the 1.17 GB source archive with an index plus hashed parts, with failure atomicity) and restore() (the user-facing GPL reconstruction shipped as restore.py). The repository tests only check that the current parts verify. They don't exercise rejection of modified, unlisted or missing parts, exclusive output, or the failure path where os.replace fails.
Failure scenario: a later change to source_parts.py breaks restore(), for example by publishing a partial output or overwriting an existing file. CI still passes, because botty-packages.py --check only calls source_names(). The shipped restore.py then fails to reconstruct the corresponding source, or does so unsafely.
Suggested fix: add a run to the host checks, for example run_check "Source parts" python3 -m unittest discover -s scripts -p 'test_source_parts.py' -v. Also run homebrew/botty-native/emulation/tests/test_sources.py if it is self-contained. Alternatively, move the tests under tests/ with a sys.path insert. Note that changing botty-host-checks.sh keeps standalone verify active for that PR.
Claude review: Code review: no findingsReviewed commits af2c669..6bc9a5c · checks: Code review complete; host checks pending · host validation source: pending (isolated
Files reviewed
Bottom line: Wait for the combined CI verdictCode review complete; host checks pending. This summary does not claim merge readiness. To fix before merge: nothing. Notes (no action needed):
Not verified: PS5 runtime behaviour of the embedded Switch engine ( |
|
✅ Ready to merge. Claude's review of |
No description provided.