Repository navigation
Return official errors for unresolved list cursors - #71
Merged
Merged
Conversation
An after cursor that does not resolve inside its already resolved parent now answers with the list family's observed error (ERROR-PROTOCOL-001): Agent, Session, Turn, Template, Vault and Credential cursors take the missing-cursor 404 path, malformed ones included; Item, Subagent and Artifact lists return their 400 invalid_request_error messages; Skill versions report invalid_value on after for a non-version value or another Skill's version and keep the 404 for a missing one. Parent lookups still run first and foreign cursors stay identical to missing ones.
official_list_query.py replays cursor rows C1, C2, C5, K1 and K3 through raw HTTP and the pinned SDK for tenants A and B. The container client, Agent, Vault, Credential and Item scripts and the Subagent acceptance script now expect the new cursor errors.
Add the dated list cursor section with evidence and decisions, replace the malformed-cursor exception in the validation batch, register evidence P and update the list rows, and refresh stale cursor notes.
The Skill version prefix error and the Skills order error repeat the caller's value only when it is at most 256 bytes of valid, printable UTF-8, the rule already used for echoed field names, now shared through internal/echotext. Longer or unprintable values get a fixed message, so a large or control-character cursor cannot inflate the response.
Artifact and Skill version lists read the parent and the cursor in separate statements. Re-check the parent before reporting the cursor 400, so a Session or Skill deleted in between still returns its 404.
Seed at least two resources per list and page each one resource at a time in both orders, checking the page contents, has_more and the first and last IDs. Child Turns get distinct creation times for a stable order.
Name base c5cb6b5, describe the bounded echo and the parent re-check, and update the Runtime observation error table to the current types, codes and ignored unknown list keys.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a list's
aftercursor does not resolve, each list now returns the officially observed error for its family. The pinned baseline is unchanged (SDK 3.13.0 / d7c41ef /agents=v1).Behavior
not_found_error, param null. A malformed cursor now takes the missing-ID path (it used to be 400invalid_request)invalid_request_error, param null,Invalid session item ID in `after`invalid_request_error,Invalid resource ID in `after`invalid_request_error,after is not a valid artifact IDinvalid_value, paramafter. Missing: 404. Another Skill's version (same tenant only): 400invalid_value, "Skill version cursor does not match this skill."ordererrors echo the caller's value only when it is at most 256 bytes of printable, valid UTF-8 (sharedinternal/echotext). Otherwise the message omits the value.Evidence
list-query-semantics.mdandoperation-evidence.md(register CE and the list rows).Validation
has_more/first_id/last_idchecks. Echo-bound tests cover 257-byte, 200 KB, control-character and invalid-UTF-8 values. The pinned-SDK list-query script passes.make checktargets plus the Web typecheck, core-doctor, unit tests and build pass. The Playwright browser cases were not run on the server (no Google Chrome; the user approved the skip).make sqlc-generateandmake openapiare byte-identical.No full protocol compatibility is claimed.
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.