YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
test(e2e): watch Windows crash reports
Louis Beaumonta3d0d219db1a
diff --git a/apps/screenpipe-app-tauri/e2e/README.md b/apps/screenpipe-app-tauri/e2e/README.mdindex eb34db86c..67e813f17 100644--- a/apps/screenpipe-app-tauri/e2e/README.md+++ b/apps/screenpipe-app-tauri/e2e/README.md@@ -161,7 +161,7 @@ Saves to `e2e/videos/`.| `home-window.spec.ts` | Opens Home window; clicks through Home, Pipes, Timeline, Help, Settings nav items || `timeline.spec.ts` | Navigates to Timeline; seeds a capture event; verifies at least one frame renders || `windows-core-recording.spec.ts` | Windows opt-in. Enables real vision recording and requires API auth, health/load, audio/device, vision, and search endpoints to stay responsive. In CI it uses `SCREENPIPE_E2E_SEED=onboarding,no-audio` so hosted runners exercise OCR without booting Whisper. When the runner exposes usable desktop frames, it also shows a foreground marker window and verifies OCR indexing/query search plus Timeline frame metadata; hosted runners without frames self-skip those capture-dependent assertions. |-| `windows-system-integration.spec.ts` | Windows-only. Verifies isolated data dir, native DLL/WebView2 runtime, display/DPI topology, localhost-only API binding, process health, Defender visibility, audio service/device health, concurrent local API load, focus churn, and rapid Home-window routing |+| `windows-system-integration.spec.ts` | Windows-only. Verifies isolated data dir, native DLL/WebView2 runtime, display/DPI topology, localhost-only API binding, process health, Defender visibility, audio service/device health, concurrent local API load, focus churn, rapid Home-window routing, and absence of Windows crash-report events during the suite || `hd-recording-pipeline.spec.ts` | macOS opt-in. Starts an HD timer session via `/capture/hd/start`; asserts the controller goes active, a non-empty `hd_*.mp4` chunk is written, and OCR keeps indexing during HD (high-fps + indexing decouple, #3699/#3707) || `settings-sections.spec.ts` | Navigates General → Recording → AI → Speakers settings; verifies content and no crash || `audio-fallback.spec.ts` | macOS opt-in spec for the Screenpipe Cloud → local Whisper fallback alert and `/notify` history |diff --git a/apps/screenpipe-app-tauri/e2e/specs/windows-system-integration.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/windows-system-integration.spec.tsindex 9fc45c97f..938a64e17 100644--- a/apps/screenpipe-app-tauri/e2e/specs/windows-system-integration.spec.ts+++ b/apps/screenpipe-app-tauri/e2e/specs/windows-system-integration.spec.ts@@ -12,7 +12,7 @@import { execFileSync } from "node:child_process";import { existsSync, readdirSync, statSync } from "node:fs";-import { dirname, join } from "node:path";+import { basename, dirname, join } from "node:path";import { E2E_DATA_DIR, getAppPath, getAppPid, WEBDRIVER_PORT } from "../helpers/app-launcher.js";import { authHeaders, fetchJson, getLocalApiConfig, waitForLocalApi } from "../helpers/api-utils.js";import { saveScreenshot } from "../helpers/screenshot-utils.js";@@ -62,6 +62,13 @@ type TimeoutFetchResult = {error?: string;};+type WindowsCrashEvent = {+ timeCreated: string;+ providerName: string;+ id: number;+ message: string;+};+function ps(command: string, timeout = 15_000): string {return execFileSync("powershell.exe",@@ -70,6 +77,10 @@ function ps(command: string, timeout = 15_000): string {).trim();}+function psSingleQuoted(value: string): string {+ return value.replace(/'/g, "''");+}+async function fetchStatusWithTimeout(url: string,timeoutMs = t(3_000),@@ -132,8 +143,10 @@ describe("Windows system integration", function () {this.timeout(180_000);let api: LocalApi | null = null;+ let suiteStartedAtIso = new Date().toISOString();before(async function () {+ suiteStartedAtIso = new Date(Date.now() - 5_000).toISOString();await waitForAppReady();if (!isWindows) return;@@ -465,4 +478,60 @@ $uniqueNames = @($names | Sort-Object -Unique)expect(health.ok).toBe(true);expect(await pageIsAlive()).toBe(true);});++ it("does not emit Windows crash reports for the app during the suite", async function () {+ if (!isWindows || !api) this.skip();++ const appPath = getAppPath();+ const appExe = basename(appPath);+ const json = ps(+ `+$since = [datetime]::Parse('${psSingleQuoted(suiteStartedAtIso)}')+$appExe = '${psSingleQuoted(appExe)}'+$appPath = '${psSingleQuoted(appPath)}'+$hits = @(+ Get-WinEvent -FilterHashtable @{ LogName = 'Application'; StartTime = $since } -ErrorAction SilentlyContinue |+ Where-Object {+ ($_.ProviderName -in @('Application Error', 'Windows Error Reporting')) -and+ (+ ([string]$_.Message -like "*$appExe*") -or+ ([string]$_.Message -like "*$appPath*") -or+ ([string]$_.Message -like '*screenpipe*')+ )+ } |+ Select-Object -First 5 |+ ForEach-Object {+ [PSCustomObject]@{+ timeCreated = $_.TimeCreated.ToString('o')+ providerName = $_.ProviderName+ id = $_.Id+ message = [string]$_.Message+ }+ }+)+if (-not $hits) {+ Write-Output "[]"+} else {+ @($hits) | ConvertTo-Json -Compress+}+`,+ 20_000,+ );+ const parsed = JSON.parse(json) as WindowsCrashEvent | WindowsCrashEvent[];+ const events = Array.isArray(parsed) ? parsed : [parsed];++ if (events.length > 0) {+ const summary = events+ .map(+ (event) =>+ `${event.timeCreated} ${event.providerName}(${event.id}): ${event.message.replace(/\s+/g, " ").slice(0, 240)}`,+ )+ .join("\n");+ throw new Error(`Windows logged app crash events during E2E:\n${summary}`);+ }++ const health = await fetchJson(apiUrl(api, "/health"));+ expect(health.ok).toBe(true);+ expect(await pageIsAlive()).toBe(true);+ });});