Skip to content

Design read-only identity verification without breaking wait polling #1349

Description

@thymikee

Problem

ADR 0012 target-binding evidence and replay-time refusal do not yet cover every selector-targeted read-only or synchronization step.

A destination guard in ADR 0016 is a polling wait <selector>. It currently proves selector existence, not that the resolved landmark has the same identity observed during authoring. A reshuffled screen containing the same label elsewhere can false-pass.

The existing ADR 0012 mechanism cannot simply be attached to wait: it verifies target-v1 before dispatch. A wait commonly begins while its landmark is absent, so pre-action verification would reject the expected starting condition instead of polling for it.

get already passes recording-time node/tree evidence on its recording-aware snapshot path. This work should preserve that behavior while defining compatible semantics for waits and the remaining eligible read-only steps.

Desired outcome

Design and implement recorded identity verification for eligible read-only steps without changing their execution semantics. For wait, selector polling must happen first; any recorded-landmark identity comparison happens only after a candidate resolves and before the wait reports success, or uses a distinct guard-specific mechanism with the same fail-closed outcome.

Acceptance criteria

  • wait <selector> continues polling while no candidate exists; identity verification never performs an eager pre-action refusal merely because the landmark has not appeared yet.
  • When an annotated wait resolves a candidate, an identity mismatch/unverifiable result fails closed through the bounded REPLAY_DIVERGENCE contract before the wait reports success.
  • The design explicitly chooses whether wait evidence can reuse target-v1 with wait-specific dispatch or requires a distinct bounded annotation; it must not accidentally enter the existing generic pre-action path.
  • Duration waits and wait stable remain unannotated because they have no element target.
  • wait @ref is not treated as a portable destination guard; ADR 0016 publication accepts only a selector or selector chain.
  • Eligible is and read-only find variants are explicitly classified as covered or intentionally deferred, with tests for each decision.
  • Existing get identity behavior remains intact and shares ADR 0012's verification machinery where its immediate-read semantics permit pre-action verification.
  • ADR 0016 gains a reshuffled-screen false-pass regression when wait identity verification ships.

Relationship

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