Repository navigation
fix(api)!: align session credits, identity scope, and pairing - #19
Merged
Merged
Conversation
Match QCA Session budget and usage schemas, route Forward identity ownership through query parameters, and support pairing by record ID. Include wire contract tests, generated references, and migration notes. BREAKING CHANGE: replace max_list_cost currency objects with max_credit_cost decimal strings.
9 tasks done
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.
Summary
Managed Session budgets still serialized the old money object, usage types missed credit fields, and several Forward resource methods could not send Identity ownership in the query. Existing channel pairing also required a code even when a pending pairing ID was available.
{"type":"limit","max_credit_cost":"100.00"}; preserve update omission and explicitnullsemantics.session.usagefields, per-call model credits, and compaction credits while retaining legacy response usage fields.identity_idto existing Environment, Skill/Version, Vault/Credential, and File operations, including multipart uploads and downloads. SAT callers must omit it.channel_pairing_idand expose pairing scope fields. This change does not add endpoints.Why
Align the existing public surface with the official Session schemas, Forward resource ownership, and channel pairing contract, checked on 2026-10-20.
Verification
make lintmake buildmake testmake docs-checkgo build ./examples/...Commands and results:
The full Go checks ran on a clean copy of the changed source because the working checkout contained an unrelated ignored historical Go harness. No current-source tests were omitted. The docs check also passed on the staged commit before submission.
Targeted CN PAT live validation on 2026-10-20 passed using temporary resources and short
automodel requests: budget create/update/omit/clear, current-turn completion and HTTP 400 rejection of the next message after budget exhaustion, Managed Session/history/SSE credits, Forward Session/model-event credits, scoped resource operations, downloads, and cross-Identity rejection. Temporary resources were deleted or archived. These targeted local harness runs are separate from the complete repository live suite; account logs and identifiers are not published.Not live-tested: SAT restrictions, channel pairing (no dedicated code/pending ID), compaction events, or thread-specific SSE. Offline contract tests cover request/response shapes for those cases; they do not establish server-side SAT behavior.
Impact
CHANGELOG.mdunderUnreleased.env.live, logs, or generated test output committedBreaking change: Use
MaxCreditCost: "100.00"instead ofMaxListCost. No-parameter Forward methods acceptforward.WithIdentityID(...); methods with params exposeIdentityID. The budget now limits cumulative model and sandbox credits. This requires a minor release while pre-1.0; versioning and publication are a separate release step.Additional context:
Companion PRs: python #21, ts #23.