Skip to content

test(acp): live round-trip test with Zed + ACP serialization snapshot gate #3271

@bug-ops

Description

@bug-ops

Description

Live validation gate for the ACP 0.11 migration (#3265). Equivalent to the LLM serialization gate in branching.md but for ACP wire format. Required before the epic is closed.

Depends on: #3270

Required test sequence (Zed IDE or equivalent ACP client)

  1. Connect over stdio → initialize handshake completes with advertised unstable_* capabilities
  2. Open new chat → new_session response includes additional_directories field in _meta
  3. Send prompt → tool call emits permission request → user approves → tool executes → result streams back with correct message_id correlation
  4. Send cancel → CancelNotification arrives → prompt returns StopReason::Cancelled; no orphan tasks
  5. Close session → session/close handler runs → SQLite row marked closed → LRU evicts → subsequent request with same id returns -32001 SessionNotFound
  6. Capture JSON-RPC frame trace and attach to PR as acp-0-11-live-trace.jsonl

Additional validation

  • HTTP+SSE: same initialize → prompt → tool_call → result flow
  • WebSocket: same flow
  • Session fork + resume: fork at turn 3, resume fork by id, verify history diverges correctly
  • Elicitation: agent requests structured input; client responds; prompt continues
  • Logout: client calls logout; agent revokes session state

Performance criteria

  • P95 prompt handler latency ≤ baseline + 10% (attach .local/traces/ Perfetto flamechart to PR)
  • Thread count with 4 concurrent HTTP sessions: tokio runtime only — no extra OS threads (ps -L output attached)

Instrumentation audit

  • Confirm all spans from plan §12 are present in the trace: acp.transport.stdio.serve, acp.handler.initialize, acp.handler.prompt, acp.outbound.*, acp.permission.*, acp.fs.*, acp.terminal.*, acp.lsp.ext_method, acp.mcp.forward, acp.session.persist, acp.session.reap

Acceptance Criteria

  • All 7 test scenarios complete without errors
  • acp-0-11-live-trace.jsonl attached to PR
  • Perfetto flamechart attached (P95 ≤ baseline + 10%)
  • ps -L output showing thread count attached
  • Coverage-status.md rows updated from Untested to Tested or Partial

References

Epic: #3265 | Plan: .local/plan/acp-migration-plan.md §10–12 | Branching rules: .claude/rules/branching.md §"LLM serialization gate"

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High ROI, low complexity — do next sprintenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions