Files
Guoliang ChenandClaude Mythos 5.2 71d13b5fbe
ci / checks (push) Successful in 1m0s
ci / corpus (push) Successful in 18s
ci / linux (push) Successful in 6m4s
release / build-and-publish (push) Successful in 5m31s
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]>
2026-11-24 12:11:09 -08:00
..

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

  • 54.1 the six L6 shapes, each with cases + parity + fuzzers
  • 54.2 randsequence as real nodes
  • 54.3 the cosmetics behind a config key, corpus impact measured (one key, not two — see the ruling in the work log)
  • Docs (this README; the strike text below is the lead's to apply)
  • 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 _ends) 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_types, 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.