Skip to content

[agent] outcome_unread still fires when the declared consequence was a route change or an element matched by role/name/testid #507

Description

@divshekhar

Update: the original scope of this issue landed on main — a declared, body-independent
consequence now stands down the unread-body caveat instead of downgrading the verdict.
A narrow residual survives, and this issue is retitled to it.

The residual

declaresBodyIndependentChannel (packages/server/src/events/declared.ts:87-107) returns true
for text, signal, state, and an element matched by value or text. Everything else falls
to default: false, including:

  • PredicateKind.ROUTE
  • a non-absent element located by role, name or testid

So a caller who declares "this action lands on /lobby" in advance, and whom Reticle then watches
land on /lobby, still gets verified: "unknown" with reason outcome_unread if the write's
response body was not captured — even though the consequence they named held on a channel that has
nothing to do with the body.

Repro

  1. Leave captureNetworkBodies off (the default).
  2. reticle_act_and_wait on a control that issues a write and changes route, with
    until: { kind: "route", ... } — or until: { kind: "element", query: { role: "heading", name: "…" } }.
  3. The route/element change is observed and the embedded evidence says pass; the top-level verdict
    is unknown / outcome_unread.

Fix

Add PredicateKind.ROUTE, and non-absent element matches by role / name / testid, to
declaresBodyIndependentChannel. A route change the caller named before the action and Reticle
watched happen is body-independent evidence by construction — the same argument the existing text
and state cases already rest on.

Keep the same conservatism the function already documents: top level and allOf only, never an
anyOf branch, and never an absent predicate.

Activity

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

    agent-reportedFiled from an AI agent's reticle_feedback report. Title is prefixed [agent].bugSomething isn't workingv2.13.0Scoped for the v2.13.0 stability release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions