Skip to content

🤖 perf: load workspace context concurrently - #3952

Open
yanncabral wants to merge 1 commit into
coder:mainfrom
yanncabral:perf/concurrent-workspace-context-loading
Open

🤖 perf: load workspace context concurrently#3952
yanncabral wants to merge 1 commit into
coder:mainfrom
yanncabral:perf/concurrent-workspace-context-loading

Conversation

@yanncabral

Copy link
Copy Markdown

Summary

Loads independent workspace context concurrently after agent resolution, reducing startup latency before a model stream can begin.

Implementation

  • Starts goal, workspace MCP override, and scratchpad/additional-context reads together.
  • Preserves MCP and scratchpad fallback behavior and startup phase timings.
  • Awaits MCP overrides before server listing and tool assembly, the goal before goal-tool availability, and scratchpad context before plan instruction construction.
  • Adds a regression test that holds the goal read pending and verifies the other independent reads have already started.

Validation

  • Confirmed the new focused test fails against the serial implementation and passes after the change.
  • bun test src/node/services/aiService.test.ts (105 pass, 0 fail)
  • bunx prettier --check src/node/services/aiService.ts src/node/services/aiService.test.ts
  • bunx eslint src/node/services/aiService.ts src/node/services/aiService.test.ts
  • bun x tsgo --noEmit -p tsconfig.main.json

Risks

Low-to-moderate risk in stream startup ordering. The resolved values are still awaited at their original consumption boundaries, and fallback behavior remains covered by the existing AIService test suite.


Generated with xum • Model: unknown • Thinking: unknown • Cost: unknown

Start independent goal, MCP override, and scratchpad reads together after agent resolution while preserving fallback behavior and phase timings.
@yanncabral

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 40a83c26a3

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 40a83c26a3

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant