Rename the tool to lucisv (Language Utility for Coding In SystemVerilog)
This commit is contained in:
1 parent
a284e33110
commit
eeaffafd56
188 files changed
+2825
-2802
No files matched your search
@@ -4,13 +4,13 @@
|
||||
|
||||
Three of the owner's five editor requests are the same question asked three
|
||||
ways — *which `end` belongs to this `begin`?* — so they get one answer:
|
||||
`crates/vfmt_server/src/pairs.rs`, a stack matcher over the token stream the
|
||||
`crates/lucisv_server/src/pairs.rs`, a stack matcher over the token stream the
|
||||
document already caches. On top of it sit three consumers:
|
||||
`textDocument/documentHighlight`, so the cursor on a `begin`
|
||||
highlights its own `end` (real matching, not a text search for the word), and a
|
||||
**missing-closer warning** that points at the `begin` which lost its `end`
|
||||
instead of leaving the user with one parse error at the bottom of the file. The
|
||||
third consumer is the extension's rainbow: `vfmt/scopePairs` hands the client
|
||||
third consumer is the extension's rainbow: `lucisv/scopePairs` hands the client
|
||||
every `begin`/`end` and `fork`/`join*` pair with its nesting depth — plus every
|
||||
block delimiter still waiting for its partner — and `extension.js` paints each
|
||||
depth in one of six colours the extension contributes itself, and each lonely
|
||||
@@ -69,13 +69,13 @@ keyword in an error red.
|
||||
colour bright red for error in syntax, but don't just hide them."* That rules
|
||||
out borrowing a theme colour whose default is `#00000000`, which is what
|
||||
0.3.1 fixed, and it is why an unmatched keyword is painted rather than left
|
||||
alone. A user or a theme may still override a `vfmt.rainbow*` id with
|
||||
alone. A user or a theme may still override a `lucisv.rainbow*` id with
|
||||
anything they like — including transparent — and that is their decision, not
|
||||
a default of ours.
|
||||
- **Analysis is cheap enough to redo per request, and that now rests on
|
||||
`analyze` being linear rather than on real files being shallow.** `analyze`
|
||||
is one pass over the token vector with a small stack, so nothing is cached
|
||||
and no invalidation rule can go stale. Measured, because `vfmt/scopePairs`
|
||||
and no invalidation rule can go stale. Measured, because `lucisv/scopePairs`
|
||||
arrives on a debounce timer rather than on a user gesture: sweeping the
|
||||
corpus, the worst single `scope_pairs` call is **2.1 ms** (`picorv32.v`, the
|
||||
largest file), against a 250 ms debounce. Until 2026-08-25 the *shape* of the
|
||||
@@ -125,7 +125,7 @@ JSON `null` — deliberately not an empty array, because an empty array tells th
|
||||
editor there are no occurrences anywhere and suppresses its own word
|
||||
highlighting.
|
||||
|
||||
**Promised to `extension.js` — the `vfmt/scopePairs` wire shape.** This is the
|
||||
**Promised to `extension.js` — the `lucisv/scopePairs` wire shape.** This is the
|
||||
contract; `the_scope_pairs_wire_shape_is_what_the_extension_reads` pins it as
|
||||
literal JSON so it cannot drift silently.
|
||||
|
||||
@@ -133,7 +133,7 @@ Request — a custom method, so nothing advertises it and a client that does not
|
||||
know it simply never asks:
|
||||
|
||||
```json
|
||||
{ "method": "vfmt/scopePairs", "params": { "textDocument": { "uri": "file:///…" } } }
|
||||
{ "method": "lucisv/scopePairs", "params": { "textDocument": { "uri": "file:///…" } } }
|
||||
```
|
||||
|
||||
Result:
|
||||
@@ -179,7 +179,7 @@ Result:
|
||||
Ordering is by opener position, though the extension does not depend on it.
|
||||
|
||||
**Promised to `package.json` — the colour ids.** The extension contributes
|
||||
`vfmt.rainbow1` … `vfmt.rainbow6` and `vfmt.rainbowUnmatched` under
|
||||
`lucisv.rainbow1` … `lucisv.rainbow6` and `lucisv.rainbowUnmatched` under
|
||||
`contributes.colors`, and `extension.js` builds one `TextEditorDecorationType`
|
||||
per id. Renaming an id in either file without the other silently paints
|
||||
nothing: an unknown `ThemeColor` is not an error, it is simply no colour. See
|
||||
@@ -207,7 +207,7 @@ a construct with no closer:
|
||||
| `covergroup cg with function sample(...);` | the covergroup's sample method; `endgroup` closes the lot |
|
||||
|
||||
**Request to the lead (outside this feature's scope):**
|
||||
`docs/features/vfmt-server/README.md` carries the server's capability list and
|
||||
`docs/features/lucisv-server/README.md` carries the server's capability list and
|
||||
`TODO.md` §6 carries the shipped/not-shipped list; both now understate the
|
||||
server by one capability (`textDocument/documentHighlight`) and one diagnostic
|
||||
source. Neither file belongs to this feature, so neither was touched.
|
||||
@@ -263,20 +263,20 @@ design: it is not an error, it is just no paint.
|
||||
|
||||
So the extension contributes its own ids with `contributes.colors`, each with a
|
||||
default for `dark`, `light`, `highContrast` and `highContrastLight`. A theme
|
||||
that knows nothing about vfmt gets our default; a theme or a
|
||||
`workbench.colorCustomizations` entry that names `vfmt.rainbowN` still wins,
|
||||
that knows nothing about lucisv gets our default; a theme or a
|
||||
`workbench.colorCustomizations` entry that names `lucisv.rainbowN` still wins,
|
||||
which is the override story the borrowed ids gave us and the only thing worth
|
||||
keeping about them.
|
||||
|
||||
| Id | Dark | Light | Why |
|
||||
|---|---|---|---|
|
||||
| `vfmt.rainbow1` | `#FFD700` gold | `#0431FA` blue | VS Code's own level-1 bracket colours, both themes |
|
||||
| `vfmt.rainbow2` | `#DA70D6` orchid | `#319331` green | VS Code's own level 2 |
|
||||
| `vfmt.rainbow3` | `#179FFF` blue (`#87CEFA` on HC dark) | `#7B3814` brown | VS Code's own level 3, HC variant included |
|
||||
| `vfmt.rainbow4` | `#87D96B` green | `#0E7490` teal | first free hue in each theme; ~11:1 on `#1E1E1E`, ~5.2:1 on white |
|
||||
| `vfmt.rainbow5` | `#FF8C69` salmon | `#6D28D9` violet | warm against the dark greens/golds, cool against the light greens/browns |
|
||||
| `vfmt.rainbow6` | `#4FD6D6` cyan | `#BE185D` magenta | closes the wheel without repeating 1–3 in either theme |
|
||||
| `vfmt.rainbowUnmatched` | `#FF1212` red | `#B30000` dark red (`#A80000` HC light) | the error state, and the one colour that must read as *wrong* |
|
||||
| `lucisv.rainbow1` | `#FFD700` gold | `#0431FA` blue | VS Code's own level-1 bracket colours, both themes |
|
||||
| `lucisv.rainbow2` | `#DA70D6` orchid | `#319331` green | VS Code's own level 2 |
|
||||
| `lucisv.rainbow3` | `#179FFF` blue (`#87CEFA` on HC dark) | `#7B3814` brown | VS Code's own level 3, HC variant included |
|
||||
| `lucisv.rainbow4` | `#87D96B` green | `#0E7490` teal | first free hue in each theme; ~11:1 on `#1E1E1E`, ~5.2:1 on white |
|
||||
| `lucisv.rainbow5` | `#FF8C69` salmon | `#6D28D9` violet | warm against the dark greens/golds, cool against the light greens/browns |
|
||||
| `lucisv.rainbow6` | `#4FD6D6` cyan | `#BE185D` magenta | closes the wheel without repeating 1–3 in either theme |
|
||||
| `lucisv.rainbowUnmatched` | `#FF1212` red | `#B30000` dark red (`#A80000` HC light) | the error state, and the one colour that must read as *wrong* |
|
||||
|
||||
Two things about that table are decisions rather than transcription:
|
||||
|
||||
@@ -311,21 +311,21 @@ saturated pure red, and only ever on screen while a block is half-typed.
|
||||
failed, capped at 20.
|
||||
- [x] e2e coverage over the wire (`tests/e2e.rs`).
|
||||
- [x] Corpus sweep for false positives (found one class; fixed).
|
||||
- [x] `vfmt/scopePairs` in `server.rs` + `pairs::scope_pairs`, wire shape
|
||||
- [x] `lucisv/scopePairs` in `server.rs` + `pairs::scope_pairs`, wire shape
|
||||
pinned by a literal-JSON test.
|
||||
- [x] The rainbow in `extension.js`: six theme decoration types, `depth % 6`,
|
||||
repaint on active-editor / visible-editors / document change (250 ms
|
||||
debounce), stale-answer guard.
|
||||
- [x] `vfmt.rainbowBeginEnd` (default true), honoured live by a
|
||||
- [x] `lucisv.rainbowBeginEnd` (default true), honoured live by a
|
||||
configuration-change listener.
|
||||
- [x] `smoke.js` drives `vfmt/scopePairs` against a nested-begin + fork
|
||||
- [x] `smoke.js` drives `lucisv/scopePairs` against a nested-begin + fork
|
||||
fixture and asserts the depths.
|
||||
- [x] **M5:** wire `depth` counts only enclosing rainbow pairs, so a scope the
|
||||
rainbow hides cannot shift the colour of one it shows.
|
||||
- [x] **0.3.1:** the rainbow's colours are the extension's own
|
||||
(`vfmt.rainbow1..6`), opaque in every theme kind — `foreground4..6`
|
||||
(`lucisv.rainbow1..6`), opaque in every theme kind — `foreground4..6`
|
||||
default to transparent and were painting depths 3–5 invisible.
|
||||
- [x] **0.3.1:** `unmatched` on the wire, painted `vfmt.rainbowUnmatched`, so a
|
||||
- [x] **0.3.1:** `unmatched` on the wire, painted `lucisv.rainbowUnmatched`, so a
|
||||
half-typed `begin` is bright red rather than uncoloured.
|
||||
- [x] **2026-08-25:** `analyze` is linear in nesting depth. Both quadratic
|
||||
scans — the depth scan at every push and the whole-stack search for a
|
||||
@@ -423,14 +423,14 @@ reading the LRM would not have caught it, running the corpus did. One guard
|
||||
declared, capability test extended. `server.rs`: one arm in the request match.
|
||||
`diagnostics.rs`: one line in `all()`, between the parse errors and the lint
|
||||
warnings, with the reason in the doc comment. Nothing else in the crate moved,
|
||||
and no file outside `crates/vfmt_server/` was touched.
|
||||
and no file outside `crates/lucisv_server/` was touched.
|
||||
|
||||
**Tests.** `cargo test -p vfmt_server`: 162 unit (was 130) + 7 e2e (was 6), all
|
||||
**Tests.** `cargo test -p lucisv_server`: 162 unit (was 130) + 7 e2e (was 6), all
|
||||
green. Full workspace: 937 passed, 0 failed. `cargo fmt --all` clean,
|
||||
`cargo clippy --all-targets` clean. The one `#[allow]` in the new code is on
|
||||
`Pair::depth`, with a comment naming the milestone that removes it.
|
||||
|
||||
### 2026-08-24 — M3: `vfmt/scopePairs` and the extension's rainbow
|
||||
### 2026-08-24 — M3: `lucisv/scopePairs` and the extension's rainbow
|
||||
|
||||
**Server.** `Pair` gained a `keyword` field (the opener as written) so a
|
||||
consumer can take a subset without the engine having to know about subsets;
|
||||
@@ -466,7 +466,7 @@ through an `lsp_types::request` type because the method is ours.
|
||||
whatever the user's theme already uses for brackets — no colours invented here,
|
||||
nothing to clash. Repaint on active-editor change, visible-editors change
|
||||
(splits, tab drags) and document change on a 250 ms debounce. Turning
|
||||
`vfmt.rainbowBeginEnd` off repaints with empty range lists, which is how a
|
||||
`lucisv.rainbowBeginEnd` off repaints with empty range lists, which is how a
|
||||
decoration type is removed — so "off" takes effect immediately in both
|
||||
directions rather than "after a reload". Closing an editor needs no handler:
|
||||
VS Code disposes its decorations with it, and the types themselves are in
|
||||
@@ -489,7 +489,7 @@ Otherwise the milestone is as specified.
|
||||
|
||||
**Verification.** `cargo fmt --all` clean, `cargo clippy --all-targets` clean
|
||||
(0 diagnostics), `cargo test --workspace` **944 passed, 0 failed** (168 unit in
|
||||
this crate, up from 162; 7 e2e). `node smoke.js ../../target/debug/vfmt-server`
|
||||
this crate, up from 162; 7 e2e). `node smoke.js ../../target/debug/lucisv-server`
|
||||
against a freshly built binary: OK. The smoke assertion was mutation-checked —
|
||||
changing the expected depths to `[9,9,9]` fails with
|
||||
`got [1,2,1]`, so it is live rather than vacuous. `npx @vscode/vsce ls` still
|
||||
@@ -580,7 +580,7 @@ not rescan. Mutation-checked (expecting 4 fails with `left: 3`).
|
||||
|
||||
**Verification.** `cargo fmt --all` clean, `cargo clippy --all-targets` clean,
|
||||
`cargo test --workspace` green, `node smoke.js` against a freshly built
|
||||
`target/debug/vfmt-server` OK.
|
||||
`target/debug/lucisv-server` OK.
|
||||
|
||||
### 2026-08-24 — 0.3.1: the rainbow was painting with transparent colours
|
||||
|
||||
@@ -590,7 +590,7 @@ and pressing Enter at line 34 made *both* that `begin` and the `end` below it
|
||||
colours.
|
||||
|
||||
**Root cause, confirmed against the running server.** The server was right: its
|
||||
`vfmt/scopePairs` answer put the new pair at depth 3, with correct ranges. The
|
||||
`lucisv/scopePairs` answer put the new pair at depth 3, with correct ranges. The
|
||||
extension was wrong. It painted depth `d` with
|
||||
`ThemeColor('editorBracketHighlight.foreground' + (d % 6 + 1))`, and VS Code's
|
||||
colour registry gives visible defaults to only `foreground1..3`; `4`, `5` and
|
||||
@@ -607,7 +607,7 @@ downward, which moved a lot of real code from the safe 0–2 band into 3–5.
|
||||
**The fix, three parts.**
|
||||
|
||||
1. **Our own colours.** `contributes.colors` in `package.json` declares
|
||||
`vfmt.rainbow1..6` and `vfmt.rainbowUnmatched`, each with a default for
|
||||
`lucisv.rainbow1..6` and `lucisv.rainbowUnmatched`, each with a default for
|
||||
`dark`, `light`, `highContrast` and `highContrastLight`, and none of them
|
||||
transparent. `extension.js` builds its decoration types from those ids. The
|
||||
values and the reasoning are in *The palette* above; the short version is
|
||||
@@ -617,7 +617,7 @@ downward, which moved a lot of real code from the safe 0–2 band into 3–5.
|
||||
2. **`unmatched` on the wire.** `ScopePairs` gained
|
||||
`unmatched: Vec<Range>` — the block delimiters `analyze` already knew were
|
||||
partnerless, filtered by the same `RAINBOW_KEYWORDS` as `pairs` and sorted
|
||||
by position — and `extension.js` paints them `vfmt.rainbowUnmatched`. This
|
||||
by position — and `extension.js` paints them `lucisv.rainbowUnmatched`. This
|
||||
is the owner's rule applied to the state that started it all: a `begin` you
|
||||
have just typed has no `end` yet, so it has no depth and no rainbow colour,
|
||||
and *"you can make their colour bright red for error in syntax, but don't
|
||||
@@ -635,8 +635,8 @@ interaction directly: in three nested `begin`s missing one `end`, the two that
|
||||
do close still report depths `[1, 2]`, because an unmatched frame is still an
|
||||
enclosing scope while it sits on the stack.
|
||||
|
||||
**Tests.** `vfmt_server`: **285 unit** (was 279; six new, all in the
|
||||
`vfmt/scopePairs` section) and **16 e2e**. New unit tests: an opener that never
|
||||
**Tests.** `lucisv_server`: **285 unit** (was 279; six new, all in the
|
||||
`lucisv/scopePairs` section) and **16 e2e**. New unit tests: an opener that never
|
||||
closes is reported; a closer that opens nothing is reported; a balanced file
|
||||
reports nothing; a keyword is never both paired and unmatched (three pairs, one
|
||||
stray `end`, one unclosed `fork`, no range on both lists); `unmatched` carries
|
||||
@@ -670,7 +670,7 @@ reverted, md5 identical (`0ff5e46f51b9c7f2079d899104776ddb`).
|
||||
not mention: without it a high-contrast *light* theme falls back to the
|
||||
ordinary light value, which happens to be fine here, but stating all four is
|
||||
one line each and leaves nothing to inference.
|
||||
- `vfmt.rainbowBeginEnd`'s description in `package.json` and the "Rainbow
|
||||
- `lucisv.rainbowBeginEnd`'s description in `package.json` and the "Rainbow
|
||||
begin/end" section of `editors/vscode/README.md` both said the colours come
|
||||
from the theme's bracket palette. Both are now accurate and document the
|
||||
override recipe; they are this feature's own user-facing text, so they were
|
||||
@@ -680,13 +680,13 @@ reverted, md5 identical (`0ff5e46f51b9c7f2079d899104776ddb`).
|
||||
`cargo check --workspace`), `editors/vscode/package.json`,
|
||||
`editors/vscode/package-lock.json` (both places), plus the illustrative
|
||||
version strings in `tools/RELEASING.md` and `README.md`'s install example — the
|
||||
same set M5 touched for 0.3.0. `target/debug/vfmt --version` → `vfmt 0.3.1`.
|
||||
same set M5 touched for 0.3.0. `target/debug/lucisv --version` → `lucisv 0.3.1`.
|
||||
`CHANGELOG.md` has a `0.3.1 — 2026-08-24` section in the changelog's voice.
|
||||
|
||||
**Verification.** `cargo fmt --all -- --check` clean; `cargo clippy --workspace
|
||||
--all-targets` **0 warnings**; `cargo test --workspace` **1268 passed, 0
|
||||
failed**; `node --check` on `extension.js` and `smoke.js` clean; `node smoke.js
|
||||
../../target/debug/vfmt-server` **OK** against a freshly built binary;
|
||||
../../target/debug/lucisv-server` **OK** against a freshly built binary;
|
||||
`npx @vscode/vsce ls` still accepts the manifest with the new
|
||||
`contributes.colors` block. No new dependencies, no `unwrap`/`expect`/`panic!`
|
||||
outside `#[cfg(test)]`, no `#[allow]` added, and `TODO.md` and
|
||||
@@ -793,7 +793,7 @@ version of each.
|
||||
two did not cover a leaked `per_rule` count.
|
||||
|
||||
**Mutation check** — five deliberate breakages, each run against the full
|
||||
`vfmt_server` suite and then reverted (`pairs.rs` restored from a copy and
|
||||
`lucisv_server` suite and then reverted (`pairs.rs` restored from a copy and
|
||||
`diff`-verified byte-identical after each):
|
||||
|
||||
| mutation | caught by |
|
||||
@@ -807,7 +807,7 @@ version of each.
|
||||
The first row is the point of test 1, and the third row is why test 2 grew a
|
||||
third shape rather than staying at two.
|
||||
|
||||
**Scope.** Only `crates/vfmt_server/src/pairs.rs` and this README were touched;
|
||||
**Scope.** Only `crates/lucisv_server/src/pairs.rs` and this README were touched;
|
||||
`inline.rs` and `docs/features/inline-templates/` were not. No new
|
||||
dependencies, no `unsafe`, no `unwrap`/`expect`/`panic!` outside `#[cfg(test)]`,
|
||||
no `#[allow]` added. `TODO.md` was not touched — this fixes a defect inside an
|
||||
@@ -816,7 +816,7 @@ went in this feature's own Status/TODO instead.
|
||||
|
||||
**Verification.** `cargo fmt --all -- --check` clean; `cargo clippy
|
||||
--all-targets --workspace` **0 warnings**; `cargo test --workspace` **1616
|
||||
passed, 0 failed, 4 ignored** (was 1614 — the two new tests). `vfmt_server`
|
||||
passed, 0 failed, 4 ignored** (was 1614 — the two new tests). `lucisv_server`
|
||||
alone: 533 unit + 29 e2e + 3 grammar, all green.
|
||||
|
||||
## QA log
|
||||
@@ -830,7 +830,7 @@ scope this round). Verdict: **PASS**, no blocking findings.
|
||||
the guard table in *Handshakes* above; ran the dev's own 162 unit + 7 e2e
|
||||
tests; then attacked with two throwaway additions to `pairs.rs`'s own
|
||||
`#[cfg(test)] mod tests` (same crate access as the real code, since
|
||||
`vfmt_server` is bin-only and has no lib target for an external test to link
|
||||
`lucisv_server` is bin-only and has no lib target for an external test to link
|
||||
against) — run, read, and **removed before this log was written**; nothing
|
||||
below is in the committed tree.
|
||||
|
||||
@@ -871,7 +871,7 @@ produce a wrong warning. Filed as an FYI for whoever next touches
|
||||
the one of the two the dev's guard table doesn't already list — worth a line
|
||||
if the table is touched again, not worth blocking on.)
|
||||
|
||||
**4. `crates/vfmt_server/src/server.rs:109-121`** (`DocumentHighlightRequest`
|
||||
**4. `crates/lucisv_server/src/server.rs:109-121`** (`DocumentHighlightRequest`
|
||||
handler): `self.offset(&uri, position)` internally calls
|
||||
`self.workspace.document(&uri)`, and the closure passed to `.and_then` calls
|
||||
`self.workspace.document(&uri)` a second time. Harmless — `Document::new`
|
||||
@@ -882,13 +882,13 @@ Non-blocking style nit, left as-is per "you verify, you don't redesign."
|
||||
|
||||
**5. Invariants.**
|
||||
- `cargo test --workspace`: every crate green, 0 failures (162 unit + 7 e2e in
|
||||
`vfmt_server` alone, matching the Work log's count exactly).
|
||||
`lucisv_server` alone, matching the Work log's count exactly).
|
||||
- `cargo fmt --all -- --check`: clean.
|
||||
- `cargo clippy --all-targets --workspace`: clean, no warnings.
|
||||
- `git diff --stat` (working tree vs `HEAD`): only
|
||||
`crates/vfmt_server/{diagnostics,main,server}.rs` and
|
||||
`crates/vfmt_server/tests/e2e.rs`, plus the untracked new
|
||||
`crates/vfmt_server/src/pairs.rs` and `docs/features/editor-scopes/`. No
|
||||
`crates/lucisv_server/{diagnostics,main,server}.rs` and
|
||||
`crates/lucisv_server/tests/e2e.rs`, plus the untracked new
|
||||
`crates/lucisv_server/src/pairs.rs` and `docs/features/editor-scopes/`. No
|
||||
formatter, `verify.rs`, or `vlog_parser` files touched, confirmed by listing
|
||||
(`git status`) as well as the stat diff.
|
||||
- No `unwrap()`/`expect()`/`panic!` in `pairs.rs`, `server.rs`, or
|
||||
@@ -902,7 +902,7 @@ recorded above (a pre-existing `vlog_parser` grammar gap unrelated to this
|
||||
feature, and a redundant-but-harmless double document lookup in
|
||||
`server.rs`).
|
||||
|
||||
### 2026-08-24 — QA round 2 (M3): `vfmt/scopePairs` and the extension rainbow
|
||||
### 2026-08-24 — QA round 2 (M3): `lucisv/scopePairs` and the extension rainbow
|
||||
|
||||
Charter items 1, 4, 5 (repeat, unregressed) and 6 from `editor_features_plan.md`
|
||||
for this dispatch: the wire shape, `scope_pairs` correctness, `extension.js`
|
||||
@@ -911,9 +911,9 @@ review, `smoke.js`, invariants, and an M1/M2 unregression spot-check. Item 2
|
||||
re-audited except where M3 touched shared code (it did not — `Pair::keyword`
|
||||
is additive). Verdict: **PASS**, no blocking findings.
|
||||
|
||||
**1. Wire shape.** Ran `cargo test -p vfmt_server`: 168 unit + 7 e2e, all
|
||||
**1. Wire shape.** Ran `cargo test -p lucisv_server`: 168 unit + 7 e2e, all
|
||||
green. Read `the_scope_pairs_wire_shape_is_what_the_extension_reads`
|
||||
(`crates/vfmt_server/src/pairs.rs:915`) — it pins the full response as literal
|
||||
(`crates/lucisv_server/src/pairs.rs:915`) — it pins the full response as literal
|
||||
JSON (`open`/`close` LSP `Range`s over the keyword, `depth`), matching the
|
||||
Handshakes section word for word. Confirmed each documented property against
|
||||
its own test, not just the pinned one:
|
||||
@@ -935,8 +935,8 @@ its own test, not just the pinned one:
|
||||
- Unopened doc → `null`: no dedicated unit test exists for this specific
|
||||
handler (matches the pattern for every sibling handler in `server.rs` —
|
||||
none of them have one either, so this is not an M3-specific gap). Verified
|
||||
directly against the built binary instead: spawned `vfmt-server`, sent
|
||||
`vfmt/scopePairs` for a URI never opened via `didOpen`, got back
|
||||
directly against the built binary instead: spawned `lucisv-server`, sent
|
||||
`lucisv/scopePairs` for a URI never opened via `didOpen`, got back
|
||||
`{"jsonrpc":"2.0","id":2,"result":null}` with no error. Matches
|
||||
`server.rs:165-170`.
|
||||
|
||||
@@ -986,8 +986,8 @@ against the round-2 charter's specific worry list:
|
||||
|
||||
No defects found in `extension.js`.
|
||||
|
||||
**4. `smoke.js`.** Built `target/debug/vfmt-server` fresh (`cargo build -p
|
||||
vfmt_server`), ran `node smoke.js ../../target/debug/vfmt-server` from
|
||||
**4. `smoke.js`.** Built `target/debug/lucisv-server` fresh (`cargo build -p
|
||||
lucisv_server`), ran `node smoke.js ../../target/debug/lucisv-server` from
|
||||
`editors/vscode/`: **OK**. Mutation check: changed the expected depths
|
||||
assertion from `[1, 2, 1]` to `[9, 9, 9]`, reran — failed as expected
|
||||
(`expected depths [1,2,1] ..., got [1,2,1]`, exit code 1), then reverted;
|
||||
@@ -997,15 +997,15 @@ was. `node --check` on both `extension.js` and `smoke.js`: clean.
|
||||
|
||||
**5. Invariants.**
|
||||
- `cargo test --workspace`: 944 passed, 0 failed (168 unit + 7 e2e in
|
||||
`vfmt_server`, matching the Work Log's count).
|
||||
`lucisv_server`, matching the Work Log's count).
|
||||
- `cargo fmt --all -- --check`: clean.
|
||||
- `cargo clippy --all-targets`: clean, no warnings.
|
||||
- `git diff --stat` vs `HEAD`: `crates/vfmt_server/{pairs,server}.rs`,
|
||||
`crates/vfmt_server/tests/e2e.rs`, `docs/features/editor-scopes/README.md`,
|
||||
- `git diff --stat` vs `HEAD`: `crates/lucisv_server/{pairs,server}.rs`,
|
||||
`crates/lucisv_server/tests/e2e.rs`, `docs/features/editor-scopes/README.md`,
|
||||
`editors/vscode/{README.md,extension.js,package.json,smoke.js}`. No
|
||||
`vlog_formatter`/`vlog_parser`/`verify.rs` paths touched.
|
||||
- `node -e "JSON.parse(...)"` on `editors/vscode/package.json`: valid; the new
|
||||
`vfmt.rainbowBeginEnd` setting and the M1 `contributes.snippets` block are
|
||||
`lucisv.rainbowBeginEnd` setting and the M1 `contributes.snippets` block are
|
||||
both present and unchanged in shape. `npx @vscode/vsce ls` accepts the
|
||||
manifest and lists `package.json`, `extension.js`, `README.md`,
|
||||
`snippets/verilog.json`, `snippets/systemverilog.json` — no error.
|
||||
@@ -1014,13 +1014,13 @@ was. `node --check` on both `extension.js` and `smoke.js`: clean.
|
||||
`pairs.rs` — the dev's removal of the `Pair::depth` `#[allow(dead_code)]`
|
||||
is confirmed; nothing new was added in its place.
|
||||
|
||||
**6. M1/M2 unregression spot-check.** `cargo test -p vfmt_server` (168 unit)
|
||||
**6. M1/M2 unregression spot-check.** `cargo test -p lucisv_server` (168 unit)
|
||||
includes the full M1 snippet-adjacent and M2 `pairs.rs`/`documentHighlight`/
|
||||
missing-end suites from round 1, all still passing; `package.json`'s
|
||||
`contributes.snippets` block is byte-identical to what round 1 saw (verified
|
||||
by reading it directly, not diffed against round 1 since M1 was committed
|
||||
before this dispatch). No M2 test was touched by this diff except the two
|
||||
lines the e2e test needed to add a `vfmt/scopePairs` frame after the existing
|
||||
lines the e2e test needed to add a `lucisv/scopePairs` frame after the existing
|
||||
`documentHighlight` assertions.
|
||||
|
||||
**Verdict: PASS.** No blocking findings, no non-blocking findings either —
|
||||
@@ -1034,7 +1034,7 @@ a gap specific to this work.
|
||||
Charter: `editor_features_plan.md`'s M5 section (the user-reported "invisible
|
||||
begin/end" bug fix) plus the M4 exclude-republish gap the lead accepted last
|
||||
round. Scope: uncommitted working tree only, diff vs `9a3a92c` —
|
||||
`crates/vfmt_server/src/pairs.rs`, `crates/vfmt_server/tests/e2e.rs`,
|
||||
`crates/lucisv_server/src/pairs.rs`, `crates/lucisv_server/tests/e2e.rs`,
|
||||
`editors/vscode/smoke.js`, `docs/features/editor-scopes/README.md`. Verdict:
|
||||
**PASS**, one non-blocking finding (item 2 below).
|
||||
|
||||
@@ -1059,7 +1059,7 @@ the reported-bug fixture. Added four throwaway tests, all passed:
|
||||
(`docs/features/editor-scopes/README.md:415`, the `no_hidden_scope_...`
|
||||
case list) — the dev's own `generate` case is an *if*-generate with a
|
||||
single anonymous `begin` (`no_hidden_scope_counts_toward_the_depth`,
|
||||
`crates/vfmt_server/src/pairs.rs:944`), which never exercises a *second*
|
||||
`crates/lucisv_server/src/pairs.rs:944`), which never exercises a *second*
|
||||
begin nested inside a named generate-for block. No inconsistency between
|
||||
the dev's tests and the README, though: the depth logic is opener-keyword-
|
||||
based, not context-based, so a generate-for's named begin behaves
|
||||
@@ -1079,7 +1079,7 @@ times).
|
||||
claims. Non-blocking, filed as a finding rather than fixed directly** (it
|
||||
would mean rewriting the test's structure, past "small unambiguous fix").
|
||||
`the_depth_counter_and_the_wire_filter_read_the_same_list`
|
||||
(`crates/vfmt_server/src/pairs.rs:978-994`) has two parts: a loop over `RULES`
|
||||
(`crates/lucisv_server/src/pairs.rs:978-994`) has two parts: a loop over `RULES`
|
||||
comparing `is_rainbow(rule.open)` against `RAINBOW_KEYWORDS.contains(&rule.open)`
|
||||
— which is **tautological**, since `is_rainbow` is defined as exactly that
|
||||
`.contains` call (`pairs.rs:74-76`); the loop can never fail regardless of
|
||||
@@ -1130,7 +1130,7 @@ that has ever caught anything.
|
||||
|
||||
**3. Mutation-check the core depth line.** Reverted
|
||||
`stack.iter().filter(|f| is_rainbow(f.rule.open)).count()` (`pairs.rs:157`)
|
||||
to `stack.len() as u32`. `cargo test -p vfmt_server` (unit): **exactly six**
|
||||
to `stack.len() as u32`. `cargo test -p lucisv_server` (unit): **exactly six**
|
||||
failures, all depth assertions, names matching the dev's Work Log list
|
||||
exactly (`a_module_with_nested_begins_matches_every_pair`,
|
||||
`a_scope_the_rainbow_hides_does_not_shift_the_colour_of_one_it_shows`,
|
||||
@@ -1150,7 +1150,7 @@ that line. Reverted; `pairs.rs` `md5` confirmed unchanged.
|
||||
|
||||
**4. M4 gap closure — the republish assertion.**
|
||||
`a_pushed_exclude_rebuilds_the_index_mid_session`
|
||||
(`crates/vfmt_server/tests/e2e.rs`) passes as committed. Mutation-checked the
|
||||
(`crates/lucisv_server/tests/e2e.rs`) passes as committed. Mutation-checked the
|
||||
new count: changed `assert_eq!(publishes, 3, ...)` to `4`
|
||||
(`tests/e2e.rs:766`) — failed as expected (`left: 3, right: 4`); reverted,
|
||||
`md5` confirmed unchanged (`ce62cbe2d094214d0e132cda9c252507` before and
|
||||
@@ -1168,8 +1168,8 @@ log. `pairs.rs` `md5` confirmed `975e8a4a80530309841415bd403cc71d` after
|
||||
removal, matching its state before the sweep test was added.
|
||||
|
||||
**6. `smoke.js` and invariants.**
|
||||
- Built `target/debug/vfmt-server` fresh (`cargo build -p vfmt_server`), ran
|
||||
`node smoke.js ../../target/debug/vfmt-server`: **OK**. Mutation check:
|
||||
- Built `target/debug/lucisv-server` fresh (`cargo build -p lucisv_server`), ran
|
||||
`node smoke.js ../../target/debug/lucisv-server`: **OK**. Mutation check:
|
||||
changed the expected-depths literal from `[0, 1, 0]` to `[9, 9, 9]`, reran —
|
||||
failed as expected (`smoke: FAIL — expected depths [0,1,0] ..., got
|
||||
[0,1,0]`, exit code 1 confirmed separately from the pipeline's own exit
|
||||
@@ -1177,14 +1177,14 @@ removal, matching its state before the sweep test was added.
|
||||
(`2092dbb2331bd040932f3ccb76246398`).
|
||||
- `node --check` on both `smoke.js` and `extension.js`: clean.
|
||||
- `cargo test --workspace`: every crate green (194 unit + 9 e2e in
|
||||
`vfmt_server`, matching the Work Log's count), 0 failures, both before any
|
||||
`lucisv_server`, matching the Work Log's count), 0 failures, both before any
|
||||
mutation and again after every mutation was reverted.
|
||||
- `cargo fmt --all -- --check`: clean. `cargo clippy --workspace
|
||||
--all-targets`: clean, no warnings (re-checked after touching the two Rust
|
||||
files to defeat incremental-build caching).
|
||||
- `git diff --stat` vs `HEAD` (`9a3a92c`): exactly the four files in the
|
||||
charter, same shape as at dispatch — `crates/vfmt_server/src/pairs.rs`,
|
||||
`crates/vfmt_server/tests/e2e.rs`, `docs/features/editor-scopes/README.md`,
|
||||
charter, same shape as at dispatch — `crates/lucisv_server/src/pairs.rs`,
|
||||
`crates/lucisv_server/tests/e2e.rs`, `docs/features/editor-scopes/README.md`,
|
||||
`editors/vscode/smoke.js`. No `vlog_formatter`/`vlog_parser`/`verify.rs`
|
||||
path touched.
|
||||
- No `unwrap()`/`expect()`/`panic!` added outside `#[cfg(test)]` in the diff
|
||||
@@ -1204,7 +1204,7 @@ Charter: the owner-confirmed root cause (transparent `foreground4..6`
|
||||
defaults) and its fix — the extension's own opaque colour ids, `unmatched` on
|
||||
the wire, and the defensive reads in `paint`. Scope: uncommitted working tree,
|
||||
diff vs `HEAD` (`d8e3708`) — `CHANGELOG.md`, `Cargo.toml`, `Cargo.lock`,
|
||||
`README.md`, `crates/vfmt_server/src/pairs.rs`, `crates/vfmt_server/tests/e2e.rs`,
|
||||
`README.md`, `crates/lucisv_server/src/pairs.rs`, `crates/lucisv_server/tests/e2e.rs`,
|
||||
`docs/features/editor-scopes/README.md`, `editors/vscode/{README.md,
|
||||
extension.js, package-lock.json, package.json, smoke.js}`, `tools/RELEASING.md`.
|
||||
Verdict: **ship-after-fixes** — one fix applied directly (below), one
|
||||
@@ -1220,10 +1220,10 @@ describes.
|
||||
**1. Gates.** `cargo fmt --all -- --check`: clean. `cargo clippy --workspace
|
||||
--all-targets`: clean, 0 warnings. `cargo test --workspace`: **1268 passed, 0
|
||||
failed** — summed the per-crate `test result:` lines independently rather than
|
||||
trusting the dev's total; `vfmt_server` alone is **285 unit + 16 e2e**, an
|
||||
trusting the dev's total; `lucisv_server` alone is **285 unit + 16 e2e**, an
|
||||
exact match to the Work Log. `node --check` on `extension.js` and `smoke.js`:
|
||||
both clean. `node smoke.js ../../target/debug/vfmt-server` against a freshly
|
||||
built (`cargo build -p vfmt_server`) binary: **OK**.
|
||||
both clean. `node smoke.js ../../target/debug/lucisv-server` against a freshly
|
||||
built (`cargo build -p lucisv_server`) binary: **OK**.
|
||||
|
||||
**2. The real user scenario, end to end.** Drove the built debug server over
|
||||
stdio (a hand-rolled probe mirroring `smoke.js`'s framing, since the crate
|
||||
@@ -1255,9 +1255,9 @@ Findings, both exactly as claimed:
|
||||
that is genuinely alone rather than the one a naive "most recently typed"
|
||||
guess would name.
|
||||
|
||||
**3. Colour-id audit, programmatic.** Extracted every `vfmt.rainbow*` id
|
||||
`extension.js` references (`vfmt.rainbow${index + 1}` for `index` 0–5, plus
|
||||
the literal `vfmt.rainbowUnmatched`) and diffed against `package.json`'s
|
||||
**3. Colour-id audit, programmatic.** Extracted every `lucisv.rainbow*` id
|
||||
`extension.js` references (`lucisv.rainbow${index + 1}` for `index` 0–5, plus
|
||||
the literal `lucisv.rainbowUnmatched`) and diffed against `package.json`'s
|
||||
`contributes.colors` array. All 7 declared, all 7 referenced, no orphans
|
||||
either direction. For each, checked all four `defaults` keys
|
||||
(`dark`/`light`/`highContrast`/`highContrastLight`) are present and parsed
|
||||
@@ -1283,7 +1283,7 @@ No probe found a false positive, a false negative, a panic, or a misattributed
|
||||
range.
|
||||
|
||||
**5. `78eeef6`'s pinned depth tests, independently diffed rather than taken on
|
||||
faith.** `git diff 78eeef6 -- crates/vfmt_server/src/pairs.rs`, checked for
|
||||
faith.** `git diff 78eeef6 -- crates/lucisv_server/src/pairs.rs`, checked for
|
||||
each of the six tests the Work Log names as unedited:
|
||||
`a_module_with_nested_begins_matches_every_pair`,
|
||||
`a_scope_the_rainbow_hides_does_not_shift_the_colour_of_one_it_shows`,
|
||||
@@ -1350,19 +1350,19 @@ depths and the missing-`end` warnings are unchanged" — verified true by
|
||||
finding 5 above.
|
||||
|
||||
One gap: `editors/vscode/README.md:49` and `:56` still read
|
||||
`vfmt-0.3.0.vsix` in the install-example commands, while the parallel example
|
||||
in the repo-root `README.md:584` correctly reads `vfmt-0.3.1.vsix`. This file
|
||||
`lucisv-0.3.0.vsix` in the install-example commands, while the parallel example
|
||||
in the repo-root `README.md:584` correctly reads `lucisv-0.3.1.vsix`. This file
|
||||
is not pristine — this very diff touches it for the rainbow-palette
|
||||
documentation (`git diff HEAD -- editors/vscode/README.md`, the
|
||||
`workbench.colorCustomizations` snippet and the "seven colours" rewrite) —
|
||||
but the two version strings were already stale at `0.3.0` before this diff
|
||||
(`git show HEAD:editors/vscode/README.md` shows the same `vfmt-0.3.0.vsix`
|
||||
(`git show HEAD:editors/vscode/README.md` shows the same `lucisv-0.3.0.vsix`
|
||||
text, so this is not a regression this diff introduced), and the Work Log's
|
||||
own version-bump list names only `tools/RELEASING.md` and (root) `README.md`
|
||||
as the "illustrative version strings" set, omitting this file even though it
|
||||
carries the same kind of string. A one-line-each, unambiguous doc fix per
|
||||
this role's charter — **fixed directly**, both occurrences now read
|
||||
`vfmt-0.3.1.vsix`, no code or test changes involved.
|
||||
`lucisv-0.3.1.vsix`, no code or test changes involved.
|
||||
|
||||
**8. Invariants.** No `unwrap()`/`expect()`/`panic!()`/`#[allow]` added
|
||||
anywhere in the `pairs.rs` diff (grepped every added line of `git diff HEAD --
|
||||
@@ -1387,8 +1387,8 @@ either be corrected or the code tightened next time this file is touched.
|
||||
Charter: the dev's claim that replacing the bare `Vec<Frame>` stack with the
|
||||
counting `Stack` type makes `analyze` linear without changing any observable
|
||||
answer — bit-identical corpus fingerprint, 1616 tests green, two new tests.
|
||||
Scope: uncommitted working tree, diff vs `HEAD` — `crates/vfmt_server/src/pairs.rs`
|
||||
and this README only. `crates/vfmt_server/src/inline.rs` and
|
||||
Scope: uncommitted working tree, diff vs `HEAD` — `crates/lucisv_server/src/pairs.rs`
|
||||
and this README only. `crates/lucisv_server/src/inline.rs` and
|
||||
`docs/features/inline-templates/` were read for context (the motivating QA
|
||||
find lives there) but not touched, per charter. Verdict: **PASS**, no
|
||||
blocking findings, one non-blocking cross-feature finding (item 8).
|
||||
@@ -1407,7 +1407,7 @@ the usual add-run-remove-and-md5-verify pattern.
|
||||
defeat incremental caching, both before and after adding QA's own test).
|
||||
`cargo test --workspace`: **1617 passed, 0 failed** (summed every crate's
|
||||
`test result:` line independently — 1616 + the one new differential test);
|
||||
`vfmt_server` alone: 530 unit + 4 ignored + 29 e2e + 3 grammar, matching the
|
||||
`lucisv_server` alone: 530 unit + 4 ignored + 29 e2e + 3 grammar, matching the
|
||||
Work Log's 533 unit count plus QA's addition.
|
||||
|
||||
Timed the dev's own scaling test in isolation:
|
||||
@@ -1422,7 +1422,7 @@ jitter a loaded CI runner typically adds. Judgment: **safe as written**.
|
||||
|
||||
**2. Independent differential check — not just trusting the corpus
|
||||
fingerprint.** Added a full-fidelity oracle to `pairs.rs`'s test module,
|
||||
transcribed verbatim from `git show HEAD:crates/vfmt_server/src/pairs.rs`
|
||||
transcribed verbatim from `git show HEAD:crates/lucisv_server/src/pairs.rs`
|
||||
(the exact pre-`Stack` `analyze`/`close`, copied as `old_analyze`/`old_close`
|
||||
over a local `OldFrame` stack) — a second, independently-typed
|
||||
implementation of the algorithm being replaced, not a rederivation from
|
||||
@@ -1492,7 +1492,7 @@ the diff, not assumed — and reads `p.depth` straight off `analyze`'s output,
|
||||
so the field-for-field differential above (which includes `depth` in its
|
||||
`pairs` fingerprint) is a direct proof the wire value is unchanged.
|
||||
`editors/vscode/extension.js` is not in `git diff --stat` at all. Ran the
|
||||
full `vfmt_server` suite's scope-pairs and depth tests
|
||||
full `lucisv_server` suite's scope-pairs and depth tests
|
||||
(`scope_pairs_depths_nest_and_forks_are_included`,
|
||||
`only_begins_and_forks_stack_up_the_colours`,
|
||||
`no_hidden_scope_counts_toward_the_depth`,
|
||||
@@ -1517,7 +1517,7 @@ ballpark as the dev's own debug-build numbers (629.1 ms / 2.3 ms at n =
|
||||
8000), close enough that the two runs are clearly measuring the same thing on
|
||||
similar hardware.
|
||||
|
||||
**6. Scope.** `git diff --stat` vs `HEAD`: `crates/vfmt_server/src/pairs.rs`
|
||||
**6. Scope.** `git diff --stat` vs `HEAD`: `crates/lucisv_server/src/pairs.rs`
|
||||
and `docs/features/editor-scopes/README.md` only (plus this entry). Grepped
|
||||
every added line for `unwrap(`, `expect(`, `panic!`, `unsafe` — all six hits
|
||||
are inside `#[cfg(test)] mod tests` (five `tokenize(...).expect(...)` calls
|
||||
@@ -1536,7 +1536,7 @@ green tree — not this feature's `pairs::analyze`. The dev's claim that
|
||||
nothing in the backlog covers this fix holds.
|
||||
|
||||
**8. Non-blocking, cross-feature finding — not fixed, `inline.rs` is out of
|
||||
scope for this dispatch.** `crates/vfmt_server/src/inline.rs:514-519`, the
|
||||
scope for this dispatch.** `crates/lucisv_server/src/inline.rs:514-519`, the
|
||||
doc comment on
|
||||
`a_deeply_nested_file_neither_crashes_nor_misses_the_trigger`, still reads:
|
||||
*"those flat loops are not all linear, though — `pairs::analyze` is
|
||||
@@ -1622,8 +1622,8 @@ Root cause was mine to confirm before the dev brief: the server's answers
|
||||
were correct, and the invisibility came from painting depth 3–5 with
|
||||
`editorBracketHighlight.foreground4..6`, whose VS Code defaults are
|
||||
transparent. The fix is the right shape — extension-contributed
|
||||
`vfmt.rainbow1..6` colors that are never transparent in any theme variant,
|
||||
plus `vfmt.rainbowUnmatched` bright red for genuinely unmatched tokens,
|
||||
`lucisv.rainbow1..6` colors that are never transparent in any theme variant,
|
||||
plus `lucisv.rainbowUnmatched` bright red for genuinely unmatched tokens,
|
||||
exactly the owner's never-hide/red-for-errors ruling. Dev's deviation
|
||||
(VS Code's real light-palette for 1–3 instead of gold-on-white) is
|
||||
approved: it avoids re-shipping the same bug in light themes. QA verified
|
||||
|
||||
Reference in new issue
Block a user