Commit Graph
32 Commits
Author SHA1 Message Date
Jinwoo Hong 495208e6f3 Merge remote-tracking branch 'origin/main' into Jinwoo-H/windows-update-survival
# Conflicts:
#	src/main/daemon/daemon-init.ts
2026-07-06 22:04:14 -04:00
Jinwoo Hong 443092618b fix(win-update-e2e): baseline pre-update echo on the idle shell before startMarker
The pre-update echo probe ran after startMarker began the foreground while-loop,
so it always logged 'interactive: false' (a command can't execute against a
running loop). Move it before the marker so the baseline reflects real input
health on the idle shell.
2026-07-06 21:47:50 -04:00
Jinwoo Hong 617d1d9c24 fix(win-update-e2e): measure marker survival and typed-input in the right order
The survival profile sampled two signals at the wrong moment, so a genuinely
surviving session failed the table:

- "marker process still alive" was read AFTER probeCtrlCInterruptsMarker
  deliberately Ctrl+C-broke the foreground heartbeat loop. Sample it before the
  interrupt, while the loop still proves the pre-update shell alive.
- "typed input echoes" typed a command WHILE the infinite `while($true)` marker
  loop still owned the shell, so it could never execute regardless of input
  health. Run the echo probe after the interrupt returns the shell to a prompt.

Reorder to: heartbeat-advanced -> marker-alive -> Ctrl+C-interrupt -> echo. Also
log the marker pid + alive-after-update for transparency. No assertion changes;
this only fixes when each is measured.
2026-07-06 21:47:04 -04:00
Jinwoo Hong c73f17668c diag(win-update-e2e): log daemon exe paths, pre-daemon survival, and daemon.log for survival profile 2026-07-06 21:11:08 -04:00
Jinwoo Hong 65f5a1b9f4 spike(daemon-relocation): submit echo with CR + strip ANSI before match
The relocated ConPTY host works on all tiers (real pwsh prompt + data
frames from the relocated conpty.dll). The only remaining failure was the
spike client: it wrote the command with a trailing CRLF, which PSReadLine
treats as a soft newline (multiline continuation) so the command was typed
but never submitted. Write a lone CR (Enter) instead, and match against the
ANSI-stripped stream since ConPTY interleaves the executed marker with
cursor-move / SGR codes.
2026-07-06 20:44:49 -04:00
Jinwoo Hong 0f8b455163 spike(daemon-relocation): add ConPTY echo diagnostics + daemon log
The relocation mechanism is proven (all tiers: daemon ready, main module =
copy, zero app-dir module handles). The only remaining failure is a pty
echo timeout with empty output and empty daemon stdout/stderr — no window
into what the ConPTY session did. Instrument the failure path:

- pass --log-file to the daemon fork so its session lifecycle events
  (session-created / session-exited / uncaught-exception-suppressed) are
  captured and dumped alongside stdout/stderr on failure.
- client now records the createOrAttach response, per-session data-frame
  counts, exit events, a raw stream sample, and a listSessions probe on
  timeout, and surfaces them via err.diagnostics so the CI log alone
  classifies "no session" vs "silent session" vs "output but no match".
- force powershell.exe and add a short pre-write delay so the shell is
  ready before the command is typed.
