2e9da208e3e4a46b4a6ab63752da2e76e5bcda0f
64
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
71d13b5fbe |
Release 0.66.2: every source file names its author
Every tracked file that can carry a comment (880 of them) now opens with "Author: Guoliang Chen, a Senior Digital Design Engineer" and closes with "Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com", in the file's own comment syntax. No behaviour change: the diff outside the version bump and changelogs is comment lines only. - tools/stamp_author.py: writes the lines; idempotent, `--check` lists what is missing. Headers go under a shebang and under Markdown front matter. - Left alone: test fixtures, cases and snapshots (byte-exact inputs), JSON and JSONL, logs, images, lockfiles, docs/site/dist (regenerated) and the LICENSE files (already carry the copyright line). - tools/linux_check.sh: --help reads its header from line 3, now that the author line sits under the shebang. - tools/gates.sh green on this tree: 5 545 tests, corpus 814/6 as before. Co-Authored-By: Claude Mythos 5.2 <[email protected]> |
||
|
|
cc1e2c8b72 |
Release 0.65.11: actions on the open file no longer wait for the workspace
A hover, definition, type definition, highlight, prepare-rename or signature help on a name the file itself declares, and the outline, folding and selection ranges, are answered from the open buffer ahead of a scan, a rescan or a widen (server/ahead.rs, same_file.rs). The precondition is stated once, on Server::answer_from_the_buffer; ahead::REACH lists the notifications proved unable to change a buffer and everything else blocks. Completion offers what the file can reach (imported package members, inherited class members, included headers' macros) right after its own names (completion/related.rs), and its answers are half the size (completion/wire.rs). A new largeFile.threshold re-classifies buffers already open. The client's answer to a settings pull is now ordered like a notification (amends scan-ordering); colours answered while anything is held count as unsettled. TODO 71.2. Four dev rounds, four QA rounds; the last ran with Fable 5.2 as dev and QA after two QA failures. docs/features/fast-actions. Co-Authored-By: Claude Mythos 5.2 <[email protected]> |
||
|
|
a8c22dcab0 |
Release 0.65.9: lucisv-mcp no longer serves stale contents; the suite runs on Linux
TODO §70, closed. - lucisv_mcp/src/project/files.rs: Stamp's racy rule (re-check by content a stamp taken too close to a timestamp it trusts) covered the mtime alone. On Linux, where ctime moves in 1 ms ticks, a same-size rewrite that restored the old mtime inside the tick of the server's read matched in every field and index-based answers came from the old text indefinitely. The rule now covers every trusted timestamp (mtime, and ctime where there is one), the window is 3 s, and a wall clock stepped back since the read distrusts the stamp. The decision is a pure compare(Seen, Clocks) with deterministic unit tests. - Test-only: two stdin helpers tolerate BrokenPipe on the write to a child that exits before reading (lucisv cli.rs, lucisv_mcp qa_m8.rs); the didOpen latency test's budget is six parses of the same buffer, not 200 ms (lucisv_server e2e.rs); qa_m3's server is spawned before its checker thread, which removes a hang on a pipe inherited across threads on macOS. - .gitea/workflows/ci.yml: a linux job on the luhpe-linux-x64 runner — clippy and cargo test --workspace on Linux x86-64. - docs/features/mcp-transport describes the new rule and what it cannot see (Windows has no ctime; writable mmaps). Linux: whole suite green 10/10 as root and 10/10 as a user (dev), 6/6 and 6/6 (QA). QA reproduced the stale read on 0.65.8 (65/65, 87/87 when the stat was identical) and got 0 here. Dev, QA and lead review: docs/features/linux-test-portability/README.md, Round 2. Version bump (Cargo.toml, Cargo.lock, editors/vscode/package.json and both package-lock.json spots); notes in CHANGELOG.md (## 0.65.9) and editors/vscode/CHANGELOG.md. Gates: tools/gates.sh PASS on this tree including cross; lucisv_mcp 388/0. Co-Authored-By: Claude Mythos 5.2 <[email protected]> |
||
|
|
58d3db3e3c |
Release 0.65.6: saving a file no longer re-indexes the workspace
TODO §71.1. On OpenTitan hw (4 058 files) every save cost ~160 ms of whole-index work, twice (the save and VS Code's watcher echo), and watcher events for files the index could not hold started whole rescans. - vlog_semantic: resolution records every table lookup per reading file, misses included (workspace/dependents.rs, references.rs, replace.rs); an update re-resolves the edited file and the readers of keys whose values changed in what resolution reads. An unchanged record merges nothing. When the readers hold more than an eighth of all references, old results are removed in one pass over the postings. - lucisv_server: watcher events are classified per file (state/watched.rs); the include graph keeps every include line as written and re-resolves the lines a named path could satisfy, in one pass per event; an event naming more paths than half the index takes the single rescan; an open buffer the index does not hold joins on its first save; completion tables are rebuilt only for the names a file declares. Every save still republishes every open buffer. The line-length lint follows the formatting style's width. - Fixed on the way: removing an included header left other files' include edges pointing at it. Typical saves: comment or watcher echo <0.3 ms, local signal 4 ms, package member 12 ms; warm startup +40..120 ms for the readers table. QA failed the first cut on four stale answers found with an independent fresh-server oracle; all four are fixed and are differential tests. Dev (three rounds), QA (two rounds) and lead review: docs/features/localized-reindex/README.md. TODO.md files lane 71.7 from what the QA rounds and an investigation found in earlier releases too. Version bump (Cargo.toml, Cargo.lock, editors/vscode/package.json and both package-lock.json spots); notes in CHANGELOG.md (## 0.65.6) and editors/vscode/CHANGELOG.md. Gates: tools/gates.sh PASS on this tree; vlog_semantic 435/0, lucisv_server 2011/0, lucisv_mcp 384/0. Co-Authored-By: Claude Mythos 5.2 <[email protected]> |
||
|
|
d57496978f |
Release 0.65.4: `ifdef blocks fold, and pin in sticky scroll
release / build-and-publish (push) Successful in 5m44s
TODO §71.4. Each conditional-compilation branch (`ifdef, `ifndef, `elsif, `else) is a folding range from its directive line to the line before the next branch or `endif, kind region, nested to any depth; sticky scroll, which already follows the server's folds, pins the branch line. Built on the lexer's directive tokens (folding/directives.rs), so directives in comments, strings and `define bodies are not folded; no parser or formatter change. An existing fold is never lost or changed: scope and comment folds are computed as before and sent first at a shared start line (folding::in_answer_order). Proven on OpenTitan hw (4 061 files, 1 061 branch folds) and the corpus (860 files, 511): non-directive folds byte-identical to 0.65.3 (QA, base built from git archive), 10 000-case fuzz against an independent model. Dev, QA (pass with findings, one fix round) and lead review are in docs/features/ifdef-folding/README.md. Not seen in a running editor. Version bump (Cargo.toml, Cargo.lock, editors/vscode/package.json and both package-lock.json spots); notes in CHANGELOG.md (## 0.65.4) and editors/vscode/CHANGELOG.md. Gates: tools/gates.sh PASS on this tree, lucisv_server 1977/0. Co-Authored-By: Claude Mythos 5.2 <[email protected]> |
||
|
|
14213f6a93 |
TODO §68.2: an unfinished port connection stays in its own entry, and its errors wait until you pause
Parser (tolerant mode only, parser/recover_list.rs): a lone '.', a
'.name(' left open at its line end and a trailing ',' in a named list are
recovered inside their entry — always a diagnostic, never silent; strict
mode and valid code are unchanged (1 026 inputs old vs new: identical
strict results and trees, byte-identical CLI output; corpus 814/6).
Server (state/port_grace.rs): diagnostics that start inside the entry the
last edit touched, in a named-connection list of an instance, are withheld
for 1.5 s and released by the loop's timeout, an edit elsewhere or a save;
a pulling client that supports it gets workspace/diagnostic/refresh.
A trailing ',' in a named list is now reported in tolerant mode too.
Dev + QA (Opus 5.5); QA failed one gate (lucisv_mcp qa_f1), one fix
round, re-check passed: parser 521, server 1954, mcp 383, formatter 352.
Not yet seen in a running VS Code. docs/features/port-entry-grace; topo
rows for §68.1 and §68.2.
Co-Authored-By: Claude Mythos 5.2 <[email protected]>
|
||
|
|
c1076f9405 |
TODO §68.1: begin+Enter writes the end, clock+reset templates, this file's names first, keyword ghosts, port items that write .name()
Server (lucisv_server only): on_type/auto_end.rs — the newline answer adds the owed end at the owning statement's indentation (lucisv.autoEnd); always_ff @( / always @( ghosts and popup templates lead with posedge clk or negedge rst_n; completion tiers put names declared and used in this buffer ahead of the index, templates and keywords (completion/buffer.rs); inline/keywords.rs ghosts the rest of a keyword and follows the popup's selected entry (lucisv.inlineKeywords); connection items keep connected ports as a second group marked 'connected' and insert name($1), pre-filled with a same-named signal (completion/connection.rs). Extension: typing.js sends the newline on-type request itself when editor.formatOnType is off and restores the cursor; the inline-completion context is converted to LSP shapes. Dev + QA (Opus 5.5) + one fix round; unit 1823, e2e 102, node 9 files, smoke OK. Not yet seen in a running VS Code. docs/features/completion-ux. Co-Authored-By: Claude Mythos 5.2 <[email protected]> |
||
|
|
2854bcaa2f |
TODO §66.2: the server's range, ranges and on-type formatting run on format_selection
textDocument/rangeFormatting, rangesFormatting and the on-type ';' now format the selected block in place of the enclosing module-level item; the reply is still one whole-document edit. On-type ';' now answers in a buffer whose error is elsewhere and adds no final newline. topo: the server → formatter edge and the selection-formatting row. Co-Authored-By: Claude Fable 5.2 <[email protected]> |
||
|
|
51b975bf68 |
TODO §65.2 closed by ruling: LSP references are scope-relative by design; tests pin both scopes
Root cause (lane A): not the fan-out. The default index scope (`folder`, depth 2) opened from hw/ip/aes/dv/tb/tb.sv indexes hw/ip/aes only, so the three *_pd_main.sv tops are never walked; with index.scope "workspace" the LSP answers 14/12, equal to the whole-set engine. Ruled out: the 1 MiB cap, autogen/ignore rules, the multi-line instantiation. The owner kept the design; the index.scope setting now says a rename of a module instantiated outside the scope leaves those sites unchanged. Tests: server/tests/references_scope.rs (3: the LSP equals the engine over the same file set in both scopes, a module rename reaches the top under `workspace`), tests/opentitan_references.rs (2, ignored: 14/12 workspace, 11/9 default). lucisv_server 1 865 passed, 0 failed; node 8/8. docs/features/references-fanout-pd-main. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
31b7db16a3 |
LSP: call and type hierarchy answer from anywhere in a body; functions and tasks are call-hierarchy nodes
Show Call Hierarchy was empty in VS Code unless the cursor sat on a module
name. prepareCallHierarchy now answers on an instance name (its module),
on a function/task declaration, call or end label (a FUNCTION/METHOD item
with data {kind,name,offset}), inside a function/task body (that one), and
inside a module/interface/program (the enclosing module). Function/task
items: incomingCalls = call sites grouped by the enclosing function/task or
unit, over the same files references reads; outgoingCalls = resolved
callees (system tasks and unresolved names skipped). A function's bare name
in its own body is its result variable, not recursion. Module items keep
instantiation edges, byte-identical. prepareTypeHierarchy answers the
enclosing class inside a class body and the base on `super`.
QA (Opus): old module answers identical at 3 137 positions; outline,
definition, references, hover unchanged at 1 340 queries; findings fixed in
a rework (outgoing over a closed 300-function package 3.0 s -> 18 ms). Two
e2e assertions that pinned the old null flipped (lead's handshake).
lucisv_server 1 862 passed, 0 failed; fmt, clippy -D warnings clean.
docs/features/call-hierarchy-everywhere.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
a2a22adad8 |
Cross-file references reach a module's nets, variables and instances (§64.1, QA task_d8afe80f of §63.1): nav.rs's two index questions (leaves_this_file, indexed_def_in_file, the latter shared with hover's live_symbol) asked WorkspaceIndex::member — the connection surface, ports and parameters — so a declaration only a hierarchical path can name (a bind connection's expression half, a u_x.sig tail) was judged unable to leave its file and references fell to the single-file answer, while a rename already edited both files; from a use that did resolve cross-file, the declaring buffer's own uses could not re-identify themselves. Both now ask member_in(…, Surface::Hierarchical); the connection answer comes first and whole from that read, so every port/parameter/package/class/struct answer is byte-identical (nav harness controls and a 948-declaration opentitan census). A hierarchical-only member has no Local postings by the §49 ruling, so nav::declaring_file_uses parses exactly the closed declaring file once per request (0.4–1.5 ms on state_q into a shut entropy_src_main_sm.sv), hierarchical_only asking the index's own table rather than restating surface_of. Three QA rounds (Sonnet, Sonnet, then Fable per the escalation rule): the closed-file path read a cached FileView and rendered against a fresh text_of (a stale offset on a wrong line) — now one fresh read per closed file threaded to the rendering step; every index-time span about a closed file, and the open-buffer declaration fallback (nav::declaration_site), guarded by hover::spells_exactly (pub(crate), shared not copied): a stale index may omit a location, never mislocate one. Accepted: +25 % on a local-net references in a 40 267-line buffer (1.22 → 1.54 ms), the guard is textual (a different exact token at a deleted declaration's old bytes). opentitan: entropy_masking_req from aes.sv now lists aes_bind.sv; state_q lists entropy_src_core.sv; checkout untouched. Tests 4422 → 4459 (11 dev + 1 hover + 1 e2e wire test; 19 QA attacks incl. escaped identifiers, UTF-8 boundaries, a deleted declaring file, oracle equivalence with vlog_refactor::find_references); fmt, clippy, workspace suite green through tools/guard.sh. Feature README docs/features/references-hierarchical-surface; references-nav, hierarchical-tail and hover-declarations READMEs, record.rs's postings comment and the topo row amended; perf entry in docs/perf/README.md. Release 0.55.0 left to the owner.
Co-Authored-By: Claude Fable 5.1 <[email protected]> |
||
|
|
e6eaf53c35 |
Organize imports: unused imports removed, duplicates merged, the run sorted; the unused-import rule; source.organizeImports
TODO §52 (docs/features/organize-imports), the third §8 refactoring. The judgement lives in `vlog_semantic::imports` (one implementation for the refactoring and the rule): an import is used when a reference in its scope, or one nested in it, resolves to a member of the package through it — `resolve::lexical`'s walk stopped at the scope, every import whose path admits the name and whose package exports it (binder tables same-file, `members_of_chain` with re-exports otherwise) marked used, a deliberate superset; a qualified `p::y` and an import's own package name never count; an `export p::x` / `export p::*` / `export *::*` in the scope marks the import it re-exports through as used (IEEE 1800 §26.6 — the review rework of QA's HIGH, pinned four ways). Refuse to judge: an unknown or twice-declared package, a macro call or conditional directive anywhere in the scope, a class with an out-of-file base, a parse diagnostic, two imports on one line. `vlog_refactor::organize_imports` deletes the unused lines, merges exact duplicates, sorts the run at the scope's top (package, item, `*` first), keeps every comment; the verifier's resolution check refuses a removal a reference needs (attack pair). `unused-import` (Style, off; safe fix) through `MentionOracle::package_exports`, silent without a project. Server: `lucisv: organize imports (removes N, sorts M)` under `source.organizeImports`, `lucisv.organizeImports`. Corpus: 40 scopes with ≥ 2 imports, 1 organized, 32 refused for macros; the rule finds 2, both substantiated. opentitan: 33 of 33 UVM env packages refused (`` `include "uvm_macros.svh" ``). 0 of 860 corpus files differ from 0.46.0. Co-Authored-By: Claude Fable 5.1 <[email protected]> |
||
|
|
aa479cf701 |
Convert ports to ANSI: a Verilog-2001 header merged with its body declarations, and a verifier that never drops a comment or an attribute
TODO §51 (docs/features/ansi-conversion), the second §8 refactoring. `vlog_refactor::convert_to_ansi` (ports/ansi.rs, ports/merge.rs): for a `PortList::NonAnsi` module, each header name gains its direction, net or variable type, signing and packed dims from the body declarations that describe it, merged per IEEE 1800 §23.2.2.2 (`output b; reg [7:0] b;` → `output reg [7:0] b`), as insertions around the untouched name so no reference anchor moves; the absorbed declarations are deleted with their comments carried onto the ports. Twenty-three refusals, each a sentence (port expressions, disagreeing ranges, initialisers, directives, a comment that would have to move into a one-line list, an attributed declaration). Code action `lucisv: convert ports to ANSI (N ports)` and command `lucisv.convertToAnsi`. Review rework (QA's two HIGHs, invariant 4): the verifier's comment rule is now `never_dropped` over comments and attribute instances alike — `has ≥ had`, `wrote ≤ gone` unless the text is the one generated placeholder, `has == had − gone + wrote` — with masked-corruption attack tests, re-attacked by QA (30-plus pairs, a neutering pass). Neither the corpus nor opentitan holds a non-ANSI module; acceptance is by round trip (ANSI → 2001 → ANSI, same ports/types in order) over five corpus modules and 290 of 291 opentitan candidates (the one failure is kmac_reduced_tb.sv's pre-existing trailing-comma parse error). 0 of 854 corpus files differ from 0.45.0. Co-Authored-By: Claude Fable 5.1 <[email protected]> |
||
|
|
d9ed2c447a |
Expand .*: a wildcard connection written out as the named connections it stands for
TODO §50 (docs/features/expand-wildcard), the first §8 refactoring. `vlog_refactor::expand_wildcard` (ports/expand.rs): at the cursor's instantiation, every port not explicitly connected becomes `.p(p)` when a same-named net, variable or port is declared in the instance's scope (generate block → parents → module; IEEE 1800 §23.3.2.4 read strictly — a parameter, genvar, type, instance or tf argument does not bind) and `.p()` plus a warning otherwise, in declaration order, replacing the `.*` element through the ports engine's splice and verifier. Refusals: no `.*`, two, a positional list, a `bind` directive, a multi-instance statement, a parse diagnostic in either file, compiler directives in either list, an unknown or twice-declared module, and a `.*` that binds nothing. Server: the lazy code action `lucisv: expand .* (N connections)` and the command `lucisv.expandWildcard`; a title-rewrite bug in the lazy offer path (`counted`) fixed on the way. Corpus: 11 of 21 sites expand (the rest refused honestly); opentitan `hw/`: 9 of 66 (50 are `bind`), each verified, two surfacing real FPV-wrapper drift. 0 of 854 corpus files differ. Dev-dependency vlog_refactor → vlog_formatter (tests). Co-Authored-By: Claude Fable 5.1 <[email protected]> |
||
|
|
f476c31483 |
Cross-file instance-member tail: a module's hierarchical surface, read only behind an instance head; rename edits the tail
TODO §49 (docs/features/hierarchical-tail). Closes topo §2.9-23 and
comment-slots finding 2. The first dev was cut off by an outage with the
library half complete; a second finished the tests, README and gates.
`Surface { Connection, Hierarchical }` on `Resolution::ExternalCandidate`
and `MemberSite::Unit`, set by `resolve.rs::head_surface` for an instance
head. `workspace/hierarchy.rs`: `surface_of` (the export rule, re-ruled)
and the two surface-taking reads; the index keeps two disjoint tables —
`members` (connection: ports, parameters; byte-identical to before for
every existing reader) and `hier_members` (nets, variables, instances) —
and a hierarchical read consults the connection table first, so a port
has one record. `FACTS_FORMAT` 18 → 19. `assign w = u_x.sig;` in another
file now resolves to `sub`'s `wire sig`; rename edits both files (nested
`u_a.u_b.sig` included); the §2.9-20 warning is retired for a resolved
tail; a generate-scoped net is still refused honestly. Completion after
`u_x.` in an expression lists the hierarchical surface; a connection
list's does not.
Census: single-file numbers unmoved; 12 939 connection + 5 239
hierarchical-only members; 335 corpus references newly resolve, 514 over
opentitan `hw/` (20 sampled by QA, all genuine). 0 of 860 corpus files
differ. Also: §50/§51 planned, §55 (state.rs size) filed.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
||
|
|
9ef1058059 |
Package re-exports as real references: bound halves, RX facts, the member walk through re-exports
TODO §48 (docs/features/package-reexports). Closes topo §2.9-16 and dpi-export's request (a). `bind_export_path` records `export pkg::item` as a `Target::Package` use and a `Target::UnitMember` use, with no scope import (a re-export brings nothing into the exporting scope, IEEE 1800 §26.6). `FileFacts` gains the `RX` group (`FACTS_FORMAT` 17 → 18): per package its re-export edges (package, source, item|*), with `export *::*` expanded into the package's own imports at record time. `workspace/reexport.rs`: the member lookup and listing follow re-exports transitively with a visited set, layered over `own_chain`/`own_members` so the walk cannot recurse into itself; `Affected::exporters` keeps one-file updates exact and `fingerprint()` shows the edges. Definition, hover, completion after `pkg::`, references and rename all read the one edge. Census 103 870 → 103 875 references (the corpus's two package export lines), 0 unplaced; 0 of 860 corpus files differ. opentitan: `spi_device_pkg::SramDepth`, reached only through a re-export, resolves. Co-Authored-By: Claude Fable 5.1 <[email protected]> |
||
|
|
8145a67be6 |
The didOpen delay: undriven-net asks the workspace census last, not once per declaration
TODO §46 (docs/features/didopen-cost). Closes take-3 finding §8.4 (§44b). Measured first: on opentitan the open of a 42 192-line file cost 1 745 ms, of which the lint pass was 1 654 ms and `undriven-net` alone 1 608 ms — the rule asked `WorkspaceIndex::files_mentioning` (a walk over all 3 976 indexed files) once per declaration, ahead of the local guards that silence almost all of them. Six lines reordered so the oracle is asked last, as `unused-signal` always did: same findings, same order (pinned by a counting-oracle unit test that fails on a revert, and shown byte-identical against 0.43.0 over a crafted workspace and four opentitan IPs). didOpen → next request: 1 742 → 117 ms on the largest file, 51–95 → 5–8 ms on typical IPs, the same on every keystroke flush. No debounce added; three wire-level pins with a debug-build bound. Docs: take-3 §8.4 annotated, docs/perf/README.md entry. Co-Authored-By: Claude Fable 5.1 <[email protected]> |
||
|
|
4b2dad87fe |
One lint-configuration contract for project and editor: the server picks the editor's selection when set, else the project's, and logs rejected project entries once
TODO §42 (docs/features/lint-config-contract). Closes topo §2.9-28 and repository-analysis finding 2. `enabled_rules(settings, project, has_oracle)`: rung 2 is `lucisv.lint.select` when non-empty else `[lint] select`, rung 5 the same for `ignore` — the CLI's `pick` applied to the editor — so one buffer linted two ways is linted the same way (asserted equal over the wire for three configurations). `lint::project`: `ProjectLint` read from the `Discovery` result `configured` already computes (no extra read per pass); an unknown rule name in a project list is dropped and said rather than silently emptying the selection. `ConfigProblems`/`ProblemLog`: rejected `[lint.<rule>]` options, unknown names and bad `[lint] waivers` lines are logged once per (config file, entry) in `lucisv check`'s wording, re-armed when the config's lint content changes; the buffer keeps linting with the entry dropped. Docs applied: README, the linter guide, configuration.md, the analysis, topo (28 struck; 29 filed for the editor-side unknown-name silence), site rebuilt. Co-Authored-By: Claude Fable 5.1 <[email protected]> |
||
|
|
8a92e79fc0 |
External waiver files: Verible's format from lucisv.toml, --waiver-file and the editor, union with inline waivers, honoured by quick fixes
TODO §39 (docs/features/waiver-files). Closes §4's last waiver item. `vlog_linter::waiver_file`: `waive --rule=<rule> [--line=N|N-M] [--location=<pattern>]`, `#` comments, BOM tolerated; `--location` is the `--exclude` matcher (`lucisv_core::walk::is_excluded`, a new vlog_linter → lucisv_core edge), a regex-looking pattern refused by name. `lint_with(ctx, rules, external)` applies inline and external waivers as a union and reports which external directives fired; `lucisv check` reports the dead ones under `unused-waiver` at the waiver file's line after the whole run. Discovery: `[lint] waivers` (relative to the toml), `--waiver-file` (repeatable), `lucisv.lint.waivers` (first workspace root); bad lines fail the CLI run with file:line and are dropped and logged once by the server. Review rework (QA's HIGH): the server's code-action path now lints with the buffer's `LintRun` — its enabled rules and external waivers — so a quick fix is never offered, nor applied by fix-on-save, for a waived finding. Docs: Waivers sections in README and the linter guide, cli and configuration rows, topo edge, site rebuilt. Co-Authored-By: Claude Fable 5.1 <[email protected]> |
||
|
|
9604753b6c |
Lazy codeAction/resolve for the port refactorings, definitions from the index, the inlayHint zero ruled correct
TODO §37 (docs/features/lazy-code-action). Closes the four §10 lines.
37.1 For a client whose resolveSupport lists "edit", the port actions are
offered over the buffer plus the instantiated module's declaration alone
(`ports::offers`, `offer_sources`), carrying `data {uri, position,
title}` and no edit; `codeAction/resolve` (`ports::resolve`) re-runs the
eager path and returns the matching action, matched on the title minus
its count phrase, erroring when the action is gone or the buffer is on
the large-file path. Clients without resolve support get today's eager
answer. Offer flat at ~55 µs from a 3- to a 128-file fan-out where the
eager path was linear; ~4.5 ms vs ~77 ms over the wire on opentitan's
128-file case.
37.2 The inlayHint zero at the default scope is correct: the hinted
module (`pins_if`) is declared outside what the scope reaches, and
definition/hover answer nothing there either. Pinned, not changed.
37.3 `locate::definition_location`: an index-only Location for a closed
file's file-scope declaration from its recorded `DeclPositions`; nav and
workspace symbols routed through it (0.4 µs vs 28 µs). Open buffers keep
the file-read path.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
||
|
|
8adb6c8ac1 |
Linter expansion, wave 3: the remaining nineteen Verible rules, forbidden-macro, void-cast's forbidden calls, and the e2e options case
TODO section 35 (54 -> 73 rules: every rule in Verible's published list but forbid-implicit-declarations). module-begin-block, legacy-generate-region, legacy-genvar-declaration, v2001-generate-begin, explicit-function-lifetime, explicit-task-lifetime (both exempt out-of-body definitions after a census showed 948 of 960 findings were exactly that shape), positive-meaning-parameter-name, suggest-parentheses (safe fix, truth-tabled), unpacked-dimensions-range-ordering, uvm-macro-semicolon, create-object-name-match, numeric-format-string-style, macro-string-concatenation, disable-statement, forbidden-macro, endif-comment (safe fix), forbid-line-continuations, dff-name-style, proper-parameter-declaration. Verible's forbidden-symbol is the source-file name of invalid-system-task-function (read in its rule .cc), so it is that rule's symbols option, nothing fires twice; void-cast gains forbidden_calls. Shared readers: walk_items_scoped, exprs.rs, preproc.rs. A checked-in e2e case drives lucisv.lint.options over the wire. Two rules fire on an error leaf because the parser refuses a module-scope begin/end and a bare generate begin - filed as docs/topo.md 2.9-25. 3 695 tests / 48 binaries; corpus 814/820 byte-identical to 0.38.0; opentitan default-set census 1 053 -> 1 169, the arithmetic balancing to the six default-on additions; timing unchanged. docs/features/linter-expansion-3/README.md. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
cebeff45b4 |
Linter expansion, wave 1: severities end to end, per-rule editor toggles generated from the registry, and nineteen Error/Warning-class rules
TODO section 33. Every rule states a Severity (error: would likely fail
to compile or elaborate, or silently mis-synthesize; warning: a probable
bug; style), printed in lucisv check text and JSON, mapped to
ERROR/WARNING/INFORMATION in the editor, grouped in --rules-doc, and
accepted by --select/--ignore and [lint] as a class word. VS Code gains
lucisv.lint.severity.{error,warning,style} and one tri-state
lucisv.lint.rules.<rule> per rule (default/on/off - a client sends
every key, so a boolean cannot say unset), generated by
vlog_linter::vscode with a drift test, and lint::enabled_rules is the
one documented ladder: defaults -> select -> class switches -> per-rule
-> ignore. Nineteen new rules (17 -> 36), one file each with true
positives and near-misses: Error - mismatched-labels,
duplicate-declaration (Semantics::duplicates(), additive),
undeclared-identifier (with a project; silent for macro text, included
fragments, hierarchical tails, any name another file mentions),
unknown-port, unknown-parameter; Warning - forbid-defparam,
invalid-system-task-function, truncated-numeric-literal,
undersized-binary-literal (safe fix), suspicious-semicolon,
packed-dimensions-range-ordering, module-port, module-parameter,
explicit-function-task-parameter-type, plusarg-assignment,
instance-shadowing, forbid-negative-array-dim, void-cast,
incomplete-assignment. Every false-positive class found on opentitan
closed with a named test; 3 383 tests / 48 binaries; corpus 814/820
and byte-identical (formatter untouched); vsix smoke OK.
docs/features/linter-expansion-1/README.md.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
||
|
|
a045cd7649 |
SVA bodies as real nodes: property and sequence expressions with Table 16-3 precedence, declarations, assertions, symbols, and a fallback that speaks
TODO section 27; the SVA half of coverage_gaps C1/M8; docs/topo.md
2.9-18's engine half.
property/sequence declarations, concurrent assert/assume/cover/restrict
property, expect, cover sequence and default disable iff were verbatim
text. They are nodes now: sequence_expr/property_expr as one
precedence-climbing extension of parse_expr (IEEE 1800-2017 Table 16-3
row by row - QA caught two rows transcribed from Table 11-2 and the
rework fixed them: nexttime on not's row, the whole loosest row read
position-independently), typed formals, assertion variables, action
blocks as the statements they are - behind a Rewind snapshot with a
byte-exact per-construct fallback that fires on 0 of 4 792 corpus and
opentitan files. No keyword reserved: operator words are text-matched
in SVA position only. One layout rule: top-level |->, |=>, ##, and, or
break one per line at the parent's indent when the spec does not fit.
SVA gap fuzzer 705 gaps / 0 failing; 46 attack pairs; verify.rs
untouched.
Semantics: SymbolKind::{Property, Sequence}, ScopeKind::PropSeq, formals
and locals scoped, instances resolve in-file and cross-file
(FACTS_FORMAT 15 -> 16); rename, references, document symbols and the
lints see inside; Scope::sva_fallback_warnings names what would still
fall back. macro_use_warnings pinned for a file whose only relationship
to the name is a macro argument (the server half stays filed).
Output moved in 13 corpus and 36 opentitan files, every changed line
inside an SVA construct (proved by tests/census.rs::sva_lines and by
QA's independent re-implementation); the 4 854 ASSERT macro uses are
byte-identical. Corpus 814/820.
docs/features/sva-bodies/README.md. Also carries TODO section 28
(decomposition, planned) and the topo rows for this round.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
||
|
|
81df63d942 |
Bind semantics, the spaced macro call and the directive inside a connection, and lucisv.instantiate
TODO section 26; closes docs/topo.md 2.9-15 and 2.9-19; coverage_gaps
M4/M5/M6 corrected against a fresh opentitan census.
A bind directive's target is a path of segments with optional indices
(bind top.gen[0].u_core chk u_chk (...)); a lone target binds as a
module reference, an instance path records nothing rather than a guess.
Each connection's port half resolves against the module being bound in
and its expression half in the target module's scope first, the
workspace's member path when the target lives elsewhere, the writing
scope last (Target::BindScope, resolve::in_bind_target - the
inline-constraint shape). FACTS_FORMAT 14 -> 15: binds now post
references and an instantiation edge.
Expression-position spaced macro calls (assign x = `WIDTH (a + b);)
keep the author's gap, read from the source as glued_null_item reads
its gap; verify.rs untouched, both pins stand. A conditional directive
inside a connection value becomes ExprKind::Verbatim, byte-exact
through raw_inline as Doc::Inline, with the closing paren's line and
the list's break read from the source - so the instantiation keeps its
edge, lens and port references instead of collapsing to opaque bytes
(opentitan: the two padring sites in chip_earlgrey_{asic,cw340}.sv,
+2 edges, everything else byte-identical to 0.31.0).
lucisv.instantiate [uri, position, module] renders the inline ghost's
plan as plain text through workspace/applyEdit for clients without
inline completion; the Neovim README documents it.
QA: 3186 tests / 47 binaries, corpus 814/820, independent binary diff
over corpus and 2 645 opentitan files: only the two named files differ.
docs/features/bind-semantics/README.md.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
||
|
|
a0c290ccc2 |
Comment slots in shared machinery: an owner for every gap, four fuzzers at zero, and the small-correctness residue
TODO section 25; closes docs/topo.md 2.9-20, 2.9-21, 2.9-22; opens 2.9-23. A comment written where no AST node had a field was never deleted: bump queued it and take_meta handed it to the next node, so it printed one node later and verify.rs refused the whole file. About seventy named comment fields now own those gaps - SegmentComments on member/scope/ index/range segments (one parse_postfix_segment replacing three hand-copied loops), one [a:b] grammar, BinaryComments on inside, casts, unary/postfix, if/case/for/foreach/do-while headers, @ and # timing, Stmt::before_semi with StmtKind::takes_semi() as the single owner of the ; (debug_assert enforced), labels on ten nodes, qualifier runs as Vec<Qualifier>, function/task/module/package/class/typedef/enum/struct headers, declarators, ports, connections, instantiations. Each prints through Fmt::slot_comments, a no-op when empty: 860 corpus and 3 975 opentitan files are byte-identical to v0.30.0 (QA reproduced from an independent baseline build). Four exhaustive gap fuzzers at zero - covergroup 329, fragment 153, constraint 395 (committed at last), RTL 352 (new) - are the regression gate. verify.rs untouched, ten attack pairs. Expression slots are boxed so Expr stays 96 bytes; ast::size_pins asserts it (QA's one finding). Also: nav::definition gains the macro branch hover already had (H5); a cast's type binds as a type via bind_type_expr, FACTS_FORMAT 13 -> 14 (M11); rename reports the candidate references that stayed unresolved through the overlay, one line per file and unit (2.9-20); the scoped name join keeps an escaped segment's terminator (2.9-21). One flagged edit outside scope: a .. in vlog_linter/src/signals.rs patterns. docs/features/comment-slots/README.md. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
5051bbdf15 |
Semantic lints on by default: the index knows who mentions what, and the linter finally asks
TODO section 24, coverage_gaps M7 via topo 2.9-6 and 2.9-4. unused-signal, undriven-net and multiply-driven shipped off because a per-file analysis cannot see a signal read or driven from another file's hierarchy. The index now carries a per-file identifier census - FileFacts::words, FACTS_FORMAT 12 -> 13, one harvest lifted from the server's completion candidates and now feeding them back from the store instead of re-lexing every file at startup (scan -28 percent) - and the linter gains a MentionOracle: unused-signal and undriven-net say nothing when the name is mentioned in any other indexed file, the false-negative-safe direction; multiply-driven shares the gate but never reads it. The three are on wherever an oracle exists (the editor always, the CLI when it walks a project) and off for a single file or stdin. With them, the missing off switch: [lint] select/ignore in lucisv.toml with CLI flags winning key by key, and lucisv.lint.select/ignore in the editor. QA's finding, reworked: the census dropped macro invocations whole, so a signal named only inside `uvm_info(..., dut.sig) was not silenced; the harvest now splits macro, directive and attribute words, skipping double-quoted runs so a "%d" cannot silence a signal named d project-wide, with workspace-defined macro names filtered out of the completion table at the reader. Store +16.9 percent corpus / +15.0 percent opentitan, measured. Corpus unused-signal 52 -> 44 and undriven-net 3 -> 0 with every silencing hand-checked, nothing added; opentitan - lint-clean under its own tools - 14 findings, all classified true against the whole repo. Also: the docs-site rules page gains the empty-item row it lacked. docs/features/semantic-lints-on/README.md. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
4e62a14af6 |
Fragment mode and define continuation: the three .svh shapes that did not parse, and the define that was blamed on its class body
TODO section 22, coverage_gaps H4 corrected. Class-body and module-item include fragments already parsed - the file-scope item loop is the class-item loop. The three shapes that did not - a bare statement list, an enum-member list (riscv-dv's CUSTOM_1, file, included between enum members), a covergroup-item list - become SourceFile::fragment, detected by a whole-file rule that cannot misfire on a valid file: the first structural item failed (directives, macros and null items do not count; a tolerant Ok that recorded a diagnostic counts as failed - an existing parity test caught if/else reading as a generate-if to one parser and a statement to the other), the file does not open with a design-unit keyword, and a shape consumes the file to EOF, tried narrowest-first. Each shape re-lexes a fresh token stream - Rewind does not restore the tokens' comment buckets and the first draft lost comments on non-fragment files. A fragment formats at indent zero through the existing printers; its declarations bind; its enum variants are not exported (pkg::CUSTOM_1 must not resolve to a name that does not exist). FACTS stays 12. The other .svh was never a fragment problem: a define whose formal argument list spans two lines with no backslash. The lexer continues such a directive until the list closes - incrementally, after QA found the first cut quadratic on an unclosed list (20000 lines: 2.5 s -> 0.56 ms), pinned by a byte-visit counter. Opentitan 12 -> 10 failing files, exactly the two predicted; corpus 813 -> 814 of 820; every remaining comment-gap failure proven to fail identically outside a fragment. docs/features/fragment-mode/README.md. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
2734885f2b |
Covergroup bodies: coverpoints, bins, transitions and crosses are real code - 544 of 544 on opentitan, zero fallbacks
TODO section 21, round 2 of coverage_gaps C1, closing it. A covergroup
was a flat token scan into verbatim text; now ItemKind::Covergroup with
CoverItemKind::{Coverpoint, Cross, Option, Directive, Empty}, BinDecl
(wildcard, kind, array, spec: Values / Transitions / Default /
DefaultSequence / Select, with, iff) and SelectExpr for binsof ...
intersect ... && !binsof - behind the same Rewind fallback as
constraints (v0.27.0's scan re-run character for character on any
failure), no keywords reserved. The bin '(' ambiguity is settled by
position, the LRM's own rule, which replaced a lookahead scan and took
the fallback count to zero. Two guards in shared expression machinery -
an index cannot begin with *, -> or =; a bin's own with (...) filter is
not an array-method iterator argument - both attacked across the corpus
and the opentitan tree. Canonical layout, verify.rs untouched, thirteen
attack pairs. Every sampled expression binds to the class's properties;
cg_inst.cp resolves cross-file; FACTS_FORMAT 11 -> 12. The gap fuzzer
was built in from day one and its classification is asserted, not
claimed.
Opentitan: 544/544 structured, 87/87 DV covergroup files idempotent
with comment streams byte-identical, sweep and per-file diagnostics
identical. Corpus +1139 references, 1135 answered.
docs/features/covergroup-bodies/README.md.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
||
|
|
bce167c052 |
Constraint bodies: constraint c { ... } is real code - soft, dist, ->, foreach, solve before - with a rewind to the verbatim it always had
TODO section 20 round 1, coverage_gaps C1 for constraints. A constraint
declaration was opaque text with no name span; renaming a rand field
left constraint c { user_id < 5; } as non-compiling code. Now
ItemKind::Constraint with a structured ConstraintSet (Expr{soft},
Implication, If, Foreach, SolveBefore, Unique, DisableSoft, Directive,
Empty), ExprKind::Dist, and randomize() with bodies as
ConstraintBody::{Items, Verbatim}. The parser attempts the structured
body behind a Rewind snapshot - cursor, both pending-comment buckets,
depth, links, open_conds, diagnostics - and on any error re-runs
v0.26.0's verbatim capture character for character, so an unknown body
IS the old behavior. No keywords reserved: soft/dist/solve/before are
matched by text, so logic before; keeps working and token.rs, pairs.rs
and the editor grammar are untouched. Canonical layout, verify.rs
untouched, attack pairs re-derived and extended. Every operand binds to
the class's properties (foreach vars nest; a with block resolves against
the randomized object's class first), so hover, definition, references
and rename reach inside. FACTS_FORMAT 10 -> 11. Lint rules read
constraint operands.
QA's finding - comments after the round's own words were dropped and
the safety net refused the file - answered with an exhaustive gap fuzzer
(358 gaps, format and idempotency demanded) and fourteen named comment
fields; the forty gaps that remain are shared machinery that fails
identically outside a constraint, filed as topo 2.9-22. Opentitan: 1993
of 2009 bodies structured, sweep unchanged, 48 DV files idempotent with
comment streams byte-identical, per-file diagnostics identical.
docs/features/constraint-bodies/README.md.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
||
|
|
df85fd3b54 |
Member completion: a dot means members - item., reg2hw.ctrl., vif.cb., pkg::, and the port map
TODO section 18. Typing a dot used to get the whole-index dump (every keyword and project word, capped at 512); now the answer after a separator is exclusively the members of what precedes it, or nothing. The prefix walk is published from vlog_semantic as MemberSite / Semantics::member_site / WorkspaceIndex::members_of_chain and the resolver's own member_of, unit_member, member_in_chain and follow_one are rewritten to call it - one walk, so the popup cannot list a member hover would not resolve (pinned structurally). Inherited members ride the same base chain; this./super./pkg::/cls:: are the same question. A headless dot inside an instantiation's (...) or #(...) lists the module's ports or parameters through signature.rs's own list detector and the Target::Port walk, already-connected ports dropped. Trigger characters '.' and ':'. Measured cheaper than the dump it replaces (6-62 us vs 212 us). QA's finding fixed at the root: the binder had discarded ParamPort.kw and bound every localparam as Param, so #(. offered prim_fifo_sync's DepthW. SymbolKind::LocalParam, keyword sticky across continuation entries as instantiate::params reads it, exported wherever Param is, 'localparam' on the hover card, excluded from the override list only. FACTS_FORMAT 9 -> 10. Also carried: TODO sections 19 and 20 (the escaped-identifier and constraint-body plans) and the topo rows for both lanes. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
2a2334ef5a |
Struct members: s.field, reg2hw.ctrl.q and the anonymous aggregates resolve
coverage_gaps H1 + topo 2.9-13 delivered. The in-file gap was one resolver gate: member_scope now returns any symbol's child scope when it is a Struct scope, so a typedef, an anonymous struct declarator and an inline nested field are one rule; fields declare with their own type so s.hdr.addr hops through a member. Cross-file, struct members export under the typedef's name, package-nested struct typedefs under their bare name (the nested-class convention, ambiguity refused), and inline nested fields - the opentitan register-package shape - under a synthesized owner.field key carried as the field's type: joined with '.', not '::', because member_type's last_segment would collapse the latter to the bare field name and q/d/qe live in every register package. Anonymous enum variants land in the enclosing scope like typedef ones. FACTS_FORMAT 8 -> 9; typeDefinition descends into typedef struct bodies. Unresolved fell 1203 -> 1162; the corpus store shrank 1.1 percent (resolved locals encode smaller than the candidates they replaced), opentitan's register packages grow it 4.3 percent. QA: 28 opentitan probes, three planted sibling pairs (rxfull/fmtfull, avsetup_rst/ avout_rst, tpm_csb/csb) all correct, zero wrong answers, hover under 0.5 ms. docs/features/struct-members/README.md; TODO.md section 17. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
311551f232 |
Interface semantics: interfaces, modports and clocking blocks become symbols; vif.sig crosses files
coverage_gaps C2/H2, topo 2.9-7 delivered. SymbolKind::{Interface,
Modport, Clocking}; is_instantiable() (Module | Interface) is the one
predicate every 'is this a module' filter reads, pinned in place, so
interfaces stay in the module table, the ghost, the hierarchies and the
refactorings while the card finally says 'interface'. An interface
exports its signals - they ARE its surface - where a module still exports
ports and params only, which is what lets virtual my_if vif; vif.sig
resolve across files. Modport and clocking-internal names bind as
scope-local references (nothing on a miss - a lexical walk would land a
modport port on a file-scope lure); the modport half of bus_if.mp in a
type position is Target::TypeMember, resolved through type_here; a
clocking block carries type_name = its enclosing unit so vif.cb.data
hops through round-2 machinery unchanged. FACTS_FORMAT 7 -> 8.
Unresolved fell 1256 -> 1203 on the corpus, the first movement in three
rounds: the @(cb) / cb.data names that had nothing to bind. Store +1.2
percent. A modport now renames from its type-position use (the refactor
pin flipped at review). QA: 17 opentitan probes, zero wrong answers, all
sub-millisecond; vif.cb.scl_i lands on i2c_if.sv's own signal.
docs/features/interface-semantics/README.md; TODO.md section 16.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
||
|
|
7ca2508ec7 |
Member chains and instance heads: cfg.vif.clk, item.hdr.addr, u_sub.port resolve through the index
DV round 2 (TODO section 15 round 2). A chain tail carries spellings -
Target::MemberOf { head, mids } - so in-file it hops declared type to
declared type, and a chain that leaves the file becomes one composed path
Unit::mid::tail that follow_one walks with member_type hops: no deferred
resolution, no ordering assumption, and chain tails post to the index
through the existing contract so hover, references and rename agree.
Def::type_name rides every indexed declaration (FACTS_FORMAT 6 -> 7,
with ReferenceFact base so this.x uses post cross-file); an instance
symbol's type is its module, and modules export ports and parameters -
nets/vars stayed in-file on measurement (+24 percent store, and .port(w)
connections would have resolved to internal nets). Typedef aliases are
chased with a visited guard; a type the workspace declares twice with
different kinds is refused one hop out, the round-1 lesson applied.
The rename truth flipped with it: u_sub.sig IS sub's wire sig and is
renamed alongside it; an unresolvable tail is left alone but no longer
warned about, filed as topo 2.9-20.
Corpus: references 97454 -> 98919, unresolved unchanged at 1256,
store +15.4 percent. QA: zero wrong answers across the attack suite and
15 live opentitan probes.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
||
|
|
ce2f858e5e |
Class member access: in_item.user_id resolves, through the handle's type and up its extends chain
DV round 1 (TODO section 15). The tail of head.member gets a reference when the head is a plain identifier whose declared type (Symbol::type_name, new) is a class or module: the member is found in that scope, else up the in-file extends chain, else the workspace's member table chases WorkspaceIndex::base_of (a subclass-to-base map rebuilt from the existing inheritance census, no new facts field) - cycle-guarded on both sides and placed in follow_one so hover, cross-file references and rename cannot disagree. this.x/super.x misses ride the same loop, delivering topo 2.9-9. An out-of-class method body (task c2::update) sees its class's members through a stand-in Class scope. FACTS_FORMAT 5 -> 6: the layout is unchanged but the reference census grew. Honesty by construction, after QA's one REWORK: a head whose type is declared in-file as anything without a member scope (typedef, alias, enum, param) records nothing - a two-state Option had stood in for the three-state TypeHere question, and a typedef named bus_t could have been answered by an unrelated class bus_t elsewhere. The fix removed exactly 438 wrong postings from the corpus with unresolved unchanged at 1256. Hover 7-143 us; opentitan tl_seq_item member 0.12 ms cold, 0.01 ms warm; store +2.85 percent. docs/features/class-member-access/README.md. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
f3b5a9d189 |
Fuzzy completion: clkenq reaches clk_osc_en_q, at VS Code's own floor
Prefix matching below three typed characters, subsequence from three up — the owner's ruling, which is VS Code's own rule. The scope, index-name and word tiers match by case-insensitive subsequence at 3+, ranked prefix-first then by a three-pass greedy-tighten scorer (boundary and contiguity bonuses, gap penalties); module, keyword, template and macro tiers unchanged, and the instantiation ghost's exact-match probe deliberately stays exact. The scan is affordable because every word and unit name carries a 32-bit character mask beside it, written in exactly two places so table and mask cannot desync: a clkenq keystroke rejects 99.6% of opentitan's 100k-word table with one AND each (+0.05 ms); the pathological class is three very common letters (aes +0.8 ms, QA's ena ~3-4 ms answered-in), accepted at lead review as imperceptible in a popup. Responses below the floor are always isIncomplete — a complete two-character answer would be client-filtered and the third keystroke, the one that turns fuzzy on, would never reach the server. QA verified clkenq -> clk_osc_en_q live in a real opentitan buffer (gfr_clk_mux2.sv) and the 2-to-3 transition over the wire; ten adversarial matcher attacks all passed. docs/features/fuzzy-completion/README.md; TODO.md section 13. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
03a4958294 |
Inline instantiation round 2: the space is the commitment, and every indexed module answers
Two owner rulings from live use. The ghost now fires only after 'name<space>' — aes alone may still be growing into aes_dft, so the typed space is what says the name is finished; an Ident ending at the cursor offers nothing at all. And a module declared in more than one file no longer declines: completion::nearest_definition picks the copy sharing the most leading path components with the asking buffer (a top_earlgrey buffer gets top_earlgrey's ast_dft), then the shallowest, then the lexicographically smallest — the depth term is QA's catch, fixed at review, so a direct sibling beats a deeper subdirectory copy that ties on the prefix. vlog_refactor::module_definition keeps its ambiguity refusal for its own callers. The refusal residue is now the enumerable inline::NoGhost, and QA's sweep proves the ruling: 1131/1131 opentitan module names ghost, zero declines (199 multiply-declared, tb 61 ways), ast_dft and io_osc verified from both tops over the wire, 0.05-0.08 ms per non-matching keystroke. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
cadb4319e4 |
Inline instantiation: the popup names the module, the ghost writes the rest
Two levels, sized for opentitan. Tier 0 of the completion popup stops planning skeletons (up to 64 file reads + header parses per keystroke) and offers module names alone; once the identifier at the cursor exactly matches an indexed module, textDocument/inlineCompletion ghosts the full instantiation — every parameter, every port, each a tabstop, in-scope signals auto-connected — planned once through the existing header-slice path and the FileView cache. Candidates::has_module is the per-keystroke probe: a case-sensitive binary search whose str-order premise is pinned. lucisv.inlineInstantiation (default on) gates it, independent of inlineTemplates. Measured on opentitan: non-matching keystroke 0.10-0.17 ms warm, ghost 0.6-1.1 ms for aes (14 params/16 ports), 2.5 ms cold for the 112-parameter top_earlgrey; popup module tier reads no files at all. Lead corrections at merge: four doc references to a lucisv/instantiate command that never existed, replaced by the honest gap (topo 2.9-19: no skeleton path for clients without inlineCompletion); extension and nvim README docs delivered. docs/features/inline-instantiation/README.md; TODO.md section 12. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
40094c4c4e |
lucisv-server --verbose: per-operation timing as a shipped toggle
The hand-patched diagnostic build becomes a feature: --verbose gates the timing lines (request answered / notification handled / HELD behind a rescan / scan and widen lifecycle / flush / reindex_one, the exact wordings of the two diagnostic builds) as LOG messages into the client's output channel; without the flag not one line is sent and the cost is one branch, measured unmeasurable against HEAD. Unknown args exit 2 with usage before the transport opens. The extension gains lucisv.verbose (default off) and its first restart-on-settings machinery: restart.js, one serialized chain reconciling to the last toggle, no client transition outside it — activation and deactivate included — after QA twice caught the alternatives (a mid-start toggle silently rejoining the stale start; deactivate's out-of-chain stop orphaning a spawn). Headless node harness restart_test.js, 44 checks, five mutations caught. Spawn contract amended everywhere it is written: no args required, --verbose optional. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
61f345aca7 |
Performance wave Lane B: completion hot path, highlight fix, scope default
Completion stops parsing whole declaring files per keystroke: tier 0
slices the module header at its terminating ';' via a whitelist walk
over a bounded lex window, anchored on the index span and re-planning
whole-file on anything unrecognized (non-ANSI included); the module
table replaces a per-keystroke workspace_symbols(""). 53 -> 3.2 ms at
the empty prefix (opentitan wire 63-66 -> 13-15 ms; typing an 11-char
word 201 -> 64 ms), items pinned byte-identical.
documentHighlight answered 0 on any name the file uses but does not
declare (both cursor questions were single-file); nav gains
external_occurrences over the overlay, grouping by the whole defs()
slice, written failing-first and pinned at the two opentitan
positions over the wire.
lucisv.index.scopeDepth default 0 -> 2 (behavior change; CHANGELOG at
release): a dv/tb file now indexes its IP block (21 files / 15 ms)
instead of one file with every cross-file answer empty. Rootless
sessions no longer climb (latent unnamed-tree walk removed).
Dev Opus + QA Sonnet in a dedicated worktree; QA SHIP with one LOW
(pre-existing attribute-instance indexing gap, pinned) and one
recorded asymmetry. Lead-reviewed.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
||
|
|
bf9170a850 |
A scope widen indexes the folders it added, not everything again
Every F12 jump into a new folder didOpen-widened the scope and re-ran a full rescan of all folders accumulated so far, growing with browsing (opentitan, warm: 120-169 ms per jump, ~90 ms of it re-opening and decoding the whole persistent store). widen_of chooses: pure folder adds take a widen scan over only the new files (absorbed into the live index/candidates/includes, open buffers refreshed from held analyses, store handle kept, no compaction); anything else still takes the whole rescan; mid-scan defers to one whole follow-up. Jumps now cost the new folder alone (12-44 ms flat), first definition of a session 99.7 -> 0.9 ms. IncludeGraph stores edges as the filesystem answered them and re-spells on relearn so a newly scoped file lends its spelling to earlier edges. Watcher-coverage narrowing documented: watcher-less clients lose the widen's incidental disk re-read, same staleness class as the save path since 2026-08-27. QA was stopped by the owner mid-gates after its adversarial phases; lead gates run twice, green. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
172a034c67 |
The startup scan answers requests as it goes
A request sent right after initialized waited out the whole startup scan — 780 ms cold, 287 ms warm over 200 files, against 26-64 us once the scan was done. The scan is now a value (Scan: begin/step/publish/ finish; rebuild_index_with is the same three-line loop, so one-shot and interleaved are structurally the same code and fingerprint identically), fed to the live index with one WorkspaceIndex::absorb per drain — per-file merging measured quadratic, 11.7 s over 800 files — and the message queue drains between files: the first hover of a session answers in 15.5 ms cold / 12.8 ms warm against the index so far, open file first, scan totals inside noise. Order contract kept: only the startup scan answers mid-way (must_wait holds requests queued behind any rescan), scans under 64 files stay one-shot (a count, not a clock), mid-scan rescan requests coalesce into exactly one follow-up, shutdown stops the scan where it stands. All three tables publish together. QA pinned the INTERLEAVE_ABOVE boundary, the absorb duplicate-path edge and the mid-scan didOpen double-publish; the whole pre-existing suite passes unmodified, stable over repeated runs. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
20567e1a7f |
The index carries every declaration's line, and hover stops re-reading files
The owner's first-level cache, realized on the carrier the index already had: DeclLines (name line + detail line) on every Decl/Def, computed at index time from the LineIndex the analysis already holds — tens of KB for 20k modules, FACTS_FORMAT 3->4, old stores discarded whole. A closed file's hover heading now costs zero I/O (it survives the file being deleted), and the snippet's one remaining read is served from a bounded FileView LRU (4 entries / 8 MiB, newest kept, dropped on set_document/close/update_one/rebuild): repeat hovers into a 12 MB file go 5.8 ms -> ~1 us, cross-file hover means 40/157 us -> 4.7/12.9 us. Ports ride the same member entries, so their lines came free. Stale-disk edits leave heading and snippet stale together, the spells_exactly guard still omits rather than lies, and QA pinned the pair. Measured and filed, not fixed here: the first request of a session waits 287-780 ms behind the startup scan (handshake for the next round). Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
cf32e92e58 |
A rescan reuses what open buffers already analyzed
A scope-widening didOpen re-parsed every open buffer's text twice — once for its index facts, once for its completion words — 210 ms of a 223 ms rescan for one 1.4 MB top.sv. FileFacts::of and words_in each split so their post-parse half is callable on a finished analysis (facts_from_analysis, words_of_tokens; one implementation per path, so the routes cannot drift), and collect_sources hands the index and candidates builds each open buffer's held analysis instead of its text, on the whole-rebuild path and didSave's. ~228 ms -> ~23 ms. Equivalence pinned: encoded facts and fingerprints byte-identical between the two routes over the corpus and 16 crafted non-corpus shapes; unsaved-edit, didClose-revert, size-cap and large-file threshold boundaries tested both directions. IndexEvent::Analyzed keeps "from cache" meaning the persistent store. Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
a4f23db2c7 |
Typing costs one reanalysis per burst, not one per keystroke
Every `didChange` used to run a full reparse, reanalysis, lint and diagnostics publish. In a 10 000-line buffer that is 31 ms of work per keystroke, nearly all of it thrown away by the next one. The text stays exactly current after every notification — incremental sync is applied immediately, and while a change is pending the buffer the server holds *is* the pending text. Only the analysis is deferred, and it is flushed by the first thing that needs it: the next request, the next non-`didChange` notification, or a 150 ms quiet-period timer in the message loop. Requests therefore see exactly what they saw before; nothing answers from a stale buffer. The invariant this replaces was "one didChange = one set_document = one generation bump". It is now one *flush* = one `set_document` per dirty buffer. The observable consequence is that intermediate diagnostics states are no longer published, which the e2e test pins: what is drawn is always a state the buffer really passed through, there are simply fewer of them. Closing a buffer drops its pending text before the flush rather than after it, so a file closed mid-edit is not analyzed and republished for nobody a line before its squiggles are cleared. Also measures it over the wire, against the shipped binary: a burst of ten keystrokes produces one `publishDiagnostics`, counted at the drain rather than reasoned about. The burst is measured last, because every `wait_for` accepts any publish and an earlier position would let a second one be absorbed by the next row's wait and never counted. Co-Authored-By: Claude Opus 5 <[email protected]> |
||
|
|
bc606dd6bd |
Large-file fast path: 100 MB netlists open in 40 ms
Owner-requested round, the last of the large-workarea wave. Above lucisv.largeFile.threshold (4 MiB default, 0 disables) a buffer opens as a line index and nothing else — no lex, no parse, no semantics, and its path removed from the index sources so nothing describes it by stale disk bytes. Viewport highlighting lexes only the requested window (snap to a line boundary, budget-bounded backward comment scan, imperfection documented); semanticTokens/full answers the spec's cancellation errors because the shipped VS Code binary marks tokens complete on ANY non-error answer and never asks for ranges again — settled by reading the bundle, verified independently by QA, pinned with the client-library citations. Same-file definition/references shipped on measurement (worst 37 ms vs the 150 ms budget); every other handler answers as the empty file by construction; formatting alone says why aloud. Two client facts recorded: VS Code never syncs files over 50 MB, and above 20 MB our viewport tokens are the only color. QA rejected the first cut on the round's true shape — thousands of tokens on one long line went quadratic through per-call UTF-16 conversion (7.86 s to color one 269 KB line). The fix adds a monotonic PositionWalker to convert.rs (restart-on-backwards proven load-bearing by the out-of-order tail-comment shape), adopted at three sites for 546x/759x on the probes — and it fixed ordinary files' semantic tokens too (2.06 s to 232 ms on a one-line buffer), a cost the normal path had always paid. Probes are now normally-running gates with 4.5x margins, walker-vs-per-call equivalence swept over gnarly fixtures and adversarial ping-pong. 51 tests added across both rounds (dev 43+5, QA 6+3, minus overlaps), 2 ignored probes. Completes the owner's large-workarea requests. docs/features/large-file-mode/README.md Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
e4b1f55c12 |
Persistent index cache: a half-indexed workarea resumes where it stopped
Owner-requested round. Every parsed file's FileFacts record is written through to an index-cache store (append per file, atomic compaction at scan end — a crash loses at most the file in flight), keyed by a content hash that is the whole key: no mtime fast path, by measured argument (6 ms of a 181 ms warm scan, and unsound against save-time write-through). On reopen, hits skip parsing and the resume is visible — cached: vs indexing: log lines, the bar counting through hits, and an end message saying how many came from cache. Warm rescan 322 to 179 ms release, 1.5 s to 0.76 s debug; 910 KB store for the 860-file corpus. Location: lucisv.index.cachePath > the extension's context.storageUri via initializationOptions (the one extension.js change) > the OS cache dir keyed by workspace identity > nowhere; lucisv.index.persist (default on) gates both directions immediately. The cache is a performance artifact, never a correctness input, and after the fix round that promise is total against everything but intentional forgery — which the threat model now formally excludes (same-user disk; a keyed MAC would be theater): a per-record checksum drops every corrupt-but-parseable line (poisoned and reforged shapes both pinned so the checksum is never mistaken for a MAC), first-writer initialization is a create_new claim with structural 100/100 survival, and a torn multi-byte tail costs exactly the torn record (0 of 583 offsets lose more). Old-format stores discard wholesale. Load==fresh fingerprint equality swept over the corpus. 45 tests added across the main and fix rounds (dev 33+2, QA 9+3, one QA test-construction bug self-caught), 2 ignored probes. docs/features/index-persistence/README.md Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
5e4aa7bd6f |
Incremental indexing + the edge tables: one file changed, one file merged
Owner-requested round. WorkspaceIndex::update_file/remove_file replace one file's contribution without reading or parsing anything else; Server::reindex_one takes the fast path for a didSave of one held file or a one-file watcher event (33 ms vs 1.5 s on the corpus, 45x), with everything else — settings, scope, filelist, multi-file events — keeping the full rebuild, pinned by a trigger-table test. FileIds stay sorted positions by deliberate deviation: renumbering through the one merge both finish and update_file end in makes build(W) byte-identical to build(W minus F).update_file(F) — fingerprint equality, attacked by QA across long interleaved sequences, disambiguation flips, define shadowing and the ghost hunt (the affected-keys union reads old and new records both). The per-file FileFacts the index retains are the documented memory cost (~1.4 MB on the corpus). The two oldest filed Handshakes land: instantiation and inheritance edge tables, built by the byte-for-byte moved census walks, turn codeLens counts (92 ms to 0.26 ms), incomingCalls and typeHierarchy subtypes into lookups — census policies pinned unchanged at both the consumers and now the source. Counts are as of the index, not of unsaved keystrokes: the freshness delta is documented and pinned from both sides. Saves no longer raise a progress bar; generation and lens refresh still ride. Round 18's three inherited scope obligations are pinned permanent. 36 tests added (dev 27 + QA 9). Left open, filed: wholesale republish, Candidates re-derivation cost, incremental removal vs include re-resolution. docs/features/incremental-index/README.md Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
7266b13702 |
Index scope: open-file-first, folder-scoped by default
Owner-requested round. The scope ladder: a filelist still defines the whole project and outranks everything; lucisv.index.scope=workspace restores the walk-the-roots behavior (the same function, not an equal-output one — pinned); the new default walks only the union of folders a buffer has been opened from, each raised lucisv.index.scopeDepth ancestor levels (default 0), clamped at the deepest containing root. Opening a file outside the scope widens it and reindexes through the existing progress/generation machinery; scope grows only along the open axis within a session. Cross-file answers are scope-relative and the docs say so loudly, with the one-line migration in the setting description. The round also closes indexing-ux QA's MEDIUM builder footgun: IndexBuilder::finish now sorts and dedups before assigning FileIds, so no insertion order can reach the result — pinned by a permanent three-order fingerprint test — which makes feeding open files first provably a progress nicety. 151 existing tests swept mechanically (QA sampled 40+ sites: constructor swaps only); lead fixed the one vacuous tail QA found plus two premise/comment hygiene items. 19 tests added. Known deltas documented: a root's .gitignore does not reach a walk starting below it (filed against lucisv_core); rootless depth-0 keeps its flat read; startup index is empty until the first didOpen. docs/features/index-scope/README.md Co-Authored-By: Claude Fable 5 <[email protected]> |
||
|
|
8c8cfc538e |
Indexing UX for large workareas: size cap, counting bar, output log
Owner-requested round. lucisv.index.maxFileSize (default 1 MiB, 0
disables, junk values fall back to the default — misparse must never
un-cap) skips walked files at one fs::metadata call before any read;
open buffers are always served uncapped, a cap change rescans like
exclude does, and the cap reads consistently through every sources()
consumer — documented per consumer, with the write-path warning gap
(a rename silently leaving a capped file stale) filed as a follow-up.
The indexing bar now counts: $/progress reports '137/860 path' with a
monotonic percentage over the post-exclude post-cap denominator,
throttled to ≤1000 reports per rescan with the last file always
reporting. Enabled by vlog_semantic's new IndexBuilder (add_file/
finish) with build() redefined as the loop over the newly-exported
index_order — the FileId ordering rule is now a call, not a comment.
QA proved both production callers order correctly; hardening the
builder against out-of-order future callers is round 18's acceptance
test. lucisv.index.logFiles (default on) streams 'indexing: path' and
cap-skip lines to the editor's Output panel at LOG level; the skip
count survives in the end message when logging is off. Measured
overhead ≈2.6% on the 860-file corpus; 0 corpus files exceed 1 MiB
and the default-capped index is pinned identical to uncapped.
21 tests added + QA's attack set + the lead's human_size boundary fix
('1024.0 KiB' can no longer be printed for a byte short of a MiB).
docs/features/indexing-ux/README.md
Co-Authored-By: Claude Fable 5 <[email protected]>
|
||
|
|
c47b16a65e |
LSP §9c: 3.18 extras — rangesFormatting ships, two honest parkings
textDocument/rangesFormatting: the engine took multi-range LineRanges
natively (this is literally the CLI's --lines a-b,c-d call), so the
server adapter is map(lines_of) around it and the verified
all-or-nothing contract rides through whole. range_formatting is now
DEFINED as the one-element case, making refusal equality structural;
lines_of extracted with its own test, plus a latent debug-overflow fix
(end.line + 1 at u32::MAX -> saturating, proven by deliberate
breakage). The capability widens documentRangeFormattingProvider from
true to {rangesSupport: true} only for clients that asked (read from
the raw initialize params; lsp-types 0.97 spells neither half) — every
pre-round client sees a byte-identical initialize result, proven on
the wire. The round's discovery: vscode-languageclient 9.0.1 has been
sending rangesSupport and gating its multi-range provider on our
answer all along — the bare boolean was turning the feature off.
SnippetTextEdit and workspace/textDocumentContent are parked with
evidence: absent from lsp-types 0.97 and from the pinned client's
node_modules (a snippet edit sent today would write literal ${1:...}
into the buffer), and the thin extension deliberately has no content
provider. Each parking carries a one-grep re-check trigger. The
whole-document reply shape is kept: splitting per-range would claim
byte ownership the engine never verified.
24 tests added; QA re-ran every evidence grep, verified the client
citations against formatting.js, and closed with zero findings. This
completes TODO.md §9c and the LSP 3.18 audit's feature work.
docs/features/lsp-318-extras/README.md
Co-Authored-By: Claude Fable 5 <[email protected]>
|