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
ci: actually fix the broken workflows — Linux WebKitGTK env, drop dead self-hosted runners, deflake team-crypto
Louis Beaumont41bc387b5dc1
diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.ymlindex 691ca65d4..825858d90 100644--- a/.github/workflows/e2e-test.yml+++ b/.github/workflows/e2e-test.yml@@ -189,19 +189,30 @@ jobs:linux-e2e-test:name: Linux E2E Testsruns-on: ubuntu-latest- # Linux E2E has been continuously red since at least 2026-04-30 with a- # `WebLoaderStrategy::internallyFailedLoadTimerFired()` from WebKit2GTK- # — the home-page render never completes under xvfb, so every spec- # fails its `before all` hook on `openHomeWindow()`. The failure mode- # is platform-specific (WebKit2GTK 4.1 + xvfb + the pre_build steps)- # and is not reproducible on macOS / Windows runners. Until that's- # actually fixed, the job is non-blocking — artifacts (videos +- # screenshots) still upload so anyone investigating Linux gets the- # repro material, but PR merges aren't gated on it. Tracked in- # the e2e-linux investigation thread on the engineering issue board.- continue-on-error: trueenv:RUSTFLAGS: "-C link-arg=-fuse-ld=mold"+ # WebKit2GTK + xvfb workarounds. Without these, WebKit2GTK 4.1+ # raises `WebLoaderStrategy::internallyFailedLoadTimerFired()`+ # during the first navigation and the Tauri webview never+ # renders the app — `[data-testid="home-page"]` never appears,+ # every spec then fails its `before all` hook on+ # openHomeWindow(). The fixes:+ #+ # - WEBKIT_DISABLE_DMABUF_RENDERER=1 — DMABuf compositing wants+ # a real GPU pipeline; on xvfb the buffer pass-through fails+ # silently (timer-fired error above).+ # - WEBKIT_DISABLE_COMPOSITING_MODE=1 — accelerated compositing+ # has no GL backing under xvfb; turning it off forces the+ # software renderer that DOES work.+ # - WEBKIT_FORCE_SANDBOX=0 — the bubblewrap sandbox can't+ # open /proc inside the GH Actions container, blocking the+ # web process from spawning.+ # - LIBGL_ALWAYS_SOFTWARE=1 — belt-and-suspenders; ensures+ # any residual GL paths use llvmpipe.+ WEBKIT_DISABLE_DMABUF_RENDERER: "1"+ WEBKIT_DISABLE_COMPOSITING_MODE: "1"+ WEBKIT_FORCE_SANDBOX: "0"+ LIBGL_ALWAYS_SOFTWARE: "1"steps:- uses: actions/checkout@v4diff --git a/.github/workflows/e2e-windows.yml b/.github/workflows/e2e-windows.ymldeleted file mode 100644index 7bec82930..000000000--- a/.github/workflows/e2e-windows.yml+++ /dev/null@@ -1,121 +0,0 @@-name: Windows E2E Tests--on:- push:- branches: [main]- # Manual trigger- workflow_dispatch:- inputs:- runner:- description: "Runner label (self-hosted runner name)"- required: false- default: "windows-desktop-test"--concurrency:- group: e2e-windows-${{ github.ref }}- # Self-hosted runner; main pushes come faster than the 30+min run, so- # cancel-in-progress on main meant 99/100 runs got cancelled before- # producing any signal. Cancel only PRs, let main finish.- cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}--env:- GIT_LFS_SKIP_SMUDGE: 1--jobs:- e2e-windows:- name: Windows E2E- runs-on: [self-hosted, "${{ inputs.runner || 'windows-desktop-test' }}"]- timeout-minutes: 30- # Only run on main to prevent arbitrary code execution on self-hosted runner- if: github.ref == 'refs/heads/main'-- steps:- - uses: actions/checkout@v4-- - name: System info- shell: powershell- run: |- echo "hostname: $env:COMPUTERNAME"- echo "os: $((Get-CimInstance Win32_OperatingSystem).Caption)"- echo "cpu: $((Get-CimInstance Win32_Processor).Name)"- echo "memory: $([math]::Round((Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory / 1GB))GB"-- - name: Setup Rust- shell: powershell- run: |- if (Get-Command rustup -ErrorAction SilentlyContinue) {- rustup update stable --no-self-update- } else {- Invoke-WebRequest -Uri https://win.rustup.rs -OutFile rustup-init.exe- .\rustup-init.exe -y --default-toolchain stable- Remove-Item rustup-init.exe- $env:PATH = "$env:USERPROFILE\.cargo\bin;$env:PATH"- echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append- }- rustc --version- cargo --version-- - name: Install/update BigBrother CLI- shell: powershell- run: |- $bbDir = "$env:USERPROFILE\Documents\bigbrother"- if (Test-Path $bbDir) {- cd $bbDir- git pull- } else {- cd "$env:USERPROFILE\Documents"- git clone https://github.com/louis030195/bigbrother.git- }- cd $bbDir- cargo build --release -p bb- $bbBin = "$bbDir\target\release"- echo $bbBin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append- & "$bbBin\bb.exe" --version-- - name: Wait for screenpipe to be running- shell: powershell- run: |- $proc = Get-Process -Name "screenpipe*" -ErrorAction SilentlyContinue- if (-not $proc) {- echo "screenpipe not running, attempting to start..."- $appPath = Get-ChildItem "$env:LOCALAPPDATA\screenpipe" -Filter "screenpipe*.exe" -Recurse | Select-Object -First 1- if ($appPath) {- Start-Process $appPath.FullName- Start-Sleep -Seconds 15- } else {- echo "warning: could not find screenpipe executable"- }- }- for ($i = 1; $i -le 30; $i++) {- try {- $response = Invoke-RestMethod -Uri "http://localhost:3030/health" -TimeoutSec 5- echo "health API ready"- break- } catch {- echo "waiting for health API... ($i/30)"- Start-Sleep -Seconds 2- }- }-- - name: Setup Bun- uses: oven-sh/setup-bun@v2- with:- bun-version: latest-- - name: Run E2E tests- id: e2e- shell: powershell- env:- ARTIFACTS_DIR: ${{ runner.temp }}\e2e-artifacts- run: |- bun .github/scripts/e2e/run-all.ts 2>&1 | Tee-Object -FilePath "${{ runner.temp }}\e2e-full.log"-- - name: Upload artifacts- if: always()- uses: actions/upload-artifact@v4- with:- name: e2e-windows-${{ github.run_id }}- path: |- ${{ runner.temp }}\e2e-artifacts\- ${{ runner.temp }}\e2e-full.log- retention-days: 14diff --git a/.github/workflows/windows-longevity-test.yml b/.github/workflows/windows-longevity-test.ymldeleted file mode 100644index 9ac6d400d..000000000--- a/.github/workflows/windows-longevity-test.yml+++ /dev/null@@ -1,281 +0,0 @@-name: Windows CLI Longevity Test--on:- schedule:- # Run every 4 hours (was 6h)- - cron: '0 */4 * * *'- workflow_dispatch:- # Allow manual triggering of the workflow--env:- GIT_LFS_SKIP_SMUDGE: 1--jobs:- test-windows:- runs-on: [self-hosted, Windows, X64]- steps:- - uses: actions/checkout@v4-- - name: Setup Node- uses: actions/setup-node@v4- with:- node-version: 22-- - name: Install Rust- run: |- Invoke-WebRequest https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe -OutFile rustup-init.exe- .\rustup-init.exe -y-- - name: Set up Rust- uses: actions-rust-lang/setup-rust-toolchain@v1- with:- toolchain: stable- override: true- cache: true- rustflags: ""-- - name: Install OpenSSL- shell: powershell- run: |- choco install openssl- openssl version-- - name: Install Scream on Windows- shell: powershell- run: |- Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/4.0/Scream4.0.zip -OutFile Scream4.0.zip- Expand-Archive -Path Scream4.0.zip -DestinationPath Scream- openssl req -batch -verbose -x509 -newkey rsa -keyout ScreamCertificate.pvk -out ScreamCertificate.cer -nodes -extensions v3_req- openssl pkcs12 -export -nodes -in ScreamCertificate.cer -inkey ScreamCertificate.pvk -out ScreamCertificate.pfx -passout pass:-- - name: Setup MSVC Dev Cmd- uses: ilammy/msvc-dev-cmd@v1-- - name: Sign and Install Scream Driver on Windows- shell: powershell- run: |- signtool sign /v /fd SHA256 /f ScreamCertificate.pfx Scream\Install\driver\x64\Scream.cat- Import-Certificate -FilePath ScreamCertificate.cer -CertStoreLocation Cert:\LocalMachine\root- Import-Certificate -FilePath ScreamCertificate.cer -CertStoreLocation Cert:\LocalMachine\TrustedPublisher- Scream\Install\helpers\devcon-x64.exe install Scream\Install\driver\x64\Scream.inf *Scream- timeout-minutes: 5-- - name: Build CLI- run: cargo build --release-- - name: Run CLI and generate activity (4-hour longevity test)- shell: powershell- run: |- $env:RUST_LOG = "debug"- $process = Start-Process -FilePath ".\target\release\screenpipe.exe" -ArgumentList "--debug" -PassThru -RedirectStandardOutput "screenpipe_output.log" -RedirectStandardError "screenpipe_error.log" -NoNewWindow-- # Create a memory log file with headers- "Timestamp,ElapsedMinutes,WorkingSet(MB),PrivateMemory(MB),VirtualMemory(MB),CPU(%)" | Out-File -FilePath "memory_usage.csv"-- $totalDuration = 4 * 60 * 60 # 4 hours in seconds- $startTime = Get-Date- $endTime = $startTime.AddSeconds($totalDuration)-- Write-Host "Starting 4-hour longevity test at $startTime"- Write-Host "Test will end at approximately $endTime"-- # Activity cycle - run this every few minutes- $iteration = 0- while ((Get-Date) -lt $endTime) {- $iteration++- $currentTime = Get-Date- $elapsedMinutes = [math]::Floor(($currentTime - $startTime).TotalMinutes)- $remainingMinutes = [math]::Ceiling(($endTime - $currentTime).TotalMinutes)-- Write-Host "Iteration $iteration - $elapsedMinutes minutes elapsed, $remainingMinutes minutes remaining"-- # Log memory usage- try {- $processInfo = Get-Process -Id $process.Id -ErrorAction Stop- $workingSetMB = [math]::Round($processInfo.WorkingSet64 / 1MB, 2)- $privateMemoryMB = [math]::Round($processInfo.PrivateMemorySize64 / 1MB, 2)- $virtualMemoryMB = [math]::Round($processInfo.VirtualMemorySize64 / 1MB, 2)- $cpuPercent = [math]::Round($processInfo.CPU, 2)-- $memoryLogEntry = "$currentTime,$elapsedMinutes,$workingSetMB,$privateMemoryMB,$virtualMemoryMB,$cpuPercent"- $memoryLogEntry | Out-File -FilePath "memory_usage.csv" -Append-- Write-Host "Memory Usage: Working Set: $workingSetMB MB, Private: $privateMemoryMB MB, Virtual: $virtualMemoryMB MB, CPU: $cpuPercent%"- }- catch {- Write-Host "Failed to get process memory info: $_"- }-- # Generate screen activity (different patterns based on iteration)- switch ($iteration % 4) {- 0 {- # Open multiple apps- Start-Process "notepad.exe"- Start-Sleep -Seconds 5- Start-Process "calc.exe"- Start-Sleep -Seconds 10- Stop-Process -Name "notepad" -Force -ErrorAction SilentlyContinue- Stop-Process -Name "calc" -Force -ErrorAction SilentlyContinue- }- 1 {- # Drawing activity- Start-Process "mspaint.exe"- Start-Sleep -Seconds 10- # Simulate mouse movement (alternatively could use actual automation)- Add-Type -AssemblyName System.Windows.Forms- $screenWidth = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Width- $screenHeight = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Height- for ($i = 0; $i -lt 10; $i++) {- $x = Get-Random -Minimum 0 -Maximum $screenWidth- $y = Get-Random -Minimum 0 -Maximum $screenHeight- [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)- Start-Sleep -Milliseconds 500- }- Stop-Process -Name "mspaint" -Force -ErrorAction SilentlyContinue- }- 2 {- # Browser activity- Start-Process "msedge.exe" -ArgumentList "https://example.com"- Start-Sleep -Seconds 15- Stop-Process -Name "msedge" -Force -ErrorAction SilentlyContinue- }- 3 {- # Text input activity- Start-Process "notepad.exe"- Start-Sleep -Seconds 5- Add-Type -AssemblyName System.Windows.Forms- [System.Windows.Forms.SendKeys]::SendWait("Testing screenpipe longevity")- Start-Sleep -Seconds 5- [System.Windows.Forms.SendKeys]::SendWait("{ENTER}Iteration $iteration")- Start-Sleep -Seconds 5- Stop-Process -Name "notepad" -Force -ErrorAction SilentlyContinue- }- }-- # Generate audio- [console]::beep(1000 + ($iteration % 10) * 200, 500)-- # Check if process is still running, restart if needed- if ($process.HasExited) {- Write-Host "WARNING: Process exited unexpectedly. Restarting..."- $process = Start-Process -FilePath ".\target\release\screenpipe.exe" -ArgumentList "--debug" -PassThru -RedirectStandardOutput "screenpipe_output.log" -RedirectStandardError "screenpipe_error.log" -NoNewWindow -Append-- # Log restart event- "$(Get-Date),PROCESS_RESTART,0,0,0,0" | Out-File -FilePath "memory_usage.csv" -Append- }-- # Sleep between activity cycles - vary time between 1-3 minutes- $sleepTime = Get-Random -Minimum 60 -Maximum 180- Write-Host "Sleeping for $sleepTime seconds..."- Start-Sleep -Seconds $sleepTime- }-- # Take one final memory measurement- try {- $processInfo = Get-Process -Id $process.Id -ErrorAction Stop- $workingSetMB = [math]::Round($processInfo.WorkingSet64 / 1MB, 2)- $privateMemoryMB = [math]::Round($processInfo.PrivateMemorySize64 / 1MB, 2)- $virtualMemoryMB = [math]::Round($processInfo.VirtualMemorySize64 / 1MB, 2)- $cpuPercent = [math]::Round($processInfo.CPU, 2)-- $elapsedMinutes = [math]::Floor(((Get-Date) - $startTime).TotalMinutes)- $memoryLogEntry = "$(Get-Date),$elapsedMinutes,$workingSetMB,$privateMemoryMB,$virtualMemoryMB,$cpuPercent"- $memoryLogEntry | Out-File -FilePath "memory_usage.csv" -Append-- Write-Host "Final Memory Usage: Working Set: $workingSetMB MB, Private: $privateMemoryMB MB, Virtual: $virtualMemoryMB MB, CPU: $cpuPercent%"- }- catch {- Write-Host "Failed to get final process memory info: $_"- }-- Write-Host "4-hour test complete. Stopping process."- Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue-- - name: Check for crashes and captured data- shell: powershell- run: |- if (Select-String -Path "screenpipe_output.log" -Pattern "panic" -Quiet) {- Write-Host "CLI crashed"- Get-Content "screenpipe_output.log"- exit 1- }- Write-Host "CLI ran successfully without crashing"-- $capturedFiles = Get-ChildItem -Path "$env:USERPROFILE\.screenpipe\data" -Recurse- if ($capturedFiles.Count -eq 0) {- Write-Host "No data was captured"- exit 1- }- Write-Host "Data captured successfully. File count: $($capturedFiles.Count)"-- if (Select-String -Path "screenpipe_error.log" -Pattern "no audio devices available" -Quiet) {- Write-Host "Audio device setup failed"- exit 1- }-- Get-Content "screenpipe_output.log" -Tail 100- Get-Content "screenpipe_error.log"-- - name: Generate memory usage report- shell: powershell- if: always()- run: |- Write-Host "Generating memory usage summary..."-- if (Test-Path "memory_usage.csv") {- $memoryData = Import-Csv "memory_usage.csv"-- # Calculate memory growth- if ($memoryData.Count -gt 1) {- $firstEntry = $memoryData | Select-Object -First 1- $lastEntry = $memoryData | Select-Object -Last 1-- $workingSetStart = [double]$firstEntry.'WorkingSet(MB)'- $workingSetEnd = [double]$lastEntry.'WorkingSet(MB)'- $workingSetGrowth = $workingSetEnd - $workingSetStart-- $privateStart = [double]$firstEntry.'PrivateMemory(MB)'- $privateEnd = [double]$lastEntry.'PrivateMemory(MB)'- $privateGrowth = $privateEnd - $privateStart-- $timeSpanHours = [math]::Round([double]$lastEntry.ElapsedMinutes / 60, 2)-- # Calculate min/max/avg- $workingSetValues = $memoryData | ForEach-Object { [double]$_.'WorkingSet(MB)' }- $workingSetMin = ($workingSetValues | Measure-Object -Minimum).Minimum- $workingSetMax = ($workingSetValues | Measure-Object -Maximum).Maximum- $workingSetAvg = ($workingSetValues | Measure-Object -Average).Average-- $privateValues = $memoryData | ForEach-Object { [double]$_.'PrivateMemory(MB)' }- $privateMin = ($privateValues | Measure-Object -Minimum).Minimum- $privateMax = ($privateValues | Measure-Object -Maximum).Maximum- $privateAvg = ($privateValues | Measure-Object -Average).Average-- # Output summary report- "## Memory Usage Summary" | Out-File -FilePath "memory_report.md"- "- Test Duration: $timeSpanHours hours" | Out-File -FilePath "memory_report.md" -Append- "- Data Points: $($memoryData.Count)" | Out-File -FilePath "memory_report.md" -Append- "- Working Set: Start $workingSetStart MB, End $workingSetEnd MB, Growth $workingSetGrowth MB" | Out-File -FilePath "memory_report.md" -Append- "- Working Set: Min $workingSetMin MB, Max $workingSetMax MB, Avg $workingSetAvg MB" | Out-File -FilePath "memory_report.md" -Append- "- Private Memory: Start $privateStart MB, End $privateEnd MB, Growth $privateGrowth MB" | Out-File -FilePath "memory_report.md" -Append- "- Private Memory: Min $privateMin MB, Max $privateMax MB, Avg $privateAvg MB" | Out-File -FilePath "memory_report.md" -Append-- Write-Host "Memory report generated successfully"- } else {- Write-Host "Not enough data points to generate memory report"- }- } else {- Write-Host "Memory usage log file not found"- }-- - name: Upload logs and data- uses: actions/upload-artifact@v4- if: always()- with:- name: windows-logs-and-data- path: |- screenpipe_output.log- screenpipe_error.log- memory_usage.csv- memory_report.md- ${{ env.USERPROFILE }}\.screenpipe\data\diff --git a/apps/screenpipe-app-tauri/lib/__tests__/team-crypto.test.ts b/apps/screenpipe-app-tauri/lib/__tests__/team-crypto.test.tsindex f746082bb..29a4ca223 100644--- a/apps/screenpipe-app-tauri/lib/__tests__/team-crypto.test.ts+++ b/apps/screenpipe-app-tauri/lib/__tests__/team-crypto.test.ts@@ -110,11 +110,21 @@ describe("team-crypto", () => {const config = { secret: "data" };const encrypted = await encryptConfig(config, key);- // flip a character in the ciphertext+ // Flip a character at a fixed offset, but pick a replacement that+ // is GUARANTEED to differ from the original. Previously this just+ // wrote 'X' at index 10 — base64 alphabet is ~64 chars so ~1.5% of+ // runs landed on a string where position 10 was already 'X', the+ // "tampered" string was identical to the original, decrypt+ // succeeded, and the test flaked. Picking the opposite-half-of-+ // alphabet replacement makes the swap deterministic.+ const original = encrypted.value_encrypted.charAt(10);+ const replacement = original === "X" ? "Y" : "X";const tampered =encrypted.value_encrypted.slice(0, 10) +- "X" ++ replacement +encrypted.value_encrypted.slice(11);+ // Sanity: the swap actually changed the string.+ expect(tampered).not.toBe(encrypted.value_encrypted);await expect(decryptConfig(tampered, encrypted.nonce, key)