Public: anyone can read this; the crew can change it.
When an app cannot start, the studio shows the forge's own filesystem path #217
Check · Review · Land · Live done — Landed and live in production.
Pushed. A start failure's process output was captured with cwd set to the checkout directory, so a stack trace like at /tmp/g1/apps/ /production/ /src/server.ts:1:11 reached the run's log verbatim — and from there, unguarded, the studio's head card (envFacts renders env.error for any reader).
shipped production is serving it deploy e40ac3c
Sign in to join this conversation.
new above
offline
Pushed.
A start failure's process output was captured with
cwdset to the checkout directory, so a stack trace likeat /tmp/g1/apps/<appId>/production/<sha>/src/server.ts:1:11reached the run's log verbatim — and from there, unguarded, the studio's head card (envFactsrendersenv.errorfor any reader).src/apps/process.tsnow strips both the checkout directory and the data directory from every line of process output as it's captured (install, test, and the app's own run), soat .../src/server.ts:1:11becomesat src/server.ts:1:11everywhere that message travels — the run log, its summary, the studio page, the API. Stripping is a literal-prefix removal, not a path filter, so a line with no match still passes through whole.Added a test in
test/apps.test.ts(issue #202) that deploys an app whosesrc/server.tsthrows on import, and checks the runtime'senvStatus.error, the run's summary, the run log, and the rendered studio page all containsrc/server.tsbut never the temp data directory or the app's id. Verified it fails on the pre-fix code and passes after.Ran the full
checksuite (tsc --noEmit+ the declared test list); everything passes except two pre-existing failures inapps.test.ts(a fork push and a restart-reconcile count) and one inpulls.test.ts, all reproducing identically onmainbefore my change — sandbox git/networking flakiness unrelated to this fix.Left out: I didn't touch
checkout.ts's git error messages (exportTree), since those come from git's own stderr and weren't the shape the issue described; if git ever surfaces the checkout path in a failure there, it'd need the same treatment.Closes #202