The mode filters the registry; an edit tool name answers unknown-tool. Extension setting lucisv.mcp.mode (full | read-only; any other value is read-only and logged), label and copy-config key lucisv-ro, both smokes in the release script. Tests: tests/read_only.rs, QA lane tests/qa_m8.rs. Co-Authored-By: Claude Fable 5.1 <[email protected]>
6.6 KiB
6.6 KiB
Manual extension-host acceptance — checklist
The one test of the VS Code extension that is not editors/vscode/smoke.js.
Run it on a release build (code --install-extension lucisv-<v>-darwin-arm64.vsix --force)
with /Users/guoliangchen/repo/opentitan open as the workspace. About an
hour. Record the release, the date and any failure in the table at the end.
| # | Step | Expected |
|---|---|---|
| 1 | Open hw/ip/aes/rtl/aes.sv. Status bar. |
"lucisv" item appears; no error toast; Output → lucisv shows the server version. |
| 2 | Wait for the scan bar to finish. Hover aes_core in an instantiation. |
Hover card with the module's header and file:line; F12 jumps to aes_core.sv. |
| 3 | Insert a tab at the start of a line. | A no-tabs squiggle within a second; lightbulb offers "Replace tab"; fix-on-save (editor.codeActionsOnSave with source.fixAll.lucisv) removes it. Undo. |
| 4 | Cursor on .clk_i in an instantiation; open the lightbulb. |
Port refactorings listed instantly (no hitch); picking one applies an edit (undo). |
| 5 | Format Document (Shift+Alt+F) on aes.sv. |
Reformats without an error toast; Format again is a no-op. Undo all. |
| 6 | Settings → search "lucisv.lint". | Every rule has a toggle; severity.style off removes all style squiggles immediately. Restore. |
| 7 | Add [lint] select = ["no-tabs"] in a scratch lucisv.toml beside the file. |
Only no-tabs diagnostics remain; removing the file restores the defaults. |
| 8 | Theme: switch Dark+ → Light+ → High Contrast. | Semantic highlighting readable in all three; no invisible tokens. |
| 9 | Zoom: View → Appearance → Zoom In ×3, then reset. | Hierarchy view and hover cards scale; nothing clipped. |
| 10 | Keyboard only: Ctrl+Shift+O (symbols), F12, Shift+F12, F2 rename, Esc. |
Every action reachable without the mouse; rename preview shows all files. |
| 11 | Screen reader (VoiceOver, ⌘F5): tab through the lucisv hierarchy view. | Each row announced with its name; the toggle buttons announced. Turn VoiceOver off. |
| 12 | Old server: point lucisv.server.path at ~/.cache/lucisv-baselines/lucisv-0.39.0's sibling server if kept, else skip. |
Extension warns about the version mismatch and still works. Reset the setting. |
| 13 | The other VSIX shape: install the lucisv-<v>-universal.vsix (no bundled server) with the CLI on PATH. |
Same behaviour as steps 1–5. |
| 14 | Restart the server (command palette: "lucisv: Restart Server"). | Diagnostics return within a few seconds; no duplicate status items. |
| 15 | Hierarchy pane: right-click aes → "Star as DUT". |
Three sections: "DUT: aes" (open, aes and its five children), "Parents of aes" (open, aes above aes_tb, aes_wrap, tb), "Other modules" (closed, 297 roots — the 292 plain ones plus the five aes_tb held beside aes, re-rooted). Right-click aes again → "Unstar DUT" puts the plain tree back exactly as it was. |
| 16 | Star aes, then hmac. |
Five sections in that order; "Other modules" has 297 roots; each section opens and closes on its own; a module under both keeps its own open state in each. Title bar "Clear DUTs" removes both. |
| 17 | Add "lucisv.hierarchy.duts": ["aes"] to the workspace .vscode/settings.json. |
The section appears without starring; right-clicking aes offers only a greyed "DUT from settings" whose tooltip names the setting; "Clear DUTs" leaves it. Remove the setting again. |
| 18 | MCP (VS Code 1.101+, platform .vsix in a clean profile: code --profile lucisv-mcp-qa --install-extension lucisv-<v>-darwin-arm64.vsix, opentitan open). Command palette → MCP: List Servers. |
lucisv (opentitan) listed under the lucisv provider without opening a Verilog file first (the contribution point activates the extension); no error toast. |
| 19 | Start it from that list; accept VS Code's trust prompt. In Chat (agent mode) ask: "call lucisv's hierarchy with no arguments". | One trust prompt; the tool call answers with the file/module counts line and the top modules as name file:line; the server's MCP output log shows lucisv-mcp: indexed N files and no error. |
| 20 | Settings → lucisv.mcp.enabled off, then on again (no reload). |
The server leaves MCP: List Servers when off and returns when on; Output → lucisv logged nothing new except, on the next activation with it off, one "lucisv.mcp.enabled is false" line. |
| 21 | File → Add Folder to Workspace… (a second folder); then remove it. | Two servers, lucisv (opentitan) and lucisv (<second>), appear without a reload; removing the folder leaves one. |
| 22 | lucisv.mcp.path set to /nowhere/lucisv-mcp; start the server from the list. Reset the setting. |
Not started; Output → lucisv: cannot start the MCP server: "/nowhere/lucisv-mcp" not found …; record whether VS Code itself adds a toast (acceptable if it is only VS Code's own "did not start" notice, not an extension error dialog). |
| 23 | Universal lucisv-<v>.vsix with no lucisv-mcp on PATH; start the server. |
Same as 22 with "lucisv-mcp" not found; the language server (steps 1–5) unaffected. |
| 24 | lucisv: Copy MCP server config → Claude Code; paste into .mcp.json of a scratch copy of a project; in a terminal there run claude, /mcp. Repeat for VS Code → .vscode/mcp.json in another window. |
The info message names .mcp.json and warns the bundled path moves on update; Claude Code lists lucisv connected and answers hierarchy (no arguments); the .vscode/mcp.json server ("type": "stdio") starts too. |
| 25 | Optional, if a VS Code older than 1.101 is at hand: install the platform .vsix there. |
Extension activates normally; Output → lucisv has one "no MCP server API (needs 1.101+)" line; the copy-config command still works. |
| 26 | Set lucisv.mcp.mode to read-only (Settings UI, workspace scope); open MCP: List Servers; start the server and list its tools in agent mode. Reset the setting afterwards. |
Without a reload the server is listed as lucisv read-only (opentitan); it offers exactly five tools (hierarchy, find, outline, read, check); asking the agent to rename something gets no edit (the tool is not there). Back to full: lucisv (opentitan) with nine tools. |
| 27 | With lucisv.mcp.mode = read-only, lucisv: Copy MCP server config → Claude Code; paste into a scratch .mcp.json. |
The info message says (read-only mode); the snippet's server key is lucisv-ro and its args end with --read-only; Claude Code's /mcp lists lucisv-ro connected with five tools. |
Runs
| Release | Date | Result | Failures (step, what happened) |
|---|---|---|---|