Skip to content

fix(runtime): give a desktop app's shells a temp folder of their own - #64

Merged
winlp4ever merged 3 commits into
feat/electron-real-appsfrom
fix/vscode-confined
Oct 11, 2026
Merged

winlp4ever merged 3 commits into
feat/electron-real-appsfrom
fix/vscode-confined

Conversation

@winlp4ever

Copy link
Copy Markdown
Contributor

Stacked on #63 (retarget to the epic once #63 is merged). The VS Code real-app pass, its safe fixes only.

Found on confined VS Code

  • It quit at once, silently (exit 1): its instance socket in its data folder, inside the sandbox, went past macOS's 104-character socket path under the driver's output folder. Real installs: 88 + the user's name long in ~/.kiframe (95 here): a stated limit (BACKLOG, FAILURE-CATALOGUE feat(compositor): draw the background image in the preview and the export #25). The driver now uses a short /tmp/kf-* work folder.
  • Its zsh said "can't create temp file" on camera: zsh writes here-docs under /tmp/zsh, denied. TMPPREFIX now points into the sandbox temp for every desktop app (feat(desktop): show the agent thinking among its steps, then for how long #27; a fixture probe, fails with the fix taken out).
  • With KIFRAME_ELECTRON_DEBUG, the app's own output and exit code go to Kiframe's stderr (how the quit was found).

Left for a reviewed design (BACKLOG)

Verified

Kif on confined VS Code opened the demo folder, greet.ts, ran cat package.json in its terminal (neutral prompt), recorded once full screen. pnpm check green.

zsh writes here-docs under /tmp/zsh, which the confinement denies: VS Code's
shell (read at its start, and its terminal's integration) said "can't create
temp file" on camera. TMPPREFIX now points into the sandbox's temp for every
desktop app. With KIFRAME_ELECTRON_DEBUG, the app's own output and exit code
are written to Kiframe's stderr (how VS Code's silent quit was found).
An app's socket in its sandbox must fit macOS's 104 characters: VS Code quit
at once under the run's own output folder. Runs use /tmp/kf-*, removed at exit;
the Check outcomes "quit" and "the site" end the wait too.
Socket path length (stated limit), shell temp files (fixed), grounding in an
editor, and two items left for a reviewed design: a desktop take refused when
the window is smaller than its viewport, and the guard's way back from a site.
@winlp4ever

Copy link
Copy Markdown
Contributor Author

Merged by mistake into #63's branch (feat/electron-real-apps), so it never reached the epic. The same change is in #65, onto epic/electron-targets.

winlp4ever added a commit that referenced this pull request Oct 11, 2026
…64) (#65)

* fix(runtime): give a desktop app's shells a temp folder of their own

zsh writes here-docs under /tmp/zsh, which the confinement denies: VS Code's
shell (read at its start, and its terminal's integration) said "can't create
temp file" on camera. TMPPREFIX now points into the sandbox's temp for every
desktop app. With KIFRAME_ELECTRON_DEBUG, the app's own output and exit code
are written to Kiframe's stderr (how VS Code's silent quit was found).

* fix(scripts): give real-app runs a short work folder

An app's socket in its sandbox must fit macOS's 104 characters: VS Code quit
at once under the run's own output folder. Runs use /tmp/kf-*, removed at exit;
the Check outcomes "quit" and "the site" end the wait too.

* docs(backlog): record the VS Code pass and its open items

Socket path length (stated limit), shell temp files (fixed), grounding in an
editor, and two items left for a reviewed design: a desktop take refused when
the window is smaller than its viewport, and the guard's way back from a site.
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