Files
vscode-cowriting-plugin/docs/MANUAL-SMOKE-F3.md
T
2026-06-10 22:14:13 -07:00

54 lines
3.0 KiB
Markdown

# F3 manual smoke — live `claude-code` turn (spec §6.8)
> **As of F4 (#12)** the edit-selection turn ends in a **proposal** — the
> direct-apply behavior in §2 step 4 now happens on **✓ Accept Proposal**. The
> full propose→accept smoke is [`MANUAL-SMOKE-F4.md`](./MANUAL-SMOKE-F4.md);
> §1's scripted smoke is unchanged (it drives the SDK turn only, no editor).
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: superseded by F4 — the turn ends in a proposal, so a
mid-turn edit can't race an application; the proposal simply renders where
its target re-resolves (or stale if the target itself changed — F4 INV-11).
## 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. |