Commit Graph
6 Commits
Author SHA1 Message Date
lucio eeaffafd56 Rename the tool to lucisv (Language Utility for Coding In SystemVerilog) 2026-08-25 23:36:00 -07:00
lucioandClaude Fable 5 83eb908f54 pairs::analyze is linear in nesting depth
QA find from the inline-templates round: the per-push rainbow-depth scan
made analyze O(depth^2), and the ghost-text gate calls it on every
keystroke — 8000 nested begins cost 629ms per request (24s at 50k). A
second quadratic hid in close(): a never-matching closer rescanned the
whole stack. Both fixed by a Stack type owning the frames plus running
counts (rainbow depth, per-rule frames), decremented through the
mismatch recovery's middle-of-stack drain — the exact hazard the old
comment cited for scanning. 8000 deep: 629ms -> 2.3ms; stray-closer
shape: 1.9s -> 12ms. Output is bit-identical: corpus fingerprint (859
files) plus two independent old-algorithm oracles (dev depth oracle, QA
field-for-field differential with fuzz sweep) now pinned as regression
tests alongside a wall-clock scaling test. Stale quadratic comment in
inline.rs's deep-nesting test updated to record the fix.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-25 14:47:34 -07:00
lucioandClaude Fable 5 ab89152264 Rainbow 0.3.1: never paint begin/end invisible; unmatched go red
The rainbow painted depth 3-5 pairs with editorBracketHighlight
.foreground4..6, whose VS Code defaults are fully transparent — a begin
typed three levels deep vanished with its end. The extension now uses
contributed vfmt.rainbow1..6 colors with opaque defaults in every theme
variant (dark/light/HC/HC-light), and vfmt/scopePairs additionally
reports genuinely unmatched begin/end/fork/join tokens, painted
vfmt.rainbowUnmatched bright red — file characters are never hidden.
Matched pairs, depths and 78eeef6's counting are unchanged.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-24 15:45:54 -07:00
lucioandClaude Fable 5 78eeef6050 Rainbow depth counts only the pairs the rainbow shows
User-reported: a begin inside a case (or any scope the rainbow filters
off the wire) painted one level deeper than its siblings — the hidden
scope read as an invisible begin/end layer. Depth now counts only
enclosing RAINBOW_KEYWORDS frames, one const shared by the counter and
the wire filter. Corpus: same 8,146 wire pairs, max depth 13 -> 7;
depth-0 bucket goes from near-empty to 2,881 (the palette was rotated).

Also closes M4 QA's e2e gap: the exclude test now asserts the republish
half of reindex(), and that a no-op settings push publishes nothing.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-24 03:34:37 -07:00
lucioandClaude Fable 5 aa26e5e427 Rainbow begin/end: vfmt/scopePairs request + themed depth decorations
Server: custom vfmt/scopePairs request returning every begin/end and
fork/join* pair with its nesting depth (UTF-16 ranges); wire shape pinned
by a literal-JSON test and by smoke.js over a real spawned server.

Extension: paints each depth with the theme's own bracket palette
(editorBracketHighlight.foreground1..6), debounced 250 ms, with a
document.version staleness guard; vfmt.rainbowBeginEnd setting (default
on) honored immediately in both directions.

Corpus sweep: 8,146 block pairs across 859 files, max depth 13, worst
request 2.1 ms (picorv32.v).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-24 02:23:22 -07:00
lucioandClaude Fable 5 f280e51169 vfmt-server: begin/end pair engine, documentHighlight, missing-end warnings
New pairs.rs: a stack matcher over the token stream for begin/end and 16
relative pairs, with guards for every no-body construct that spells an
opener keyword (extern/DPI prototypes, typedef class, virtual interface,
assert property, covergroup with function sample, ...). Non-cascading
mismatch recovery makes one missing end point at the exact unclosed begin.

Feeds textDocument/documentHighlight (cursor on begin highlights its
matching end) and WARNING diagnostics for unmatched openers/closers —
gated on the parse already failing, so macro/ifdef keyword imbalance in
working code can never warn.

Corpus sweep: 840 clean-parsing files, 11,062 matched pairs, 0 false
positives (reproduced independently by QA).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-24 02:08:00 -07:00