Repository navigation
fix(api): close the remembered-consent review findings - #3584
Conversation
The consent skip setting is a follow-up to an unreleased change, so its note joins that change's entry (.changeset/README.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
…evoked On Postgres the revoke was one statement, reading with one snapshot taken before it waited on a redemption's code: the grant that redemption then committed survived. The codes now end before the grants, each in its own statement, so the grant delete reads after the wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
The answer was stored under the client's digest when it came in. A client whose metadata document changed while the step showed was then remembered for the person, who never saw it. The flow now keeps the digest of the client the step showed, and an answer for a client that changed since is answered but not remembered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
… shared error A person's token without user.read is answered 403 auth.scope_insufficient, but the spec's 403 allowed only sess.project_mismatch, so the generated Go client could not read it. The 403 now takes the shared error details, as identity links' does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 91d0552 The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟡 Changes recommended
Empty CLI digests allow answers to be remembered without a sealed client identity, while consent-page reloads can leave stale digests that prevent remembering answers or associate them with the wrong client.
2 open issues
1 file not reviewed
packages/go/api/oas_response_decoders_gen.go: Generated file
What changed in this PR
Addresses remembered-consent follow-ups to #3574, complementing the hosted-cloud skip gate from #3583.
Changes:
- Orders PostgreSQL revocation statements to catch refresh grants created by concurrent code redemption.
- Carries the displayed client’s digest through consent flow state.
- Corrects consent-list error schemas, adds regression tests, and consolidates release notes.
| File | Description |
|---|---|
packages/go/api/oas_schemas_gen.go |
Regenerates client error types. |
packages/go/api/oas_response_decoders_gen.go |
Updates consent-list error decoding. |
packages/go/api/oas_json_gen.go |
Adds generated error serialization. |
packages/go/api/client_test.go |
Tests insufficient-scope response decoding. |
apps/api/internal/storage/stmttest/consent_test.go |
Tests revocation during code redemption. |
apps/api/internal/storage/dialect/postgres/consent.go |
Deletes codes before refresh grants transactionally. |
apps/api/internal/service/flow_auth_request.go |
Checks the displayed client digest before remembering consent. |
apps/api/internal/service/flow_auth_request_test.go |
Checks consent digest population. |
apps/api/internal/service/flow_auth_request_remembered_test.go |
Tests changed-client consent handling. |
apps/api/internal/flowengine/state.go |
Stores the displayed client digest. |
apps/api/internal/flowengine/auth_request.go |
Passes the digest through consent processing. |
apps/api/internal/flowengine/auth_request_test.go |
Tests digest propagation into answers. |
apps/api/internal/api/generated/oas_schemas_gen.go |
Regenerates server error types. |
apps/api/internal/api/generated/oas_response_encoders_gen.go |
Updates consent-list response encoding. |
apps/api/internal/api/generated/oas_json_gen.go |
Adds generated error serialization. |
apps/api/api/openapi/endpoints/users/me/consents/methods.yaml |
Documents shared 403 error details. |
apps/api/api/openapi/bundled/openapi.json |
Refreshes the bundled API contract. |
.changeset/oauth-remembered-consent.md |
Incorporates consent-skip release notes. |
.changeset/oauth-consent-skip.md |
Removes the consolidated changeset. |
Review effort: Balanced
| state.ConsentScopes = append(make([]string, 0, len(consent.Granted)), consent.Granted...) | ||
| return nil, nil | ||
| } | ||
| state.ConsentDigest = consent.Digest |
| } | ||
| // The client changed while the step showed: the person answered for the | ||
| // client they saw, and a later request of this one starts from nothing. | ||
| if in.ShownDigest != client.Digest { |
A reload renders the consent step from state that is not sealed again, so the flow kept the client digest of the first showing while the screen showed the client as it is now. A reload that finds another client now restarts the flow instead of answering for one client while showing another. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
… one The built-in CLI client had no digest, so a CLI flow sealed before the flow kept the shown client matched on two empty digests and was remembered. The CLI now has a digest like every other client, and an answer that names no shown client is answered but not remembered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf

Context
Summary
listMyConsentsdocuments its403 auth.scope_insufficientanswer with the shared error details, as identity links does, so the generated clients decode it.Validation
Run by the writing session:
go-generate --check,go vetwith each tag,go test ./..., the Go client module's tests, the SQLite lane and the PostgreSQL 16 lane on a fresh database.Release notes / changeset
oauth.consent_skipchangeset from fix(api): skip no consent step in the hosted cloud until the Console revokes #3583 is folded into.changeset/oauth-remembered-consent.md, as.changeset/README.mdasks for an unreleased follow-up; these fixes belong to the same unreleased feature.Notes
https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
Generated by Claude Code