Repository navigation
test(android): a content description change invalidates snapshot reuse and survives the selector digest - #2920
Conversation
…e and survives the selector digest Review follow-up: `contentDescription` joined the presentation-equivalence key and the digest allowlist without a case in either table, so removing it later would have left both suites green.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Test-only Android regression coverage for contentDescription in snapshot reuse and selector digests.
Changes:
- Tests changed and unchanged descriptions.
- Extends selector digest fixtures.
| File | Description |
|---|---|
src/daemon/__tests__/response-views.test.ts |
Verifies selector digest retention. |
src/commands/capture/runtime/snapshot-unchanged.test.ts |
Covers description changes and unchanged reuse. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
This is ready at a2a27bb. Not blocking: the new "unchanged metadata keeps a content description that did not change" test (src/commands/capture/runtime/snapshot-unchanged.test.ts:110) passes regardless of whether contentDescription is in PRESENTATION_SCALAR_FIELDS, since the existing "unchanged metadata ignores refs and volatile process ids" test already covers reuse on equal nodes, so you can drop it or change it to pair an unchanged contentDescription with a changed non-presentation field like editable, but either way it's fine to merge as is. Checks are green (12/12), and the diff is test-only, staying inside the changed test files' own route. I ran only the two targeted test files, not the full repo gate, and took #2912's live-device claim about contentDescription on the wire as established rather than re-verifying it. |
Summary
Review follow-up to #2912, test-only.
contentDescriptionjoined the presentation-equivalence key insnapshot-unchanged.tsand the selector-digest allowlist inresponse-views.tswithout a case in either table, so removing either entry later would have left both suites green.snapshot-unchanged.test.ts:contentDescriptionis a row in the "detects presentation changes" table, and a new case keeps a node whose description did not change as unchanged.response-views.test.ts:MATCHED_NODEandCOMPACT_NODEcarrycontentDescription, so the find/get digest assertions cover its retention.2 files, 14 lines. Flagged inline on #2912 by Copilot and noted as non-blocking by @thymikee; it merged before the rows landed.
Validation
Tested at a2a27bb.
pnpm check:affected --run --base 86d719dc3passed: format, lint, typecheck, layering, fallow, build, and the two related files (74 tests). No runtime change, so no device run.