Skip to content

refactor(daemon): drive find/dismiss-overlay sparse handling from the snapshot quality verdict #776

@thymikee

Description

@thymikee

What to build

find.ts still detects degraded compact snapshots with its own node-shape heuristic (isSparseIosInteractiveSnapshot) and retries via full/scoped captures (recoverSparseInteractiveSnapshot), and react-native dismiss-overlay can analyze a sparse tree without knowing it is sparse. Both predate the structured snapshot quality verdict.

Now that the runner self-recovers (compact plan: queries → private-AX) and every planned snapshot carries snapshotQuality, simplify the daemon: replace the node-shape heuristic with quality.state === 'sparse', and decide whether the daemon-side full-snapshot retry still earns its keep at all — on a sparse verdict the runner has already exhausted its backends, so the retry's value is limited to the scope-widening case. dismiss-overlay should consult the verdict before concluding "no overlay detected" on an unreadable tree.

Acceptance criteria

  • find.ts consults the verdict instead of re-deriving sparseness from node shapes (legacy heuristic kept only when the verdict is absent — older runner builds).
  • The daemon-side retry tiers are either justified with a test that shows a case the runner plan cannot recover, or removed.
  • react-native dismiss-overlay distinguishes "no overlay present" from "tree unreadable (sparse verdict)" in its response.
  • Existing find fallback tests updated; mixed-version behavior covered.

Blocked by

Landing of refactor/ios-snapshot-capture-plan (stacked on #758).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions