PRD 0009: Remove ssh-gate and bottle.ssh #13
Reference in New Issue
Block a user
Delete Branch "deprecate-ssh-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements the PRD that lands in this same branch. ssh-gate was introduced in PRD 0007 as an L4 forwarder for non-git SSH; in practice every upstream declared in any bottle has been a git remote, and PRD 0008's git-gate now handles those with credential isolation, gitleaks scanning, and
insteadOfURL rewrites that capture push / fetch / clone / pull / ls-remote. ssh-gate was left doing transport-only forwarding with no gating value over the git-gate path; this PR removes it.The change is mostly deletion across four commits, one per layer:
SshEntry,Bottle.ssh, the shadow-route validator between bottle.ssh and bottle.git, and the SSH-only port helper are gone. A legacysshkey on any bottle now parse-fails with a one-line hint pointing atbottle.git(PRD 0008) so the migration is visible and one-shot rather than a silent ignore.claude_bottle/ssh_gate.py, the Docker sidecar (backend/docker/ssh_gate.py), and the SSH provisioner (backend/docker/provision/ssh.py) are deleted. The abstractBottleBackendlosesprovision_sshand_validate_ssh_entries; the docker backend drops theDockerSSHGateinstance, thegatekwarg threaded through prepare / launch, thegate_planfield onDockerBottlePlan, the y/N preflight's ssh-hosts block, and thessh_hosts/ssh_gatekeys in the dry-run JSON (the latter is a breaking change for any consumer ofstart --dry-run --format=json).cli infoswitches to printing the bottle's declared git remotes. Pipelock's docstring picks up the git-gate framing now that there's no PRD-0007 boundary to call out.tests/unit/test_ssh_gate.pyand thefixture_with_sshfixtures are deleted; the pipelock-allowlist test rewrites to exercise an egress duplicate (the property the ssh-leak guard was hitching onto); the manifest's shadow-route assertion becomes a legacy-ssh-dies-with-hint assertion; the orphan-cleanup integration drops the SSHGate.stop idempotency check (pipelock equivalent stays); the dry-run-plan integration drops assertions on the removed keys.~/.ssh/config; the manifest example showsgit:instead ofssh:. PRD 0007 keeps the file but carries aStatus: Superseded by PRD 0009header with a one-paragraph block explaining why — the prior design's rationale stays in-tree as audit history.52 unit tests pass. If non-git SSH ever returns, the git-gate pattern (gate holds credentials, agent gets a rewritten URL, gate makes the upstream connection) is the template for a fresh sidecar; ssh-gate's L4-only design doesn't come back.