chore: drop chat gateway key columns - #27172
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
@codex review |
Dogfood migration UAT passed.
|
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
72c2c0a to
d2c8c25
Compare
6635cd2 to
7557de2
Compare
|
@codex review |
7557de2 to
2a464a3
Compare
d2c8c25 to
7618beb
Compare
2a464a3 to
e6a9d4f
Compare
c077b35 to
2de350a
Compare
e6a9d4f to
21f7269
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Final-stack targeted dogfood passed after the FK-decoupling fix.
This supplements the earlier full UI/API/database UAT and validates the final rewritten stack heads. |
2de350a to
5cd4bec
Compare
a2c5a8f to
f3a8581
Compare
5cd4bec to
4f27e67
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f27e67113
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4f27e67 to
d4ddfab
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
d4ddfab to
ced7713
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Resolve the synthetic gateway key by deterministic token name (chatd_<owner_id>_session_token) instead of a mapping table, mirroring the provisionerd session token model. The lookup excludes login_type 'token' rows so a user-created token with the colliding name is never picked up or extended. Near-expiry keys are extended in place under a per-user advisory lock, keeping the key ID stable for in-flight generations. New keys carry a minimal scope as defense in depth.
f3a8581 to
b3b93ac
Compare
ced7713 to
29a32ce
Compare
b3b93ac to
9fabe24
Compare
Squashed into #27171 per review feedback there. |

Summary
Drop the unused
api_key_idcolumns from chat messages and queued messages after #27171 stops reading and writing them, and remove the transitional query scaffolding that existed only to avoid referencing those columns during rolling deploys.With the columns gone,
sqlcgeneratesdatabase.ChatMessageanddatabase.ChatQueuedMessagewithoutapi_key_id, so:*Rawchat message queries get their canonical names backchatMessageQuerierinterface, pass-through wrappers, duplicated dbauthz methods, and row-projection types are deletedThe down migration re-adds nullable text columns without foreign keys so rollback reproduces the amended #27171 schema. Previous column values cannot be restored. Deploy only after #27171 is fully deployed.
Depends on #27171.