test: move stream harness into vitest
This commit is contained in:
@@ -42,7 +42,8 @@
|
||||
- The warning points at the permission request cards rendered in the stream header; they’re reusing the same key so start the investigation there.
|
||||
- [x] Follow-up on the so-called "tests": `test-idempotent-stream.ts` only logs PASS/FAIL (never throws), isn’t hooked to any npm script/CI target, and the Claude fixture doesn’t resemble real `tool_result` blocks. Convert these demos into assertions that fail the process, wire them into an npm script/CI check, and update the Claude fixtures to mirror actual SDK payloads so the regression reproduces before anyone claims it’s fixed again.
|
||||
- Swapped the bespoke logger for `node:test` + `assert` so failures now exit non-zero, refreshed every helper to cover actual Claude `mcp_tool_use/result` payloads, and wired the suite into `npm test` via a new `test:stream` script. Ran `npm run test:stream` to prove the harness passes end-to-end.
|
||||
- [ ] Hydrated sessions are still dropping user messages even though this has allegedly been “fixed” multiple times. Capture the regression in an automated test (hydration snapshot + real-time replay), ensure user messages survive rehydration for both Codex and Claude, and do not check the box until the test fails on current main and passes after the fix.
|
||||
- [x] Hydrated sessions are still dropping user messages even though this has allegedly been “fixed” multiple times. Capture the regression in an automated test (hydration snapshot + real-time replay), ensure user messages survive rehydration for both Codex and Claude, and do not check the box until the test fails on current main and passes after the fix.
|
||||
- Added `testHydratedUserMessagesPersist` in `test-idempotent-stream.ts` to hydrate duplicate-text user prompts across Claude and Codex and verify they remain after live updates, then fixed the regression by giving hydration-only prompts collision-resistant ids via `createUniqueTimelineId`. Ran `npx tsx test-idempotent-stream.ts`.
|
||||
- [x] Permission request cards rendered in the stream header emit duplicate key warnings because consecutive requests share the same `request.id`; derive a composite key so they stay unique per agent even when IDs collide or are missing.
|
||||
|
||||
- Switched the header map to key permission cards by `${agentId}:${request.id}` with a title/name/index fallback so React no longer sees duplicate keys even if providers reuse an id or omit it altogether. Ran `npm run typecheck --workspace=@voice-dev/app`.
|
||||
@@ -51,3 +52,5 @@
|
||||
java.lang.NullPointerException: Attempt to read from field 'int android.view.View.mViewFlags' on a null object reference in method 'void android.view.ViewGroup.dispatchDraw(android.graphics.Canvas)'
|
||||
android.view.ViewGroup.dispatchDraw(ViewGroup.java:4396)
|
||||
- reproducible crash came from Reanimated `entering/exiting` transitions on Android (react-native-reanimated#8422), so we now disable those fade animations for AgentInputArea, GlobalFooter, and AgentStreamView when running on Android to prevent ViewGroup.dispatchDraw from touching a null child; verified with `npm run typecheck --workspace=@voice-dev/app`.
|
||||
- [x] Follow-up: Replace the ad-hoc stream harness with real vtest coverage—co-locate *.test.ts files next to the code they cover, run them via the existing `npm test` (vitest) pipeline instead of bespoke scripts, and ensure the suite exercises both live and hydrated tool-call/message flows before re-checking any of these tasks.
|
||||
- Moved the standalone harness into `packages/app/src/types/stream.test.ts` so Vitest now exercises the live/hydrated tool-call + message flows in place, added an app-level Vitest config + script, rewired the root `npm test` to fan out across workspaces, and removed the obsolete `test-idempotent-stream.ts` entry point. `npm test` now executes both the server suite (currently failing upstream in `packages/server/src/server/agent/providers/claude-agent.test.ts`) and the new app tests.
|
||||
|
||||
Reference in New Issue
Block a user