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.
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.
Deleting a config-sourced SSH target had no lasting effect: the Manage-SSH pane
re-imports ~/.ssh/config on open, and the import was a pure upsert with no record
of deletions, so the just-deleted host was re-inserted verbatim from the config
that still exists on disk.
Persist a `deletedSshConfigAliases` tombstone set:
- Deleting a config-managed target (source 'ssh-config', or an adopted legacy
import) records its alias; manual targets are never tombstoned.
- The passive on-open sync skips tombstoned aliases, so a deleted host stays
deleted.
- Re-adding or editing a target reclaims its alias, and the explicit Import
action (`reAdopt`) clears all tombstones to deliberately re-adopt config.
This also fixes the edit-then-reappear case: editing a config host to `manual`
already reserved its current alias, and reclaim covers alias changes.
* fix(github): route PR merges through repo owner
- Use repo-owner runtime settings before source-context overrides in PR actions
- Keep headless/runtime repos on runtime RPC instead of local gh:mergePR
- Add source-boundary coverage for merge routing and Windows-safe newline matching
* fix(github): preserve repo-owner merge routing
- Apply task-source runtime overrides only when they resolve to a runtime host
- Keep runtime-owned repos from being downgraded to local gh:mergePR
- Guard the routing contract with source-boundary coverage
- Important because non-runtime source contexts could recreate the issue #6957 access-denied path
* test(github): add behavioral regression test for repo-owner merge routing
Mirrors PRActionsPanel's merge-routing decision through the real
repo-runtime-owner/task-source helpers so a revert to source-only
routing (issue #6957) fails here. Covers the runtime-owned repo with a
local GitHub source view and the local-repo-while-runtime-focused case.
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
The relocated daemon runs from userData\daemon-host\<ver>\, outside the
install dir, so the NSIS updater's path-based process kill (image path under
$INSTDIR) correctly spares it. But CHECK_APP_RUNNING has a second, name-based
branch (`taskkill /IM Orca.exe`, used in the per-user and PowerShell-unavailable
paths) that matches by image name. The relocated copy was still named Orca.exe,
so that branch killed it — the first survival run confirmed the daemon died on
update despite running from userData.
Rename the copied Electron host to a distinct image name so no name-based branch
matches. Belt-and-suspenders: the distinct name defends the name kill, the
userData path defends the path kill. Renaming only the exe is safe — run-as-node
is env-triggered, an embedded signature survives a rename, and the harness
identifies the daemon by its daemon-entry.js command line, not image name.
Regression guard for the runtime-agent-list fix: asserts the composer's
detectedAgentList selector and detection effect resolve SSH -> runtime ->
local in that order, so a runtime-owned repo shows the paired runtime's
agents instead of the local machine's.
Co-authored-by: Orca <help@stably.ai>
* feat(ai-vault): add OMP sessions to the AI Vault session browser
Adds OMP ("Oh My Pi") to the AI Vault/Agents catalog so historical
.omp/agent/sessions/**/*.jsonl transcripts are discovered, parsed, and
resumable from the right-sidebar session browser — locally and over SSH.
- Discovery mirrors Pi (OMP_CODING_AGENT_DIR env, WSL home roots, per-agent
limit) in both the local scanner and the remote/SSH scanner.
- Parses OMP's message-graph JSONL via the shared graph parser (new
MessageGraphAgent type), capturing the model from model_change.model (OMP's
key, not Pi's modelId) or the assistant message, and tokens from usage.
- Routes OMP through the incremental parse cache so ~5s rescans resume from
the last byte instead of re-reading whole transcripts.
- Resumes by absolute transcript path (`omp --resume <path>`) so it resolves
regardless of which session-dir root (custom OMP_CODING_AGENT_DIR / WSL
store) the file was discovered under; threaded through both the scanner and
the renderer's local resume/copy rebuild.
- Renderer reuses the existing OmpIcon/catalog/grouping; adds overflow-x-hidden
so long worktree chips never widen the sidebar.
Generalizes normalizePiSessionsDir -> normalizeAgentSessionsDir. Verified
end-to-end against 10 real ~/.omp transcripts and rendered in the app.
Co-authored-by: gatsby74 <166927047+gatsby74@users.noreply.github.com>
* fix: make AI Vault parse-cache agent switch explicit
---------
Co-authored-by: gatsby74 <166927047+gatsby74@users.noreply.github.com>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Phase 1 of Windows terminal update-survival. On win32 packaged, the
terminal daemon is now forked from a copy of the Electron runtime staged
under userData/daemon-host/<version> (run as node, ELECTRON_RUN_AS_NODE),
so its process image and all loaded modules live outside the install dir
the NSIS updater deletes and force-closes. Keeping the Electron binary
(not stock node.exe) means run-as-node behavior is byte-identical — no
console flashing, asar-correct — which the reverted #7473 attempt broke.
Proven on CI by tools/daemon-relocation-spike: a copied Orca.exe boots
the daemon, drives a real ConPTY session, and holds zero loaded-module
handles into the install dir, on the minimal file set.
- daemon-host-relocation.ts: materialize (atomic staging + marker-last +
fail-open), version-keyed dir, PID-pinned GC of old versions.
- daemon-init.ts: fork from the relocated exe/entry when available;
byte-identical in-dir fork otherwise (non-win32, dev, or fail-open).
- Adoption-neutral: protocol/pipe unchanged; a new app still adopts an
old in-dir daemon.
- win-update-survival-e2e.yml: builds a branch installer and runs the
harness with --expect survival to prove sessions survive an update.
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.
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.
oxlint already fails any file over max-lines that is not suppressed, so the
only way to grow past the budget is to add an eslint/oxlint-disable max-lines
comment or a per-file max-lines bump in mobile/.oxlintrc.json. This adds a CI
gate that freezes the current set of suppressions (config/max-lines-baseline.txt,
355 grandfathered entries) and fails the build when a NEW one appears — with a
loud, actionable message pointing at 'split the file'. Existing oversized files
are untouched; the baseline may only shrink (pnpm check:max-lines-ratchet --prune).
Wired into the root lint script and as a dedicated pr.yml step. Unit-tested
(15 cases) and verified against all three failure paths + clean-tree pass.
Co-authored-by: Orca <help@stably.ai>
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.
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.
retainedAgentsByPaneKey snapshots a completed agent (a full AgentStatusEntry
— up to ~24KB of prompt/message text — plus a TerminalTab) per ephemeral
paneKey. paneKeys never recur, and the map is pruned only on worktree removal
or manual dismissal, so a long-lived worktree in a busy multi-agent /
orchestration session grows it without bound. This is the dominant
large-payload driver of the renderer JS-heap OOM seen in the Windows crash
bundles (heap climbing to the 3586 MB V8 old-space limit under continuous
multi-agent work).
Cap the map with insertion-order (== retention-order) FIFO eviction, mirroring
capRecordByInsertionOrder in github.ts: the newest completions survive; the
oldest simply stop showing in the recently-completed overlay. retainAgents is
the only path that grows the map, so capping there fully bounds it.
Adds a leak regression test that drives the production retainAgents path with
distinct ephemeral paneKeys and asserts the map stays bounded — fails before
this change (grows to N), passes after (capped at MAX_RETAINED_AGENTS).
Co-authored-by: Neil <neil@stably.ai>
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.
- 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.