perf(chat): cache optional preparation and identify slow send steps - #5127
Open
reachjalil wants to merge 2 commits into
Open
reachjalil wants to merge 2 commits into
reachjalil wants to merge 2 commits into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Contributor
|
Selected evidence: Incomplete · 12/12 tests · 18/18 assertions · 8 images Commit Coverage gaps: Required verification: incomplete. Selected evidence does not satisfy all required specs. No authenticated current-head required plan is available. |
reachjalil
force-pushed
the
perf/cached-send-preparation
branch
from
September 18, 2026 17:50
136db1c to
a05779e
Compare
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.
Problem
A message can remain in Starting while optional preparation finishes, and the console does not identify which pre-send request is waiting. Environment-key hints were cached per conversation, so a new thread repeated the same lookup; a stalled lookup could hold dispatch. Native Cloud skill materialization also staged every body before checking whether the existing file was identical.
The current send route already bypasses the broad Cloud MCP readiness gate. This change does not add another bypass or claim to identify the root cause of every Starting stall.
Changes
No visual/layout changes. Archive checks, authentication, authorization, Stop ordering, and fresh per-message context are retained.
Validation
Commands below ran from
apps/appunless noted:bun test --isolate tests/session-stop-refresh.test.ts tests/session-send-isolation.test.ts tests/env-context.test.ts tests/send-step-diagnostics.test.ts tests/session-ownership.test.ts tests/opencode-session-native.test.ts tests/safe-edit-resend.test.ts tests/session-history.test.tsx tests/session-scroll.test.tsx— 324 passed. React act warnings remain in the history/Stop harnesses.bun test --isolate tests/opencode-v2-adapter.test.ts --test-name-pattern 'send-step diagnostics'— 5 passed, 101 non-selected tests filtered out. These exercise each instrumented native request: warning fires while blocked, no duplicate request, subsequent requests wait, and original completion is preserved.bun test --isolate ./tests/env-context.test.ts ./tests/send-step-diagnostics.test.ts ./tests/session-send-isolation.test.ts ./tests/cloud-mcp-submit-readiness.test.ts— 45 passed.apps/server:bun --conditions=development test src/cloud-native-skills.test.ts— 12 passed, including no writes/renames for unchanged bodies, atomic changed-body replacement, scope changes, removals, and failed staging.pnpm run typecheckinapps/appand server TypeScript check — passed.git diff --check— passed.Known failures and limits
v2 provider catalog retains display names and advertised effort without exposing provider credentialsreceives an extra leadingnullvariant. The exact same unchanged test fails on base8c18c952abfad9fda39adba9bce29f7de8b2b817, independently checked with the same dependencies.pnpm evals:pr specs/session-send-isolation.test.tscould not launch because the evals workspace lacks Vitest. Its nine underlying app suites were run directly and all passed; this is not a successful eval artifact receipt.Manual check
environment_keyswarning appears and sending can proceed without the optional hints. Let the response finish; the next thread reuses it.[send-step] Still pendingwarning names it. The request is not replayed and normal error/Stop handling remains in effect.