chore: delete the v1 python test suite#73
Merged
Conversation
The v1 socket-protocol python test suite in tests/ (driven by tests/cmux.py) is superseded by tests_v2/, which now has full protocol parity. Deletes 85 files from tests/ plus scripts/run-tests-v1.sh (the manual VM runner for the retired suite). Two tests/ files stay because they're CI-wired in .github/workflows/ci.yml and don't depend on the v1 protocol: - test_cli_version_memory_guard.py (no socket protocol, standalone) - test_workspace_churn_up_arrow_lag.py (ported to the v2 client in #71) Also preserved: the CI/release-infrastructure guard scripts in tests/ (they guard workflow/build/release config, not app socket behavior, so they're unrelated to the v1 protocol) and tests/fixtures/ssh-remote, which tests_v2/ depends on. Fixes the one stale living reference to the deleted layout in docs/v2-api-migration.md. Dated historical changelog/checklist entries in TODO.md, PROJECTS.md, and docs/agent-browser-port-spec.md that record past VM validation runs are left untouched as historical record. Part of the v1-protocol-deletion sequence (step 5).
arzafran
added a commit
that referenced
this pull request
Jul 8, 2026
v2 JSON-RPC is now the only socket protocol. All consumers were migrated first (CLI in #74, shell integration in #72, tests in #71/#73; the remote daemon was already v2-only), so this deletes the v1 line dispatch itself and everything that only existed to serve it. - TerminalController.processCommand now dispatches JSON unconditionally; a non-JSON line gets a terse v1_removed error instead of being routed to the old space-delimited command switch. - Deletes the v1 switch (~90 cases) and every handler function that becomes unreferenced, plus their v1-only parsing helpers (parseOptions/parseOptionsNoStop, resolveTabForReport, withReportTargetSurface, upsertSidebarMetadata/clearSidebarMetadata/ listSidebarMetadata, schedulePanelMetadataMutation, parseReadScreenArgs). Debug handlers that v2's debug.* methods reuse as their implementation core (setShortcut, simulateShortcut, activateApp, isTerminalFocused, readTerminalText, renderStats, layoutDebug, bonsplit/empty-panel/flash counters, focusFromNotification, panelSnapshot(Reset), captureScreenshot) are kept, since they're still live v2 entry points, not v1 relics. Self.socketFastPathState and tailTerminalLines/ readTerminalTextBase64(terminalPanel:) stay too - v2 surface-telemetry and screen-read methods depend on them directly. - auth was already a connection-level preamble (authResponseIfNeeded, handled before any protocol dispatch) supporting both a raw auth-plus-password line and v2 auth.login; only the CLI's raw-line call needed migrating, which this does (auth.login now). - Removes the now-unreachable isV2:false focus-intent allowlist (focusIntentV1Commands) and updates the one unit test that exercised it directly to cover the v2 equivalent instead. - Docs: v2-api-migration.md collapses to a short removal note plus the v1->v2 name mapping (kept for reference); socket-focus-steal-audit.todo.md and agent-browser-port-spec.md get historical annotations; CLAUDE.md's socket-threading-policy examples are reworded to v2 method names. TerminalController.swift: 12834 -> 9615 lines (-3219). Net repo diff: +156/-3410 across 7 files. Breaking change: any external script or tool that still speaks the old space-delimited socket protocol directly (rather than through the CLI) will now get a v1_removed JSON error instead of a response. Use the CLI or the v2 JSON-RPC protocol described in docs/v2-api-migration.md.
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.
What this does
Deletes the v1 socket-protocol python test suite (~85 files, −20,700 lines) now that the v2 suite (
tests_v2/, 103 files) covers the product and the v1 protocol itself is about to be removed. Step 5 of the v1-deletion sequence.Summary
tests/cmux.py(v1 client) +scripts/run-tests-v1.sh(VM runner)tests/(deliberate): the 10 CI-infrastructure guard scripts wired intoci.yml/release.yml(self-hosted-guard, create-dmg pin, SPM retry, scheme config, GhosttyKit checksums ×2, remote-daemon assets, theme-picker helper, universal-release settings, homebrew sha),test_cli_version_memory_guard.py(protocol-free),test_workspace_churn_up_arrow_lag.py(ported to the v2 client in refactor: port typing-lag CI test to the v2 socket client #71), andtests/fixturestests_v2/on demandTest Plan