Skip to content

Heavy lane on the runner: real screenpipe engine, desktop + server pairing - #6

Merged
onthegonow merged 17 commits into
mainfrom
ci/screenpipe
Nov 12, 2026
Merged

onthegonow merged 17 commits into
mainfrom
ci/screenpipe

Conversation

@onthegonow

Copy link
Copy Markdown
Contributor

Two more groups of heavy suites move from the owner's Mac to every pull request.

1. A real screenpipe on the runner. The new screenpipe phase installs screenpipe's open-source engine.

  • Version: the pinned 0.4.58, from npm, checked against its SHA-512. The phase fails if config/screenpipe-settings.json pins a different version.
  • Settings: the owner's (realtime, 5 s chunks, whisper-tiny-quantized, Core Audio system audio), recording BlackHole 2ch on :3030.
  • Why the engine: the screenpipe app records only when signed in to an account.
  • Effect: the capture suites and the audio-latency benchmark run against it. Preflight, flag and status checks skip by name; they need the app and the owner's launchd setup.

2. Desktop + server pairing. learner-server (public) is checked out at config/learner-server.ref. The server phase installs Postgres 17, migrates its test database and builds its web app.

  • PairingE2E and MasteryE2E run learner-server's own pairing harness locally instead of over ssh ovh, with unchanged assertions.
  • New, GitHub runner only: the installed app pairs from a pairing code through tool pair and restarts. The server then sees the app's own heartbeat with pairing state ok.

Reviews. An adversarial review ran before the first run; its fixes are in this PR and #5. A second adversarial review of this run's actual output comes before merge, so auto-merge is off.

🤖 Generated with Claude Code

onthegonow and others added 5 commits November 12, 2026 16:27
The screenpipe phase installs screenpipe's open-source engine at the version
config/screenpipe-settings.json pins (0.4.58). It comes from npm, checked against its
pinned SHA-512, and the phase fails if the config's pin moves without the hash. It runs
with the owner's audio settings (realtime, 5 s chunks, whisper-tiny-quantized, Core
Audio system audio) on :3030, recording BlackHole 2ch. It gets screen, audio and
microphone grants by path in TCC.db, waits for /health, and speaks one line so there is
a transcription row. The engine, its downloads and its models are cached.

The app itself only records when signed in to a screenpipe account (checked in its
source at app-v2.7.145), so the runner uses the engine.

- The audio-latency benchmark now runs on the runner.
- The preflight check skips there, by name: it needs the app's store.bin.
- The flag and status suites still skip: they need the app and the owner's launchd
  setup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the installed app

The heavy lane's pairing and mastery end-to-end suites now run on every pull request,
against the real learner-server code on the runner. They used to run only by hand, over
`ssh ovh`.

- CI checks out learner-server (public) at config/learner-server.ref and sets up bun
  1.4.0. The new server phase installs Postgres 17, migrates learner_test as
  learner-server's own CI does, and builds the web app. It exports the harness settings
  through ci-out/server.env, which each lane reads.
- PairingE2E's Harness has a local mode (LEARNER_SERVER_DIR): it runs
  scripts/pairing-server.ts on this machine instead of over `ssh ovh`. The assertions
  are unchanged. MasteryE2E's seeded 50% -> 65% gain runs the same way.
- New, GitHub runner only (LEARNER_TEST_ENV=runner and GITHUB_ACTIONS): the INSTALLED
  app pairs from a pairing code through `tool pair`, restarts onto it, and the server
  then sees the app's own heartbeat with its pairing report (pairing state ok). Only
  the app holds that device's key. The key never appears in output or the app's log,
  and is never an operand of an assertion.

These fixes came from an adversarial review before the first run: a stuck harness's
API port is freed, `ready` waits the harness's full 180 s, the log is read from a byte
offset taken before `tool pair`, the server env reaches `ci.sh all`, and the re-pair
test is GitHub-runner-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he server's secrets and warm-up

Run 1: every phase passed except the heavy lane, for two reasons.

