Skip to content

Tests: MCP and lab suites pass on a Mac that runs Transcripted - #1892

Merged
r3dbars merged 1 commit into
mainfrom
claude/dev-mac-test-fixes
Sep 28, 2026
Merged

r3dbars merged 1 commit into
mainfrom
claude/dev-mac-test-fixes

Conversation

@r3dbars

@r3dbars r3dbars commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Two package suites failed or hung on a Mac that runs Transcripted, while passing on CI's clean runners. That's the worst kind of test: red locally for no reason, so people learn to ignore it.

MCP: a test saw the real app's version

testReadMeetingBuildsPostHogPayloadFromRealSavedArtifactLookup asserts that the standalone helper reports no app_version / build_channel / build_revision. On a dev Mac it got 1.1.66 / local / af5cf8a93577: observations resolved their build from the real ~/Library/Application Support/Transcripted, where the running app saves its build info for the helper.

The build now comes from AgentCaptureQueryTelemetryRuntime.buildIdentity, used at both call sites (trackAgentCaptureQueryObserved and withAgentCaptureQueryTelemetry). ToolHandlersTests points it at an empty temp folder in setUp and restores it in tearDown. Production is unchanged (same .resolve() default).

Lab: the timeout test hung forever

testProcessTimeoutStopsChildrenThatIgnoreTermination hung at 0% CPU inside LabProcessRunner.run, both inside and outside the sandbox. It passed alone (3 s) and hung every time after the other process tests. The runner waited with Process.waitUntilExit() from async code. When the child outlived that call, it parked on a run loop that the exit notification never woke. Exit is now observed with terminationHandler, which Foundation calls on a background queue whatever thread launched the process, and the async loops wait on that flag. The other waitUntilExit() in the lab (gitRevision, synchronous and on one thread) is left as is.

How I checked it

  • Lab: the three process tests together hung 3/3 before, and pass 3/3 after. The full lab suite passes in 5 s.
  • MCP: 213/213 on a Mac with Transcripted installed. Without the new setUp line, the same test fails here again (3 failures).
  • check-test-shape (self-test and guard), check-source-pins --changed-only, swift test --package-path Tools/TranscriptedLab --jobs 4, both lab products built, build_and_run.sh --verify, swift test --package-path Tools/TranscriptedMCP, bash run-e2e-smoke.sh.

🤖 Generated with Claude Code

MCP: observations resolved their build from the real Application Support,
where a running Transcripted saves its version, so a ToolHandlers test
saw "1.1.66" on a dev Mac and passed only on clean CI. The build now
comes from AgentCaptureQueryTelemetryRuntime.buildIdentity, which the
tests point at an empty folder. Production behavior is unchanged.

Lab: LabProcessRunner waited with Process.waitUntilExit() from async
code. When the child outlived the call (the timeout test run after the
other process tests), it parked on a run loop the exit never woke and
hung forever. Exit is now observed with terminationHandler, which runs
on a background queue whatever thread launched the process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@r3dbars
r3dbars merged commit 4e6294d into main Sep 28, 2026
9 checks passed
@r3dbars
r3dbars deleted the claude/dev-mac-test-fixes branch September 28, 2026 20:05
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