feat: support live replay test reporters#959
Conversation
|
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
c688cb1 to
e6e9ed9
Compare
|
Reviewed #959 against the live replay test reporter contract and the command path from The progress path now keeps daemon progress parsing transport-level and routes replay-test events into the same reporter instances that render final output. Generic command progress still falls back to stderr, JSON mode still avoids implicit default reporter output, and the documented reporter exit-code behavior now prevents a custom reporter from masking a failing suite with exit 0. No linked issue is attached, so I reviewed against the PR summary and existing replay reporter docs. Checks are green, including Typecheck, Unit Tests, Integration Tests, Smoke Tests, Fallow Code Quality, Lint & Format, Swift Runner Unit Compile, Web Platform Smoke, and deploy-preview. I do not see an actionable blocker; this is ready for maintainer review. |
0a2a19c to
4669dfd
Compare
|
The head changed after my previous review ( |
4669dfd to
ae85fec
Compare
ae85fec to
42981b3
Compare
|
Re-reviewed the current clean #959 head ( The live reporter path still matches the intended contract: daemon progress parsing remains transport-level, replay-test events route into the same reporter runtime used for final output, custom reporters see semantic hooks ( Checks are green, including Typecheck, Unit Tests, Integration Tests, Smoke Tests, Coverage, Fallow Code Quality, Lint & Format, Swift Runner Unit Compile, Web Platform Smoke, iOS Runner Swift Compatibility, and deploy-preview. I do not see an actionable blocker; ready for maintainer review. |
|
Head changed after the prior readiness review (now at 8e41006), and CI is still in progress. I removed ready-for-human for now; please wait for checks to settle and re-review this head before restoring the label. |
8e41006 to
aa4d7bf
Compare
|
Review finding on the current clean head aa4d7bf:
Please either make live hooks explicitly synchronous in the public type/docs, or track/flush pending live-hook promises before |
…spatch Live reporter hooks (onSuiteStart/onTestStart/onTestStep/onTestResult) were typed as `void | Promise<void>` but fired from the synchronous daemon progress stream reader without being awaited, so a stateful async reporter could receive onSuiteEnd before its live work settled. Type them as `void` to make the contract honest; onSuiteEnd stays awaited for async flushing. A returned promise from a misbehaving custom JS reporter is still caught so it cannot crash the CLI with an unhandled rejection, but it is documented as unsupported and not awaited. Collapse the four near-identical per-event hook dispatch branches into a single table-driven path, and document the synchronous-hook and exit-code-escalation contracts. Add a regression test covering a throwing live hook. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XXHAYxWpvSzqc6CtneYL8J
Summary
Enable custom replay test reporters to receive live progress events while
agent-device testis running, with stream-aware stdout/stderr reporter context.Update the default reporter to render through the same live reporter path and document a custom emoji reporter example.
Touched 16 files; scope stayed within replay test reporting, daemon client progress forwarding, CLI command wiring, tests, and docs.
Validation
pnpm exec vitest run src/__tests__/cli-network.test.ts src/utils/__tests__/daemon-client.test.tspassed: 2 files, 46 tests.pnpm typecheckpassed.