Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
The user approved option A1 on 2026-11-01. Revision 1 resolves the Codex REVISE findings: transport and pin come from the written URL (git clone ignores the enclosing repository's insteadOf), host certificates on non-default ports are a fail-closed limitation, ssh-add -c confirmation is documented as the agent's own prompt, ServerAliveInterval/CountMax bound silent servers, and the unknown-host recovery command uses the plan's port and known_hosts file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
Escape known_hosts paths for OpenSSH's argv_split and %-token expansion before shell quoting, keep the agent socket out of the command with IdentityAgent=SSH_AUTH_SOCK, give the recovery command the plan's HostKeyAlias so certificate fallbacks save the plain key, and start the confirmation-refusal test agent with SSH_ASKPASS_REQUIRE=never. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
) An outside agent that passes the Terminals gate (Terminals on, Full access, terminal:operate, read live) may clone ssh:// URLs with the person's SSH agent. ssh runs through BiBCode's own GIT_SSH_COMMAND: -F none, HostName=<checked address>, HostKeyAlias=<host> ([host]:port off 22), strict known_hosts checking that never writes, agent keys only, no proxy, multiplexing or forwarding, ConnectTimeout and ServerAlive for stalls. Known_hosts paths get OpenSSH option escaping then shell quoting. Every other agent gets clone_ssh_not_allowed naming the https:// URL. An SSH URL an enclosing insteadOf rewrites is refused, since git clone uses the URL as written. ssh's own refusals get actionable advice; a missing agent or an ssh lacking an option is clone_ssh_unavailable. The Terminals gate is one predicate shared by the terminal tools and the clone policy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
Approve the design, describe the SSH plan, gate and reasons in the MCP reference, user guide and architecture, and add the real-sshd, agent, certificate and ssh-add -c steps to the validation runbooks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
…cy (#217) The stall test now asserts ssh connected and the failure carries no policy reason, so a refusal before ssh runs cannot pass it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
…ory (#217) The direct RPC rebuilt transfer failures from their detail and dropped reason: clone_ssh_unavailable; it now keeps the reason as the plan's refusals do. The cancel test now checks that the fake ssh's sleeping child has exited (its OS pid, the Windows pid under MSYS), not only that the folder is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
) MSYS changes a forked child's Windows pid when it execs, so the fake ssh now waits (up to 10 s) until /proc/<child>/exename is sleep before reading its winpid; the cancel test then watches the real sleeper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
…eset waits on a reader
PRAGMA wal_checkpoint(TRUNCATE) reports busy when every committed page is
already in the database file but a reader keeps the WAL from being reset.
Update preparation refused that, which failed the Windows desktop lane
("WAL checkpoint remained busy (163/163 pages)"). A busy result now passes
only with non-negative counts and every page moved; -1 counts (another
checkpointer held the lock) and pages left in the WAL still fail.
Refs #263
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
Owner
Author
|
Merged into |
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 #217
Implements the approved design
docs/plans/2026-11-01-mcp-ssh-agent-clone-design.md. The user chose option A1 on 2026-11-01, and Codex reviewed the design over 3 rounds.Update 2026-11-02 (back in v0.15.0)
main(feat(web): resizable Git Changes panes and next/previous change across files #241), with no conflicts.backend::tests::an_unparsable_operation_id_reads_the_same_on_both_transports: "SQLite online backup WAL checkpoint remained busy (163/163 pages)"). Refs Tests: harden load-sensitive web, device, desktop and queue tests seen in the v0.15 batch #263.Database::checkpoint_wal. That ranPRAGMA wal_checkpoint(TRUNCATE)once and refused anybusyresult. Here every committed page was already in the database file, and only the WAL reset waited on a reader.-1counts, which means another checkpointer held the lock and nothing moved (found by Codex), and pages left in the WAL.a_checkpoint_that_moved_every_page_succeeds_while_a_reader_holds_the_walfailed before the fix with exactly CI's error,remained busy (52/52 pages), and passes now.a_checkpoint_that_leaves_committed_pages_behind_still_failspasses.a_busy_checkpoint_is_complete_only_when_every_page_movedcovers each result case.persistence::andmaintenance::lib tests (122) pass, as do--test production_maintenance(16),cargo fmt --all --checkand Clippy with-D warnings.-1case (NEEDS-FIX), which is now fixed and covered by the case test.Changes
ssh://[user@]host[:port]/pathonly if they already pass the Terminals gate: MCP on, Terminals on, effective ceiling Full access, andterminal:operate.mcp::control::acts_as_server_user.clone_ssh_not_allowed, naming thehttps://equivalent for GitHub, GitLab, Bitbucket and Codeberg on port 22.user@host:pathandgit+ssh://are refused with thessh://spelling.sshcommand:-F noneandHostName=<checked public address>.HostKeyAliasis the host on port 22, or[host]:porton other ports.StrictHostKeyChecking=yes,BatchMode=yes,UpdateHostKeys=no.IdentityFile=nonewithIdentityAgent=SSH_AUTH_SOCK. There is no proxy, control master or forwarding.ConnectTimeout=30,ServerAliveInterval=15,ServerAliveCountMax=4.sh -c.GIT_SSH_COMMAND,GIT_SSH,GIT_SSH_VARIANTorcore.sshCommandis never used.SSH_AUTH_SOCKwhen it is a socket.SSH_AUTH_SOCK, or the System32 OpenSSH client with theopenssh-ssh-agentpipe.clone_ssh_unavailable.HostKeyAlias. Thereasonis kept in the directsourceControl.cloneRepositoryRPC too.sshruns as Git's child in the existing supervised process group, so cancel stops it. A test asserts thesshchild has exited.Validation
node scripts/run-msvc.mjs cargo test -p bibcode-server --lib -- clone_policy mcp_tools_tests::clone: 34 pass (17 policy, 17 clone integration), 3 runs in a row.sshtests ran on both Windows clients (Git's OpenSSH 10.6 and Windows OpenSSH 9.5). They coverssh -Greading the generated command, a silent server ending the clone without a cancel, and the trust command.%%escaping, failed 14 tests. Thereasontest failed before its fix.cargo fmt --all --check, clippy-D warnings,vp check,vp run typecheck: pass.docs/testing/cross-platform-validation.md(step 15) anddocs/testing/ssh-environments.md: real sshd,ssh-add -c, a host certificate, and ports 22 and 2222.Review
sshstopped, the RPC dropping the reason, and a Windows pid race in the test. All are fixed.Profiler coverage:
sshis a child of the supervised clone process group (cancel, the 24 h bound and reaping cover it);vcs.cloneis already long-running. No URL user, key or known_hosts content is logged.Docs:
docs/reference/mcp.md,docs/user/mcp.md,docs/architecture/rpc-and-orchestration.md, plus the runbooks above.Known limitations (from the design)
ssh-add -cconfirmation dialog belongs to the person's agent.ssh_configis not read.🤖 Generated with Claude Code
https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P