Skip to content

queryV1 read module; plans for the vendored SDK and query.v1 reads - #42

Merged
jallers merged 3 commits into
proposed_type_script_api_versionfrom
claude/admiring-ride-vsq4sa
Nov 6, 2026
Merged

jallers merged 3 commits into
proposed_type_script_api_versionfrom
claude/admiring-ride-vsq4sa

Conversation

@jallers

@jallers jallers commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

This adds client.queryV1, a read path through query.v1, fixes how api/asset reports a failure that has no command index, and updates the plans to match.

  • queryV1: sends the same query bodies as client.assets.query and translates rows the same way. The endpoint can't write and returns only rows, so it's the safe place to explore a query. A page is required, a request may be retried, and a refused query throws with the server's message.
  • Unattributed failures: if a command failure arrives without a sourceCommandIndex, send now sets every query slot to null and reports the real failure. It used to throw a generic "cannot tell which result belongs to which query" error instead.
  • Plans: A4 is done. The slack bot keeps its query.v1 reads: S2 becomes "add a page to every read", and B1 maps query to client.queryV1. gh-v1 vendors the SDK, and C1 is in versionone/gh-v1#33.

All 99 unit tests pass. On v1sdktesting, the live api/asset and query.v1 suites pass, and query.v1 and api/asset return identical rows for the same query.

🤖 Generated with Claude Code

https://claude.ai/code/session_016NSWj9gL1oCubj5e2anVkb

gh installs a script extension with git clone alone, so the SDK ships in
gh-v1's vendor/ with the commit it came from, pinned as a devDependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016NSWj9gL1oCubj5e2anVkb
api/asset can run every query query.v1 can, but query.v1 cannot write and
answers with rows alone, so it is the safe, simple place to explore a
query. Rows are spelled as api/asset spells them (probed 2026-11-06), so
they translate through the same schema.

- wire/queryV1: query/queries; a page required; POSTs marked idempotent
  (the endpoint cannot write); a refused query throws QUERY_REJECTED with
  the server's exception messages, never an empty result.
- client.queryV1.query/queries, translated through the client's schema.
- Integration (read-only): query.v1 and api/asset give the same rows; a
  miss is []; an unknown attribute fails the request.
- Plans: A4 done; the slack bot keeps query.v1 reads (S2 is now "page
  every read", B1 maps query to client.queryV1). Spec §6 and README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016NSWj9gL1oCubj5e2anVkb
…ount error

When a failure carried no sourceCommandIndex and the query results did not
line up, send threw "cannot tell which result belongs to which query" and
the real failure was lost. Now every query slot is null (no row is
placed when any query may be the one that failed) and the failures are the
answer: a CommandFailureError with the server's messages for reads and
with throwOnFailure, or in the envelope otherwise. A count mismatch with no
unattributed failure is still its own error. Spec 000 §6 updated.

Found adopting the SDK in gh-v1 (C1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016NSWj9gL1oCubj5e2anVkb
@jallers
jallers merged commit 79b5b48 into proposed_type_script_api_version Nov 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants