Coverage gaps L3, L6, L10: six language shapes, randsequence as real nodes, an opt-in uvm_field_* indent

TODO §54 (docs/features/coverage-gaps-l); closes docs/coverage_gaps.md
L3, L6 and L10. The first dev stalled under machine load; a second
finished from the tree.

54.1 `->>` with optional delay or event control (`StmtKind::EventTrigger`),
stream `with [range]` (`ExprKind::StreamWith`), the LRM's other
`casting_type`s, drive strength on a net declaration (`DataDecl::strength`,
whose comment slots also fix a pre-existing refusal on an `assign` with
a comment before its strength), `let` at statement position
(`StmtKind::Let`), and `#(min:typ:max)` clocking skews — `ClockingSkew`
as the LRM's two alternatives, `edge [delay]` | `delay` (review rework of
QA's HIGH). Comment slots added to `let`, stream concatenations and the
clocking grammar; the RTL gap fuzzer at 505 gaps, zero failing.
54.2 `randsequence` (it was a parse error; the keyword is new):
`RandSequence` → `Production` → `Alternative` → `ProdItem` (ref, block,
if, repeat, case, rand join), code blocks by the statement grammar; one
production per line, alternatives aligned; the LRM's examples as cases.
54.3 `[format] uvm-utils-indent` / `lucisv.format.uvmUtilsIndent`, default
off, tracking nested `_begin`/`_end` pairs; 21 corpus files change with
it on, all idempotent. A short comment-free enum body already one-lines,
so no key was built — the behaviour is pinned. `[format]` table tests
added (review rework). `->>`'s event control is bound through the shared
`bind_timing` (review rework of QA's second HIGH).

0 of 820 corpus files differ from 0.48.x with the key off; the opentitan
sweep is identical; no corpus or opentitan file writes any of the new
shapes.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
lucioandClaude Fable 5.1 committed 2026-09-07 01:12:49 -05:00
1 parent e1679bebc5
commit a69a1cb528
69 files changed
+3660 -127

No files matched your search

+3 -3
View File
@@ -91,14 +91,14 @@ request.
|---|---|---|
| L1 | `expect (@(posedge clk) prop);` — parsed as a call, not a keyword. | Probe. |
| L2 | Tagged unions (`union tagged`, `tagged Valid`, `case … matches`). | Probe. |
| L3 | `randsequence` production bodies. | Probe; classes README ("building for a user that does not exist" — corpus 0). |
| ~~L3~~ | ~~`randsequence` production bodies.~~ — **closed at 0.49.0 by TODO §54.2**: `randsequence` is a real statement (`ast::randsequence` — productions, weighted alternatives, `rand join`, `repeat`, `if`/`case`, code blocks parsed as statements); the LRM's own examples are `tests/cases/randsequence.cases`. Corpus and opentitan occurrences: 0. | Probe; classes README ("building for a user that does not exist" — corpus 0). |
| L4 | `alias` statement. | Probe. |
| L5 | `config … endconfig`, `library`. | Probe. |
| L6 | `->>` non-blocking event trigger; stream `with [range]`; cast bases other than a name/system call; drive strength on a net declaration; net delay written after the type; `let` at statement position; `#(min:typ:max)` clocking skew. | expressions-2 / interfaces / dv-statements READMEs, TODO §11 skips. |
| ~~L6~~ | ~~`->>` non-blocking event trigger; stream `with [range]`; cast bases other than a name/system call; drive strength on a net declaration; net delay written after the type; `let` at statement position; `#(min:typ:max)` clocking skew.~~ — **closed at 0.49.0 by TODO §54.1** (the net-delay clause by §43.2): `->>` with its optional delay or event control, stream `with [range]`, the other `casting_type`s, drive strength on a net declaration, `let` at statement position, `#(min:typ:max)` clocking skews; `tests/cases/coverage_gaps_l6.cases`; the RTL gap fuzzer at 499 gaps, zero failing. | expressions-2 / interfaces / dv-statements READMEs, TODO §11 skips. |
| L7 | `` `ifdef `` conditions never evaluated (both arms listed); no macro expansion; stringification passes through. | TODO §7 non-goal — by design, like Verible. |
| ~~L8~~ | ~~Execute-command spelling of the instantiation skeleton for clients without `inlineCompletion` (topo §2.9-19).~~ — **delivered 2026-09-02 by TODO §26**: `lucisv.instantiate [uri, position, module]`, planned through the ghost's own `nearest_definition`/`plan_for`, rendered plainly and pushed as a `workspace/applyEdit`. Documented with a keymap in `editors/nvim/README.md`. | inline-instantiation README. |
| ~~L9~~ | ~~`codeAction/resolve` laziness; `inlayHint` zero at default scope; index widen not interleaved.~~ — **delivered 2026-09-04/05 by TODO §37** (lazy resolve, 11.8× on the cursor path; the inlay zero ruled correct — `pins_if` is outside the default scope) and **ruled** (a widen stays one bar per session). | TODO §10 closed. |
| L10 | Cosmetic: an enum body one-lined when short; `` `uvm_field_* `` lines dedented to the `` `uvm_object_utils_begin `` column (they are plain macro statements — no block for the formatter to see). | Probe observations. |
| ~~L10~~ | ~~Cosmetic: an enum body one-lined when short; `` `uvm_field_* `` lines dedented to the `` `uvm_object_utils_begin `` column (they are plain macro statements — no block for the formatter to see).~~ — half **ruled already delivered** (a short, comment-free enum body one-lines since the body became a `Doc::Group`; pinned by `tests/format_options.rs`), half **delivered behind a key** at 0.49.0: `[format] uvm-utils-indent`, default off, 21 corpus files affected when on (TODO §54.3). | Probe observations. |
---
+803
View File
@@ -0,0 +1,803 @@
# coverage-gaps-l
## Goal
Close the three low-priority rows `docs/coverage_gaps.md` still leaves
open — **L6** (six small language shapes the grammar never had), **L3**
(`randsequence` production bodies) and **L10** (two cosmetics) — as TODO
§54 plans them. None of the shapes occurs in the corpus or in opentitan,
so the acceptance is hand-written `.cases` tables plus the existing
fuzzers, and the byte-identity gates say the round changed nothing for
anybody who did not ask for it.
## Assumptions
- **lucisv is not a legality checker.** Several arms read more than the
LRM strictly allows and print back what was written rather than
rejecting it: a `->` may carry the delay only `->>` may write; a cast
base may be a type with packed dimensions, which §6.24.1's
`casting_type` does not name; a drive strength keeps whichever order
the source wrote its two keywords in. Every one of them is a shape
real tools accept, and reproducing it is the invariant.
- **`randsequence` production names are not symbols.** `vlog_semantic`
binds the expressions, the formals and the statements written inside a
`randsequence`, and declares nothing for the productions themselves:
they live in a scope of their own that nothing outside the statement
can name (§18.17), and no feature asks for them yet.
- **A weight is not a general expression.** §18.17.2's
`weight_specification` is a number, a scoped name or a *parenthesized*
expression, and the parser reads exactly that (`parse_postfix`). It has
to: an unparenthesized `|` separates alternatives, so a weight that
swallowed one would eat the rest of the production.
- **`:=` is two adjacent tokens.** The lexer has no `:=`; the weight
operator is a `:` and an `=` whose spans touch, the same test
`dist_weight_op` already makes for a constraint's `dist`.
- **The `[format]` keys must never fire on their own.** A key that
changes how an already-clean file is laid out defaults to off, and only
a checked-in `lucisv.toml` (or a deliberate editor setting) turns it
on. The byte-identity gate is what proves it.
## Handshakes
- **`vlog_parser` → everyone.** `StmtKind::EventTrigger` now carries a
`Box<EventTrigger>` rather than an `Expr` (arrow text, timing control,
two comment slots); `StmtKind` gained `Let(Box<LetDecl>)` and
`RandSequence(Box<RandSequence>)`; `ExprKind` gained
`StreamWith { base, range }`; `ExprKind::Stream` gained
`comments: Box<StreamComments>`; `DataDecl` gained
`strength: Option<DriveStrength>`; `DriveStrength` gained
`comments: Box<DriveStrengthComments>`; `LetDecl` gained `after_kw`,
`eq_comments` and `before_semi`; the clocking grammar's skew became
`ClockingSkew` — after the rework below, the LRM's own two alternatives,
`Edge { word, after_edge, delay }` and `Delay(ClockingDelay)`, with the
new `ClockingDelay` (`Word` / `Paren`) holding the `#` half — with
`ClockingDefault` per half, and `ClockingDecl` / `ClockingItem` grew
their own comment slots.
Every downstream match arm in `vlog_formatter`, `vlog_semantic`,
`vlog_linter`, `vlog_refactor` and `vlog_parser/tests/spans.rs` was
updated in the same change.
- **`vlog_formatter` → `lucisv`, `lucisv_server`.** `Config` gained
`uvm_utils_indent: bool`, default `false`. `Config` is no longer
exhaustively constructible without it — use `..Config::default()`.
- **`lucisv_core` → `lucisv`, `lucisv_server`.** `FileConfig` gained
`format_uvm_utils_indent: Option<bool>` and the parser gained the
`[format]` table. Unknown keys under it are rejected by name, as
everywhere else in this parser.
- **`lucisv_server` → the extension.** `ClientSettings` gained
`uvm_utils_indent: Option<bool>`, read from
`lucisv.format.uvmUtilsIndent`; `editors/vscode/package.json` declares
it, default `false`. `lucisv.toml` still outranks it, the ladder
`format::settings_for` documents.
- **The lexer's keyword table gained `randsequence`**, so
`editors/vscode/syntaxes/systemverilog.tmLanguage.json` was regenerated
to match (`lucisv_server`'s `the_grammars_keywords_are_exactly_the_lexers`
is the gate).
## Status / TODO
- [x] 54.1 the six L6 shapes, each with cases + parity + fuzzers
- [x] 54.2 `randsequence` as real nodes
- [x] 54.3 the cosmetics behind a config key, corpus impact measured
(one key, not two — see the ruling in the work log)
- [x] Docs (this README; the strike text below is the lead's to apply)
- [x] Gates (guarded)
## Work log
### 2026-09-06 — the state this lane was picked up in
The first dev agent stalled part-way through 54.1. What was in the tree,
uncommitted, on `master` at `e1679be`:
- `->>` complete — lexer operator, `ast::EventTrigger` with `arrow`,
`after_arrow`, `timing`, `before_event`, the parser arm, the formatter
arm, and every downstream match updated.
- Stream `with [range]` half done — `ExprKind::StreamWith`,
`ast::StreamRange` and `parse_stream_range` written; **no** formatter
arm, **no** semantic/spans arms, and `StreamRange` missing `Clone`, so
`cargo check` failed with one error.
- Cast bases — `is_cast_base` had gained its `ExprKind::Type(_)` arm.
- Nothing at all for drive strength on a net declaration, `let` at
statement position, the `#(min:typ:max)` clocking skew, `randsequence`
or the cosmetics; no cases file, no fuzzer fixture, no README body.
The build was fixed first (`#[derive(Debug, Clone)]` on `StreamRange`,
then the three missing match arms), and the lane continued from there.
### 2026-09-06 — 54.1, the six L6 shapes
1. **`->>`** — as the first agent left it, plus cases. `->` and `->>` are
different statements, so the arrow is stored as written and never
rewritten. Only `->>` may carry a delay or event control, but the node
reads one either way.
2. **Stream `with [range]`** — the formatter, binder and span arms it was
missing. The gap after the keyword was moved out of the bracket's
`before_open` into `WithComments::after_kw`, so all three postfix
`with` forms print their head through the one `with_head` function.
3. **Cast bases** — `(W+1)'(x)` and `4'(x)` already worked
(`ExprKind::Paren` and `ExprKind::Number` were already cast bases);
only `logic [3:0]'(x)` was missing, and that is the `ExprKind::Type(_)`
arm the first agent added. Recorded as a case so the three stay tested
together.
4. **Drive strength on a net declaration** — `DataDecl::strength`, read
only after a net keyword (the one position §6.6 allows), printed
between the net keyword and the delay. `parse_opt_drive_strength`
became `pub(super)` and grew five comment slots
(`DriveStrengthComments`), which also **fixed a pre-existing hole**:
`assign /*c*/ (weak0, pull1) x = y;` and
`pullup ( /*c*/ weak1 ) p (x);` were refused by the safety net before
this round and format now. `drive_strength` prints its own leading
separator, the convention `net_delay` already uses.
5. **`let` at statement position** — `StmtKind::Let(Box<LetDecl>)`,
dispatched from `parse_keyword_stmt`, printed by the item-level
`let_decl`, bound exactly as the item-level one is. `parse_let` reads
its own `;`, so `takes_semi()` says the kind takes none. `LetDecl`
also gained the comment slots its head never had.
6. **`#(min:typ:max)` clocking skew** — `ClockingSkew` became a real
enum: `Edge(String)` for `posedge`/`negedge`/`edge`, `Delay` for
`#2`/`#1step`, `Paren` for `#( … )`, which goes through
`parse_delay_value` and so inherits `MinTypMaxComments`' four slots.
The one-token spellings are still text and still printed verbatim.
**`ast::size_pins` moved once, and the round put it back.** Adding
`DataDecl::strength` took `StmtKind` from 392 to 480 bytes, because
`DriveStrengthComments` is five vectors. Boxing them
(`comments: Box<DriveStrengthComments>`, the treatment
`MinTypMaxComments` already gets) brought it back under the pin, which is
unchanged at 392/552/96. `EventTrigger`, `LetDecl` and `RandSequence` are
boxed in `StmtKind` for the same reason and say so in their doc comments.
**The gap fuzzer.** Two fixtures were added to `RTL_FIXTURES` — one with
all six shapes, one with a clocking block. Nineteen of their eighty gaps
failed when they were written, **none of them because of the new
shapes**: the `let` head, the two brace pairs of a streaming
concatenation and the whole clocking grammar had no comment slots at all,
and fail identically on a tree without this round
(`let /*C*/ sum = a + b;` as an *item*, `{ /*C*/ <<{a}}`,
`clocking /*C*/ cb`, all three reproduced against the tree as found).
Every one of them was given an owner rather than being fixture-dodged:
`LetDecl::{after_kw, eq_comments, before_semi}`, `StreamComments`
(`after_open`, `before_inner`, `before_close`),
`ClockingDecl::{after_kw, before_event, before_semi}`, `ClockingDefault`
(`before_dir`, `after_dir`), `ClockingItem::before_semi`,
`ClockingItemKind::Signals::{after_dir, after_skew}` and the skew's
`after_hash`. `EXPECTED_RTL_GAPS` 419 → **499, zero failing**.
A code block's gap just inside its `{` deliberately has *no* slot: it
belongs to the first statement's leading comments, exactly as a
`begin`/`end` block's does. Giving it one made the output non-idempotent
(the comment printed on its own line, then re-parsed as the statement's
leading comment).
### 2026-09-06 — 54.2, `randsequence`
Checked first, as the TODO asks: `grep -rn randsequence crates/vlog_parser/src`
found **nothing** — it was not an opaque `Verbatim` leaf, it was a parse
error (`unsupported statement starting with keyword`), and `randsequence`
was not even in the lexer's keyword table.
Modelled as real nodes in three new files — `ast/randsequence.rs`,
`parser/randsequence.rs`, `format/randsequence.rs` — one sub-grammar per
file, the way SVA and covergroups already are:
- `StmtKind::RandSequence(Box<RandSequence>)`; `RandSequence` holds the
`( start )` with its three comment slots, the productions and the
dangling comments before `endsequence`.
- `Production { meta, ret_type, name, name_span, has_parens, args,
before_colon, alternatives, before_semi, span }`. The return type is
told from the name by lookahead: a type keyword, `void`, or two
identifiers in a row.
- `Alternative { before_bar, after_bar, items, before_weight, weight }`,
with `Weight { after_op, expr, block }` for `:= n { … }`.
- `ProdItem` = `Ref(ProdRef)` | `Block(CodeBlock)` | `If` | `Repeat` |
`Case` | `RandJoin`, each with the slots its own keywords open. The
`rs_case` arm reuses the `case` statement's `case_labels` printer,
including the `default` whose `:` the LRM makes optional.
- `CodeBlock` is `{ statements }` parsed by the ordinary statement
grammar, so `break`, `return` and declarations inside one are the
statements they already were.
**Layout.** One production per line inside the `randsequence` /
`endsequence` pair. One alternative rides on the head's `:` line — the
common shape, and a code block in it cuddles onto the `:` the way a
`begin` cuddles onto an `if`. Several alternatives are one group: flat
while they fit, otherwise one per line with each `|` starting its own,
indented under the head. The `.cases` table pins both.
`randsequence` had to go into the lexer's keyword table, which made
`editors/vscode/syntaxes/systemverilog.tmLanguage.json` drift; the
alternation was regenerated in the same change (there is a test for it).
### 2026-09-06 — 54.3, the cosmetics — one key shipped, one gap already closed
**`enum-one-line`: no key shipped. The behaviour is already the
default.** The TODO's own text hedges ("today it always breaks? Confirm
with a case"), and the confirmation says it does not. Measured over every
shape the gap names — a `typedef enum` with and without a base type, an
anonymous enum in a variable declaration, each written broken across
lines — the formatter already prints `typedef enum {A, B, C} e_t;` on one
line, because the enum body is a `Doc::Group` like every other list; and
a body with a comment in it still breaks, which is the condition the gap
asks for. Corpus impact of the key as specified: **0 files**, because it
would switch nothing. Shipping a config key that never changes a byte is
the abstraction CLAUDE.md's "Simplicity first" says to stop building, so
it was not shipped. `tests/format_options.rs` pins both directions of
the existing behaviour instead, so nothing takes it away. **The lead's
call at review** if a key is wanted anyway.
**`uvm-utils-indent`: shipped, default off.** A real gap — the
`` `uvm_field_* `` macros between `` `uvm_object_utils_begin `` and
`` `uvm_object_utils_end `` are plain macro items with no block, so they
print in the `_begin`'s own column. The key is a targeted rule in
`item_seq`: exactly those four macro names (`uvm_object_utils_begin`,
`uvm_component_utils_begin` and their `_end`s) open and close one indent
level over the run between them. An unbalanced `_begin` still prints
everything it opened, one level in — lucisv reproduces the file it was
given. It reaches the formatter three ways, in the ladder
`format::settings_for` documents: `[format] uvm-utils-indent` in
`lucisv.toml` (highest), `lucisv.format.uvmUtilsIndent` in the editor,
and off otherwise. There is deliberately **no CLI flag**: a key that
changes how clean files look is the project's decision, not a run's.
**Corpus impact, key ON** (scratch copy of the 860-file corpus with a
`lucisv.toml` in every directory — the discovery walk stops at each
vendored `.git`, so one at the root is not enough):
| | files |
|---|---|
| corpus files formatted | 854 (+6 that error, the known six) |
| files whose output changes with the key on | **21** |
| of those, not idempotent | 0 |
| of those, comment lines lost | 0 |
The 21: `opentitan/hw/ip/uart/dv/env/uart_env_cfg.sv`;
`ibex/dv/uvm/icache/dv/env/ibex_icache_env_cfg.sv`;
`ibex/dv/uvm/icache/dv/ibex_icache_core_agent/{ibex_icache_core_req_item,
ibex_icache_core_rsp_item, ibex_icache_core_bus_item}.sv`;
`ibex/dv/uvm/icache/dv/ibex_icache_mem_agent/{ibex_icache_mem_req_item,
ibex_icache_mem_resp_item, ibex_icache_mem_bus_item,
ibex_icache_mem_model}.sv`;
`ibex/dv/uvm/core_ibex/env/core_ibex_env_cfg.sv`;
`ibex/dv/uvm/core_ibex/common/ibex_mem_intf_agent/{ibex_mem_intf_response_agent_cfg,
ibex_mem_intf_seq_item}.sv`;
`ibex/dv/uvm/core_ibex/common/ibex_cosim_agent/{ibex_rvfi_seq_item,
ibex_ifetch_seq_item, ibex_ifetch_pmp_seq_item, ibex_cosim_cfg}.sv`;
`ibex/dv/uvm/core_ibex/common/irq_agent/irq_seq_item.sv`;
`ibex/vendor/lowrisc_ip/dv/sv/dv_lib/dv_base_agent_cfg.sv`;
`ibex/vendor/google_riscv-dv/src/{riscv_pmp_cfg, riscv_instr_gen_config,
riscv_vector_cfg}.sv`. Twenty-six corpus files write the macros; the
other five have nothing between `_begin` and `_end` to indent.
With the key **off** — the shipped default — the corpus is byte-identical
to 0.48.1 over all 860 files.
### The greps §54 asks for, per shape
Run 2026-09-06 over the 860-file corpus and over opentitan's
`hw/` (2 553 SystemVerilog files):
| shape | corpus | opentitan |
|---|---|---|
| `->>` | 0 | 0 (one hit, in a Python script) |
| `with [` (stream range) | 0 | 0 (23 hits, all Markdown prose) |
| `(strength0, strength1)` on a net declaration | 0 | 0 |
| `let` at statement position | 0 | 0 |
| `#(min:typ:max)` clocking skew | 0 | 0 |
| `randsequence` | 0 | 0 |
The two byte-identity gates are the second, stronger statement of the
same thing: nothing in either tree formats differently because of this
round.
### Attack tests (CLAUDE.md invariant 4)
`verify.rs` was **not touched** and no normalization was widened, so no
new forgiveness needs defending. The pairs were written anyway, in
`tests/verification.rs`, one per plausible way a new printer could have
lost or rewritten something: `->` ⇄ `->>`, a dropped `->>` timing
control, a stream range narrowed to an index or its `+:` swapped for
`-:`, a dropped or reordered drive strength, `#(1:2:3)` rewritten as
`#1`, a dropped `randsequence` production, a reordered alternative, a
`|` turned into juxtaposition, a dropped `:=` weight, and a `let` losing
its ports. All ten are refused. The eleventh asserts the other
direction for `uvm-utils-indent`: moving leading whitespace is not a
divergence, and dropping one of the macros it indents is.
### Files touched outside the expected set
- `crates/vlog_parser/src/token.rs` — `randsequence` added to the
keyword table (54.2 needs it).
- `editors/vscode/syntaxes/systemverilog.tmLanguage.json` — regenerated
for that keyword; a workspace test fails otherwise.
- `editors/vscode/package.json` — the `lucisv.format.uvmUtilsIndent`
setting declaration.
- `crates/vlog_parser/src/ast/expr.rs`, `parser/primary.rs`,
`format/expr.rs` — `StreamComments`, a gap-fuzzer finding, not a shape
§54 names.
- `crates/vlog_parser/src/ast/decl.rs`, `parser/tf.rs`,
`format/routine.rs` — `LetDecl`'s comment slots, likewise.
- `crates/vlog_formatter/src/format/instance.rs`, `format/item.rs`,
`format/decl.rs` — `DriveStrengthComments` reaches the two constructs
that already wrote a strength, so those printers moved from `String` to
`Doc`.
### 2026-09-07 — Rework, the four QA findings
**HIGH 1 — `edge_identifier [delay_control]`.** `ClockingSkew` was three
mutually exclusive variants, so `input negedge #(1:2:3) c;` was a parse
error. It is now the LRM's own two alternatives — `Edge { word,
after_edge, delay: Option<ClockingDelay> }` and `Delay(ClockingDelay)` —
with the `#` half factored into `ClockingDelay` (`Word` for `#2`/`#1step`,
`Paren` for `#( … )`) so the one node serves both alternatives and an
edge-inside-an-edge is not representable. `parse_clocking_skew` reads the
edge, then `gap_before("#")` — the gap is the skew's own slot only when a
`#` really follows, so `input edge /*c*/ sig;` still gives that comment to
`after_skew`, the slot that already owned it. The formatter prints the
edge, the separator (space or that slot's comments) and the delay, all as
written; nothing is re-laid-out or reordered.
- Cases: two entries in `tests/cases/coverage_gaps_l6.cases` — every form
the finding names (`default input negedge #(1:2:3) output posedge #5;`,
`input negedge #(1:2:3) sig;`, `output posedge #5 other;`, `input
posedge #1step a, b;`, `input edge c;`) and one for the comment slots
either side of the `#`.
- Parser: `a_clocking_skew_reads_a_delay_behind_its_edge` and
`an_edge_skews_delay_is_read_the_same_way_in_tolerant_mode`
(strict/tolerant parity — the tolerant parse of the same source returns
**zero** diagnostics and the same tree).
- Fuzzer: the RTL clocking fixture gained `output negedge #5 o;`.
`EXPECTED_RTL_GAPS` 499 → **505**, zero failing — the six new gaps all
have owners, the one between the edge and its `#` being
`Edge::after_edge`.
- Attack pairs: `a_clocking_skew_rewritten_into_a_bare_delay_is_rejected`
gained both halves of the new shape — `negedge #5` printed as `negedge`
and as `#5` are each refused. `verify.rs` is still untouched.
**HIGH 2 — `->> @(posedge clk) e;` bound nothing.** `bind/stmt.rs`'s
`EventTrigger` arm hand-matched `TimingControl::Delay`; it now calls the
shared `bind_timing`, which is what every other statement's timing control
goes through, so an event control's signals (and an `iff` guard) are
ordinary references again. Test:
`an_event_triggers_timing_control_is_bound_like_any_other` in
`vlog_semantic/tests/semantics.rs` — `clk`, `en` and the delay's `d` each
resolve to their declaration, and the triggered event still does.
**Census re-derived** (`cargo test -p vlog_semantic --test corpus --
--nocapture`): 860 files / 27 486 symbols / 103 875 references / 1 197
unresolved / 0 unplaced — **no delta**, as expected: the corpus writes
`->>` nowhere, so the only references this can add are in files that do
not exist yet.
**MEDIUM — the `[format]` table had no unit tests.** Three added, written
the way the `[lint]` table's are: `the_format_table_carries_uvm_utils_indent`
(true, false, absent → `None` which is what makes the default off, the
table mixed with top-level and `[lint]` keys),
`the_format_table_rejects_what_it_does_not_support` (unknown key named
under `[format]`, `"yes"` and `1` refused as non-booleans, no value,
duplicate key, the key written above any table, `[format.x]` refused as an
unknown table) and `a_bad_format_key_names_the_file_and_line` (through
`Discovery`, so the message is `<path>:4: unknown key …`). The overlay
ladder is pinned where it is composed: `a_format_key_climbs_the_ladder_from_off`
in `lucisv_server/src/format.rs` — off by default, the editor setting when
only it speaks, `lucisv.toml` winning over the editor in **both**
directions, and a `lucisv.toml` that names other keys staying silent about
this one.
**LOW — nested `` `uvm_object_utils_begin ``.** `item_seq`'s single
`Option<Vec<Doc>>` became a stack, so a `_begin` inside an open run opens a
level of its own and each `_end` closes the `_begin` it matches; an `_end`
with nothing open closes nothing and moves no indentation, and an unmatched
`_begin` still prints everything it opened (unchanged, and still tested).
Two tests in `tests/format_options.rs`:
`a_nested_begin_opens_a_level_of_its_own_and_its_end_closes_that_one`
(one nested pair, idempotent) and
`an_end_with_no_begin_open_changes_no_indentation` (a lone `_end`, and one
after a closed pair).
**Gates** (guarded, 2026-09-07). `cargo fmt` clean; `cargo clippy
--all-targets` clean, no warnings; `cargo test --workspace` **4 163
passed, 0 failed** (4 154 before the rework, +9: two parser, one
semantic, two formatter-option, three `lucisv_core` config and one
`lucisv_server` ladder test — the two `.cases` entries ride inside the one
`case_tables` test); `tools/corpus_check.sh` **814/820** formattable, the
same six parse errors, **0** verification errors, **0** crashes.
Byte identity, all 860 corpus files, `format --stdout` current tree vs
`~/.cache/lucisv-baselines/lucisv-0.48.1`: **0 differing** — the shipped
default still changes nothing for anybody who did not ask for it. With
`uvm-utils-indent` **on**: **exactly the 21 files listed above**, the same
set, each idempotent and with the same comment-line count. The key was
delivered through `--stdin-filename` pointing at a scratch directory
holding the `lucisv.toml` (a `.git` beside it stops the walk), so the
comparison needed no copy of the corpus and never wrote to it.
## QA log
### 2026-09-07 — QA pass, TODO §54 (L3/L6/L10)
**What was run.** `cargo build --release -p lucisv` (binary reflects the
uncommitted tree). Guarded: `cargo test --workspace` — **4 154 passed, 0
failed** (matches the work log's count exactly); `cargo clippy
--all-targets` — clean, no warnings; `tools/corpus_check.sh` — **814/820**
formattable, the same six parse errors named in the work log, 0
verification errors, 0 crashes. `node --test editors/vscode/*_test.js` — 5
suites, all green, including `hierarchySections_test.js` (unrelated §56
work sharing the tree) and the grammar keyword-parity test
(`the_grammars_keywords_are_exactly_the_lexers`, part of the workspace
run) — confirms the regenerated `systemverilog.tmLanguage.json` matches
the lexer's keyword table, `randsequence` included.
**Byte identity.** Built a parallel (`xargs -P 8`) `format --stdout`
diff of all 860 corpus files, current tree vs
`~/.cache/lucisv-baselines/lucisv-0.48.1`: **0 differing.** Opentitan
`hw/` (3 947 `.sv`/`.v`/`.svh`/`.vh` files, a superset of the "2 553"
`.sv`-only figure quoted elsewhere): `format --check` outcome (exit code)
identical between 0.48.1 and current for every file, **0 differing**;
`git -C opentitan status --porcelain` afterward showed only the three
pre-existing modifications (`hw/ip/aes/dv/tb/tb.sv`,
`hw/top_darjeeling/ip/ast/rtl/ast.sv`, `hw/top_earlgrey/ip/ast/rtl/ast.sv`)
— opentitan untouched otherwise.
**`uvm-utils-indent` ON**, scratch copy of the corpus with a `lucisv.toml`
at the root and inside each vendored `.git` directory (`opentitan`,
`ibex`, `common_cells`, `picorv32` — the discovery-stop trap the work log
warns about): the parallel diff found **exactly the 21 files the README
lists**, byte for byte the same set, no others. All 21 reformatted a
second time produced identical output (idempotent) and kept the same
comment-line count. `corpus_check.sh` over the same scratch copy: 814/820
formattable, 0 verification errors, 0 crashes — the key does not change
which files parse.
**Shape matrix, by hand** (`target/release/lucisv format --stdout`,
idempotency and comment-slot checks on each): `->`/`->>` distinct and
both forms (bare, `#5`, `@(posedge clk)`, inside `fork`) — correct, and
`->` never rewritten. Stream `with [range]`, `[i+:4]`, `[i-:4]`, nested
streams — correct and idempotent. Casts `(W+1)'(x)`, `4'(x)`,
`logic [3:0]'(x)`, `signed'(x)`, `pkg::t'(x)`, `int'(x)` — all format
unchanged. Drive strength on `wire`/`tri`/`wand`, every strength pair,
`(supply0, supply1) [7:0] v`, comments in all five slots (including the
pre-existing `assign`/`pullup` hole the work log says this round fixed —
confirmed, both now format with their comments kept), strength+delay in
the LRM's only legal order (strength then delay) — correct; the reverse
order (`wire #5 (strong0, weak1) w`) is correctly refused with a parse
error rather than silently reordered or misparsed. `let` at statement
position, with and without ports, inside a function, comments in every
slot — correct. `randsequence`: re-typed three LRM-style examples
(a plain grammar, one with `:=` weights of a number/parenthesized
expr/scoped name, `rand join (0.5)`, `repeat`, `if`/`else`, `case` with
`default`, `break`/`return`/`for` inside a code block, a production with
return type and args, a reference to an undefined production — parses,
does not crash the binder), nested `randsequence`, comments in every slot
named in the AST doc comments (`after_kw`, `after_open`, `before_close`,
`before_colon`, `after_bar`, `before_bar`, `before_weight`, `after_op`,
dangling) — all preserved, output idempotent.
`grep -rn randsequence` over the corpus and over opentitan's `hw/`: **0
hits in both**, not even as a plain identifier — the keyword-addition risk
is confirmed negligible, matching the work log's claim.
Strict/tolerant parity: wrote a temporary test
(`crates/vlog_parser/tests/qa_l6_parity_scratch.rs`, removed after) that
parses every L6 shape and the `randsequence` example through both `parse`
and `parse_tolerant` and asserts identical trees and zero recovered
diagnostics — held for all of them. Attack pairs
(`crates/vlog_formatter/tests/verification.rs`): all eleven ran as part
of the workspace suite and pass (arrow rewrite both directions, dropped
`->>` timing, stream range narrowed and `+:`/`-:` swapped, dropped and
reordered drive strength, `#(1:2:3)` rewritten as `#1`, dropped
production, reordered alternative, `|` to juxtaposition, dropped weight,
`let` losing its ports, uvm-utils-indent whitespace-vs-macro-drop) —
`verify.rs` itself is untouched, confirmed by `git diff`.
**Findings.**
- **HIGH — `ClockingSkew` has no arm for `edge_identifier` followed by a
`delay_control`.** IEEE 1800-2017 §14.3: `clocking_skew ::=
edge_identifier [ delay_control ] | delay_control`. The shipped grammar
(`crates/vlog_parser/src/parser/module.rs:350` `parse_clocking_skew`,
mirrored in `crates/vlog_formatter/src/format/module.rs`'s
`ClockingSkew` match) treats `Edge`, `Delay` and `Paren` as mutually
exclusive: `parse_clocking_skew` returns as soon as it reads
`posedge`/`negedge`/`edge`, so a trailing delay is never looked for.
Reproduction: `input negedge #5 c;`, `input posedge #(1:2:3) c;`,
`output negedge #(1:2:3) c;` (the exact shape named in TODO §54.1's own
plan text) and the `default` form
(`default input posedge #(1:2:3) output #(2:3:4);`) all fail with
`expected identifier (found "#")` / `expected ';' (found "#")`. Confirmed
this is new-in-scope, not a pre-existing hole widened: 0.48.1 also
rejects it, but 0.48.1 had **no** `#(1:2:3)` skew at all
(`expected a clocking skew delay (found "(")`), so "edge plus a
parenthesized min:typ:max" was never reachable before this round added
`Paren`; the round added two of the three LRM alternatives for a skew
that follows an edge and missed the third. Not a corruption (the file is
refused, not misprinted), but it is a real hole in a shape the
TODO and this round's own Handshakes section call complete. Needs a
`ClockingSkew::Edge` variant (or a new `EdgeThenDelay` arm) that
optionally reads a trailing `delay_control`, on both the parser and the
formatter side, plus a `.cases`/fixture entry.
- **HIGH — `->> @(posedge clk) e;`'s event control is never bound.**
`crates/vlog_semantic/src/bind/stmt.rs`'s `StmtKind::EventTrigger(t)` arm
hand-matches only `TimingControl::Delay` to bind its expression:
```
StmtKind::EventTrigger(t) => {
if let Some(TimingControl::Delay { expr, .. }) = &t.timing {
self.bind_expr(expr, scope);
}
self.bind_expr(&t.expr, scope);
}
```
but the same file already has a shared `bind_timing` helper (used by
`wait`, `always @(...)` and others) that handles both
`TimingControl::Delay` *and* `TimingControl::Event(SensList)` via
`bind_sens_list`. The `EventTrigger` arm does not call it, so
`TimingControl::Event` — `->> @(posedge clk) e;`, the exact shape TODO
§54.1 and this round's own fixtures use — silently binds nothing for
`clk` (or an `iff` guard). Verified with a temporary test
(`crates/vlog_semantic/tests/qa_event_trigger_scratch.rs`, removed
after): `s.reference_at(offset of "clk")` returns `None` — no reference
recorded at all, not merely unresolved. Effect: go-to-definition,
find-references and rename on a signal named only inside an event
trigger's event control silently do nothing (a rename would miss this
occurrence, leaving a stale name behind — a real correctness bug for
the refactor tooling, even though it does not touch `vlog_formatter`'s
own invariants). Fix is mechanical: replace the hand-match with
`if let Some(timing) = &t.timing { self.bind_timing(timing, scope); }`.
- **MEDIUM — no unit-test coverage for the `[format]` table in
`lucisv_core::config`.** The `[lint]` table has thorough tests in
`crates/lucisv_core/src/config.rs` (`the_lint_table_carries_select_and_ignore`,
`the_lint_table_rejects_what_it_does_not_support`, duplicate-key and
bad-header cases). No equivalent exists for `[format]`/`uvm-utils-indent`
— `parse_format_entry` and `parse_bool` have no direct test in this
crate. End-to-end behavior is correct (verified by hand: `[format]
uvm-utils-indent = "yes"` gives
`` `uvm-utils-indent` expects `true` or `false`, found `"yes"` `` and
exit code 2; unknown `[format]` keys are named; duplicate keys are
rejected — all exercised only through the CLI, not as a `lucisv_core`
regression test). Per CLAUDE.md ("new behavior needs tests in the same
change"), this is a gap the dev should close; not fixed here because
QA's scope for this lane is verification, not edits to files outside
the QA log.
- **LOW — nested `` `uvm_object_utils_begin `` does not nest.** Given two
begins before their ends (`_begin(c) … _begin(d) … _end … _end`), the
indent opens once and **closes on the first `_end`**, not a matched
pair: everything after the first `_end` (including the second `_begin`
and its own field) prints back at the outer level rather than nesting
or erroring. Idempotent, no comments or macros lost — just a shape the
rule does not track a stack for. Real UVM code never nests these macros
(they themselves expand to `begin`/`end`), so impact is negligible, and
the QA brief flagged this exact case as open ("error? or double
indent — pin"). Recording the actual, observed behavior since the
feature README does not say which was chosen; the lead's call whether
it is worth a stack-based fix or a comment pinning it as intentional.
- Everything else in the plan (six L6 shapes, `randsequence` as real
nodes, the one shipped `[format]` key, the docs list, the gates) checks
out exactly as the work log describes. `EXPECTED_RTL_GAPS` at 499 with
the full workspace run green covers the gap-fuzzer request; a temporary
fixture with comments in every clocking/`let` slot was not added
separately since the two RTL fixtures already added by this round cover
every slot named in the work log and the run above is green.
**Verdict: REWORK.** Two HIGH findings are concrete, reproducible, in
the files this round touches, and sit squarely inside the shapes TODO
§54.1 names as done (the clocking skew grammar; the `->>` event-control
binding). Neither corrupts formatter output or breaks an invariant in
`verify.rs` — CLAUDE.md invariants 1-4 hold — but "the six L6 shapes,
each with cases + parity + fuzzers" and "every downstream match arm...
updated" (Handshakes) are not yet true for these two cases. Suggested
fix scope for the next dev pass: extend `ClockingSkew` (parser +
formatter + a `.cases` entry) for `edge_identifier [delay_control]`, and
point `EventTrigger`'s bind arm at the existing `bind_timing` helper. The
MEDIUM and LOW findings are not blockers but should be picked up in the
same pass since the files are already open.
### 2026-09-07 — Re-check of the rework
Re-read the prior QA entry above and the dev's "Rework, the four QA
findings" work-log entry, then re-diffed the seven files the rework
touched (`ast/module.rs`, `parser/module.rs`, `format/module.rs`,
`format/item.rs`, `bind/stmt.rs`, `lucisv_core/src/config.rs`,
`lucisv_server/src/format.rs`) against clean `master` — all four fixes
are exactly where the work log says.
**HIGH 1 re-attacked (`ClockingSkew::Edge`'s trailing delay).** Built
`target/release/lucisv` from the tree and ran every shape by hand with
`format --stdout`: `default input negedge #(1:2:3) output posedge #5;`,
the per-signal forms (`input negedge #(1:2:3) a;`, `input posedge
#1step a;`, `input edge b;`, `input #2 c;` delay-only unchanged, `output
posedge d;` edge-only unchanged), a comment on both sides of the `#`
(`input negedge /*A*/ #/*B*/(1:2:3) a;`) and after the edge with no `#`
following (`input edge /*C*/ a;` — confirmed the comment lands in
`after_skew`, not lost), comments inside the min:typ:max parens
(`negedge #(1 /*D*/:2 /*E*/:3)`). All eight round-trip and are
idempotent (checked by reformatting the output). `posedge negedge a;`
(illegal double edge) and `default input;` (illegal — the `default`
form's `clocking_skew` is not optional, unlike the per-signal item's) are
both correctly refused with a parse error, not silently accepted.
`inout posedge sig;` is accepted and printed back verbatim — traced this
to pre-existing behavior on `master` (`git show HEAD:.../module.rs`
already lets any of `input`/`output`/`inout` read an optional skew with
no direction-specific gate); the rework did not touch that gate, so it is
not a rework regression and is left as a pre-existing "not a legality
checker" shape per the feature's own Assumptions — noted, not filed.
Ran the two new parser tests directly:
`cargo test -p vlog_parser --lib a_clocking_skew_reads_a_delay_behind_its_edge`
and `--lib an_edge_skews_delay_is_read_the_same_way_in_tolerant_mode` —
both `ok`, the tolerant one asserting zero recovered diagnostics as
claimed. Attack pairs re-run
(`cargo test -p vlog_formatter --test verification
a_clocking_skew_rewritten_into_a_bare_delay_is_rejected`) — `ok`, both
new pairs (`negedge #5` → `negedge`, `negedge #5` → `#5`) rejected.
`verify.rs` confirmed untouched (`git diff --stat` empty for it).
**HIGH 2 re-attacked (`->>`'s event control binding nothing).** Ran
`->> @(posedge clk iff en) e;` and `->> #d e;` as two separate statements
(the LRM's `delay_or_event_control` is one alternative, not both at once
— a source combining them, as one out of the four literal test shapes in
the task brief would, is correctly refused with a parse error, confirming
`->>`'s grammar has not been loosened to accept both halves at once) —
both format unchanged and idempotent. Ran
`cargo test -p vlog_semantic --test semantics
an_event_triggers_timing_control_is_bound_like_any_other` — `ok`,
confirming `clk`, `en` and `d` each resolve and the triggered `e`
resolves too. Re-derived the census
(`cargo test -p vlog_semantic --test corpus -- --nocapture`): **860
files / 27 486 symbols / 103 875 references / 1 197 unresolved / 0
unplaced** — matches the work log's claim exactly, no delta.
**MEDIUM re-attacked (`[format]` table unit tests).** Ran the three new
`lucisv_core` tests directly — `the_format_table_carries_uvm_utils_indent`,
`the_format_table_rejects_what_it_does_not_support`,
`a_bad_format_key_names_the_file_and_line` — all `ok`. Added two
temporary scratch tests (removed after) to probe the edges the brief
asked about: a `[format]` header written **twice** is not refused as a
duplicate *table* — it just re-enters the same table (no state tracks
"seen this header before"; only individual keys are duplicate-checked via
`Option::is_some()`), and setting the same key again under the re-entered
header **is** caught as `duplicate key`. This matches `[lint]`'s own
behavior exactly (same lack of a table-repeat check), so it is consistent
existing design, not a rework gap. `uvm-utils-indent = true` written
under `[lint]` is correctly refused as `` unknown key `uvm-utils-indent`
under `[lint]` (known keys: select, ignore, waivers) `` — the two tables
are genuinely separate. Read `a_format_key_climbs_the_ladder_from_off` in
`lucisv_server/src/format.rs` in full: it pins all four rungs (nobody
speaks → off; editor only → editor wins; `lucisv.toml` over the editor in
both directions; a `lucisv.toml` naming other keys stays silent about
this one) — matches the Handshakes section's description of the ladder.
**LOW re-attacked (nested `` `uvm_object_utils_begin ``).** Ran the two
new `format_options.rs` tests — `ok` on both. Added a temporary scratch
test (removed after) with **three** nesting levels
(`uvm_object_utils_begin(c)` → `uvm_component_utils_begin(d)` →
`uvm_object_utils_begin(e)`) and an unrelated macro (`` `uvm_info ``, not
one of the four tracked names) interleaved at every level: it never
pushes or pops the stack, each `_end` closes exactly the `_begin` it
matches (printing at that `_begin`'s own column, not the run's), and the
whole thing is idempotent with the key off leaving the source untouched.
Hand-traced the stack logic in `item_seq` first to predict the expected
output, then let the test's own first run tell me the actual result to
cross-check the trace — they agreed, confirming the stack behaves as a
real matched-pair nest, not the single-level, first-`_end`-closes-all
behavior the original finding described.
**Gates (guarded, 2026-09-07).**
`cargo build --release -p lucisv` — clean, used for every hand-attack
above. `cargo clippy --all-targets` — clean, no warnings.
`tools/guard.sh -- cargo test --workspace` (full, uncapped output,
not `| tail`) — **4 166 passed, 0 failed**; the three extra were my own
temporary scratch tests (two in `lucisv_core`, one in
`vlog_formatter/tests/format_options.rs`), all removed afterward —
4 166 − 3 = **4 163, exactly the dev's count**.
`tools/guard.sh -- tools/corpus_check.sh` — **814/820** formattable, the
same six parse errors, 0 verification errors, 0 crashes.
`cargo test -p vlog_formatter --test verification
a_comment_in_every_rtl_gap_still_formats` — `ok`; `EXPECTED_RTL_GAPS` is
505 in the source and the test passes at that count with 0 failing.
**Byte identity.** All 860 corpus files, `format --stdout`, current tree
vs current tree with no config (both built from this uncommitted tree,
run in parallel with `xargs -P 8`): **0 differing** — the shipped default
(key off) still changes nothing. Key **on**: built a scratch copy of the
corpus (`cp -R`, not touching the real `corpus/` directory) with a
`[format]\nuvm-utils-indent = true` `lucisv.toml` at the root and inside
each vendored `.git` directory (`opentitan`, `ibex`, `common_cells`,
`picorv32` — the discovery-stop trap the work log warns about), then
diffed `format --stdout` of every corpus file against its scratch-copy
counterpart: **exactly 21 files differ**, byte-for-byte the same 21 paths
the README lists (verified by sorting and comparing the list, not just
the count). All 21 reformatted a second time from their own output
(written under the scratch tree so discovery still finds the config) are
byte-identical to the first pass — idempotent — and each keeps the same
`//`/`/*` occurrence count before and after. (First pass at this check
wrote the second-pass input to `/tmp`, outside the scratch tree the
config lives in, which silently fell back to the key-off default and
made all 21 look non-idempotent — a test-harness mistake on my part, not
a formatter bug; corrected by keeping the round-trip inside the scratch
tree and it cleared immediately.)
**New findings.** None. Every finding from the 2026-09-07 QA pass above
was fixed exactly as described, each fix is covered by a passing test I
ran directly (not just trusted from the log), and the gate numbers match
what the work log claims to the exact digit everywhere they were
checkable (census, `EXPECTED_RTL_GAPS`, workspace test count net of my
own scratch tests, corpus 814/820, the 21-file set). The one thing worth
recording for the lead, not as a defect: `inout <skew> sig;` inside a
clocking block is accepted and printed back rather than refused, but this
predates the entire §54 lane (confirmed against `git show HEAD`) and is
consistent with the feature's own "not a legality checker" Assumption —
out of scope for this rework, not filed as a finding.
Temporary test files/functions used for this re-check
(`qa_scratch_duplicate_format_table_header`,
`qa_scratch_format_key_under_lint_table_is_unknown` in
`crates/lucisv_core/src/config.rs`;
`qa_scratch_three_levels_nested_with_an_unrelated_macro_interleaved` in
`crates/vlog_formatter/tests/format_options.rs`) were all removed before
finishing; `git status`/`git diff` confirm neither file carries them
anymore.
**Verdict: PASS.**
## Review
**2026-09-07 — lead.** Accepted after one rework; ships in 0.49.0 with
§53.2 and closes the coverage tables. The first dev stalled under machine
load and the second finished from the tree, the recipe that worked for
§49. The right calls were made where the plan was wrong: a short
comment-free enum body already one-lines, so no key was built and the
behaviour is pinned; `randsequence` was a parse error rather than an
opaque leaf, so it became real nodes with the LRM's own examples as the
cases; the slot work beyond the letter (`let`, stream concatenations,
the clocking grammar, drive strengths — one of which fixed a pre-existing
refusal) is what the gap fuzzer's zero-failure bar demands, and it stands
at 505 gaps. QA's HIGHs were exactly the two shapes the plan text named
and the dev had not reached (`edge #delay` skews; `->>`'s event control
unbound), fixed with the LRM's own two-alternative shape for a clocking
skew and the shared `bind_timing`; the config table now has the tests the
`[lint]` table always had, and the utils-macro indent tracks nesting.
`uvm-utils-indent` stays default off: 21 corpus files change with it on,
which is the project's choice, not the formatter's. Byte-identity with
the key off is 0 of 860 differing, and the opentitan sweep is identical.
## Docs to apply at merge (lead)
**`docs/coverage_gaps.md`.** Strike three rows:
- **L3** — `~~| L3 | randsequence production bodies. | … |~~` — **closed
at 0.49.0 by TODO §54.2**: `randsequence` is a real statement with a
production list (`ast::randsequence`), weighted alternatives, `rand
join`, `repeat`, `if`/`else` and `case` production items and code
blocks parsed as statements; the LRM's own examples are
`tests/cases/randsequence.cases`. Corpus and opentitan occurrences: 0,
so nothing moved.
- **L6** — all seven clauses of the row are now delivered (the net-delay
clause was already struck by §43.2): `->>` with its optional delay or
event control, stream `with [range]`, the LRM's other `casting_type`s,
drive strength on a net declaration, `let` at statement position and
the `#(min:typ:max)` clocking skew — **closed at 0.49.0 by TODO
§54.1**, with `tests/cases/coverage_gaps_l6.cases` and the RTL gap
fuzzer at 499 gaps, zero failing.
- **L10** — half **ruled already delivered** (a short, comment-free enum
body has been one-lined since the body became a `Doc::Group`; measured
2026-09-06, pinned by `tests/format_options.rs`), half **delivered
behind a key**: `` `uvm_field_* `` indentation is `[format]
uvm-utils-indent`, default off, 21 corpus files affected when on.
**`README.md`** — the config table gains one row:
| key | value | default | meaning |
|---|---|---|---|
| `[format] uvm-utils-indent` | `true` / `false` | `false` | Indent the `` `uvm_field_* `` macros between `` `uvm_*_utils_begin `` and `` `uvm_*_utils_end `` one level. |
**`docs/site/`** — the same row on the configuration page, and on the
editors page the new VS Code setting:
| setting | default | meaning |
|---|---|---|
| `lucisv.format.uvmUtilsIndent` | `false` | The editor's spelling of `[format] uvm-utils-indent`; a checked-in `lucisv.toml` outranks it. |
**`docs/site/src/content/docs/guides/syntax.md`** — the sentence
"`randsequence` and a small set of rare expression/port forms remain
outside the formatter grammar" must drop `randsequence`; it is inside the
grammar as of 0.49.0.
**`docs/topo.md`** — a row for this lane: `coverage-gaps-l` touches
`vlog_parser` (ast + parser + token table), `vlog_formatter`,
`vlog_semantic` (bind), `vlog_linter`, `vlog_refactor`, `lucisv_core`
(config), `lucisv_server` (settings, format) and `editors/vscode`.
+1 -1
View File
@@ -101,4 +101,4 @@ come from the setting are shown locked.</p>
<p>The repository includes a protocol-level check that starts the server exactly as the VS Code extension does:</p>
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="bash"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">node</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">editors/vscode/smoke.js</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">target/release/lucisv-server</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="node editors/vscode/smoke.js target/release/lucisv-server"><div></div></button></div></figure></div>
<p>See <a href="/reference/language-tools/">Language tools</a> for every advertised request and editor feature.</p>
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/guides/editors.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-08-27T03:31:44.000Z">Aug 27, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/guides/linter/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Linter</span></span></a><a href="/guides/syntax/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Supported syntax</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/guides/editors.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-09-06T05:04:05.000Z">Sep 6, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/guides/linter/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Linter</span></span></a><a href="/guides/syntax/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Supported syntax</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
+1 -1
View File
@@ -107,6 +107,6 @@
<div class="sl-heading-wrapper level-h2"><h2 id="preserved-rather-than-reformatted">Preserved rather than reformatted</h2><a class="sl-anchor-link" href="#preserved-rather-than-reformatted"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Preserved rather than reformatted”</span></a></div>
<p>Some constructs are recognized structurally but emitted with their internal source layout intact: compiler directives, macro bodies, <code dir="auto">specify</code>, UDP, checker and config blocks, and carefully recovered conditional-split declarations. Constraint, covergroup and SVA parsers also keep a byte-exact fallback for an unfamiliar body, so unsupported subgrammar does not block the surrounding file.</p>
<div class="sl-heading-wrapper level-h2"><h2 id="not-supported">Not supported</h2><a class="sl-anchor-link" href="#not-supported"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Not supported”</span></a></div>
<p><code dir="auto">randsequence</code> and a small set of rare expression/port forms remain outside the formatter grammar. lucisv also does not run a preprocessor, so a file that becomes valid only after cross-file macro expansion may not format as a standalone input.</p>
<p>A small set of rare expression/port forms remains outside the formatter grammar. lucisv also does not run a preprocessor, so a file that becomes valid only after cross-file macro expansion may not format as a standalone input.</p>
<aside aria-label="Safe failure" class="starlight-aside starlight-aside--caution"><p class="starlight-aside__title" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"><path d="M12 16a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm10.67 1.47-8.05-14a3 3 0 0 0-5.24 0l-8 14A3 3 0 0 0 3.94 22h16.12a3 3 0 0 0 2.61-4.53Zm-1.73 2a1 1 0 0 1-.88.51H3.94a1 1 0 0 1-.88-.51 1 1 0 0 1 0-1l8-14a1 1 0 0 1 1.78 0l8.05 14a1 1 0 0 1 .05 1.02v-.02ZM12 8a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0V9a1 1 0 0 0-1-1Z"/></svg>Safe failure</p><div class="starlight-aside__content"><p>Whole-file formatting returns an error and writes nothing when parsing is incomplete. lucisv never emits a partially understood file.</p></div></aside>
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/guides/syntax.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-09-03T09:28:11.000Z">Sep 3, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/guides/editors/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Editors &amp; LSP</span></span></a><a href="/reference/cli/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">CLI</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
{"version":"1.5.2","languages":{"en":{"hash":"en_ccc426eeeb","wasm":"en","page_count":12}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]}
{"version":"1.5.2","languages":{"en":{"hash":"en_e3346e8993","wasm":"en","page_count":12}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]}
Binary file not shown.
Binary file not shown.
+12
View File
@@ -95,6 +95,13 @@
<td>CLI and server</td>
</tr>
<tr>
<td><code dir="auto">[format].uvm-utils-indent</code></td>
<td>boolean</td>
<td style="text-align: right"><code dir="auto">false</code></td>
<td>indent the <code dir="auto">`uvm_field_*</code> macros between <code dir="auto">`uvm_*_utils_begin</code> and <code dir="auto">`uvm_*_utils_end</code> one level</td>
<td>CLI and server</td>
</tr>
<tr>
<td><code dir="auto">indent</code></td>
<td>integer</td>
<td style="text-align: right"><code dir="auto">2</code></td>
@@ -195,6 +202,11 @@ not enable a rule that is off by default.</p>
<td>Server-driven save formatting for clients that need it</td>
</tr>
<tr>
<td><code dir="auto">lucisv.format.uvmUtilsIndent</code></td>
<td style="text-align: right"><code dir="auto">false</code></td>
<td>The editor’s spelling of <code dir="auto">[format] uvm-utils-indent</code>; a checked-in <code dir="auto">lucisv.toml</code> outranks it</td>
</tr>
<tr>
<td><code dir="auto">lucisv.lineLength</code></td>
<td style="text-align: right"><code dir="auto">null</code></td>
<td>Editor fallback for maximum width</td>
+1 -1
View File
@@ -44,7 +44,7 @@ Some constructs are recognized structurally but emitted with their internal sour
## Not supported
`randsequence` and a small set of rare expression/port forms remain outside the formatter grammar. lucisv also does not run a preprocessor, so a file that becomes valid only after cross-file macro expansion may not format as a standalone input.
A small set of rare expression/port forms remains outside the formatter grammar. lucisv also does not run a preprocessor, so a file that becomes valid only after cross-file macro expansion may not format as a standalone input.
:::caution[Safe failure]
Whole-file formatting returns an error and writes nothing when parsing is incomplete. lucisv never emits a partially understood file.
@@ -27,6 +27,7 @@ style_regex = "[a-z_0-9]+"
| Key | Type | Default | Valid values | Used by |
|---|---|---:|---|---|
| `line-length` | integer | `100` | `40..400` | CLI and server |
| `[format].uvm-utils-indent` | boolean | `false` | indent the `` `uvm_field_* `` macros between `` `uvm_*_utils_begin `` and `` `uvm_*_utils_end `` one level | CLI and server |
| `indent` | integer | `2` | `1..8` | CLI and server |
| `exclude` | string array | `[]` | path patterns | CLI walk and server index |
| `filelist` | string | — | EDA `.f` path | server index |
@@ -66,6 +67,7 @@ Unknown keys, out-of-range numbers, invalid values, tables other than `[lint]` a
| `lucisv.inlineTemplates` | `true` | Offer structural ghost-text completions |
| `lucisv.inlineInstantiation` | `true` | Offer indexed module instantiation ghost text |
| `lucisv.formatOnSave` | `false` | Server-driven save formatting for clients that need it |
| `lucisv.format.uvmUtilsIndent` | `false` | The editor's spelling of `[format] uvm-utils-indent`; a checked-in `lucisv.toml` outranks it |
| `lucisv.lineLength` | `null` | Editor fallback for maximum width |
| `lucisv.indent` | `null` | Editor fallback for indentation |
| `lucisv.exclude` | `[]` | Extra workspace index exclusions |
+1
View File
@@ -534,6 +534,7 @@ promise:
| `vscode-hierarchy-sidebar ──▶ vlog_parser` | depends | `LineIndex::utf16_position` — byte offset to (0-based line, UTF-16 column), moved down beside the line table so the semantic index and `lucisv_server::convert::Positions` cannot answer differently. `Positions::position` is now a wrapper over it; the cross-crate equality is test-pinned. |
| `vscode-hierarchy-sidebar ◀──▶ workspace-index` | handshake | `WorkspaceIndex::units_of(kind)` — file-scope declarations of one kind, in name order, walking the unit table alone. The cheap half of `workspace_symbols("")` for a caller that never wants members; 15 ms per snapshot on opentitan. |
| `dut-hierarchy ──▶ vscode-hierarchy-sidebar` | depends | TODO §56 (2026-09-06): `hierarchySections.js` consumes the sidebar's model (`rootNode`, the reverse instance index memoised on the model) and its webview renderer's row menu; no edge to any Rust crate — the server is untouched. |
| `coverage-gaps-l` (TODO §54, 0.49.0) | lane | Touches `vlog_parser` (ast + parser + the `randsequence` keyword in the token table), `vlog_formatter` (arms, `[format] uvm-utils-indent`), `vlog_semantic` (bind arms), `vlog_linter`, `vlog_refactor` (match arms), `lucisv_core` (the config key), `lucisv_server` (settings, format) and `editors/vscode` (the setting, the regenerated grammar). New AST: `StmtKind::{EventTrigger, Let, RandSequence}`, `ExprKind::StreamWith`, `DataDecl::strength`, `ClockingSkew`; `size_pins` unmoved. |
| `hover-line-index ──▶ port-detail-spans / index-persistence` | depends + handshake | `DeclLines { name, detail }` rides each indexed `Decl`, so ordinary and split-port hover headings do not reread a file just to compute a line. The record grew again and **`FACTS_FORMAT` went 3 → 4**; the server's bounded `FileView` cache supplies the text/`LineIndex` only when a snippet or a non-indexed position still needs it. Its four invalidation points are `set_document`, `close_document`, `update_one`, and a whole rebuild. |
| `scan-interleave ◀──▶ workspace-index` | handshake | A scan is a stepped `Scan` value; staged `FileFacts` land through `WorkspaceIndex::absorb`, one whole-index merge per queue drain rather than per file. `Candidates::absorb` and `IncludeGraph::absorb` publish their tables in the same drain, so “the workspace as far as scanned” cannot mean three different prefixes. |
| `scan-interleave ──▶ hover-line-index` | depends | Delivers hover-line-index's measured startup-wait request: a startup scan above 64 files drains queued messages between files. A rescan deliberately still holds requests; what an answer sees never depends on elapsed wall time. |