Skip to content

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

Merged
winlp4ever merged 1 commit into
epic/electron-targetsfrom
fix/vscode-confined-epic
Oct 11, 2026
Merged

winlp4ever merged 1 commit into
epic/electron-targetsfrom
fix/vscode-confined-epic

Conversation

@winlp4ever

Copy link
Copy Markdown
Contributor

Replaces #64 (merged by mistake into #63's branch, never into the epic): the same commit, cherry-picked onto the epic. 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.

…64)

* 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.
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/runtime/src/electron.ts 77.77% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@winlp4ever
winlp4ever merged commit babbff7 into epic/electron-targets Oct 11, 2026
3 of 5 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