Files
lucisv/docs/manual-acceptance.md
T

9.3 KiB
Raw Permalink Blame History

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.
28 Open hw/ip/aes/rtl/aes_control_fsm_n.sv lines 382-486 (aes_control_fsm #() and scroll inside its port list; then open hw/ip/aes/rtl/aes_cipher_core.sv lines 793-930 (`ifdef INC_ASSERT) and scroll inside the branch. Sticky scroll pins up to 10 enclosing scopes: module header, aes_control_fsm #( (line 382), and ) u_aes_control_fsm ( (line 385) inside the connection list; the fold ends at line 485 so collapsing the range or reaching the end leaves ); (line 486) visible. In aes_cipher_core.sv, `ifdef INC_ASSERT (and `else branches where present) pins and folds independently with `endif outside the fold.
29 With aes_core.sv open, inspect the Hierarchy sidebar (lucisv.hierarchy.highlightCurrent = true). aes_core and its parent chain highlight in the active-path shades (lucisv.hierarchyCurrent / Parent1–3 / Ancestor); switching tabs updates the highlight.
30 Select one statement inside an always_ff/always_comb block and run Format Selection; also test "lucisv.format.style": "auto" vs "google". Only the selected containing block reformats (rest of file unchanged); auto preserves the file's predominant layout and google applies Google preset rules without altering lucisv default elsewhere.
31 Open a large .sv file containing [3:0] inside a comment, add // TODO: keep (parens) and [brackets], and test lucisv.commentKeywords.custom / builtIn / caseSensitive. TODO (and configured custom words inside // or /* */, never inside strings or identifiers) highlight cleanly without reload. VS Code's own bracketPairColorization (lucisv's rainbow covers begin/end/fork/join only) stops coloring brackets inside comments once background tokenization finishes (or settles after a /* edit).
32 Type begin + Enter inside an always_comb; inspect semantic token colors on module instantiations across Dark+, Light+, and High Contrast. Pressing Enter after begin completes end; module/interface type, #/.PARAM, instance name, and .port names hold distinct semantic token colours in all three themes.
33 Place the caret immediately after an identifier's last letter and trigger Shift+F12 (Find References). References, hover, definition, and rename work identically to inside the identifier; the Lucisv References view displays full trimmed lines and clicking a row places the caret at the symbol start.
34 In VS Code agent mode with lucisv MCP server started, ask it to run check on a directory or glob (e.g. ip/aes/rtl/*.sv). Returns ok (or lint/parse diagnostics) scoped cleanly to matching files under the root.

Runs

Release Date Result Failures (step, what happened)