fix(libc): provide ASOBI_ROOT environment variable for title path resolution #7715
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7715"
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?
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_ROOTthroughgetenvto build its asset paths; without it the sound configuration never loads and start-up stops at the title's own assertion:(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 includinglibs:asobi_root_environment(default value,setenvoverride, absent variable) andguest_environmentpass.python tools/check_conventions.py --base origin/mainpasses;tools/pr_overlap.pywas 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
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)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: yourasobi_root_environmenttest sits alongsidemain's newerguest_dinkumware_atomicsregistration, 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 knownmainregressions (agc_driver_tessellation— Mesa, #5444;agc_driver_bda_device— #7584), neither from this PR.To pick it up:
Head is
fd377744e.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 now439b5d6dd). Also, the verification on the corrected head showed a third knownmainregression beyond the two in the original comment:agc_driver_image_table_vouched_lookupsfails on RADV since the #6454 merge — bisected and filed as #7766, not from this PR. The handoff itself is green apart from the three knownmainregressions (#5444 Mesa, #7584 BDA, #7766 image-table vouch).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:
ASOBI_ROOTthrough 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 readsASOBI_ROOTthroughgetenv, with no source, and the title was not rerun with this build. Please show the title getting pastSoundManager.cpp:306with this change (log), or evidence (disassembly/import trace) that it callsgetenv("ASOBI_ROOT").getenvreturns the value the PR seeds, so it would not catch the fix being ineffective. Theapp0value 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/hosttranslation layer, as #3480 suggests, that is a different change. Alsocore/libs/prx/libc/CMakeLists.txtconflicts with main (test registration); please rebase when you update.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 withmain's newguest_dinkumware_atomicstests, unioned (both blocks registered; the sharedif(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_environmentandguest_dinkumware_atomicsboth pass; full suite green apart from the four knownmainregressions (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR; conventions pass.To pick it up:
Head is
3e221b62a.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:
ASOBI_ROOTthrough 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 callinggetenv("ASOBI_ROOT"). Please attach either a log of the title getting pastSoundManager.cpp:306with this change, or an import trace/disassembly of thegetenvcall.core/libs/tests/AsobiRootEnvironment.cpponly reads back the value the PR seeds, so it passes whether or not the fix helps the title. Theapp0value follows a homebrew convention and is not measured on the console.core/libs/prx/libc/CMakeLists.txtconflicts with main again (test registration); rebase when you update.If the real behaviour is
%VAR%handling at the/hosttranslation layer, that is a different change.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 readsASOBI_ROOTthroughgetenv.What I ran
783fa9b83f5f0ac617d4b0f05321a34c1279cb7f(based on376c040294370ce7de355485947d5d00a9417e29)main:b433c40f2f46aa2e59e19806010a839ac8572d64BUILD_TESTING=ON, a clean worktree; build and tests ran in a sandbox without network access.Results
maincore/libs/prx/libc/CMakeLists.txtanddocs/dev/debt/libc.mdgit diff --checkcheck_conventions.py --base origin/mainAll conventions checks passed.asobi_root_environment,guest_environmentasobi_root_environmentfails (Subprocess aborted)Merge conflict (test registration)
In
CMakeLists.txt, the newasobi_root_environmentblock collides with theguest_dinkumware_atomicsandguest_dinkumware_internalsregistrations thatmainhas added afterguest_environment. Indocs/dev/debt/libc.md,mainhas reordered and rewritten the surrounding entries. Thegetenventry is now at line 158 onmain.Tests on the PR head
Negative control
I restored
core/libs/prx/libc/src/Environment.cppfrom the PR's base (376c040294).main's copy includes headers that do not exist at that base and did not compile there. I rebuilt, andasobi_root_environmentaborted, 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
Conflict with
main. The head still conflicts incore/libs/prx/libc/CMakeLists.txtanddocs/dev/debt/libc.md, so the checklist line "Based on currentmain" does not hold. blawesom's rebase handoffs (3e221b62a) were not picked up, andmainhas moved on since. Please rebase onto currentmain.Title-specific default in a libc-wide path.
Environment.cpp:24-31seedsASOBI_ROOT=app0into 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.The premise is not supported, and the evidence posted here points the other way. The description says the title reads
ASOBI_ROOTthroughgetenv, but it gives no source, and the title was not rerun. In this thread:getenv,setenvorputenvimports and no plain"ASOBI_ROOT"string. Every occurrence is a literal/host/%ASOBI_ROOT%/...or Windows tool path.mainwithout the change and did not hit theSoundManager.cpp:306assertion.%VAR%expansion in the path resolver (ExpandEnvironmentVariables()wired intoResolve()), not agetenvvalue.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
getenvandenvironnow disagree. libkernel'senvironis still empty (Process.cpp:217-218), whilegetenv("ASOBI_ROOT")returnsapp0. The updated debt line still says the environment "starts empty, like theenvironlibkernel exports". A title that walksenvironwould not see a variable thatgetenvreports. This goes away if the seeding is dropped. If it stays, both views need the same contents.docs/dev/debt/libc.md:65names 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.core/libs/tests/AsobiRootEnvironment.cppis 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 existingguest_environmenttest.Not verified
getenvclaim myself.main. The checks above ran on the PR head at its old base.To get this to a good state
main.main, with a log of PPSA21564 or a disassembly of thegetenvcall. 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.docs/dev/debt/libc.md) or from an opt-in in the launcher, not from a libc default. Keepenvironconsistent withgetenv.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=app0in the guest environment and tests its default and override behavior.What I ran
783fa9b83f5f0ac617d4b0f05321a34c1279cb7f.description.md,commits.md,manifest.json,diff.patch, and all four changed files listed in the manifest.repo_read.pywas used for repository reads.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
files.jsonwas 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.
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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.