Repository navigation
feat(account): gate leads with contract changes: pairing confirm signs the permissions, link_epoch on paired and unlinked, Android refresh device_counter - #194
Merged
Conversation
…s the permissions, link_epoch on agent.paired and agent.unlinked, Android refreshes carry a rising device_counter
WillCybertron
marked this pull request as ready for review
November 12, 2026 09:41
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Day 6 review gate, Account-core part 2 of 3: the decided leads that change a contract. Do not merge before the coordinator has routed the contract delta below to iOS, Android and the products.
Pairing confirm signs the permissions (
pairing.ts)confirmPayloadnow carriespermissions, sorted and without duplicates.GET /v1/pairings/{id}?permissions=a,bserves the approval request for exactly those permissions. Confirm recomputes the digest from its body's list, so an approval signed for other permissions is 401approval_invalid. The app still signs exactly what the service serves.pairing.test.tsM1 path. An approval read with no permissions does not confirm two. This fails without the change.link_epochonagent.pairedandagent.unlinked(pairing.ts,agents.ts,schema.sql)agent.pairedcarries the new link andagent.unlinkedcarries the link it ends.pairing.test.ts"gate lead: each pairing is a new link_epoch…".Android refreshes carry a counter (
binding.ts)device_counter, inside the bytesX-OE-Device-Signaturesigns, above the last refresh's. Otherwise 401binding_invalid.binding.test.tsAndroid. Without a counter, or with one not above the last, the refresh is refused; this fails without the change.Contract delta (
account/openapi.yaml, exact):What each client does:
GET /v1/pairings/{id}?permissions=<comma-separated>, sign thatapproval_request, and confirm with the samepermissions.device_counter, one higher each time, in every refresh body.link_epochper agent. Applyagent.pairedonly if its epoch is newer than or equal to the one held, andagent.unlinkedonly if its epoch equals the one held.Tests: account 179 pass.
scripts/verify.shis green in the pre-push hook.