fix(coderd): strip injected context from chat watch events#26397
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f49219abd
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! 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". |
Chat watch events publish through Postgres NOTIFY, so embedding the full REST chat payload can exceed the payload limit when
last_injected_contextgrows. StripLastInjectedContextfrom watch payloads, matching the existingFilesomission, while keepingDiffStatuspopulated fordiff_status_changeevents and leavingGET /chats/{id}unchanged.A previous attempt in #26368 introduced a separate summary type for watch events. This avoids making that API change prematurely: one large optional field is not enough reason to split the shared
Chatshape by endpoint, so this keeps the existing type and omits the heavy detail field from pubsub payloads.Closes CODAGT-501