Repository navigation
feat(connection): give each agent session and each backup or restore its own connections - #770
Merged
Merged
Conversation
…its own connections The agent and job lanes were one pool each per profile, so concurrent agent sessions shared two connections, and a backup and a restore took the job lane's two. Each kind of work now has connections of its own (#731): - Route replaces Lane: Interactive, Session (editor tab), Agent (one agent session) and Job (one backup or restore). - Agent sessions: the MCP endpoint already builds a server per session; it now asks the workspace for a per-session one, whose queries, staged writes, DDL, EXPLAIN and schema reads go to Route::Agent(session). Up to AGENT_SESSION_MAX (2) connections, since agents call tools in parallel; opened on first use, closed after a minute idle and when the session's workspace is dropped. FR-6.3.2 holds per session, not per profile. - Jobs: start_job opens one connection for the backup or restore and closes it when the JobConnection is dropped, however the job ends. Disconnect closes agent and job connections as before. - Busy messages are per route: an agent session says so and that the editor and other agents are unaffected; a job's connection is its own and is never reported as busy. Closes #731. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
This was referenced Oct 20, 2026
Merged
EVWorth
added a commit
that referenced
this pull request
Oct 20, 2026
* release: 1.3.0 Version bump across the three manifests and the two lockfile entries that record the app's own version. 1.2.0 and 1.2.1 were bumped but never tagged, so 1.3.0 is the first release since 1.1.0 and carries everything since it: Connections (#731) - Each editor tab runs on its own server session, so SET @var, SET SESSION, temporary tables and multi-run transactions carry over (#734) - Each agent session, and each backup or restore, has connections of its own, so none of them can hold up the editor or each other (#732, #770) - The Min/Max pool size setting and the status-bar pool counter are gone; connections are no longer something to size (#769) - A "busy" error says what is busy and what to wait for (#727) Grid - Grid edits save on the tab's session without committing its open transaction (#762) - Copy a long cell value without opening the viewer (#748) Fixes - Linux: WebKitGTK's DMABUF renderer is off under Wayland (#742) - rustls for RUSTSEC-2026-0285 and RUSTSEC-2026-0346..0349 (#728, #759) - Tauri 2.12.3, tauri-plugin-updater 2.13.3, tauri-plugin-shell 2.5.0 (#749, #747, #758), and dependency roll-ups Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g * fix(deps): bump rustls-webpki and webpki-roots for RUSTSEC-2026-0381..0383 rustls-webpki 0.103.16, webpki-roots and webpki-root-certs 1.0.10. The advisories were published today: certificate verification could accept distrusted intermediates, and the bundled roots still trusted the distrusted emSign intermediates. cargo audit fails on all three, and a release should not ship them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g --------- Co-authored-by: Claude <[email protected]>
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.
Closes #731. Follows #769.
Why
After #769 the agent and job lanes were still one pool each per profile. Concurrent agent sessions shared two connections, and a backup and a restore shared the job lane's two. One agent's long query could hold up another, which FR-6.3.2 says shouldn't happen.
Change
Routing (
mas-core)RoutereplacesLane. It has four variants:Interactive: schema browsing, dialogs and admin; a fixed 3 connections.Session(tab): an editor tab's own connection.Agent(session): one agent session's connections.Job(id): one backup or restore.AGENT_SESSION_MAX= 2 connections each, because agents call tools in parallel. They open on first use, close after 60s idle, and close when the session ends (close_agent_session).start_jobreturns aJobConnection, one connection that closes when it is dropped, however the job ends (finished, failed or cancelled).MCP
Workspace::for_sessionhook, which defaults to sharing.AppWorkspacegives each session its ownRoute::Agentfor queries, staged writes, DDL, EXPLAIN and schema reads. Staged writes and Cancel still work across sessions.Docs: FR-6.3.2 and AI_INTEGRATION §6 describe per-session connections.
Tests
mas-core,mas-admin,mas-mcp), 210 passed.connection_lanes,connection_health,editor_sessions,backup_dump,restore_fileandstaged_write, 53 passed.connection_lanescheck that:mas-core,mas-mcpand the app crate.-D warnings, rustfmt and dprint are clean.bindings.tsis unchanged, since no commands or exported types changed.Generated by Claude Code