Repository navigation
refactor(daemon): relocate the settle, disclosure and capture tests by what they assert - #3698
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 14 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
1b6a344 to
656bd27
Compare
|
The test moves at 656bd27 look correct, and all 15 checks pass. I did not run the suite myself, so the 36/41 test-count parity and the mutation checks come from the PR body and CI, and I derived the ref-frame authority case by reading the fixture rects, not by running it. No conflicts. Nothing blocks merge from the code side. Not blocking, and you can take or leave each: the package now has two touch command-surface fakes, so could you fold the new one into Could one fake do the job? If I did not check whether the platform-apple tests still cover the The three Cubic P2 threads look fixed at this head, so please resolve them: the Android escape-dispatch assertions (#3698 (comment)), the post-gesture selector-miss assertions (#3698 (comment)), and the ref-frame-first lookup now pinned by the fill handler test in |
|
Answers to the open questions, with no code change:
The non-blocking suggestions (folding the two touch fakes into one, renaming the private-ax test, the disclosure doc comment) are declined here. The fake merge needs a single selector grammar and a write-back check across the other 18 users of the older fake, which is its own change. I'd rather not churn the stack's heads, and with them CI, for those. |
|
Taking the suggestion to fold |
|
Thanks, that settles it at 656bd27. I found the |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndler (a); the full-tree retry outcome inheritance is a command test (c) interaction-capture-disclosure: all four cases are daemon disclosure decisions (a) over a touch-forwarding surface and the legacy capture interactor resolution; the unsettled-outcome inheritance by the full-tree retry, which the miss case relied on the real command for, is now pinned directly by selector-target-resolution-post-gesture (c). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h finalizer (a) interaction-common: all five cases are daemon response-boundary and recorder decisions (a); the two handler-route cases run on the touch-forwarding surface, which now answers with the selector chain the command family builds for the resolved node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…teraction handler (a); the guard row moves beside its guard (a) interaction-dispatch-disclosure: the ten daemon rows and the four daemon verdict cases (a) drive the interaction handler over a touch-forwarding surface with get and gesture members, installing the interactor resolution instead of mocking the capture module. The post-action-guard row is driven by its own file beside interaction-android-escape; the contracts driver-owner map names both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…arry the capture preference Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (a); stalled-capture deadline and fill settle land as command tests (c) interaction-settle: all ten cases are daemon decisions (request signal inheritance, settle flag to parameter mapping, refsGeneration and the partial ref frame, the settled tree stored under the scoped lifetime, expired-frame refusal, flag guards) run over a settling touch-forwarding surface. The diff, tail, unavailable-observation hint, and deadline behaviors those cases leaned on are command behavior: settle.test.ts already pins the diff, tail, and broken-capture cases, and settle-capture-deadline adds the stalled-capture signal and fill --settle (c). interaction-settle-private-ax-route: (a) daemon forwarding of the settle loop's private-ax preference to the interactor snapshot options, over the installed interactor resolution; the pin decision and the runner request construction are covered by settle.test.ts and the platform-apple suites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-disclosure test and format Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e batch left without importers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re cases, and resolve refs against the ref frame in the touch-forwarding fake Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…andler test and drop the standalone fake test (R84) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The code verdict on 656bd27 is unchanged: no findings. The branch now conflicts with main, so I removed |
656bd27 to
9c7f710
Compare
Summary
Part 2 of 3 of the find/settle batch of the daemon test redesign (no test exports of any kind). Stacked on #3693 (green and mergeable; this PR retargets to
mainwhen it merges). The five root tests undersrc/__tests__/daemon-composition/interaction/for capture disclosure, the fill-scrubbing common cases, dispatch disclosure and settle wiring are placed by what they assert. Daemon halves (a) run against the package fakes; assertions about what the realsrc/commands/interaction/**code does (c) moved beside that code. Part 3 (target evidence) follows.New package fixture, a new unexported file:
support/touch-forwarding-surface-fake.ts(a touch surface that also observes a settle and carries the capture preference). Edits to existing fixtures:command-surface-override-fake.ts(additive: settle observation and capture preference pass-through, from #3693).a / c split and test-count parity
Before = exact count at the old path (vitest JSON reporter,
origin/main); after = run count per destination on this head. Package paths are underpackages/daemon/src/execution/interaction/internal/; command paths undersrc/commands/interaction/runtime/.interaction-capture-disclosure(4)interaction-capture-disclosure.test.ts(4)selector-target-resolution-post-gesture.test.ts(1: the full-tree retry inherits the unsettled post-gesture outcome)interaction-common(5)interaction-common.test.ts(5; parameterized fill scrubbing runs on the touch finalizer)interaction-dispatch-disclosure(16)interaction-dispatch-disclosure.test.ts(15: driver check, 10 daemon rows, 4 verdict cases),interaction-android-escape-dispatch-disclosure.test.ts(2: driver check, post-action-guard row)interaction-settle(10)interaction-settle.test.ts(10)settle-capture-deadline.test.ts(2: stalled capture gets its deadline signal and a "stalled" hint;fillon a@refwith--settle); settle diff, removals-only tail and broken-capture hint were already pinned insettle.test.tsinteraction-settle-private-ax-route(1)interaction-settle-private-ax-route.test.ts(1; installs the fakeInteractorResolution)settle.test.tsandpackages/platform-apple36 tests before; 41 after (the +5: one command test, the second driver check, two settle command tests, and the ref-frame authority case in
interaction-common.test.ts). No assertion was dropped.Gap, stated rather than hidden. The private-ax route no longer exercises the composed path from daemon to runner request; its rule is pinned in
settle.test.tsand inplatform-apple. If that must remain a root (b) test it needs a fullstartDaemonRuntimesession flow, which this PR does not build.Mutation checks
issueSettleRefs(...)ininteraction-touch-response.tswithundefinedfails three settle tests: "press --settle responds with the settled diff, refsGeneration, and activates a partial ref frame", "held touch settle publishes refs into the current record of its scoped lifetime" and "press --settle on a removals-only diff attaches the unchanged interactive tail at the diff generation" (expected 'expired' to be 'active'). Reverted.isSessionRecordinggate andpreferredBackendforwarding and saw the suites fail.vi.mockNo
vi.mockin any destination file (rg 'vi\.mock\('over the destinations returns nothing). Thesnapshot-interactor-capturemock these tests used is replaced by the installedInteractorResolution.Selection
All destinations match
packages/*/src/**/*.test.tsorsrc/**/*.test.ts, sounit-coreselects them (pnpm test:unit,test:coverage); the sources were already inunit-core.check:affected --runruns thevitest relatedleg.Subpath exports
daemonDeleted:
interaction/internal/interaction-android-escape,interaction/internal/types. No other package changed; no new subpath, barrel orexport *.Notes
DISPATCH_DISCLOSURE_DRIVER_OWNERS('daemon.'and'post-action-guard.'lines) inpackages/contracts/src/dispatch-disclosure.fixtures.ts, and one path in.device-evidence/CHECKLIST.md.Validation
check:quick,check:layering,check:fallowandcheck:gate-manifestpass on this head.check:affected --runran 15,437 tests and failed three, all 5-second timeouts under heavy host contention (the run took 649 s): two inscripts/fuzz/harness.test.tsand one inscripts/__tests__/test-file-size-ratchet.test.ts, neither touching this change. Rerun alone,harness.test.tspasses (2/2) and the ratchet passes (3/3).🤖 Generated with Claude Code