Skip to content

Response envelopes omit Cursor and Location from PrintMembers (V27) #30

Description

@Blind-Striker

Source: multi-agent review of PR #26, adversarial verification (CONFIRMED, severity 1, shipped-runtime diagnostics). 2026-08-14. Scope widened by the 2026-08-17 comment below.

The generated guarded PrintMembers override on response envelopes prints the shared metadata and the payload, but not the other envelope-owned members:

  • Cursor on cursor-list envelopes. Logging a successful page loses the continuation token that identifies it. Example: src/OpenCode.Sdk/Sessions/SessionListResponse.cs prints Sessions but not _cursor.
  • Location on envelopes with a server-resolved location. Example: src/OpenCode.Sdk/Agents/AgentListResponse.cs.

Status 2026-09-27: still true at v2.0.18. Two cursor envelopes and 41 Location envelopes are affected.

Fix: in EnvelopeEmitter, make PrintMembers append every envelope-owned diagnostic member in a fixed order: payload, cursor when present, location when present. Read backing fields, not guarded public getters, so the error path stays safe. Regenerate, re-approve snapshots, and pin it with a contract assertion on ToString() output.

Trigger: the next change that touches the envelope emitters.

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

    ready-for-agentSpecified enough that the work is mechanical

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions