Skip to content

find: stop chaining two resolution engines on mutating actions #1654

Description

@thymikee

Split out of #1630 (see PR #1649 review).

What remains

#1630's acceptance criteria included "Mutating find no longer chains two resolution engines". PR #1649 delivered the policy matrix and routed find's selector matching through it (SELECTOR_RESOLUTION_POLICIES.findAct, reject-candidates), but the second engine hop is still there: handleFindClick / handleFindFill re-dispatch the resolved match by @ref through the ordinary click/fill request path (find.ts:424, :466), which re-resolves it via resolution.ts's ref branch. internal.findResolvedTarget skips ref-frame admission for that hop but does not pass the already-resolved node or its evidence through.

Why it was not done in #1649

It is a dispatch-behavior change, not a declaration refactor. The invoke() hop is what currently gives find's click/fill the full interaction leaf: action recording, ref-frame effects, post-action observation/settle, deferred-outcome marking, and the interaction guarantee cells that go with them. Bypassing it — as handleFindFocus/handleFindType already do with direct coordinate dispatch — means deciding, per behavior, which of those the find path should keep. That belongs in a PR whose stated contract is "behavior changes here", with the ADR 0011 guarantee cells re-checked; #1649's contract was explicitly "semantics unchanged".

Suggested shape

  • Pass the resolved node (and its resolutionDisclosure/target evidence) into the interaction leaf instead of a bare @ref, so the leaf can skip re-resolution while keeping recording/observation/guarantees.
  • Re-check the affected ADR 0011 dispatch-path × guarantee cells for the find paths.
  • Keep handleFindFocus/handleFindType's existing direct dispatch consistent with whatever shape click/fill land on.

Acceptance criteria

  • A mutating find resolves the target exactly once end to end
  • Recording, ref-frame effects, settle/observation, and deferred-outcome marking for find's click/fill are unchanged (or the change is stated and gated)
  • ADR 0011 cells for the find dispatch paths re-verified
  • A test that fails if a second resolution is performed

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions