Files
vscode-cowriting-plugin/docs/MANUAL-SMOKE-F3.md
T
2026-06-10 10:27:28 -07:00

2.7 KiB

F3 manual smoke — live claude-code turn (spec §6.8)

The live turn is deliberately NOT in CI (unit + host E2E drive the seam). It gets this documented smoke, run once per machine that has Claude Code installed and signed in (Pro/Max). The extension itself holds no credentials (INV-8) — auth is entirely the local Claude Code login.

1. Scripted smoke (the quick check)

npm run smoke:live

Expected: prints a replacement: line containing "The smoke test passed.", the model id, a non-empty sessionId, and exits 0.

2. In-editor smoke (the real PUC-2)

  1. npm run build, then F5 (Extension Development Host) opening this repo.
  2. Open any markdown file in the workspace; type a sentence — it renders with the human gutter border (left edge) as you type.
  3. Select the sentence → run “Cowriting: Ask Claude to Edit Selection” → instruction: rewrite this more formally.
  4. Expected: progress notification; on completion the replacement text lands tinted (Claude-attributed), the human border remains on your other edits, and after save the sidecar .threads/<doc>.json has an attributions[] entry with author.kind: "agent", agent.model, agent.sessionId, and a turnId.
  5. Cowriting: Toggle Attribution hides/shows both decorations (PUC-5).

3. Failure paths (INV-8 — graceful, tracking unaffected)

  • Signed out / no Claude Code: hard to simulate on a machine where Claude Code is installed — neither stripping PATH nor hiding the ~/.local/bin/claude symlink works (the SDK discovers the real install under ~/.local/share/claude/versions/…). The only true trigger is being signed out (or having no installation at all), so exercise this on a signed-out machine when one is available. Expected: the script exits 1 with a clear error (runEditTurn throws on any non-completed run status); in-editor, the command shows an error notification and NO edit is applied.
  • Buffer edited mid-turn: start an edit-selection turn, type elsewhere in the document before it completes → warning notification "document changed", no partial application (stale expectedVersion, spec §6.9).

Smoke log

Date Machine Result
2026-06-10 benstull mac (darwin) PASS — replacement: "The smoke test passed.", model sonnet, sessionId run_g_rYKGYl, 6.9s, exit 0. Failure-path notes: turn still succeeded with PATH="/usr/bin:/bin" (6.2s) AND with ~/.local/bin/claude renamed away (3.7s, run_TQwQipJx) — the SDK discovers the real install under ~/.local/share/claude/versions/…, so only a genuine sign-out (not attempted from inside a live session) exercises the error path.