You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: lock find click JSON response to exact deterministic key set #182
Add a unit test that enforces the exact JSON response shape for find "<query>" click --json to prevent accidental schema drift.
Why
Machine consumers depend on a stable, deterministic schema. We recently aligned find click to return deterministic metadata (ref, locator, query, x, y) and to avoid leaking platform-native response blobs.
Proposed changes
Add/extend tests in src/daemon/handlers/__tests__/find.test.ts to assert that response.data for successful find ... click contains exactly these keys:
ref
locator
query
x
y
Assert no extra keys are present (strict key-set assertion).
Cover both:
normal resolved target with rect
fallback coordinate path when resolved hittable ancestor lacks rect
Acceptance criteria
pnpm test:unit passes.
find click tests fail if any key is added/removed/renamed in the success payload.
No platform-specific fields leak into find click success payload.
Activity
test: lock find click JSON response to exact deterministic key set
test: lock find click JSON response to exact deterministic key set (#183