The owner's slow-F12 root cause: textDocument/codeAction on a module
instantiation read every in-scope file through ws.sources() and ran
the port-refactor engine over them, per cursor move — 3.1-4.6 s on
opentitan's 3 976 files, blocking the single-threaded loop so every
queued definition/hover paid the bill. Workspace::module_sources now
hands the engine the cursor modules' fan-out: declarers (units),
instantiation-edge files, references_to postings (the fourth rung —
edges_of drops owner-less file-scope instantiations, so edges alone
are not a superset), and every open buffer. 4.56 s -> 7.1 ms typical,
83 ms at a 36-file fan-out; equality with the whole-workspace
computation pinned by four dev + six QA equivalence/attack tests.
Disclosed behavior change: the answer now sees the workspace as the
index describes it, like every other index-backed answer.
Also: performance.md (full opentitan benchmark of every LSP action)
committed at the root, and TODO.md gains section 10 tracking the
performance wave the benchmark spawned (rename family, completion,
documentHighlight, scope default) with per-lane file ownership.
Co-Authored-By: Claude Fable 5 <[email protected]>
vlog_refactor ports engine: add_port (ANSI + non-ANSI, named/ordered/.*
sites, .p(p) vs TODO placeholder by real scope lookup), remove_port
(refuses positional connections and live body uses, lists dropped
expressions), propagate_ports, all through a new splice verifier (piece
equality, comments never deleted, no new parse diagnostics, resolution
identity) plus a per-feature shape check. A new port can never silently
land inside an `ifdef arm (nesting-aware refusal, both insertion paths);
macro-argument/define-body occurrences of a removed port warn. Server:
code actions + vfmt.addPort/removePort/propagatePorts executeCommands.
Co-Authored-By: Claude Fable 5 <[email protected]>