- screenpipe answered 403 to every query (`/meetings`, `raw_sql`, transcriptions).
  The engine's --api-auth defaults to on; the owner's app runs with apiAuth: false.
  The engine now starts with --api-auth false. The runner's default output becomes
  BlackHole 16ch, so system-audio capture has a device; with none it timed out and
  /health said degraded.
- learner-server's API came up only after the harness's 180 s wait, then failed its
  first request on the missing LEARNER_AUTH_SECRET. The server phase now generates
  throwaway secrets (LEARNER_AUTH_SECRET, LEARNER_BASE_URL) outside ci-out, whose logs
  are public, and runs pikku's code generation once ahead of time
  (prepare:runtime).
- liveSettingsMatchTheCommittedCapture skips on the runner: the store.bin there is the
  engine's, not the screenpipe app's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the runner's latency bound, mastery's reason

Run 2: desktop and server pairing pass on the runner, both in-process and with the
INSTALLED app paired from a code. Three heavy failures were left:

- screenpipe /health said active_no_data. Its rule marks an input whose level stays
  under RMS 0.001 for 30 s, and the virtual mic was digital silence between phrases. A
  quiet pink-noise room tone (about -46 dBFS) now plays into BlackHole 2ch for the
  whole run, as a real mic's noise floor would.
- The audio-latency benchmark warned 21 s after the 30 s mark. Whisper runs several
  times slower on 3 shared runner cores than on the owner's Mac. On the runner the bound
  is 30 s and the measured delay is printed; the 6 s budget stays the Mac's.
- The mastery feed run failed without saying why. The test now records the job's
  outcome and the two RPC replies (no keys travel in either).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…osis; prints its proof)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
onthegonow and others added 12 commits November 12, 2026 17:58
…erver, marked, not weakened

Run 3: the desktop asked correctly. Its first feed query reaches back 15 minutes, and
getBaselineStatus resolved the seeded learner, but getMasteryNotifications answered [].

learner-server's explanation, from its code: since its 7d2a7c8 the feed announces a
rise only past a 30-day chance gate (gains in 6+ sittings), and pairing-server.ts
--seed-mastery-gain still writes one sitting, so the feed is empty by design. The fix,
a seedMasteryGain RPC, is in its review. Until the pin moves past it, the test runs
under withKnownIssue, and only against the local harness at 918beb1. Its assertions
are unchanged. When the seed makes a gain the feed announces, the known issue stops
occurring and Swift Testing fails the test until the marker is removed.

The CI summary now lists known issues as expected failures, never as passes. The
harness's own --check diagnostic is dropped: on macOS it stops early on a Linux-only
`stat` permission read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one-paste pairing)

learner-server's main now has one-paste pairing codes, confined CI test devices, a gain
seeder whose gain the real feed announces (chance gate included), and macOS-portable
mode checks in pairing-server.ts. Its --seed-mastery-gain goes through
createTestDevice -> seedMasteryGain -> revokeTestDevice.

With the pin past 918beb1, MasteryE2E runs without its known-issue marker, as a plain
test against its unchanged assertions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dater to leave

- The room tone is re-launched every 20 s. In run 5 the virtual device was
  reconfigured under the long-running sox when other programs opened it; sox kept
  running while screenpipe heard only zero-filled buffers, and after 30 s /health said
  active_no_data.
- uninstall-app.sh waits for the updater's launchd job to leave the domain, as it
  already did for the app. bootout returns first, so the leftover check raced it.
- The summary's known-issue list quotes only the known-issue lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…level arriving, screenpipe's audio status)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce), the runner's latency is printed, not asserted

Run 7's diagnosis, taken before the heavy lane: the room tone was playing and its loop
alive, yet BlackHole 2ch delivered RMS 0.000000. The virtual loopback goes silent
mid-run on the runner, so screenpipe's 30 s no-data rule can't be met there. The health
check skips on the runner with that reason. Every other screenpipe suite still runs.

