fix(libc): provide ASOBI_ROOT environment variable for title path resolution #7715

Open
renzipego-cpu wants to merge 1 commit from upstream-pr/7715 into main
renzipego-cpu commented 2026-10-19 02:29:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by renzipego-cpu on 2026-10-19T02:29:33Z.


Carries the rework of #4274 (StarMrGamer:fix/astrobot-asobi-root-env@0528bae8), pushed by its author after the verification request in #3480, rebased onto current main.

What

ASTRO BOT (PPSA21564) reads ASOBI_ROOT through getenv to build its asset paths; without it the sound configuration never loads and start-up stops at the title's own assertion:

ASSERT: D:\asobi\6.0\source\engine\app\Game\Sound\SoundManager.cpp:306
Assertion failed: defaultBusses.size() == 1

(reproduced on Windows in #3480; the issue was closed with the author's private stack, none of which is on main). The guest environment starts empty by design (70ef3710f, docs/dev/debt/libc.md: never reads the host's), so the title has no way to see the variable. This seeds one console-provided default, ASOBI_ROOT=app0, into the guest environment - the value follows the homebrew payload convention. The host-seeding half of the carried branch was dropped in the rebase: main's empty-environment decision postdates the branch base and takes precedence. The debt entry is updated accordingly.

Tested

Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Ninja, Release, BUILD_TESTING=ON, full build including libs: asobi_root_environment (default value, setenv override, absent variable) and guest_environment pass. python tools/check_conventions.py --base origin/main passes; tools/pr_overlap.py was run against the branch (only closed predecessors #4274/#3959/#4565; no open PR provides this). The title itself was not rerun with this build.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: #3480
  • Unblocks: PPSA21564 #3480
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4914972326 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7715). Originally posted by [renzipego-cpu](https://github.com/renzipego-cpu) on 2026-10-19T02:29:33Z. --- Carries the rework of #4274 (`StarMrGamer:fix/astrobot-asobi-root-env@0528bae8`), pushed by its author after the verification request in #3480, rebased onto current main. ### What ASTRO BOT (PPSA21564) reads `ASOBI_ROOT` through `getenv` to build its asset paths; without it the sound configuration never loads and start-up stops at the title's own assertion: ``` ASSERT: D:\asobi\6.0\source\engine\app\Game\Sound\SoundManager.cpp:306 Assertion failed: defaultBusses.size() == 1 ``` (reproduced on Windows in #3480; the issue was closed with the author's private stack, none of which is on main). The guest environment starts empty by design (70ef3710f, docs/dev/debt/libc.md: never reads the host's), so the title has no way to see the variable. This seeds one console-provided default, `ASOBI_ROOT=app0`, into the guest environment - the value follows the homebrew payload convention. The host-seeding half of the carried branch was dropped in the rebase: main's empty-environment decision postdates the branch base and takes precedence. The debt entry is updated accordingly. ### Tested Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Ninja, Release, `BUILD_TESTING=ON`, full build including `libs`: `asobi_root_environment` (default value, `setenv` override, absent variable) and `guest_environment` pass. `python tools/check_conventions.py --base origin/main` passes; `tools/pr_overlap.py` was run against the branch (only closed predecessors #4274/#3959/#4565; no open PR provides this). The title itself was not rerun with this build. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: #3480 - [x] Unblocks: PPSA21564 #3480 - [x] GPUs tested: n/a - [x] AI-assisted: yes
blawesom commented 2026-10-19 06:30:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-19T06:30:55Z.


Rebase handoff — rebased onto current main (authorship unchanged). One conflict in the test registration: your asobi_root_environment test sits alongside main's newer guest_dinkumware_atomics registration, both kept.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; full suite green apart from the two known main regressions (agc_driver_tessellation — Mesa, #5444; agc_driver_bda_device — #7584), neither from this PR.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7715
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is fd377744e.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6261169405 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7715#issuecomment-6261169405). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-19T06:30:55Z. --- **Rebase handoff** — rebased onto current `main` (authorship unchanged). One conflict in the test registration: your `asobi_root_environment` test sits alongside `main`'s newer `guest_dinkumware_atomics` registration, both kept. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; conventions pass; **full suite green apart from the two known `main` regressions** (`agc_driver_tessellation` — Mesa, #5444; `agc_driver_bda_device` — #7584), neither from this PR. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/7715 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `fd377744e`.
blawesom commented 2026-10-19 06:47:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-19T06:47:59Z.


Correction to the handoff above: the first push had a malformed CMakeLists merge (an unterminated if(WIN32) block from the conflict resolution — the fix is amended in, head is now 439b5d6dd). Also, the verification on the corrected head showed a third known main regression beyond the two in the original comment: agc_driver_image_table_vouched_lookups fails on RADV since the #6454 merge — bisected and filed as #7766, not from this PR. The handoff itself is green apart from the three known main regressions (#5444 Mesa, #7584 BDA, #7766 image-table vouch).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6261419893 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7715#issuecomment-6261419893). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-19T06:47:59Z. --- Correction to the handoff above: the first push had a malformed CMakeLists merge (an unterminated `if(WIN32)` block from the conflict resolution — the fix is amended in, head is now `439b5d6dd`). Also, the verification on the corrected head showed a third known `main` regression beyond the two in the original comment: `agc_driver_image_table_vouched_lookups` fails on RADV since the #6454 merge — bisected and filed as #7766, not from this PR. The handoff itself is green apart from the three known `main` regressions (#5444 Mesa, #7584 BDA, #7766 image-table vouch).
adriadam10 commented 2026-10-19 17:13:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T17:13:36Z.

Review: CHANGES_REQUESTED


Thanks for carrying this. Two problems before it can land:

  • The root cause in #3480 says the opposite of what this PR assumes: "Serving ASOBI_ROOT through the guest environment alone does not help: the title does not expand the token itself", and the title passes /host/%ASOBI_ROOT%/target/data/... literally to the file API. The PR body says the title reads ASOBI_ROOT through getenv, with no source, and the title was not rerun with this build. Please show the title getting past SoundManager.cpp:306 with this change (log), or evidence (disassembly/import trace) that it calls getenv("ASOBI_ROOT").
  • The test only checks that getenv returns the value the PR seeds, so it would not catch the fix being ineffective. The app0 value comes from a homebrew convention and is not measured on the console (as the debt line itself says).

If the real behaviour is %VAR% handling at the /host translation layer, as #3480 suggests, that is a different change. Also core/libs/prx/libc/CMakeLists.txt conflicts with main (test registration); please rebase when you update.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5575097281 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7715#pullrequestreview-5575097281). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T17:13:36Z. **Review:** CHANGES_REQUESTED --- Thanks for carrying this. Two problems before it can land: - The root cause in #3480 says the opposite of what this PR assumes: "Serving `ASOBI_ROOT` through the guest environment alone does **not** help: the title does not expand the token itself", and the title passes `/host/%ASOBI_ROOT%/target/data/...` literally to the file API. The PR body says the title reads `ASOBI_ROOT` through `getenv`, with no source, and the title was not rerun with this build. Please show the title getting past `SoundManager.cpp:306` with this change (log), or evidence (disassembly/import trace) that it calls `getenv("ASOBI_ROOT")`. - The test only checks that `getenv` returns the value the PR seeds, so it would not catch the fix being ineffective. The `app0` value comes from a homebrew convention and is not measured on the console (as the debt line itself says). If the real behaviour is `%VAR%` handling at the `/host` translation layer, as #3480 suggests, that is a different change. Also `core/libs/prx/libc/CMakeLists.txt` conflicts with main (test registration); please rebase when you update.
blawesom commented 2026-10-19 19:10:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-19T19:10:06Z.


Rebase handoff — rebased onto current main (585075cb7, authorship unchanged). One CMake test-registration conflict with main's new guest_dinkumware_atomics tests, unioned (both blocks registered; the shared if(WIN32) closer duplicated so each block closes its own).

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; asobi_root_environment and guest_dinkumware_atomics both pass; full suite green apart from the four known main regressions (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR; conventions pass.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7715
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is 3e221b62a.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6275124161 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7715#issuecomment-6275124161). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-19T19:10:06Z. --- **Rebase handoff** — rebased onto current `main` (`585075cb7`, authorship unchanged). One CMake test-registration conflict with `main`'s new `guest_dinkumware_atomics` tests, unioned (both blocks registered; the shared `if(WIN32)` closer duplicated so each block closes its own). Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; `asobi_root_environment` and `guest_dinkumware_atomics` both pass; **full suite green apart from the four known `main` regressions** (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR; conventions pass. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/7715 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `3e221b62a`.
adriadam10 commented 2026-10-22 20:51:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-22T20:51:01Z.

Review: CHANGES_REQUESTED


Still blocked on the same point, now that the rebase is in:

  • The premise is unproven. #3480's root cause says serving ASOBI_ROOT through the guest environment alone does not help (the title passes /host/%ASOBI_ROOT%/target/data/... literally to the file API), and nothing in this PR or its thread shows the title calling getenv("ASOBI_ROOT"). Please attach either a log of the title getting past SoundManager.cpp:306 with this change, or an import trace/disassembly of the getenv call.
  • core/libs/tests/AsobiRootEnvironment.cpp only reads back the value the PR seeds, so it passes whether or not the fix helps the title. The app0 value follows a homebrew convention and is not measured on the console.
  • core/libs/prx/libc/CMakeLists.txt conflicts with main again (test registration); rebase when you update.

If the real behaviour is %VAR% handling at the /host translation layer, that is a different change.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5620689518 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7715#pullrequestreview-5620689518). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-22T20:51:01Z. **Review:** CHANGES_REQUESTED --- Still blocked on the same point, now that the rebase is in: - The premise is unproven. #3480's root cause says serving `ASOBI_ROOT` through the guest environment alone does not help (the title passes `/host/%ASOBI_ROOT%/target/data/...` literally to the file API), and nothing in this PR or its thread shows the title calling `getenv("ASOBI_ROOT")`. Please attach either a log of the title getting past `SoundManager.cpp:306` with this change, or an import trace/disassembly of the `getenv` call. - `core/libs/tests/AsobiRootEnvironment.cpp` only reads back the value the PR seeds, so it passes whether or not the fix helps the title. The `app0` value follows a homebrew convention and is not measured on the console. - `core/libs/prx/libc/CMakeLists.txt` conflicts with main again (test registration); rebase when you update. If the real behaviour is `%VAR%` handling at the `/host` translation layer, that is a different change.
XairRrR commented 2026-10-29 04:29:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T04:29:59Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The head still conflicts with main, and the change seeds one title's variable into every guest's environment, which the project rules forbid. The evidence in this thread so far also goes against the premise that the title reads ASOBI_ROOT through getenv.

What I ran

  • Head: 783fa9b83f5f0ac617d4b0f05321a34c1279cb7f (based on 376c040294370ce7de355485947d5d00a9417e29)
  • main: b433c40f2f46aa2e59e19806010a839ac8572d64
  • Arch Linux 7.2.11-zen, GCC 16.2.1, Release, Ninja, BUILD_TESTING=ON, a clean worktree; build and tests ran in a sandbox without network access.
git fetch -q origin main pull/7715/head:refs/review/7715
git checkout -q --detach origin/main
git merge -q --no-ff --no-edit refs/review/7715      # conflicts, aborted
git checkout -q --detach refs/review/7715
git diff --check origin/main...refs/review/7715
python3 tools/check_conventions.py --base origin/main
cmake --build build -j10 --target asobi_root_environment_tests guest_environment_tests
ctest --test-dir build -R '^(asobi_root_environment|guest_environment)$' --output-on-failure
# negative control
git checkout 376c040294370ce7de355485947d5d00a9417e29 -- core/libs/prx/libc/src/Environment.cpp
cmake --build build -j10 --target asobi_root_environment_tests
ctest --test-dir build -R '^(asobi_root_environment|guest_environment)$' --output-on-failure

Results

Check Result
Merge into main Conflicts in core/libs/prx/libc/CMakeLists.txt and docs/dev/debt/libc.md
git diff --check Clean
check_conventions.py --base origin/main All conventions checks passed.
Build (PR head) OK
asobi_root_environment, guest_environment Both pass
Negative control asobi_root_environment fails (Subprocess aborted)
Merge conflict (test registration)
CONFLIT (contenu) : Conflit de fusion dans core/libs/prx/libc/CMakeLists.txt
CONFLIT (contenu) : Conflit de fusion dans docs/dev/debt/libc.md

In CMakeLists.txt, the new asobi_root_environment block collides with the guest_dinkumware_atomics and guest_dinkumware_internals registrations that main has added after guest_environment. In docs/dev/debt/libc.md, main has reordered and rewritten the surrounding entries. The getenv entry is now at line 158 on main.

Tests on the PR head
1/2 Test #127: guest_environment ................   Passed    0.00 sec
2/2 Test #128: asobi_root_environment ...........   Passed    0.00 sec
100% tests passed out of 2

Negative control

I restored core/libs/prx/libc/src/Environment.cpp from the PR's base (376c040294). main's copy includes headers that do not exist at that base and did not compile there. I rebuilt, and asobi_root_environment aborted, which is the expected result. The test only reads back the value the change seeds. It shows that the seeding exists, not that the title needs it or that it fixes the title (adriadam10 already made this point).

Findings

Blocking

  1. Conflict with main. The head still conflicts in core/libs/prx/libc/CMakeLists.txt and docs/dev/debt/libc.md, so the checklist line "Based on current main" does not hold. blawesom's rebase handoffs (3e221b62a) were not picked up, and main has moved on since. Please rebase onto current main.

  2. Title-specific default in a libc-wide path. Environment.cpp:24-31 seeds ASOBI_ROOT=app0 into every guest's environment. The name is one engine's variable, and the value comes from a homebrew convention, not from a console measurement. This breaks CONTRIBUTING.md:12: "Implement the general behaviour of a function, not what one title happens to need". It also breaks the AGENTS.md rule against special-casing a value seen in one title. oneandonlydean raised the same concern. I'm adding the rule it breaks. If the console's start-up environment is unknown, the debt entry should say so, and the guest environment should stay empty.

  3. The premise is not supported, and the evidence posted here points the other way. The description says the title reads ASOBI_ROOT through getenv, but it gives no source, and the title was not rerun. In this thread:

    • BunnyFl's static read of PPSA21567 01.019.000 found no getenv, setenv or putenv imports and no plain "ASOBI_ROOT" string. Every occurrence is a literal /host/%ASOBI_ROOT%/... or Windows tool path.
    • cadenasynyster ran PPSA21567 01.018.000 on main without the change and did not hit the SoundManager.cpp:306 assertion.
    • In #3480 itself, the fix discussed for this assertion was %VAR% expansion in the path resolver (ExpandEnvironmentVariables() wired into Resolve()), not a getenv value.

    I did not run any title, so I can't add runtime evidence. I am confirming adriadam10's request: a log of PPSA21564 getting past the assertion with this change, or a disassembly or import trace that shows the getenv("ASOBI_ROOT") call, is needed before this can be weighed.

Non-blocking

  1. getenv and environ now disagree. libkernel's environ is still empty (Process.cpp:217-218), while getenv("ASOBI_ROOT") returns app0. The updated debt line still says the environment "starts empty, like the environ libkernel exports". A title that walks environ would not see a variable that getenv reports. This goes away if the seeding is dropped. If it stays, both views need the same contents.
  2. Debt text names a title. The new sentence in docs/dev/debt/libc.md:65 names ASTRO BOT, PPSA21564 and #3480 as the reason for the behaviour. As oneandonlydean noted, debt entries describe behaviour and its unknowns. This is a symptom of blocking finding 2.
  3. Test name and scope. core/libs/tests/AsobiRootEnvironment.cpp is named after one engine's variable and only checks the seeded value. A generic environment property, such as a start-up state measured on the console, belongs in the existing guest_environment test.

Not verified

  • No title was run (PPSA21564 or PPSA21567), and I have no title binary to read, so I cannot confirm or refute the getenv claim myself.
  • Windows was not built or tested.
  • I did not build or test a conflict-resolved merge with main. The checks above ran on the PR head at its old base.
  • I did not run the full test suite, only the two environment tests.

To get this to a good state

  • Rebase onto current main.
  • Show that the title actually needs the variable on current main, with a log of PPSA21564 or a disassembly of the getenv call. If the title only uses %ASOBI_ROOT% inside /host/... paths, as #3480 and the static read suggest, the fix belongs in the path resolver as general %VAR% handling, which would be a separate PR.
  • If some start-up environment is needed, take its contents from the console (measured and recorded in docs/dev/debt/libc.md) or from an opt-in in the launcher, not from a libc default. Keep environ consistent with getenv.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5692869369 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7715#pullrequestreview-5692869369). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T04:29:59Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The head still conflicts with `main`, and the change seeds one title's variable into every guest's environment, which the project rules forbid. The evidence in this thread so far also goes against the premise that the title reads `ASOBI_ROOT` through `getenv`. ## What I ran - Head: `783fa9b83f5f0ac617d4b0f05321a34c1279cb7f` (based on `376c040294370ce7de355485947d5d00a9417e29`) - `main`: `b433c40f2f46aa2e59e19806010a839ac8572d64` - Arch Linux 7.2.11-zen, GCC 16.2.1, Release, Ninja, `BUILD_TESTING=ON`, a clean worktree; build and tests ran in a sandbox without network access. ``` git fetch -q origin main pull/7715/head:refs/review/7715 git checkout -q --detach origin/main git merge -q --no-ff --no-edit refs/review/7715 # conflicts, aborted git checkout -q --detach refs/review/7715 git diff --check origin/main...refs/review/7715 python3 tools/check_conventions.py --base origin/main cmake --build build -j10 --target asobi_root_environment_tests guest_environment_tests ctest --test-dir build -R '^(asobi_root_environment|guest_environment)$' --output-on-failure # negative control git checkout 376c040294370ce7de355485947d5d00a9417e29 -- core/libs/prx/libc/src/Environment.cpp cmake --build build -j10 --target asobi_root_environment_tests ctest --test-dir build -R '^(asobi_root_environment|guest_environment)$' --output-on-failure ``` ## Results | Check | Result | |---|---| | Merge into `main` | **Conflicts** in `core/libs/prx/libc/CMakeLists.txt` and `docs/dev/debt/libc.md` | | `git diff --check` | Clean | | `check_conventions.py --base origin/main` | `All conventions checks passed.` | | Build (PR head) | OK | | `asobi_root_environment`, `guest_environment` | Both pass | | Negative control | `asobi_root_environment` fails (`Subprocess aborted`) | <details><summary>Merge conflict (test registration)</summary> ``` CONFLIT (contenu) : Conflit de fusion dans core/libs/prx/libc/CMakeLists.txt CONFLIT (contenu) : Conflit de fusion dans docs/dev/debt/libc.md ``` In `CMakeLists.txt`, the new `asobi_root_environment` block collides with the `guest_dinkumware_atomics` and `guest_dinkumware_internals` registrations that `main` has added after `guest_environment`. In `docs/dev/debt/libc.md`, `main` has reordered and rewritten the surrounding entries. The `getenv` entry is now at line 158 on `main`. </details> <details><summary>Tests on the PR head</summary> ``` 1/2 Test #127: guest_environment ................ Passed 0.00 sec 2/2 Test #128: asobi_root_environment ........... Passed 0.00 sec 100% tests passed out of 2 ``` </details> ## Negative control I restored `core/libs/prx/libc/src/Environment.cpp` from the PR's base (`376c040294`). `main`'s copy includes headers that do not exist at that base and did not compile there. I rebuilt, and `asobi_root_environment` aborted, which is the expected result. The test only reads back the value the change seeds. It shows that the seeding exists, not that the title needs it or that it fixes the title (adriadam10 already made this point). ## Findings ### Blocking 1. **Conflict with `main`.** The head still conflicts in `core/libs/prx/libc/CMakeLists.txt` and `docs/dev/debt/libc.md`, so the checklist line "Based on current `main`" does not hold. blawesom's rebase handoffs (`3e221b62a`) were not picked up, and `main` has moved on since. Please rebase onto current `main`. 2. **Title-specific default in a libc-wide path.** [`Environment.cpp:24-31`](https://github.com/boykopovar/AnyPS5/blob/783fa9b83f5f0ac617d4b0f05321a34c1279cb7f/core/libs/prx/libc/src/Environment.cpp#L24-L31) seeds `ASOBI_ROOT=app0` into every guest's environment. The name is one engine's variable, and the value comes from a homebrew convention, not from a console measurement. This breaks [CONTRIBUTING.md:12](https://github.com/boykopovar/AnyPS5/blob/b433c40f2f46aa2e59e19806010a839ac8572d64/CONTRIBUTING.md#L12-L12): "Implement the general behaviour of a function, not what one title happens to need". It also breaks the [AGENTS.md](https://github.com/boykopovar/AnyPS5/blob/b433c40f2f46aa2e59e19806010a839ac8572d64/AGENTS.md#L7-L7) rule against special-casing a value seen in one title. oneandonlydean raised the same concern. I'm adding the rule it breaks. If the console's start-up environment is unknown, the debt entry should say so, and the guest environment should stay empty. 3. **The premise is not supported, and the evidence posted here points the other way.** The description says the title reads `ASOBI_ROOT` through `getenv`, but it gives no source, and the title was not rerun. In this thread: - BunnyFl's static read of PPSA21567 01.019.000 found no `getenv`, `setenv` or `putenv` imports and no plain `"ASOBI_ROOT"` string. Every occurrence is a literal `/host/%ASOBI_ROOT%/...` or Windows tool path. - cadenasynyster ran PPSA21567 01.018.000 on `main` without the change and did not hit the `SoundManager.cpp:306` assertion. - In #3480 itself, the fix discussed for this assertion was `%VAR%` expansion in the path resolver (`ExpandEnvironmentVariables()` wired into `Resolve()`), not a `getenv` value. I did not run any title, so I can't add runtime evidence. I am confirming adriadam10's request: a log of PPSA21564 getting past the assertion with this change, or a disassembly or import trace that shows the `getenv("ASOBI_ROOT")` call, is needed before this can be weighed. ### Non-blocking 1. **`getenv` and `environ` now disagree.** libkernel's `environ` is still empty ([`Process.cpp:217-218`](https://github.com/boykopovar/AnyPS5/blob/783fa9b83f5f0ac617d4b0f05321a34c1279cb7f/core/libs/prx/libkernel/System/src/Process.cpp#L217-L218)), while `getenv("ASOBI_ROOT")` returns `app0`. The updated debt line still says the environment "starts empty, like the `environ` libkernel exports". A title that walks `environ` would not see a variable that `getenv` reports. This goes away if the seeding is dropped. If it stays, both views need the same contents. 2. **Debt text names a title.** The new sentence in [`docs/dev/debt/libc.md:65`](https://github.com/boykopovar/AnyPS5/blob/783fa9b83f5f0ac617d4b0f05321a34c1279cb7f/docs/dev/debt/libc.md#L65-L65) names ASTRO BOT, PPSA21564 and #3480 as the reason for the behaviour. As oneandonlydean noted, debt entries describe behaviour and its unknowns. This is a symptom of blocking finding 2. 3. **Test name and scope.** `core/libs/tests/AsobiRootEnvironment.cpp` is named after one engine's variable and only checks the seeded value. A generic environment property, such as a start-up state measured on the console, belongs in the existing `guest_environment` test. ## Not verified - No title was run (PPSA21564 or PPSA21567), and I have no title binary to read, so I cannot confirm or refute the `getenv` claim myself. - Windows was not built or tested. - I did not build or test a conflict-resolved merge with `main`. The checks above ran on the PR head at its old base. - I did not run the full test suite, only the two environment tests. ## To get this to a good state - Rebase onto current `main`. - Show that the title actually needs the variable on current `main`, with a log of PPSA21564 or a disassembly of the `getenv` call. If the title only uses `%ASOBI_ROOT%` inside `/host/...` paths, as #3480 and the static read suggest, the fix belongs in the path resolver as general `%VAR%` handling, which would be a separate PR. - If some start-up environment is needed, take its contents from the console (measured and recorded in `docs/dev/debt/libc.md`) or from an opt-in in the launcher, not from a libc default. Keep `environ` consistent with `getenv`.
MarcZX10 commented 2026-11-23 02:36:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T02:36:16Z.

Review: APPROVED


Reviewed — looks good

Nothing in the inspected changes shows a verified blocking defect; the change seeds ASOBI_ROOT=app0 in the guest environment and tests its default and override behavior.

What I ran

  • Reviewed head 783fa9b83f5f0ac617d4b0f05321a34c1279cb7f.
  • Read description.md, commits.md, manifest.json, diff.patch, and all four changed files listed in the manifest.
  • No build or tests were run; repo_read.py was used for repository reads.

Results

Check Result Note
Diff and changed-file review passed All four changed files read
Build and tests not run Author reports Windows build and tests
Runtime title behavior not run Title not rerun per description

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • Build and test results reported in the PR description were not independently verified.
  • ASTRO BOT startup and behavior on console hardware were not tested.
  • files.json was not available through the reader; the manifest lists four changed files, and all four were read.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6015959473 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7715#pullrequestreview-6015959473). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T02:36:16Z. **Review:** APPROVED --- # Reviewed — looks good Nothing in the inspected changes shows a verified blocking defect; the change seeds `ASOBI_ROOT=app0` in the guest environment and tests its default and override behavior. ## What I ran - Reviewed head `783fa9b83f5f0ac617d4b0f05321a34c1279cb7f`. - Read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, and all four changed files listed in the manifest. - No build or tests were run; `repo_read.py` was used for repository reads. ## Results | Check | Result | Note | |---|---|---| | Diff and changed-file review | passed | All four changed files read | | Build and tests | not run | Author reports Windows build and tests | | Runtime title behavior | not run | Title not rerun per description | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified - Build and test results reported in the PR description were not independently verified. - ASTRO BOT startup and behavior on console hardware were not tested. - `files.json` was not available through the reader; the manifest lists four changed files, and all four were read. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 13:36:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:36:40Z.

Review: COMMENTED


Built the branch sources against the existing Linux runtime. The focused ASOBI_ROOT environment fixture passed.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6170841757 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7715#pullrequestreview-6170841757). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T13:36:40Z. **Review:** COMMENTED --- Built the branch sources against the existing Linux runtime. The focused ASOBI_ROOT environment fixture passed. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/7715:upstream-pr/7715'
git switch 'upstream-pr/7715'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/7715'
git switch 'upstream-pr/7715'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/7715'
git switch 'upstream-pr/7715'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/7715'
git switch 'main'
git merge --squash 'upstream-pr/7715'
git switch 'main'
git merge --ff-only 'upstream-pr/7715'
git switch 'main'
git merge 'upstream-pr/7715'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7715
No description provided.