Skip to content

chore: delete the v1 python test suite#73

Merged
arzafran merged 1 commit into
mainfrom
chore/delete-v1-test-suite
Jul 8, 2026
Merged

chore: delete the v1 python test suite#73
arzafran merged 1 commit into
mainfrom
chore/delete-v1-test-suite

Conversation

@arzafran

@arzafran arzafran commented Jul 8, 2026

Copy link
Copy Markdown
Member

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

  • Deleted: the v1 python tests + tests/cmux.py (v1 client) + scripts/run-tests-v1.sh (VM runner)
  • Survivors in tests/ (deliberate): the 10 CI-infrastructure guard scripts wired into ci.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), and tests/fixtures
  • Coverage note: v1-only tests without a same-named v2 counterpart die with the protocol they exercised; anything testing product behavior worth keeping should be ported into tests_v2/ on demand

Test Plan

  • None of the deleted files are referenced by any workflow (verified before deletion)
  • CI green

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 arzafran merged commit 302b196 into main Jul 8, 2026
8 checks passed
@arzafran arzafran deleted the chore/delete-v1-test-suite branch July 8, 2026 12:43
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant