mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 00:57:45 +00:00
* A Claude chat shows the turns made outside it When a Claude chat's agent next opens, turns written to the same conversation elsewhere (claude --resume in a terminal) are appended once, in order, under the existing "Continued outside this chat." divider. Streamed reply and thinking rows are now keyed by their source block (message id and block index), which Claude also saves on each transcript row, so the chat can tell which saved rows it already shows. The read goes back from the end of the transcript only to the chat's saved turn-end leaf, replays the rows through Claude's own translator in an isolated sink, and commits them in one settlement that writes nothing if the chat moved. Imported prompts are display-only and never settle a send; any failure opens the chat normally. * test(claude): name the transcript row shapes the catch-up test builds * fix(claude): read a catch-up row's uuid once as a string * fix(claude): parse transcript tail rows without type assertions * refactor(native-chat): share the catch-up open runner across agents The Codex catch-up's agent-neutral parts move to one module: the open-time envelope (its own deadline and cancellation, never gating the open), the bounded staged batch, the single settlement commit that re-checks the journal before writing, and the "Continued outside this chat." divider. Codex keeps only how it reads its saved turns and what the chat already holds. No behavior change; the other agents' catch-up builds on this instead of copying it. * refactor(claude): catch up through the shared history catch-up runner * chore: remove unrelated pnpm executable metadata * refactor(native-chat): the catch-up runner reads the chat's view only when the agent asks * chore: remove regenerated pnpm executable metadata * fix(native-chat): the catch-up deadline also bounds waiting for its commit to be written A journal write barrier that never settled after the import was admitted held the provider's open past the catch-up deadline. The wait now ends with the deadline or the open's cancellation, like every other step. * test: type the history catch-up sink fixture without assertions * fix(native-chat): bound and revoke history preparation * test(claude): expect source block identity in stream cadence * fix(claude): preserve final output and history coverage * feat(native-chat): validate expected saved items during history catch-up * fix(claude): integrate conditional history settlement * fix(claude): use new content and provider prompt identities for catch-up * fix(claude): retain qualified completed leaves through session exit * fix(claude): preserve unresolved membership for recovered follow-ups * test(claude): use fork epoch reason for rewind preservation * fix(claude): consolidate translator sink type imports * fix(claude): preserve source message times during catch-up * fix(claude): narrow staged history mutations to items * test: bound Claude retained-leaf catch-up work * fix(claude): settle imported work at source boundaries * test(claude): keep shared journal harness portable * test(mobile): await editor listener cleanup before snapshot * test: isolate retained slice measurements and accept closed socket EPIPE
199 lines
12 KiB
JavaScript
199 lines
12 KiB
JavaScript
import { findSqliteRuntimeTests } from './vitest-sqlite-runtime-scan.mjs'
|
|
|
|
// SQLite publication, native bindings, worker IPC, socket liveness, and V8 retention use Node.
|
|
const NODE_RUNTIME_INCLUDE = [
|
|
'src/main/runtime/structured-agent-cli-writers.test.ts',
|
|
'config/scripts/vitest-sqlite-runtime-boundary.test.ts',
|
|
'config/scripts/cloud-security-history-workflow.test.mjs',
|
|
'config/scripts/skill-recipe-shell.test.mjs',
|
|
'src/main/ssh/legacy-relay/ssh-relay-endpoint-incumbent-shell.integration.test.ts',
|
|
'src/main/ssh/ssh-remote-commands.test.ts',
|
|
'src/packages/process-host/src/run-process.test.ts',
|
|
'tests/e2e/cursor-quota-transport.unit.test.ts',
|
|
'tests/e2e/helpers/electron-process-shutdown.unit.test.ts',
|
|
'src/main/ai-vault-search/session-search-index-writer.test.ts',
|
|
'src/main/ai-vault/session-scanner-unlimited-dedup.test.ts',
|
|
// The parse cache persists through node:sqlite.
|
|
'src/main/ai-vault/session-parse-cache-antigravity-upgrade.test.ts',
|
|
'src/main/ai-vault/session-parse-cache-devin-upgrade.test.ts',
|
|
'src/main/ai-vault/session-parse-cache-large-scan.test.ts',
|
|
'src/main/ai-vault/session-parse-cache-metadata-checkpoint.test.ts',
|
|
'src/main/ai-vault/session-parse-cache-persistence.test.ts',
|
|
'src/main/ai-vault/session-scanner-scope-cwd-facts.test.ts',
|
|
'src/main/ai-vault/session-scanner-scope-walk.test.ts',
|
|
// Electron main bridges streams with Node's implementation.
|
|
'src/main/host/electron-http-client.test.ts',
|
|
'src/main/daemon/daemon-init-provider-installation.test.ts',
|
|
'src/main/orcad/orcad-daemon-teardown-linux.test.ts',
|
|
'src/renderer/src/components/terminal-pane/pty-input-write-queue.test.ts',
|
|
'src/renderer/src/lib/react-commit-cascade-observer.test.ts',
|
|
'src/renderer/src/lib/react-commit-cascade-telemetry.test.ts',
|
|
// These reach Node SQLite through a shared helper or a dynamic import, which the scan skips.
|
|
'src/main/claude/claude-transcript-catch-up.test.ts',
|
|
'src/main/claude/claude-transcript-duration.test.ts',
|
|
'tests/e2e/native-chat-startup-option-pickers.unit.test.ts',
|
|
'src/main/ai-vault/session-document-consumer-replacement.test.ts',
|
|
'src/main/ai-vault-search/session-search-dependent-transcripts.test.ts',
|
|
'src/main/ai-vault-search/session-search-list-reparse.test.ts',
|
|
'src/main/ai-vault-search/session-search-transcript-dependencies.test.ts',
|
|
'src/main/native-chat/structured-agent-cli-conversation-adoption.test.ts',
|
|
'src/main/runtime/orchestration-cli-subprocess.test.ts',
|
|
'src/main/runtime/orchestration-mailbox-delivery.test.ts',
|
|
'src/main/runtime/orchestration-mailbox-routing.test.ts',
|
|
'src/main/runtime/worker-terminal-archive-release.test.ts',
|
|
'src/main/runtime/worker-terminal-archive-screen.test.ts',
|
|
'src/main/runtime/worker-terminal-wrap-provenance.test.ts',
|
|
'tests/e2e/cross-version-wire/agent-session-clear-old-client.unit.test.ts',
|
|
'tests/e2e/cross-version-wire/agent-session-clear-old-tab-mirror.unit.test.ts',
|
|
'src/main/acp/acp-structured-host-live-listing.test.ts',
|
|
'src/main/acp/acp-structured-host-configured-default.test.ts',
|
|
'src/main/pi/rpc-session-adapter.test.ts',
|
|
'src/main/pi/rpc-session-startup.test.ts',
|
|
'src/main/acp/acp-structured-publish-at-spawn.test.ts',
|
|
'src/main/acp/acp-structured-omp-recordings.test.ts',
|
|
'src/main/acp/acp-text-stream-identity.test.ts',
|
|
'src/main/acp/acp-text-message-ownership.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-clear-queued-command.test.ts',
|
|
'src/main/acp/acp-structured-sign-in.test.ts',
|
|
'src/main/acp/acp-structured-auth.test.ts',
|
|
'src/main/acp/acp-structured-prompt-failure.test.ts',
|
|
'src/main/acp/acp-timeline-turn-failures.test.ts',
|
|
'src/main/acp/acp-structured-session-adapter.test.ts',
|
|
'src/main/acp/acp-structured-session-adapter-resume.test.ts',
|
|
'src/main/acp/acp-structured-host-start-aborts.test.ts',
|
|
'src/main/acp/acp-conversation-copy.test.ts',
|
|
'src/main/pi/rpc-turn-races.test.ts',
|
|
'src/main/acp/acp-structured-child-session-end.test.ts',
|
|
'src/main/acp/acp-structured-child-stop.test.ts',
|
|
'src/main/acp/acp-structured-child-work-admission.test.ts',
|
|
'src/main/acp/acp-structured-child-work.test.ts',
|
|
'src/main/acp/acp-structured-host-subagent-stop.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-background-stop-unreadable.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-exit-delivery.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-provider-open.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-ready-operation-order.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-message-choices.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-queued-messages.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-send.test.ts',
|
|
'src/main/orcad/serve-profile-ssh-targets.test.ts',
|
|
'src/main/runtime/orca-runtime.test.ts',
|
|
'src/main/runtime/worktree-agent-first-surface.test.ts',
|
|
'src/main/runtime/runtime-client-agent-launch-settings-durability.test.ts',
|
|
'tests/e2e/host-agent-launch-settings-hook-bookkeeping.unit.test.ts',
|
|
'src/cli/**/*.test.ts',
|
|
'src/main/persistence/**/*.test.ts',
|
|
'src/main/persistence*.test.ts',
|
|
'src/main/sqlite/**/*.test.ts',
|
|
'src/main/orca-profiles/**/*.test.ts',
|
|
'src/main/managed-data-accounts/**/*.test.ts',
|
|
'src/main/quit-path-durable-write-blocking.test.ts',
|
|
'src/main/automations/automation-worker-durability.test.ts',
|
|
'src/**/*.node-pty.test.ts',
|
|
'src/**/node-pty-*.test.ts',
|
|
'src/**/*.live-shell.test.ts',
|
|
'src/**/*real-pty*.test.ts',
|
|
'src/**/*-native.test.ts',
|
|
'src/**/*retention*.test.ts',
|
|
'src/**/*lifetime*.test.ts',
|
|
'src/**/*memory*.test.ts',
|
|
'src/**/*allocation*.test.ts',
|
|
'src/**/*expiry*.test.ts',
|
|
'src/renderer/src/lib/flatten-retained-slice.test.ts',
|
|
'src/shared/own-retained-string.test.ts',
|
|
// Times V8 string flattening, which is what Electron main runs.
|
|
'src/main/runtime/terminal-tail-redraw-wall-time.test.ts',
|
|
'src/main/agent-hooks/server-transport-interference.test.ts',
|
|
'src/main/plugins/plugin-worker-supervision.integration.test.ts',
|
|
// Reconciliation loads the real native Parcel watcher; Bun can abort on Linux ARM.
|
|
'src/main/plugins/plugin-service-reconciliation.test.ts',
|
|
'src/main/usage/usage-scan-worker-event-loop.test.ts',
|
|
// Asserts Node's spawn-failure close signal and that a dead worker closes its children's pipes.
|
|
'src/main/worker-thread-child-process/worker-thread-child-process.test.ts',
|
|
'src/main/git/command-runner/worker-exec-file.test.ts',
|
|
'src/main/git/worktree-removal-real-git.test.ts',
|
|
'src/main/git/worktree-list-paths.test.ts',
|
|
'src/main/git/worktree-sparse-checkout.test.ts',
|
|
'src/main/git/worktree-removal-large-tree.bench.test.ts',
|
|
'src/main/runtime/runtime-failed-local-worktree-removal.test.ts',
|
|
'src/main/runtime/runtime-interrupted-local-worktree-removal.test.ts',
|
|
'src/main/local-worktree-removal-recovery-live.test.ts',
|
|
'src/main/rate-limits/codex-rpc-worker-backpressure.test.ts',
|
|
'src/main/computer/macos-native-provider-client.test.ts',
|
|
'src/main/ai-vault-search/session-search-schema.test.ts',
|
|
'src/main/ai-vault-search/session-search-fts5-contract.test.ts',
|
|
'src/main/foreign-sqlite-readers/**/*.test.ts',
|
|
'src/main/browser/*cookie*.test.ts',
|
|
'src/main/browser/cookies/sources/browser-cookie-validation.test.ts',
|
|
// Playwright's CDP transport needs Node's WebSocket implementation.
|
|
'src/main/browser/browser-popup-adapter-compatibility.electron.test.ts',
|
|
'src/main/browser/popup-origin-chrome.electron.test.ts',
|
|
'src/main/browser/browser-link-materialization.electron.test.ts',
|
|
'src/main/browser/browser-popup-compatibility.electron.test.ts',
|
|
'src/main/browser/browser-popup-native-compatibility.electron.test.ts',
|
|
'src/main/browser/browser-popup-background-compatibility.electron.test.ts',
|
|
'src/main/ai-vault/session-scanner-devin-db.test.ts',
|
|
'src/shared/workspace-session-salvage.test.ts',
|
|
'src/main/git/repo-detection.test.ts',
|
|
'src/renderer/src/components/browser-pane/annotate/browser-grab-toast-owner-cleanup.test.tsx',
|
|
'src/main/window/native-chat-paste-files.test.ts',
|
|
'src/main/computer/desktop-script-serve-channel.test.ts',
|
|
'src/main/providers/local-pty-child-process-verdict.test.ts',
|
|
'src/main/providers/working-directory-validation.test.ts',
|
|
'src/main/pty/posix-pty-process-groups.integration.test.ts',
|
|
'src/shared/ephemeral-vm-recipe-output-capture.test.ts',
|
|
'src/main/gitlab/gitlab-known-host-retirement.test.ts',
|
|
'src/main/window/main-window-updater-deferred-setup.test.ts',
|
|
'src/renderer/src/lib/pane-manager/pane-dom-focus-class-sync-lifecycle.test.ts',
|
|
'src/renderer/src/components/terminal-pane/terminal-pane-host-state-memo.test.ts',
|
|
'src/renderer/src/components/automations/use-automation-runs-dashboard-payload.test.tsx',
|
|
'src/renderer/src/components/right-sidebar/parent-pr-checks-projection-selector.test.ts',
|
|
'src/renderer/src/store/github/cache-persistence.test.ts',
|
|
'src/main/native-chat/agent-session-journal/**/*.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-status-feed-conversation-name.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-status-first-input-identity.test.ts',
|
|
'src/main/native-chat/structured-chat-naming.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-outgrown-child.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-permission-mode.test.ts',
|
|
'src/main/native-chat/agent-session-wire/structured-agent-session-queued-legacy-import.test.ts',
|
|
'src/main/runtime/agent-session-conversation-name-store.test.ts',
|
|
'src/main/runtime/structured-session-mail-redrive-wiring.test.ts',
|
|
'src/main/runtime/rpc/ws-transport.test.ts',
|
|
'src/main/runtime/rpc/dispatcher-transport-parity.test.ts',
|
|
'src/main/runtime/rpc/methods/structured-agent-session-visual.test.ts',
|
|
// Bun resolves 'ws' to its built-in client, which bypasses the patched package.
|
|
'src/main/runtime/rpc/ws-empty-payload-frame-write.test.ts',
|
|
'src/shared/remote-runtime-client.test.ts',
|
|
'src/shared/remote-runtime/remote-runtime-connect-bound.test.ts',
|
|
// Bun's built-in ws client ignores maxPayload; the product opener only runs on Node.
|
|
'src/shared/remote-runtime/requests/remote-runtime-request-websocket.test.ts',
|
|
'src/shared/remote-runtime/requests/remote-runtime-subscription-connect-bound.test.ts',
|
|
'src/main/codex/codex-shared-server-probe.test.ts',
|
|
'src/main/opencode/opencode-launch-model-context-supervision.test.ts',
|
|
'src/main/hermes/hermes-config-remote-adapter.test.ts',
|
|
'src/main/ipc/orca-profiles-switch-persistence.test.ts',
|
|
'src/main/ipc/settings-delayed-response.test.ts',
|
|
'src/main/ipc/session-window-view-save.test.ts',
|
|
'src/main/ipc/renderer-shutdown-checkpoint-sleep-records.test.ts',
|
|
'src/main/runtime/structured-agent-session-startup-tab-restore.test.ts',
|
|
'src/main/runtime/structured-agent-session-windowless-layout-host.test.ts',
|
|
'src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts',
|
|
'src/main/runtime/mobile-cloud-relay/relay-control-client.test.ts',
|
|
'src/main/ipc/filesystem-watcher-ignore-real.test.ts',
|
|
'src/main/ipc/runtime-environments/runtime-environment-preference.test.ts',
|
|
// Real fs.watch file bindings; Bun's watcher is not the one Electron runs.
|
|
'src/main/ipc/rebinding-file-watch.test.ts',
|
|
'src/main/ipc/parcel-watcher-shallow-file-subscription.test.ts',
|
|
'src/main/ipc/runtime-environments/runtime-environment-transport-routing-tailscale-hint.test.ts',
|
|
'src/renderer/src/components/emulator-pane/emulator-device-frame-visibility.test.tsx',
|
|
'src/main/claude/claude-agent-sdk-contract-pins.test.ts',
|
|
'config/scripts/profile-state-worker-smoke.test.mjs',
|
|
'config/scripts/process-host-dev-rebuild.test.ts',
|
|
'config/scripts/vitest-node-runtime-boundary.test.ts',
|
|
'config/scripts/vitest-node-runtime-pool.test.ts'
|
|
]
|
|
|
|
export function getNodeRuntimeInclude() {
|
|
return [...NODE_RUNTIME_INCLUDE, ...findSqliteRuntimeTests()]
|
|
}
|