2026-07-06 20:31:05 -04:00
Jinwoo Hong 202a5ac0de spike(daemon-relocation): dump daemon stderr + copied tree on failure for diagnosis 2026-07-06 20:13:46 -04:00
Jinwoo Hong cd0b9b459a spike(daemon-relocation): fix node-pty copy path — mirror full win-unpacked layout
node-pty is packaged at resources/node_modules/node-pty (a sibling of
app.asar.unpacked, not under it), so computing its copy dest relative to the
app.asar.unpacked root produced a mangled '\-pty' path and the relocated
daemon crashed on require('node-pty') (exited before ready, all tiers). Make
every copy destination relative to the win-unpacked root so the layout is
mirrored verbatim and the require walk from daemon-entry finds
resources/node_modules/node-pty exactly as in the packaged app. Also pass
--keep-work-dir in CI so per-tier daemon logs survive for the artifact.
2026-07-06 20:09:15 -04:00
Jinwoo Hong a06175fa1d spike(daemon-relocation): find minimal Electron run-as-node file set on CI
Phase 1 groundwork. tools/daemon-relocation-spike copies a candidate set
of a packaged win-unpacked build to a relocated dir, forks the copied
Orca.exe as node (ELECTRON_RUN_AS_NODE), drives a real ConPTY session
through the daemon protocol, and probes the daemon's loaded modules to
confirm none resolve back into the app dir (the file-lock test). Three
tiers (full / no-gpu / minimal) find the smallest working set. The CI
workflow builds the unpacked app once (cached) and runs all tiers.
2026-07-06 19:59:38 -04:00
Jinwoo Hong 10f41e370f fix(win-update-e2e): escape \$ for the outer shell so nested-pwsh loops actually run 2026-07-06 18:46:00 -04:00
Jinwoo Hong e4bff4b32b fix(win-update-e2e): wait for the visible .xterm container, not a hidden duplicate 2026-07-06 18:36:54 -04:00
Jinwoo Hong 1fbde69712 fix(win-update-e2e): dismiss Got-it feature-tip modal before typing; restore createTerminalTab import 2026-07-06 18:29:07 -04:00
Jinwoo Hong f4cd9e35aa fix(win-update-e2e): focus terminal by click, target visible surface, no-create on relaunch 2026-07-06 18:20:47 -04:00
Jinwoo HongandOrca 417723411e perf(source-control): stop gh rate-limit storms and idle git-status spawn churn (#7595)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 15:12:56 -07:00
Jinwoo Hong 0a13fc0dad feat(win-update-e2e): dismiss post-creation overlays, use the created terminal directly 2026-07-06 18:11:10 -04:00
Jinwoo Hong 776be625c8 feat(win-update-e2e): submit worktree composer via Create button prefix / Ctrl+Enter 2026-07-06 18:04:02 -04:00
Jinwoo Hong 311eba844d feat(win-update-e2e): select Blank Terminal mode and click Create worktree in composer 2026-07-06 17:58:53 -04:00
Jinwoo Hong 6d8cf51a48 feat(win-update-e2e): seed a project + drive workspace creation to reach a terminal
CI diagnostics showed the onboarding seed works but the app then sits at
"No workspaces found" - a terminal needs a project + workspace, and "Add
Project" is a native dialog Playwright cannot drive. So seed a throwaway
git repo into orca-data.json as a project (first launch only, to avoid
clobbering the persisted session the relaunch restores), and drive the
in-app "New workspace" composer to create a worktree whose default tab is
a terminal.
2026-07-06 17:52:31 -04:00
Jinwoo Hong c1a25c8b3a feat(win-update-e2e): onboarding seed + fail-fast driving + failure diagnostics
- Seed a completed-onboarding profile into userData before launch so the
  fullscreen onboarding overlay stops blocking the terminal UI.
- ensureTerminal(): create a terminal from a fresh profile rather than
  waiting for a pre-existing surface that never appears.
- Wrap the whole run in try/catch/finally: a driving failure now captures
  a screenshot + DOM/store diagnostics and ALWAYS tears down (close app,
  uninstall), then force-exits — turning a 30-min CI job timeout into a
  ~2-min readable failure. Workflow uploads the diagnostics.
2026-07-06 17:41:51 -04:00
Jinwoo Hong 071d9884fd fix(win-update-e2e): commit the isolation-mode modules the harness imports
registry-shortcut-backup.mjs was untracked, so run.mjs (which imports it
unconditionally) crashed on CI with ERR_MODULE_NOT_FOUND before reaching
the install/drive steps. Commit it plus the cli-args/preflight/README
changes that complete the (developer-machine only) isolated-install mode.
2026-07-06 17:06:13 -04:00
Jinwoo Hong 95415014e4 ci: add manual Windows update-survival E2E workflow + harden harness uninstall
Adds .github/workflows/win-update-e2e.yml (workflow_dispatch): on a clean
windows-2022 runner, downloads two release installers, runs the
update-survival harness, and uploads the output log. A CI runner is the
only safe home for install-based testing — electron-builder oneClick
uninstalls the registry-registered app before every install, so running
the harness on a machine with a real Orca install deletes it.

Also hardens the harness against that exact hazard: silentUninstall now
requires an explicit install directory (no scan-and-discover fallback)
and refuses the default per-user location unless a caller that owns the
install opts in; non-isolated teardown uninstalls only the exact dir it
installed into.
2026-07-06 16:43:48 -04:00
Jinwoo Hong d2d0d4325d feat(daemon): Phase 0 update-survival groundwork — daemon file log + packaged-update proof harness
Two independent pieces, no behavior change to terminal handling:

1. Daemon lifecycle file log. The detached daemon runs with stdio
ignored, so field failures have zero daemon-side evidence. The daemon
now writes rotated NDJSON lifecycle events (startup/ready/hello
accept+reject/session create/attach/exit/kill/shutdown/uncaught
exceptions) to logs/daemon.log via a new optional --log-file fork arg.
Fail-open (any fs error disables logging), adoption-neutral (old
daemons without the arg keep working, protocol untouched), and the
diagnostic bundle collector now includes the file, bounded by the same
lookback window as trace spans.

2. tools/win-update-e2e: a packaged NSIS update proof harness. Installs
version N, drives the installed app (isolated userData), plants a
canary marker session, silently updates to N+1, relaunches, and
asserts an explicit expectations profile: --expect cold-restore
(today's behavior) or --expect survival (the Phase 1 target). Window
flashes are detected by baseline-diffed window enumeration with
canary-title attribution; daemons are identified by command-line
marker, never exe name. Refuses to run when a pre-existing Orca app is
running or (without --allow-existing-install) installed, and only
uninstalls an install it fully owns.
2026-07-06 04:12:58 -04:00
Jinwoo Hong 3b081c11e0 Revert "feat(daemon): Phase 0 update-survival groundwork — daemon file log + packaged-update proof harness (#7532)" (#7535)
This reverts commit e9b9836da5.
2026-07-06 01:12:37 -07:00
Jinwoo Hong e9b9836da5 feat(daemon): Phase 0 update-survival groundwork — daemon file log + packaged-update proof harness (#7532)
Two independent pieces, no behavior change to terminal handling:

1. Daemon lifecycle file log. The detached daemon runs with stdio
ignored, so field failures have zero daemon-side evidence. The daemon
now writes rotated NDJSON lifecycle events (startup/ready/hello
accept+reject/session create/attach/exit/kill/shutdown/uncaught
exceptions) to logs/daemon.log via a new optional --log-file fork arg.
Fail-open (any fs error disables logging), adoption-neutral (old
daemons without the arg keep working, protocol untouched), and the
diagnostic bundle collector now includes the file, bounded by the same
lookback window as trace spans.

2. tools/win-update-e2e: a packaged NSIS update proof harness. Installs
version N, drives the installed app (isolated userData), plants a
canary marker session, silently updates to N+1, relaunches, and
asserts an explicit expectations profile: --expect cold-restore
(today's behavior) or --expect survival (the Phase 1 target). Window
flashes are detected by baseline-diffed window enumeration with
canary-title attribution; daemons are identified by command-line
marker, never exe name. Refuses to run when a pre-existing Orca app is
running or (without --allow-existing-install) installed, and only
uninstalls an install it fully owns.
2026-07-06 01:09:54 -07:00
Jinwoo Hong 2f3c7e8660 Fix Windows slow startup and multi-minute UI freezes (#7225) (#7266) 2026-07-03 19:40:45 -04:00
Jinwoo Hong 2ce9314acb Improve Windows terminal performance: retain WebGL contexts, warm first ConPTY (#7085) 2026-07-02 18:41:23 -04:00
Neil f9e18910ae chore(lint): adopt unicorn/prefer-import-meta-properties (error) (#6847)
Migrate fileURLToPath(import.meta.url) / dirname(...) boilerplate to the
native import.meta.dirname / import.meta.filename, then enable the rule
at error so new code stays on the native form.

The oxlint autofix rewrites the expression but leaves the now-unused
node:url / node:path imports behind (which the already-enabled
no-unused-vars=error would then flag), so this commit also removes those
34 orphaned imports — trimming the named import where other names are
still used, deleting the line where it was the sole import.

Scope is build scripts + Node-env tests only (config/scripts, tools/
benchmarks, *.test.{ts,mjs}, vitest configs); zero shipped runtime code.
The native properties are exact equivalents (Node >= 20.11; repo is on
24), so behavior is unchanged.

Verified: oxlint 0 errors tree-wide (root + mobile), oxfmt clean,
typecheck (node+cli+web) + mobile tsc pass, root vitest 22825 passed /
0 failed, mobile vitest 1018 passed. Exercised the rewritten scripts
directly: build:relay (6 targets), ensure-native-runtime,
verify-macos-entitlements all run correctly with import.meta.dirname.
2026-06-29 23:37:30 -07:00
Neil 380db44d77 Measure and batch restored terminal startup (#6836) 2026-06-29 20:37:26 -07:00
Jinwoo Hong 4daf409776 perf(windows): avoid blocking daemon pid checks (#5137) 2026-06-10 21:32:41 -04:00
Jinwoo Hong 5f6b454c3a perf(windows): fix 60s startup ACL walk and OpenCode streaming freeze, with benchmark harnesses (#5124) 2026-06-10 16:41:22 -04:00
Jinwoo HongandOrca 20c4ee7895 Suppress macOS renderer teardown crash reports (#4655)
Co-authored-by: Orca <help@stably.ai>
2026-06-04 13:02:51 -07:00
Jinwoo HongandOrca 0f54103dda Add native computer-use automation (#1683)
Co-authored-by: Orca <help@stably.ai>
2026-05-11 14:20:08 -07:00