Repository navigation
fix(test): migrate the daemon stack's tests to complete runtime snapshots - #3684
Conversation
|
I found no code problems at 872908b. The change is test-only (production +0/-0), and I read the diff against the snapshot contract. I did not run tsc -b or vitest. I also did not grep every test for other flat-nodes backend results. Not blocking: the fallback snapshot in command-surface-fake.ts is hand-written. It only runs when All 16 checks are queued and none has failed. Typecheck & Package, Integration Tests, Coverage and Repo Guards (R83/R84) are the ones that exercise these files. Please check those when they finish. No conflicts. |
Size Report
Startup median (7 runs, lower is better):
|
|
What
Main fails
tsc -bwith 7 errors. #3642 changedBackendSnapshotResultin@agent-device/contracts/backendto require a completesnapshotand removed the flatnodes,truncatedandbackendfields. The daemon test relocations (#3652 and #3666) were written against the old shape and merged after #3642. Neither side conflicted textually, so the break appeared only on main. It is not only a type error: on main all 6snapshot-freshnesstests fail at runtime too (6/6 failed, run against the main copy of the file), because the runtime no longer reads flatnodes.src/commands/capture/runtime/snapshot-freshness.test.ts: the five backend results now passsnapshot: makeSnapshotState(nodes, { truncated: false, backend: 'android' }), the same migration refactor(capture): require complete runtime snapshots #3642 applied tosnapshot.test.ts. No test was added or removed: 6 tests before (all failing on main) and 6 passing after.src/commands/interaction/runtime/wait-capture-options.test.ts: the indexed array read typed asSnapshotState | undefined. It is now a plain conditional over the two captures; the behaviour is unchanged.packages/daemon/src/__tests__/support/command-surface-fake.ts: the forwarding fake no longer readscaptured.nodes. Its own test for "falls back to a flat node list from a backend that returns no snapshot" is deleted, because the backend contract no longer permits that shape.Validation
pnpm exec tsc -b: 0 errors (7 on main).pnpm check:quickandpnpm check:layeringpass. R83 reports 99 = 99 and R84 reports 202 = 202.vitest runon the three files: 11 passed.🤖 Generated with Claude Code