Skip to content

fix(core): resolve DB init race condition and reasoning translation - #12003

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.51from
raheemuddin786:fix/mcp-stdio-db-race
Aug 30, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.51from
raheemuddin786:fix/mcp-stdio-db-race

Conversation

@raheemuddin786

Copy link
Copy Markdown
Contributor

Summary

  • Adds explicit ensureDbInitialized() invocation during MCP stdio transport initialization to prevent startup database initialization race conditions during tool registration.
  • Fixes undefined variable reference (reasoningContent -> replayableReasoningContent) in non-streaming response format translation.

Test Plan

  • Run static type verification: npm run typecheck:core
  • Verify MCP stdio transport initialization and tool registration without database lock contention.

- Added explicit 'ensureDbInitialized()' in MCP stdio startup to prevent race conditions during tool registration.
- Fixed an undefined variable reference ('reasoningContent' -> 'replayableReasoningContent') in the non-streaming response translator.
@diegosouzapw
diegosouzapw merged commit 2ec24e7 into cheaper-inference:release/v3.8.51 Aug 30, 2026
14 of 15 checks passed
diegosouzapw pushed a commit that referenced this pull request Aug 30, 2026
… hot-reloading (#11841)

Boarded with #12003/#11840/#11839 in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles all green; 24/24 focused tests pass. Clean, well-contained addition mirroring the existing systemTransforms hot-reload pattern, tested for both set and cleared states. Thanks for the tidy runtime-config feature.
diegosouzapw pushed a commit that referenced this pull request Aug 30, 2026
…routing (#11840)

Boarded with #12003/#11841/#11839 in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles all green; 24/24 focused tests pass. Contained fix — preserves the unstripped model string for passthrough providers (cline/kilocode) only when the combo actually redirected to a passthrough provider. Thanks for the regression coverage.
diegosouzapw pushed a commit that referenced this pull request Aug 30, 2026
Boarded with #12003/#11841/#11840 in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles all green; 24/24 focused tests pass. relayMode is opt-in and defaults to standard, so this is backward-compatible as claimed — verified the plumbing through resolveUniversalHandoffConfig/resolveContextRelayConfig/selectMessagesForSummary. Thanks for the clean, well-tested addition.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…heaper-inference#12003)

Boarded with cheaper-inference#11841/cheaper-inference#11840/cheaper-inference#11839 in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles all green; 24/24 focused tests pass. Both fixes are surgical and well-reasoned: explicit ensureDbInitialized() call for MCP stdio (verified the function exists at src/lib/db/core.ts:1496) avoids a startup race, and the reasoningContent fallback prevents empty message.content when only reasoning was returned. Thanks for tracking down both root causes.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… hot-reloading (cheaper-inference#11841)

Boarded with cheaper-inference#12003/cheaper-inference#11840/cheaper-inference#11839 in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles all green; 24/24 focused tests pass. Clean, well-contained addition mirroring the existing systemTransforms hot-reload pattern, tested for both set and cleared states. Thanks for the tidy runtime-config feature.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…routing (cheaper-inference#11840)

Boarded with cheaper-inference#12003/cheaper-inference#11841/cheaper-inference#11839 in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles all green; 24/24 focused tests pass. Contained fix — preserves the unstripped model string for passthrough providers (cline/kilocode) only when the combo actually redirected to a passthrough provider. Thanks for the regression coverage.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…per-inference#11839)

Boarded with cheaper-inference#12003/cheaper-inference#11841/cheaper-inference#11840 in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles all green; 24/24 focused tests pass. relayMode is opt-in and defaults to standard, so this is backward-compatible as claimed — verified the plumbing through resolveUniversalHandoffConfig/resolveContextRelayConfig/selectMessagesForSummary. Thanks for the clean, well-tested addition.
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.

2 participants