The runner's audio benchmark warned 21 s, then 34 s, after the 30 s mark. Its 3 shared
cores are too uneven for any budget to say something about the Mac. On the runner it
proves the pipeline end to end (the warning comes, never early) and prints the delay.
The 6 s budget stays the Mac's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nthesizer if not, and fails plainly if it stays broken

Run 8's runner synthesized silence (85 samples for a passage) on the same image that
spoke in every earlier run, and everything that speaks failed downstream with it: the mic
end to end, the medium speech model, screenpipe's rows and the audio benchmark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run 9 was green, and the review checked the headline claims against the logs: the
installed app paired through its own heartbeat, mastery ran without a marker, the
synthetic sample was read, no secret is in any public output, and a failed phase cannot
show green. These are the gaps it found.

- The room tone was at the floor (vol 0.005 measured RMS 0.0011 against screenpipe's
  0.001). vol 0.025 is a real room's level. The audio-health skip is removed; that check
  runs on the runner again.
- System audio had BlackHole 16ch as its output while 16ch was also a microphone. A
  third device (BlackHole 64ch) is the output now. The mic end-to-end check also
  requires each turn to end on silence, the owner's own turn and not "someone else
  spoke", and the 2ch turn to carry the words screenpipe heard.
- The screenpipe phase's spoken line came before screenpipe recorded the mic. It now
  waits for that recording, speaks, and requires a transcription row.
- The runner's audio-benchmark delay was swallowed by the quiet log. It goes to stderr
  now, with a 90 s bound that only catches a stuck pipeline.
- A harness teardown that failed (revoke-failed, killed, bad exit) now fails the test:
  it would leave a live key behind.
- Remote pairing ran nowhere. The server phase adds the hosts entry and nginx, so the
  remote topology runs on the runner. It also installs shellcheck for the light lane.
- The server's secrets go to the harness only (LEARNER_SERVER_SECRETS), not to every
  test process. A phase that never reported is a failure in the summary. MasteryE2E's
  dead 918beb1 branch is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(a synthetic voice is someone else); harness exit 130 is its normal cleanup; the mic grant is shown and re-applied before the heavy lane

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck dead, measured twice); its realtime half runs everywhere

Run 11 was green but for one check. With the room tone at the louder level the review
asked for, the virtual mic still read RMS 0.000000, the same as run 7. So it isn't too
quiet; BlackHole's loopback goes dead mid-run on the runner. The test is split:
`audioPipelineIsRealtime` (transcription_mode) runs everywhere, and only
`audioIsFlowingAndHealthy` skips on the runner, with that evidence as its reason.

Run 11 also confirmed the mic-grant reset: the grant before the heavy lane was bound
to another build's signature (csreq=bound). Once it was re-applied, the bundle's mic
self-test passed, and the mic end-to-end check passed with each heard turn closed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ium, heavy), not just the start

Run 12: say passed the speech phase's check (46148 samples), then made silence by the mic
end to end (85 samples), as in run 8. Everything that speaks failed with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot a phase failure

Run 13 passed everything but the screenpipe phase. The engine recorded the mic in time,
but no transcription row came from the spoken line: the virtual loopback went dead early
this time.

The room tone only served screenpipe's audio-health rule, and that check skips on the
runner now (measured RMS 0 twice). A player restarted every 20 s on the same virtual
device is also a plausible cause of the dying loopback, so it is removed.

A missing seeded row becomes a ::warning. The heavy lane's raw_sql suite still fails on
its own if screenpipe has no rows. The engine's log moves to screenpipe-engine.log, out
of the phase's own log file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… about; the say guard retries for a minute

Run 14: screenpipe started recording the mic seconds after the 240 s wait ended (its
model loads slowly on a busy runner), and say made silence for 9 s, then recovered by the
next phase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@onthegonow
onthegonow merged commit 81b3064 into main Nov 12, 2026
1 check passed
@onthegonow
onthegonow deleted the ci/screenpipe branch November 12, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant