Repository navigation
Conversation
chatACLGroups queried member counts per group in a loop, causing N+1 DB round trips. Use the existing GetGroupMembersCountByGroupIDs batch query and fold results into a map instead. Co-Authored-By: FuXi <fuxicodex@gmail.com>
hashFiles('**/*.go') invalidated the lint cache on every Go source change
(test edits included), and PRs only restore without saving, so upstream
runs always started cold. Key only on dependency/config/workflow changes.
Co-Authored-By: FuXi <fuxicodex@gmail.com>
Exclude .fuxi/ (projects, settings, scheduled tasks) from version control so agent-local state is never committed. Co-Authored-By: FuXi <fuxicodex@gmail.com>
UpdateWorkspaceAppHealthByID fetched the workspace on every call to authorize the update, even when the agent RPC had already injected the cached workspace RBAC object into the context. Follow the same fast-path pattern as UpdateWorkspaceAgentMetadata: authorize against the cached object and only fall back to GetWorkspaceByWorkspaceAppID when it is absent or stale. Co-Authored-By: FuXi <fuxicodex@gmail.com>
BatchUpdateAppHealths contained a per-app update loop, and each UpdateWorkspaceAppHealthByID call triggers an authorization fetch of the workspace. The AppsAPI already holds the cached workspace fields used by the agent connection; inject them into the context up front so the dbauthz fast path can skip the repeated workspace query. Co-Authored-By: FuXi <fuxicodex@gmail.com>
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
cdrci2
added a commit
to coder/cla
that referenced
this pull request
Sep 21, 2026
Author
|
recheck |
This branch has not been deployed
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
Batch of small, targeted performance optimizations found during a codebase review:
GetGroupMembersCountByGroupIDwith the existingGetGroupMembersCountByGroupIDsbatch query (1 DB round trip instead of N).**/*.go— a pure source change (e.g. a test edit) no longer invalidates the lint cache, and PRs only restore without saving, so upstream runs always started cold.UpdateWorkspaceAppHealthByID— authorize against the cached workspace RBAC object injected by the agent RPC, falling back toGetWorkspaceByWorkspaceAppIDonly when absent/stale (mirrorsUpdateWorkspaceAgentMetadata).Test plan
go build ./coderd/...passes with Go 1.26.5 (matches go.mod)go test ./coderd/database/dbauthz/... -run "TestNew/UpdateWorkspaceAppHealthByID"passesgo test ./coderd/agentapi/...completes successfully🤖 Generated with FuXi