Repository navigation
fix: keep results on timeout; restore and startup bugs - #926
Merged
Merged
Conversation
The two data-directory summaries were string literals broken across lines without a backslash continuation, so the next line's indentation ended up inside the message. Move them into helpers and test for double spaces. Closes #920 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
A restore whose every statement was refused, with Stop on error off, reported partially_applied even though statements_run was 0. Move the rule into a function, require statements_run > 0, and unit test it. Closes #919 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
A script that hit the query timeout came back without a statement index, so the results of the statements that had already finished were lost. The timeout is now tagged with the statement it stopped, carrying the completed results the same way a normal failure does. A failed run on an editor session now also asks the server whether a transaction is still open, using the same probe as a successful run, and reports it as QueryError.transaction. The probe is bounded to two seconds and never fails, so it cannot replace or hold back the error. The mock mirrors it on execute_query's error path. CoreError::root() looks through the statement tag for callers that match on the kind of error, now that timeouts are tagged too. The docs said `just db-down` stops the test containers; it removes them and their data volumes. Item 3 of #917 (mock tests for completedResults and transaction) was done in #918. Closes #917 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
When a statement on an editor tab's session (or an agent's pool) ran past the query timeout, the KILL QUERY was sent through that same pool, whose only connection the timed-out statement was holding. The KILL waited for a connection until the acquire timeout and failed, so the tab sat out the whole statement: a 1s timeout on SELECT SLEEP(5) took 11s. Send it through the shared pool instead, as cancel already does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
This was referenced Oct 30, 2026
Merged
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.
Backend follow-ups, done by the
implementer-rustlane.Closes #917, #919, #920, #925.
Changes
partially_applied(...)function and requiresstatements_run > 0.QueryErrorgains an optionaltransaction. After a failure on an editor session, the same probe added in feat: report completed results and transaction state #916 runs, bounded to 2 s. If the probe fails, the field is left out and the original error comes back unchanged.CoreError::root()looks through the statement tag, so code that matches onTimeoutstill works now that timeouts are tagged.just db-downremoves the containers and their data volumes.cancel()already does.Tests
partially_applied; the error's transaction state androot().cargo fmt,clippy -D warnings, andcargo testfor mas-core, sqlpilot and mas-mcp all pass. The mas-core integration suites pass on MySQL 13306 and on MariaDB 13308.npm run type-checkis clean, andvitestpasses forsrc/dev,src/storesandsrc/lib(1798 tests).Generated by Claude Code