Skip to content

Codex/release 2.0.0 - #58

Merged
Portablelle merged 11 commits into
mainfrom
codex/release-2.0.0
Oct 21, 2026
Merged

Portablelle merged 11 commits into
mainfrom
codex/release-2.0.0

Conversation

@Portablelle

Copy link
Copy Markdown
Owner

No description provided.

Portablelle and others added 10 commits October 15, 2026 13:19
)

* 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]>
* 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]>
* 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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T01:05:05.469673Z af2c669 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread homebrew/botty/src/zip.hpp Outdated
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{};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in 6bc9a5c.

@@ -0,0 +1,67 @@
import json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in 6bc9a5c.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Claude review: Code review: no findings

Reviewed commits af2c669..6bc9a5c · checks: Code review complete; host checks pending · host validation source: pending (isolated Claude host checks job in this run)

ID Severity Location Finding Status
R1 🟡 homebrew/botty/src/zip.hpp:113 1 MiB inflate buffer on the stack of the detached PS5 preparation worker thread fixed in 6bc9a5c
R2 🟡 scripts/botty-host-checks.sh:75 The source-part and engine-source tests were never run by host checks fixed in 6bc9a5c
Files reviewed
  • This increment (6bc9a5c): homebrew/botty/src/zip.hpp (std::vector output buffer; output.data()/output.size() usage unchanged), scripts/botty-host-checks.sh (new fast checks Source archive parts and Engine source provenance; scripts/ has no __init__.py, so import source_parts resolves through discovery, and test_sources.py loads ../sources.py by path), packages/botty/manifest.json and packages/botty-release.json (rebuilt botty-manager.elf, botty-source.tar.gz and manifest hashes are consistent; botty-packages.py --check enforces them in host checks).
  • Earlier full review (af2c669), unchanged since: CI/policy files, service sources, dedicated server, native app and the textual package records listed in the previous summary. The earlier review only scanned switch-metadata.hpp, switch-library.hpp, switch-format.hpp, switch-release.hpp, switch-artwork.cpp, forge.py, the new tests, ui/app.js and the docs. It did not read the vendored stb_image.h, emulation/patches/standalone.diff, the .po translations or the binary payloads.

Bottom line: Wait for the combined CI verdict

Code review complete; host checks pending. This summary does not claim merge readiness.

To fix before merge: nothing.

Notes (no action needed):

  • ⚪ This PR changes review policy and workflows (CLAUDE.md, .claude/commands/review-pr.md, both workflows, scripts/botty-host-checks.sh), so a maintainer must inspect it, and standalone verify must pass on the head.
  • ⚪ Native 2.0.0 adds engine files beyond the original 13-file manifest. Managers older than 1.10.4 reject that manifest, so the manager has to be updated first (update-compatibility.json records this).
  • ⚪ The R1/R2 threads have "Fixed" replies, but the review token could not resolve them (Resource not accessible by integration).

Not verified: PS5 runtime behaviour of the embedded Switch engine (emulation-runtime.json declares hardwareValidated: false), the sceSystemServiceLoadExec launch, and Switch preparation and ZIP extraction on the console.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Ready to merge. Claude's review of 6bc9a5c found nothing to fix.

@Portablelle
Portablelle merged commit 9dbb5d1 into main Oct 21, 2026
10 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.

1 participant