Skip to content

Complete ADR 0012 replay target-binding verification #1221

Closed

Description

@devin-ai-integration

Problem

ADR 0012 target annotations are parsed, recorded, preserved, and included in the
plan digest, but replay does not enforce them before invoking an action.
ReplayDivergenceKind remains action-failure only. A selector may therefore
resolve to a different target without producing the planned
selector-miss/identity-mismatch/identity-unverifiable divergence.

Scope

  • Implement ADR 0012 migration step 4 using the existing target-evidence parser,
    current replay tree/selector machinery, and
    classifyTargetBindingMatch.
  • Verify annotated target binding before side-effecting target actions.
  • On failure, do not invoke the action; return the appropriate structured
    divergence kind, target-binding evidence, current-screen provenance, ranked
    suggestions, and resume metadata.
  • Preserve existing behavior for old scripts without target annotations.
  • Keep resume/plan-digest and redaction semantics intact.
  • Update ADR 0012 status/migration progress accurately.

Owning files

  • src/replay/target-identity.ts
  • src/replay/divergence.ts
  • src/replay/script.ts
  • src/daemon/session-target-evidence.ts
  • src/daemon/handlers/session-replay-*.ts
  • docs/adr/0012-interactive-replay.md

Acceptance criteria

  • Selector miss, identity mismatch, and identity-unverifiable are distinguished.
  • No target action occurs after failed target-binding verification.
  • Matching annotations execute normally.
  • Unannotated legacy scripts remain compatible.
  • Nested flows and resume preserve correct source/step metadata.
  • Divergence text and structured output retain actionable refs/suggestions and
    do not leak replay variable values.
  • Focused replay tests plus pnpm check:affected --base origin/main --run pass.

Non-goals

  • Automatic script rewriting or restoration of --update.
  • Changing selector healing policy beyond the ADR's ranked read-only suggestions.
  • Claiming live-device/model benchmark evidence when infrastructure is absent.

Activity

  1. devin-ai-integration commented on Jul 12, 2026

    @devin-ai-integration
    ContributorAuthor

    Closing as already implemented by merged #1209 on current main. Focused replay/target-binding coverage passes (66 tests); only the stale ADR 0012 status remains and is tracked in #1222.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions