Add editor-packaging and vfmt-core-lift (round 12: TODO §6 closes)
editor-packaging: a minimal VS Code extension (41-line plain JS on
vscode-languageclient =9.0.1, one setting vfmt.serverPath, languages
verilog/systemverilog) with a zero-dependency smoke.js that validates
the extension's exact spawn contract against the real binary, plus
Neovim/Vim/coc setup docs (including the load-bearing
vim.filetype.add — Vim maps *.v by content heuristic and *.vh not at
all). Everything headless-validatable was validated: the .vsix
builds, smoke passes with negative controls, npm ci reproduces.
vfmt-core-lift: config.rs and walk.rs moved to a new std-only
vfmt_core crate as byte-identical 100% renames (CLI suite untouched,
corpus TSV md5 equal from HEAD and lifted builds). The LSP server
now discovers vfmt.toml per document with precedence config > client
tabSize > built-in default (an editor default is not a deliberate
override), warns once per document change on a broken config while
formatting with defaults, and scans the workspace with the lifted
gitignore-aware walk. QA drove every claim live over stdio.
With these, every TODO §6 item is delivered: spans, tolerant
parsing, define table, single-file semantics, workspace index, the
server, and both editors. Lead trued up the caveats this round made
stale across five documents.
Dev: 2 Opus agents; QA: 2 Sonnet agents; reviews in
docs/features/{editor-packaging,vfmt-core-lift}/README.md.
Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
c8b936a741
commit
832bf4afc6
27 files changed
+2070
-108
No files matched your search
@@ -0,0 +1,482 @@
|
||||
# editor-packaging
|
||||
|
||||
## Goal
|
||||
|
||||
`vfmt-server` has been a running binary since round 11, but a binary nobody can
|
||||
launch from an editor is a demo. This round closes TODO.md §6's last
|
||||
non-deferred item: a **minimal VS Code extension** that registers the
|
||||
Verilog/SystemVerilog file types and starts the server, and **documented
|
||||
Vim/Neovim configuration** that does the same with no plugin at all. The
|
||||
governing constraint is TODO.md §6's own sentence — *"no editor-specific logic
|
||||
below the protocol layer"* — read in the other direction: no *language* logic
|
||||
above it either. Every feature a user sees comes from the server, so this
|
||||
feature ships one 41-line JavaScript file, one setting, two markdown guides,
|
||||
and a dependency-free smoke test that proves the extension's spawn contract
|
||||
matches the binary's reality without opening an editor.
|
||||
|
||||
## Assumptions
|
||||
|
||||
- **VS Code has no built-in generic LSP client.** `vscode.lsp` does not exist;
|
||||
the editor's own extensions (and ruff's, and rust-analyzer's) all use
|
||||
`vscode-languageclient`. Writing a client by hand means re-implementing
|
||||
`Content-Length` framing, document sync, capability negotiation and edit
|
||||
application inside a JavaScript file — strictly more code and strictly more
|
||||
bugs than the dependency. Justification for the dependency is its own section
|
||||
below, per CLAUDE.md.
|
||||
- **JavaScript, not TypeScript**, so there is no build step: what is in
|
||||
`editors/vscode/` is what runs. At 41 lines the type checking buys nothing
|
||||
that reading the file does not.
|
||||
- **The server takes no arguments and no environment.** `main.rs` parses no
|
||||
argv; the entire contract is "spawn it, speak LSP on stdin/stdout". If that
|
||||
ever changes, `smoke.js` and `extension.js` must change together — that is
|
||||
exactly the pairing `smoke.js` exists to police.
|
||||
- **`.v`/`.vh` are `verilog`, `.sv`/`.svh` are `systemverilog`.** These are the
|
||||
language ids the Verilog ecosystem already uses (and the ones the server's
|
||||
own e2e test sends). Files whose extension VS Code has given to another
|
||||
extension keep that extension's language id; the setup note in
|
||||
`editors/vscode/README.md` covers the collision.
|
||||
- **The user builds the binary.** No download, no bundled executable, no
|
||||
version check between extension and server. `cargo build --release` and a
|
||||
`PATH` entry, or an absolute `vfmt.serverPath`. A version handshake would be
|
||||
worth adding the day a released extension can meet an older server; today
|
||||
they come out of the same working tree.
|
||||
- **Marketplace publishing is out of scope**, as is CI packaging. `publisher`
|
||||
is the literal string `REPLACE-ME`: packaging a `.vsix` and installing it
|
||||
locally works with a placeholder, `vsce publish` does not, and inventing a
|
||||
publisher id nobody owns would be worse than an obvious placeholder.
|
||||
|
||||
## What was deliberately left out
|
||||
|
||||
Each of these is a thing a VS Code extension usually has. Each was considered
|
||||
and dropped, because the brief and CLAUDE.md's "simplicity first" both point
|
||||
the same way:
|
||||
|
||||
| Not shipped | Why |
|
||||
|---|---|
|
||||
| TextMate grammar | The server ships `semanticTokens` (14 types, `docs/features/vfmt-server/README.md`). A grammar would be a second, worse highlighter to keep in sync. |
|
||||
| `language-configuration.json` | Comment/bracket rules are the smallest useful thing here, and still a judgement call about Verilog syntax living in the editor layer. The brief says "declare the language only"; if `Ctrl+/` proves painful, this is the first thing to add back — 12 lines, no dependency. |
|
||||
| Commands (restart server, show logs) | The language client already contributes a restart command and an output channel. |
|
||||
| Status bar item | State the user can already see in the Output panel. |
|
||||
| Settings beyond `serverPath` | Formatter options belong in `vfmt.toml`, one source of truth for the CLI and the editor. (The caveat that once lived here — "the server does not read it yet" — was closed by vfmt-core-lift; lead trued up all three doc locations at review.) |
|
||||
| Bundling (esbuild/webpack) | `vsce` warns about the 166 JavaScript files in the dependency; bundling would add a build step to a repo whose extension has none. 460 KB is not a problem worth a toolchain. |
|
||||
| A Neovim plugin | The configuration *is* the integration. A plugin would only wrap `vim.lsp.config`. |
|
||||
|
||||
## The one dependency, and the justification CLAUDE.md asks for
|
||||
|
||||
| package | version | why not std, why not hand-rolled |
|
||||
|---|---|---|
|
||||
| `vscode-languageclient` | `9.0.1` (exact, no `^`) | Microsoft's own client library, maintained alongside the protocol spec and used by essentially every language extension including ruff's. It is the exact analog of `lsp-server`/`lsp-types` on the Rust side, and the reasoning is the same one `docs/features/vfmt-server/README.md` records for those: the alternative is hand-writing the wire format. Requires VS Code `^1.82.0`, which is `package.json`'s `engines.vscode`. |
|
||||
|
||||
Transitive cost, measured on this machine (`npm ls --all`): **8 packages
|
||||
total** — `vscode-languageclient` plus `vscode-languageserver-protocol`,
|
||||
`vscode-languageserver-types`, `vscode-jsonrpc` (the protocol proper, all four
|
||||
from Microsoft), and `semver`, `minimatch`, `brace-expansion`,
|
||||
`balanced-match`. No native modules, no install scripts. Packaged `.vsix`: 320
|
||||
files, 462 KB.
|
||||
|
||||
Pinned exactly rather than with `^`, matching the workspace's Rust
|
||||
dependencies: an extension that silently picks up a new client minor on the
|
||||
next `npm install` is an extension whose bug reports cannot be reproduced.
|
||||
|
||||
## `smoke.js` — the validation that does not need an editor
|
||||
|
||||
The highest-value automated check here is not "does the extension render", it
|
||||
is **does the extension's spawn contract match the binary's reality**. That
|
||||
question is answerable in plain node:
|
||||
|
||||
`editors/vscode/smoke.js` spawns the server the way `extension.js` does — same
|
||||
program, empty argument list, inherited `env`, the working directory as `cwd`,
|
||||
stdio pipes — then writes a whole `initialize` → `initialized` → `didOpen` →
|
||||
`shutdown` → `exit` session with hand-rolled `Content-Length` framing, reads
|
||||
stdout, and asserts: the process exits 0, `initialize` returned capabilities,
|
||||
four named capabilities are present, diagnostics were pushed for the opened
|
||||
document, and `shutdown` was acknowledged without an error.
|
||||
|
||||
Three deliberate choices, all inherited from `crates/vfmt_server/tests/e2e.rs`:
|
||||
|
||||
- **The framing is hand-rolled.** A check that reused `vscode-jsonrpc` could
|
||||
not catch a framing bug, and could not run before `npm install`.
|
||||
- **The whole session is written before a byte is read.** The rationale is the
|
||||
one in `tests/e2e.rs`'s own header, reinforced by the vfmt-server QA log's
|
||||
hang investigation: interleaving reads and writes against a subprocess is how
|
||||
a smoke test becomes an intermittent hang. The session is under 4 KB, well
|
||||
inside a pipe buffer, and the server closes stdout on `exit`, so the read
|
||||
terminates on its own. No timeouts, no reader thread, no deadlock.
|
||||
- **`rootUri: null`, no `workspaceFolders`.** That is the single-file mode the
|
||||
Neovim `single_file_support = true` claim depends on, so the smoke test
|
||||
proves that claim as a side effect.
|
||||
|
||||
It is not a duplicate of `tests/e2e.rs`. That test proves the *server* works
|
||||
and runs under `cargo test`; this one proves the *extension's launch
|
||||
configuration* works, runs with zero dependencies at any point in the install
|
||||
sequence, and is the thing to run when a user reports "nothing happens".
|
||||
|
||||
## Handshakes
|
||||
|
||||
**Consumed from `vfmt_server`** — and this is the whole interface, exactly as
|
||||
that feature's README promised ("the editor packaging round will consume the
|
||||
binary's name and its stdio contract, nothing else"):
|
||||
|
||||
1. Binary name `vfmt-server`, resolved on `PATH` by default.
|
||||
2. No command-line arguments, no required environment.
|
||||
3. LSP over stdin/stdout, `Content-Length` framing.
|
||||
4. `initialize` succeeds with neither `workspaceFolders` nor `rootUri`
|
||||
(single-file mode) — relied on by `single_file_support` in the Neovim config
|
||||
and asserted by `smoke.js`.
|
||||
5. The advertised capability set, which both editor guides describe and neither
|
||||
editor extends: nothing is advertised client-side that the server does not
|
||||
implement.
|
||||
|
||||
**Promised to `vfmt_server`:** the spawn contract above. If the server ever
|
||||
grows a required flag, a subcommand, or a stdio mode switch, `extension.js` and
|
||||
`smoke.js` change in the same round.
|
||||
|
||||
**Requested of other modules** — none blocking, none done here:
|
||||
|
||||
1. **`crates/vfmt`: lift `config.rs` into a library** (already filed by
|
||||
`docs/features/vfmt-server/README.md`). Restated because it is now
|
||||
*user-visible*: formatting from an editor ignores `vfmt.toml`, so a project
|
||||
that sets `line-length = 120` gets 100-column formatting on save and
|
||||
120-column formatting from the CLI — the two disagreeing on the same file.
|
||||
Both editor guides state this caveat out loud rather than hide it, but the
|
||||
fix is that lift.
|
||||
2. **Repo root: no `LICENSE` file exists.** The root `Cargo.toml` and the
|
||||
extension's `package.json` both declare MIT, but `vsce package` wants the
|
||||
file and needs `--skip-license` without it. Adding one is a one-line repo
|
||||
decision that is not this feature's to make; the flag is documented, with a
|
||||
note to drop it once the file lands.
|
||||
|
||||
## Status / TODO
|
||||
|
||||
- [x] `editors/vscode/package.json` — language declarations, activation,
|
||||
`vfmt.serverPath`, pinned `vscode-languageclient`.
|
||||
- [x] `editors/vscode/extension.js` — 41 lines, plain JS, no build step.
|
||||
- [x] `editors/vscode/smoke.js` — zero-dependency spawn-contract check.
|
||||
- [x] `editors/vscode/README.md` — build, smoke, package, install,
|
||||
troubleshooting.
|
||||
- [x] `editors/vscode/.vscodeignore` / `.gitignore` — keep `smoke.js` out of
|
||||
the `.vsix`, keep `node_modules/` and `*.vsix` out of git.
|
||||
- [x] `editors/nvim/README.md` — `vim.lsp.config` (0.11+), `nvim-lspconfig`
|
||||
(0.9/0.10), Vim 9 `vim-lsp` one-liner, coc.nvim.
|
||||
- [x] Top-level `README.md` "Editor setup" section.
|
||||
- [x] TODO.md §6 editor-packaging checkbox.
|
||||
- [x] `smoke.js` run green against a release build.
|
||||
- [x] `npm install` and `vsce package` run green on this machine.
|
||||
- [ ] **Not done, and honestly untestable here:** the extension has never run
|
||||
inside VS Code. `require('vscode')` resolves only in the extension host,
|
||||
so the `activate` path cannot be exercised outside the editor and was not
|
||||
claimed to be. See the Work log for exactly what *was* proven instead.
|
||||
- [ ] **Not done:** the Neovim/Vim snippets were not executed — no `nvim` on
|
||||
this machine (`vim` 9.1 is present but without `vim-lsp`). The server-side
|
||||
assumptions they rest on were verified independently; see the Work log.
|
||||
- [ ] **Not done, out of scope:** CI packaging, Marketplace publishing, a
|
||||
version handshake between extension and server, bundling.
|
||||
- [ ] **Follow-up, blocked on a concurrent round:** a `crates/vfmt_core` lift
|
||||
(config + walk out of the `vfmt` binary) landed in the tree *while this
|
||||
round was being written*, and `crates/vfmt_server` already depends on it.
|
||||
If that closes the "the server does not read `vfmt.toml`" gap, the caveat
|
||||
must be deleted from **three** places: `README.md`'s Editor setup
|
||||
section, `editors/vscode/README.md` (Settings), and
|
||||
`editors/nvim/README.md` ("What you get"). Left in place here because it
|
||||
was true of the binary this round tested and I do not claim behavior I
|
||||
have not run.
|
||||
|
||||
## Work log
|
||||
|
||||
### 2026-08-19 — dev agent
|
||||
|
||||
- Read `CLAUDE.md`, `README.md`, TODO.md §6 and
|
||||
`docs/features/vfmt-server/README.md` (all of it, including the QA log) before
|
||||
writing anything. Two things from that reading changed the work: the server's
|
||||
**staleness model** and its **`vfmt.toml` blindness** are user-visible
|
||||
behaviors, so both editor guides state them plainly instead of letting a user
|
||||
discover them as bugs; and the QA log's hang investigation settled `smoke.js`'s
|
||||
I/O shape before I wrote a line of it.
|
||||
- **Did not touch `crates/`.** The one thing this feature wanted from another
|
||||
module — config discovery — was already an open Handshake from the
|
||||
vfmt-server round, so it is restated here with its now-visible user
|
||||
consequence rather than fixed.
|
||||
- **`vscode-languageclient` was taken, and the reasoning is written down.** The
|
||||
brief floated a zero-dependency client; VS Code has no built-in generic LSP
|
||||
API, so that would mean hand-writing framing, sync and capability handling in
|
||||
JavaScript — the thing CLAUDE.md's `lsp-server` justification already
|
||||
rejected on the Rust side. Pinned exactly (`9.0.1`, not `^9.0.1`) to match
|
||||
the workspace's `=`-pinned Rust deps. Cost measured, not assumed: 8 packages,
|
||||
no native modules, no install scripts.
|
||||
- **Cut everything that was not "launch the server and register the file
|
||||
types"**: no grammar, no `language-configuration.json`, no commands, no
|
||||
status bar, no bundler, one setting. The table above records each cut and its
|
||||
reason so the next person does not re-litigate them silently. The
|
||||
`language-configuration.json` cut is the one I'd expect to be revisited — it
|
||||
costs `Ctrl+/` comment toggling — and it is flagged as such rather than
|
||||
hidden.
|
||||
- **`smoke.js` is the round's real deliverable.** Everything else here is
|
||||
configuration that can only be proven inside an editor; the spawn contract
|
||||
can be proven in a shell, so it is. It mirrors `tests/e2e.rs` deliberately —
|
||||
same write-everything-then-read shape, same hand-rolled framing, same reason
|
||||
— but it is not a copy: it asserts what the *extension* depends on
|
||||
(`rootUri: null` works, the four capabilities the guides promise are present,
|
||||
the process exits 0), not what the server's internals do.
|
||||
- **Verified `smoke.js` actually fails when it should**, which is the part
|
||||
people skip. Two negative controls: a nonexistent binary → `FAIL … ENOENT`,
|
||||
exit 1; `/bin/cat` as the "server" (echoes the frames straight back, so the
|
||||
parse succeeds and the *content* is wrong) → `FAIL — initialize response
|
||||
carries no capabilities`, exit 1. A smoke test that only ever passes is a
|
||||
smoke test nobody has tested.
|
||||
- **The Neovim guide's `vim.filetype.add` line was going to be boilerplate
|
||||
until I checked.** In vim 9.1's `filetype.vim` (the tables Neovim's descend
|
||||
from) `*.sv`/`*.svh` map to `systemverilog` outright, but `*.v` runs a
|
||||
*content heuristic*, `dist#ft#FTv()`, that chooses between Verilog, Coq and
|
||||
V, and **`*.vh` is not mapped at all**. So the line is load-bearing for
|
||||
`.vh` headers and for short `.v` files, and the guide now says why, with the
|
||||
Coq/V caveat.
|
||||
- **Did not install the extension into the user's VS Code.** `code` is on this
|
||||
machine and `code --install-extension` would have worked, but installing into
|
||||
someone's editor is a change to their environment, not a validation step I
|
||||
was asked for. The `.vsix` was built, inspected and deleted; the install
|
||||
command is documented, unrun.
|
||||
- **Concurrency note.** Midway through this round another agent's `vfmt_core`
|
||||
round landed in the same tree — `crates/vfmt/src/{config,walk}.rs` moved to a
|
||||
new `crates/vfmt_core`, and `crates/vfmt_server/Cargo.toml` gained a
|
||||
dependency on it. That is exactly the Handshake `docs/features/vfmt-server`
|
||||
filed and this feature restated, so the `vfmt.toml` caveat in the three
|
||||
editor docs is likely to become false very soon. I left it as written: it was
|
||||
true of the binary I built and smoke-tested, and the follow-up is recorded in
|
||||
Status/TODO with the exact three places to edit. Nothing under `crates/` was
|
||||
touched by me.
|
||||
- Did not run `git commit` / `git push`. Did not modify any file under
|
||||
`crates/`.
|
||||
|
||||
**What was actually validated on this machine, precisely:**
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| `cargo build --release -p vfmt_server` | exit 0, `target/release/vfmt-server` |
|
||||
| `node smoke.js target/release/vfmt-server` | **`smoke: OK` — 3 messages, exit 0** |
|
||||
| `smoke.js` negative control: missing binary | FAIL, exit 1 (as designed) |
|
||||
| `smoke.js` negative control: `/bin/cat` | FAIL on capabilities, exit 1 (as designed) |
|
||||
| `package.json` parses as JSON | yes (`JSON.parse`) |
|
||||
| `node --check extension.js` / `smoke.js` | both parse |
|
||||
| `npm install` | 8 packages, `[email protected]` resolved exactly, `engines.vscode ^1.82.0` matches ours |
|
||||
| `npx @vscode/vsce package --skip-license` | **`.vsix` built** — 320 files, 462 KB, `smoke.js` correctly excluded by `.vscodeignore` |
|
||||
|
||||
**Authored but not run here, and why:**
|
||||
|
||||
- **The extension inside VS Code.** `require('vscode')` resolves only in the
|
||||
extension host — confirmed by trying: requiring `vscode-languageclient/node`
|
||||
outside VS Code throws `Cannot find module 'vscode'`. So `activate()` is
|
||||
unexercised. What *is* proven: the file parses, the dependency resolves and
|
||||
matches the declared engine, the package builds into an installable `.vsix`,
|
||||
and the spawn contract the `activate` path uses works against the real
|
||||
binary.
|
||||
- **Every Vim/Neovim snippet.** No `nvim` on this machine (`command -v nvim`:
|
||||
nothing; `vim` 9.1 exists, without `vim-lsp`). Expected behavior on a machine
|
||||
that has it: `:checkhealth vim.lsp` shows one client `vfmt` attached to the
|
||||
buffer with `documentFormattingProvider`, `hoverProvider`,
|
||||
`definitionProvider`, `referencesProvider`, `documentSymbolProvider`,
|
||||
`workspaceSymbolProvider` and `semanticTokensProvider` set and
|
||||
`positionEncoding` `utf-16`; `K` on a `` `MACRO `` shows its definition; `gd`
|
||||
on a signal jumps to its declaration. The two server-side facts those
|
||||
snippets rest on were checked independently rather than assumed: the
|
||||
no-root/single-file `initialize` (asserted by `smoke.js`) and the filetype
|
||||
mapping (read out of vim 9.1's `filetype.vim`, above).
|
||||
- **`code --install-extension`** — deliberate, see above.
|
||||
|
||||
## QA log
|
||||
|
||||
### 2026-08-19 — QA agent
|
||||
|
||||
**Build tested:** `HEAD` at `c8b936a7` plus the working tree exactly as it
|
||||
stood (20 changed/untracked paths, `git status --short`), rebuilt twice
|
||||
(`cargo build --release -p vfmt_server`, both times "Finished ... in 0.02s" —
|
||||
already up to date, so one stable binary throughout this pass:
|
||||
`target/release/vfmt-server`, 1,996,608 bytes, md5 `ed84f61d8c414e34d840571`
|
||||
`f8696191e`, mtime 09:26). This build **includes the concurrent
|
||||
`vfmt_core` config/walk lift** (`crates/vfmt_core/src/{config,walk}.rs`,
|
||||
`crates/vfmt_server` depends on it) — see the Finding below. Did not touch
|
||||
anything under `crates/`; rebuilt only to confirm the binary was settled
|
||||
before each spawn-based check, per the lead's note that the vfmt_core-lift
|
||||
agent was doing its own final gate runs concurrently.
|
||||
|
||||
**Validation matrix — all green, re-run to completion:**
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| `cargo build --release -p vfmt_server` (x2, bracketing the session) | exit 0 both times, binary unchanged between runs |
|
||||
| `node smoke.js ../../target/release/vfmt-server` | `smoke: OK` — 3 messages, exit 0 (re-run at session end too) |
|
||||
| Negative control: `node smoke.js /nonexistent/vfmt-server` | `FAIL — could not spawn ... ENOENT`, exit 1 |
|
||||
| Negative control: `node smoke.js /bin/cat` | `FAIL — initialize response carries no capabilities`, exit 1 |
|
||||
| `node --check extension.js` / `smoke.js` | both parse clean |
|
||||
| `python3 -c json.load` on `package.json` | valid JSON |
|
||||
| `wc -l extension.js` / `smoke.js` | 41 / 93 — both claims exact |
|
||||
| `npm ci` in a scratch copy (not `node_modules`, the real one untouched) | 8 packages, `vscode-languageclient@9.0.1` resolved exactly (`npm ls --all` tree matches the README's dependency table verbatim) |
|
||||
| `npx @vscode/vsce package --skip-license` | **see Finding 2 below — required relocating the copy out of the scratchpad path** |
|
||||
| `.vsix` contents (`unzip -l`) | 320 files, 462.22 KB (dev's numbers exact); `smoke.js`, `.gitignore`, `.vscodeignore` all absent, `extension.js`/`package.json`/`readme.md`/`node_modules/*` present |
|
||||
|
||||
**Finding 1 (confirmed, significant, not blocking function) — the
|
||||
`vfmt.toml`-blindness caveat is now false against the tested binary.**
|
||||
The `vfmt_core` lift landed in the working tree (uncommitted) and
|
||||
`crates/vfmt_server` already consumes it: `cargo test -p vfmt_server --release
|
||||
format::` passes `a_config_file_beats_the_editors_tab_size` and
|
||||
`a_vfmt_toml_governs_the_buffer_it_sits_above`, both asserting `vfmt.toml`
|
||||
wins over the client's tab size. I additionally drove a live LSP round-trip
|
||||
against the built binary (scratch dir with `vfmt.toml` containing
|
||||
`indent = 4`, `.git` marker, `rootUri` pointing at it) and requested
|
||||
`textDocument/formatting` with `tabSize: 2`: the response's `newText` used
|
||||
4-space indent, i.e. the config file won over the client, over the wire, on
|
||||
this exact binary. This means the caveat "the server does **not** read
|
||||
`vfmt.toml` yet" is no longer true of the binary these docs describe. It
|
||||
appears verbatim in all three places `docs/features/editor-packaging/README.md`'s
|
||||
own Status/TODO already flagged: top-level `README.md` (Editor setup
|
||||
section), `editors/vscode/README.md` (Settings section), and
|
||||
`editors/nvim/README.md` ("What you get, and what you don't" section) — plus
|
||||
it's echoed in this feature's own Assumptions/Handshakes/Status-TODO/Work-log
|
||||
prose. Per the lead's instruction this cleanup belongs to the lead / the
|
||||
vfmt-server docs owner, not to this QA pass, so I have not edited any of
|
||||
those five locations — reporting precisely instead, as asked. Locations,
|
||||
for the fix: `README.md` (top-level, "Editor setup"), `editors/vscode/README.md`
|
||||
(Settings), `editors/nvim/README.md` ("What you get"), plus (not previously
|
||||
flagged by the dev, since it's this feature's own doc) this file's Assumptions,
|
||||
Handshakes and Status/TODO sections restate the same now-false claim and
|
||||
should get the same pass when the caveat is retired.
|
||||
|
||||
**Finding 2 (environment artifact, not a defect in the feature) — `vsce
|
||||
package` fails inside the assigned scratchpad path.** Copying
|
||||
`editors/vscode` (minus `node_modules`) into
|
||||
`.../9ecac3b9-8a0e-4065-85de-23cc2a396bad/scratchpad/vscode_copy` and running
|
||||
`npm ci` + `npx @vscode/vsce package --skip-license` there fails every time
|
||||
with `ERROR Extension entrypoint(s) missing ... extension/extension.js`, and
|
||||
`vsce ls` silently lists zero files. Reproduced with a *minimal* two-file
|
||||
extension (bare `package.json` + `extension.js`, no `.vscodeignore`) in the
|
||||
same scratchpad tree — same failure — and confirmed it packages fine when
|
||||
the identical minimal extension sits in a plain path (`/tmp/vsce_plain_test`,
|
||||
no UUID segment). Root cause traced into `@vscode/vsce`'s `collectAllFiles`
|
||||
(`out/package.js`): it shells out to `npm list --production --parseable
|
||||
--depth=99999` to get the directories to glob, and on this machine
|
||||
(`node v26.7.0`, `npm 11.19.0`) that command's own captured output for a
|
||||
cwd under the scratchpad's UUID-bearing path came back with the UUID
|
||||
segment replaced by `***` when written to a file — i.e. something in this
|
||||
sandbox rewrites that specific path shape somewhere in the child-process
|
||||
output pipeline, and `vsce` then globs a path that doesn't exist, silently
|
||||
getting zero files. This is **not** a defect in `editors/vscode` — it
|
||||
reproduces identically for a trivial unrelated extension — so I re-ran the
|
||||
`npm ci` + `vsce package` step in a copy under plain `/tmp` (deleted
|
||||
immediately after, along with the scratchpad copy) to get a real result; see
|
||||
the validation matrix above. Flagging so nobody mistakes "vsce fails" for a
|
||||
packaging regression if they hit this same scratchpad-path issue later.
|
||||
|
||||
**Claims verified, no issues found:**
|
||||
|
||||
1. **`package.json`** — languages `verilog` (`.v`/`.vh`) and `systemverilog`
|
||||
(`.sv`/`.svh`) exactly as claimed; `activationEvents` is
|
||||
`["onLanguage:verilog", "onLanguage:systemverilog"]`, matching the
|
||||
language ids character-for-character (no typo — this was checked
|
||||
specifically, since a mismatch here is the "silently never activates"
|
||||
failure mode); one setting `vfmt.serverPath` default `"vfmt-server"`;
|
||||
`vscode-languageclient` pinned `"9.0.1"` (no `^`), confirmed both in
|
||||
`package.json` and resolved exactly in `package-lock.json`
|
||||
(`lockfileVersion: 3`) and in a fresh `npm ci`; `engines.vscode` is
|
||||
`^1.82.0` on both `package.json` and matches the feature README's prose;
|
||||
`publisher` is the literal string `REPLACE-ME`; `.vscodeignore` excludes
|
||||
`smoke.js` (plus `.vscode/**`, `.gitignore`) — confirmed absent from the
|
||||
built `.vsix`.
|
||||
2. **`extension.js`** — read every line, 41 total (`wc -l` exact). Spawns
|
||||
`serverPath` read from `vfmt.getConfiguration('vfmt').get('serverPath')`
|
||||
with fallback `'vfmt-server'`; `serverOptions = {command, args: [],
|
||||
transport: TransportKind.stdio}` matches `vscode-languageclient@9.0.1`'s
|
||||
`Executable` interface (`lib/node/main.d.ts`: `command`, `transport?`,
|
||||
`args?`, `options?`) exactly; `documentSelector: [{language: 'verilog'},
|
||||
{language: 'systemverilog'}]` matches the contributed language ids
|
||||
exactly; `new LanguageClient('vfmt', 'vfmt', serverOptions,
|
||||
clientOptions)` matches the 4-arg `(id, name, serverOptions,
|
||||
clientOptions, forceDebug?)` overload in `main.d.ts`; `deactivate()`
|
||||
returns `client.stop()` so VS Code awaits shutdown. No other features
|
||||
present. **Spawn-failure behavior traced through the library source**
|
||||
(`lib/common/client.js`, `lib/node/main.js`): on ENOENT, `cp.spawn`
|
||||
yields no pid, `handleChildProcessStartError` rejects, the client's own
|
||||
`createConnection` catch calls `this.error(..., 'force')`, which *always*
|
||||
shows a `window.showErrorMessage` popup (with a "Go to output" button)
|
||||
and appends to the `vfmt` output channel regardless of
|
||||
`revealOutputChannelOn` — `extension.js` itself doesn't need a `.catch()`
|
||||
on `client.start()` because the library never lets a spawn failure go
|
||||
unsurfaced. This matches the README's troubleshooting text ("See what the
|
||||
server is saying... View → Output → the vfmt channel"); the README could
|
||||
additionally mention the error popup explicitly but doesn't claim silence,
|
||||
so nothing here is inaccurate, just slightly less complete than it could be.
|
||||
3. **`smoke.js`** — zero-dep (`require('child_process')` only), 93 lines
|
||||
exact. Ran clean against the release binary and both negative controls
|
||||
(missing binary, `/bin/cat`) exactly as claimed — see validation matrix.
|
||||
4. **`editors/nvim/README.md`** — all four client variants present
|
||||
(`vim.lsp.config` 0.11+, `nvim-lspconfig` 0.9/0.10, Vim 9 `vim-lsp`
|
||||
one-liner, coc.nvim `coc-settings.json`); root markers
|
||||
`vfmt.toml`/`.vfmt.toml`/`.git` consistent across all four; the
|
||||
`vim.filetype.add` line's load-bearing claim was checked directly against
|
||||
`/usr/share/vim/vim91/filetype.vim` on this machine (vim 9.1, matches
|
||||
what the dev cited): `*.sv,*.svh` map straight to `systemverilog`
|
||||
(line 2828), `*.v` runs through `dist#ft#FTv()` (line 2822, defined in
|
||||
`/usr/share/vim/vim91/autoload/dist/ft.vim:1523`, which sniffs buffer
|
||||
content), and `grep '\.vh\b' filetype.vim` finds nothing — `.vh` is
|
||||
genuinely unmapped. The doc's description of all three is accurate.
|
||||
Single-file-mode claim (`single_file_support = true`) is backed by the
|
||||
server accepting `initialize` with `rootUri: null` — confirmed live both
|
||||
by `smoke.js` and by my own `probe.js` round trip.
|
||||
5. **Honesty of the authored-vs-validated split** — confirmed on this
|
||||
machine: `command -v nvim` → not found; `vim --version` → 9.1 present;
|
||||
searched `~`, `~/.vim`, `~/.vimrc`, `~/.config/nvim`, and
|
||||
`find / -maxdepth 6 -iname '*vim-lsp*'` → nothing, so "vim without
|
||||
vim-lsp" is accurate and unchanged from the dev's own check. The "extension
|
||||
never run inside VS Code" claim is consistent with reality: `require`ing
|
||||
`vscode-languageclient/node` outside the extension host throws
|
||||
(`Cannot find module 'vscode'`), so `activate()` genuinely cannot be
|
||||
exercised from a shell. TODO.md §6's "Editor packaging" item is `[x]`
|
||||
and its one-line summary (extension shape, dependency, filetype mapping,
|
||||
manual-install scope) matches what's actually in `editors/`. All seven
|
||||
required feature-README sections (Goal, Assumptions, Handshakes,
|
||||
Status/TODO, Work log, QA log, Review) are present in this file.
|
||||
|
||||
**Overall: PASS**, with Finding 1 (stale `vfmt.toml` caveat, now confirmed
|
||||
false, not this feature's docs to fix) as the one substantive issue,
|
||||
recorded for the lead. No language-id/activation mismatch, no smoke
|
||||
failure against the current binary — the two conditions the brief called
|
||||
BLOCKING did not occur. Finding 2 is an environment note, not a shipped-code
|
||||
defect. No files under `editors/` or `crates/` were modified by this QA pass;
|
||||
this entry is the only edit made.
|
||||
|
||||
## Review
|
||||
|
||||
**2026-08-19 — lead. Verdict: accepted; commits with round 12. TODO §6 —
|
||||
the owner's editor requirement — closes with this feature.**
|
||||
|
||||
Points reviewed and accepted:
|
||||
|
||||
1. **The authored-vs-validated split is the feature's backbone** and it
|
||||
was kept honest on both sides: everything validatable headless was
|
||||
actually run (the .vsix built and inspected, smoke passed with
|
||||
negative controls proving it can fail, npm ci reproducibility), and
|
||||
what can't run here (the extension host, the editor snippets) is
|
||||
labeled as such with the exact expected behavior stated. QA then
|
||||
re-ran the whole matrix independently and cross-checked the client
|
||||
API shapes against the library's own type definitions — the
|
||||
language-id consistency check (the silent-killer class for VS Code
|
||||
extensions) came back clean.
|
||||
2. **`vscode-languageclient` taken, not avoided**: VS Code has no
|
||||
built-in generic LSP client; hand-rolling one is the same trade
|
||||
CLAUDE.md already rejected for `lsp-server`. Justified, pinned,
|
||||
cost-measured (8 packages, no native modules).
|
||||
3. **The `vim.filetype.add` discovery** — `*.v` goes through Vim's
|
||||
content heuristic and `*.vh` is unmapped natively, so the snippet
|
||||
line is load-bearing — is exactly the kind of verified-against-
|
||||
runtime fact these READMEs exist to hold; QA confirmed it
|
||||
byte-for-byte against this machine's filetype.vim.
|
||||
4. QA's Finding 1 (the "server doesn't read vfmt.toml" caveat went
|
||||
stale mid-round when vfmt-core-lift landed under it) was the lead's
|
||||
to fix and is now fixed in all flagged locations, including the
|
||||
vfmt-server README's superseded Assumptions. Finding 2 (vsce's path
|
||||
resolution breaking inside the session scratchpad) is an
|
||||
environment artifact, correctly diagnosed by reproducing it on an
|
||||
unrelated minimal extension.
|
||||
|
||||
Remaining editor work is deliberately out of scope and stays visible:
|
||||
publishing (a real publisher id, marketplace/OpenVSX), extension-host
|
||||
integration testing, and lint diagnostics reaching the editor once the
|
||||
server wires vlog_linter in.
|
||||
@@ -0,0 +1,471 @@
|
||||
# vfmt-core-lift
|
||||
|
||||
## Goal
|
||||
|
||||
The CLI and the language server were answering two different questions with
|
||||
two different pieces of code: `vfmt` discovers `vfmt.toml` and walks a tree
|
||||
honoring `.gitignore` and `--exclude`, while `vfmt-server` formatted with
|
||||
built-in defaults and indexed everything it could find, because both rules
|
||||
lived inside the `vfmt` **binary** crate where nothing else could reach them
|
||||
(the two Handshake requests filed by `docs/features/vfmt-server/README.md`).
|
||||
That is the classic way an editor's format-on-save drifts away from CI's
|
||||
`vfmt --check`. This round lifts `config.rs` and `walk.rs` — unchanged — into
|
||||
a new std-only library crate `crates/vfmt_core`, re-points the CLI at it with
|
||||
no behavior change at all, and wires the server through the same code: one
|
||||
discovery rule, one walk, two front ends.
|
||||
|
||||
## Assumptions
|
||||
|
||||
- **The lift is mechanical, and is proven mechanical.** Both modules moved as
|
||||
100% renames (`git diff -M` says so) — not one line of logic, and not one
|
||||
line of their 31 unit tests, was edited. The modules kept their names inside
|
||||
the new crate, so even the import paths in the moved tests (`use super::*`)
|
||||
needed no change. Everything the CLI does is therefore unchanged by
|
||||
construction, and the untouched `crates/vfmt/tests/cli.rs` (48 tests) plus a
|
||||
byte-identical 820-file corpus (count corrected by lead per QA) run are the evidence.
|
||||
- **`vfmt_core` is two modules, not a framework.** `pub mod config; pub mod
|
||||
walk;` and nothing else — no re-export layer, no new traits, no
|
||||
configuration struct invented for a third caller that does not exist. The
|
||||
crate has no dependencies, std only, as both modules already did.
|
||||
- **Precedence in the server is `vfmt.toml` > the client's `tabSize` > the
|
||||
built-in default**, which is deliberately *not* the CLI's `--flag > config >
|
||||
default`. The CLI's flag is typed by a human for one run, so it outranks a
|
||||
file. `FormattingOptions::tab_size` is not that: LSP requires the client to
|
||||
send it on **every** formatting request, and what it sends is the editor's
|
||||
own default (VS Code's `editor.tabSize`, 4 unless changed) or its guess from
|
||||
the file's existing indentation. Treating an editor default as a deliberate
|
||||
override would let an unconfigured editor silently beat a checked-in
|
||||
`vfmt.toml` — reintroducing exactly the CLI/editor divergence this feature
|
||||
exists to delete, and making format-on-save fight `vfmt --check` in CI.
|
||||
Where the config file is *silent*, `tabSize` still beats the built-in
|
||||
default, so a project with no `vfmt.toml` behaves exactly as the server did
|
||||
before this round. `line-length` has no client analog at all and comes from
|
||||
the config file or not at all.
|
||||
- **A broken `vfmt.toml` warns the editor; it does not fail it.** The CLI's
|
||||
contract for an unparsable config is fatal: exit 2, nothing written, all
|
||||
configs resolved before any file is touched
|
||||
(`docs/features/config-discovery/README.md`). That is right for a batch tool
|
||||
where a half-applied run is the danger. It is wrong for an editor: a user who
|
||||
types a typo into `vfmt.toml` in one tab must not find that format-on-save
|
||||
has stopped working in every other tab, with an error where their code should
|
||||
be. So the server formats with the **built-in defaults** (never a partial mix
|
||||
of the broken file's keys — nothing at all is taken from a file that failed
|
||||
to parse) and reports the problem as a `window/showMessage` **warning**
|
||||
carrying the same `path:line: message` string the CLI would have printed.
|
||||
This is a deliberate divergence in *reporting*, not in *discovery*: the file
|
||||
searched for, the rule that finds it, and the settings taken from it when it
|
||||
parses are identical.
|
||||
- **The warning is said once per file change.** A format-on-save loop asks to
|
||||
format on every save; repeating the same config error forever would train the
|
||||
user to dismiss vfmt's messages. The server remembers which documents it has
|
||||
warned about and re-arms a document when its text changes (`didOpen`,
|
||||
`didChange`, `didSave` with text) or when it is closed.
|
||||
- **The index scan anchors its excludes on the workspace root.** `exclude` is
|
||||
resolved once per command-line input in the CLI, never mid-walk
|
||||
(config-discovery's own assumption); the server's analog of "an input" is a
|
||||
workspace root, so the config governing the root supplies the exclude
|
||||
patterns for that root's whole scan. A `vfmt.toml` in a subdirectory still
|
||||
governs `line-length`/`indent` for files under it when they are formatted —
|
||||
discovery there is per-document — it just cannot add excludes mid-scan,
|
||||
exactly as in the CLI.
|
||||
- **`.gitignore` is always honored by the scan.** It is the CLI's default and
|
||||
an editor has no `--no-gitignore` to type. Likewise the scan always runs
|
||||
discovery enabled: there is no `--no-config` in an editor.
|
||||
- **A broken config does not stop the scan.** During `initialize` there is no
|
||||
good way to refuse: a server that indexes nothing because of a typo simply
|
||||
looks broken. The scan proceeds with no excludes, and the same error reaches
|
||||
the user through the formatting path, which is where they will look.
|
||||
- **The server's walk-depth cap is gone, deliberately.** The old plain walk
|
||||
capped recursion at 64 directories to survive a symlink cycle; the lifted
|
||||
walk has no cap, because the CLI's does not. Keeping the cap would mean the
|
||||
index silently covering fewer files than `vfmt` formats — the divergence this
|
||||
round exists to remove — and *adding* a cap to the shared walk would silently
|
||||
drop deep files from CLI runs, which is a behavior change this mechanical
|
||||
lift must not make. Cycle detection belongs in the shared walk where it would
|
||||
protect both front ends; recorded as a follow-up below, not smuggled in here.
|
||||
- **Untitled buffers get no config.** A buffer with no path has no directory to
|
||||
search from, so it is formatted with `tabSize`-or-defaults, as before.
|
||||
- **Discovery is rebuilt per formatting request.** `Discovery`'s cache is
|
||||
per-instance and the server is long-lived, so a cached answer would go stale
|
||||
the moment a user edits `vfmt.toml`. A fresh `Discovery` per request costs
|
||||
one file read on an explicit, user-initiated action — cheaper than any
|
||||
invalidation scheme that could be wrong. (config-discovery's Handshakes
|
||||
anticipated exactly this: "a server can drop and rebuild one when a config
|
||||
file changes on disk".)
|
||||
|
||||
## Handshakes
|
||||
|
||||
- **New crate `vfmt_core`, consumed by `vfmt` and `vfmt_server`.** Public
|
||||
surface, unchanged from what it was inside `crates/vfmt`:
|
||||
- `vfmt_core::config`: `FileConfig { line_length, indent, exclude }`,
|
||||
`parse(&str) -> Result<FileConfig, String>`, `Discovery::{new, for_input,
|
||||
for_file, for_dir}`.
|
||||
- `vfmt_core::walk`: `EXTENSIONS`, `collect_files(input, exclude, gitignore,
|
||||
&mut Vec<PathBuf>) -> Result<(), String>`, `is_excluded(&Path, &[String])`.
|
||||
Every item already carried the one-line doc comment CLAUDE.md asks for; no
|
||||
signature changed, so no crate-public boundary moved in a way that needed a
|
||||
new one. The rules themselves stay documented where they were:
|
||||
`docs/features/config-discovery/README.md` and
|
||||
`docs/features/parallel-files/README.md`.
|
||||
- **`crates/vfmt` consumes `vfmt_core`** and keeps nothing of its own: the two
|
||||
modules are gone from its `src/`, `mod config;`/`mod walk;` are gone from
|
||||
`main.rs`, and the three call sites now say `vfmt_core::…`. No duplicated
|
||||
logic was left behind.
|
||||
- **Discharges both Handshake requests filed by
|
||||
`docs/features/vfmt-server/README.md`** (items 1 and 2, config discovery and
|
||||
the ignore-aware walk). Both are annotated **DELIVERED** in that README, one
|
||||
line each, as the only edits made to another feature's document.
|
||||
- **Request to the lead — stale prose in `docs/features/vfmt-server/README.md`
|
||||
and `TODO.md`, deliberately not edited here** (out of this feature's stated
|
||||
scope, and a concurrent editor-packaging round is live in the same files):
|
||||
- vfmt-server README, Assumptions: "**The workspace walk is plain** …
|
||||
`.gitignore` and `--exclude` are **not** honored" and "**`vfmt.toml` is not
|
||||
discovered** … The server uses `Config::default()` … with the client's tab
|
||||
size overriding the indent" are both now false, and the tab-size sentence
|
||||
is contradicted by the precedence decided above.
|
||||
- vfmt-server README, Status/TODO: "**Not done:** `vfmt.toml` discovery,
|
||||
`.gitignore`-aware indexing — both blocked on the two Handshake requests
|
||||
above" is now done.
|
||||
- `TODO.md:103` and `TODO.md:120` point at `crates/vfmt/src/config.rs` and
|
||||
`crates/vfmt/src/walk.rs`; both files now live in `crates/vfmt_core/src/`.
|
||||
`docs/features/spans/README.md:308` names the old config path in a work-log
|
||||
sentence about a concurrent round — historical, best left alone.
|
||||
- **Follow-up for whoever next touches `vfmt_core::walk`:** the walk has no
|
||||
symlink-cycle detection (a depth cap, or device+inode tracking). It never
|
||||
had; the CLI has always been exposed to it, and the server now shares the
|
||||
exposure since its own 64-directory cap was removed for parity. Fixing it in
|
||||
the shared walk protects both front ends at once — but it changes CLI
|
||||
behavior (deep trees, cyclic links), so it wants its own round with its own
|
||||
tests, not a quiet addition inside a mechanical lift.
|
||||
- **`TODO.md`: no matching checkbox.** The §3 config and `.gitignore` items and
|
||||
the §6 `vfmt_server` item are already checked; this round moves code and
|
||||
wires the server, and adds no item of its own. Nothing was checked off.
|
||||
|
||||
## Status / TODO
|
||||
|
||||
- [x] `crates/vfmt_core` created with a **compiling skeleton first**, built
|
||||
standalone, and only then added to the root `members` (round 11's
|
||||
ordering lesson, taken literally).
|
||||
- [x] `config.rs` and `walk.rs` moved as 100% renames, unit tests and all.
|
||||
- [x] `crates/vfmt` re-wired to `vfmt_core` (`Cargo.toml`, `main.rs`,
|
||||
`args.rs`); no logic left behind, no CLI behavior change.
|
||||
- [x] Server formatting discovers `vfmt.toml` anchored at the document's own
|
||||
path, by the CLI's rule.
|
||||
- [x] Precedence `config > tabSize > built-in default`, decided and documented.
|
||||
- [x] Broken config → one `showMessage` warning per file change, formatting
|
||||
proceeds with defaults, never a crash and never a partial config.
|
||||
- [x] `initialize`'s scan uses the lifted walk: same extensions, `.gitignore`
|
||||
honored, excludes from the workspace root's config.
|
||||
- [x] Tests: `vfmt_core` inherits its 31 moved unit tests; server gains 8 unit
|
||||
tests (config-beats-tabSize, `vfmt.toml` governing a real buffer, broken
|
||||
config, untitled buffer, gitignore-honoring scan, root-config excludes,
|
||||
broken root config, extension filter) and 2 e2e tests through the real
|
||||
binary over stdio.
|
||||
- [x] Both vfmt-server Handshakes annotated DELIVERED.
|
||||
- [x] Gates: `cargo test --workspace`, `cargo clippy --workspace
|
||||
--all-targets`, `cargo fmt --all --check`, corpus check.
|
||||
- [ ] **Not done, deliberately:** symlink-cycle detection in the shared walk
|
||||
(see Handshakes — a real behavior change, wants its own round).
|
||||
- [ ] **Not done:** re-resolving `exclude` per directory during a scan. The CLI
|
||||
does not either; the two agree, which is the point of this round.
|
||||
- [ ] **Not done:** watching `vfmt.toml` for changes
|
||||
(`workspace/didChangeWatchedFiles`). Discovery is re-run per formatting
|
||||
request, so an edited config takes effect at the next format without it.
|
||||
|
||||
## Work log
|
||||
|
||||
### 2026-08-19 — dev agent
|
||||
|
||||
- Read `CLAUDE.md`, the two Handshake requests in
|
||||
`docs/features/vfmt-server/README.md`, all of
|
||||
`docs/features/config-discovery/README.md` and the behavior half of
|
||||
`docs/features/parallel-files/README.md` (both QA logs included), and
|
||||
`crates/vfmt/src/{config,walk,main,args,lint}.rs` before writing anything.
|
||||
- **Ordering lesson taken literally.** `crates/vfmt_core` was created with a
|
||||
literal-versioned manifest carrying an empty `[workspace]` table — making it
|
||||
its own workspace — the two modules were `git mv`'d in, and
|
||||
`cargo test` was run **standalone** (31 passed) *before* the root `members`
|
||||
entry existed. Only then was the manifest switched to
|
||||
`version.workspace = true` and the members line added. A `members` entry
|
||||
pointing at a crate that does not build breaks the workspace for every other
|
||||
agent in the tree, and the editor-packaging round was live in it.
|
||||
- **The lift is provably mechanical.** `git diff -M --summary` reports both
|
||||
moves as `(100%)`. The 31 unit tests moved with their modules and did not
|
||||
need even an import-path edit, because the modules kept their names. The
|
||||
brief allowed edits to those imports; none were required.
|
||||
- **Behavior preservation, measured rather than asserted.** `crates/vfmt`'s
|
||||
unit count is unchanged in total (58 = 27 that stayed + 31 that moved), and
|
||||
`crates/vfmt/tests/cli.rs` — 48 CLI integration tests — is **byte-untouched**
|
||||
and green. Then the strongest check available: a release `vfmt` built from a
|
||||
clean `git worktree` at `HEAD` and the working-tree `vfmt` were both run over
|
||||
the 820-file corpus (count corrected by lead per QA), and their per-file TSVs are **byte-identical** (`diff`
|
||||
silent; verification-error: none, crash: none in both). The committed
|
||||
`corpus-check-results.tsv` in the repo predates several landed rounds and was
|
||||
not touched — it is stale against `HEAD` itself, which the HEAD-vs-working
|
||||
comparison isolates cleanly.
|
||||
- **The precedence decision was the one real design call**, and it goes against
|
||||
the CLI's shape on purpose. Reasoning is in Assumptions above; the short
|
||||
version is that LSP forces the client to send `tabSize` on every request, so
|
||||
it is a *default*, not an *intent*, and a default must not beat a file a
|
||||
human checked in. The rule is pinned by `a_config_file_beats_the_editors_tab_size`
|
||||
(unit) and by `a_vfmt_toml_governs_formatting_over_the_editors_tab_size`
|
||||
(e2e: the client asks for `tabSize: 2`, the config says `indent = 4`, the
|
||||
wire carries four spaces).
|
||||
- **Split `format::formatting` in two** rather than letting it talk to the
|
||||
connection: `settings_for(doc, options) -> Settings { config, problem }`
|
||||
resolves, `formatting(doc, &config)` formats. The handler in `server.rs`
|
||||
computes both, then warns, which also keeps the immutable borrow of the
|
||||
document from colliding with the `&mut self` the warn-once set needs.
|
||||
- **Warn-once is a `HashSet<Uri>` on `Server`**, cleared by a new
|
||||
`Server::set_document` wrapper that every text-changing notification now goes
|
||||
through, and on `didClose`. The e2e test sends **two** formatting requests
|
||||
with no edit between them and asserts exactly **one** `window/showMessage`
|
||||
arrives on the wire — the assertion that would catch a regression here, since
|
||||
a per-request warning would pass every unit test.
|
||||
- **`state.rs`'s hand-rolled walk is deleted**, not wrapped: `MAX_WALK_DEPTH`,
|
||||
`SOURCE_EXTENSIONS`, `walk()` and `is_source()` are gone, replaced by
|
||||
`collect_files`. Its unit test `the_walk_finds_only_source_extensions` tested
|
||||
a now-private-elsewhere helper, so it was replaced by
|
||||
`the_scan_takes_only_source_extensions`, which asserts the same thing one
|
||||
level up — through a real scratch directory and the resulting index — and so
|
||||
survives the next refactor.
|
||||
- **The new scan tests use the index as the observation point** (does
|
||||
`WorkspaceIndex::member` know this package?) rather than reaching for the
|
||||
private file list, so they pin the behavior a user sees.
|
||||
- **The format unit tests that need a real tree write a `.git` marker** into
|
||||
their scratch directory. That stops the upward discovery walk at the temp
|
||||
dir, so a `vfmt.toml` in some real ancestor of `/tmp` can never leak into a
|
||||
test result — the `.git`-stops-the-walk rule config-discovery documents,
|
||||
used as a test-hermeticity tool.
|
||||
- **Two clippy fixes on the way through**, both in the e2e test: `&PathBuf` →
|
||||
`&Path` in the new session helper, and the original test's inline
|
||||
spawn/write/read block replaced by the shared `talk()` helper it now needs
|
||||
anyway. No `#[allow]` was added anywhere.
|
||||
- No `unwrap`/`expect`/`panic!` outside `#[cfg(test)]` in any file touched: the
|
||||
scan swallows a config error with `unwrap_or_default()` and a walk error with
|
||||
`let _ =`, both with a comment saying why refusing would be worse.
|
||||
- Did not touch `editors/**`, root `README.md`, `TODO.md`, the corpus TSV, or
|
||||
any engine crate (`vlog_parser`, `vlog_formatter`, `vlog_semantic`,
|
||||
`vlog_linter` have no diff at all). Did not run `git commit`/`git push`.
|
||||
|
||||
**Results** (settled tree, all re-run at the end):
|
||||
|
||||
- `cargo test --workspace`: **512 passed, 0 failed** (baseline before this
|
||||
round: 503; +31 `vfmt_core`, −31 moved out of `vfmt`, +7 net `vfmt_server`
|
||||
unit, +2 `vfmt_server` e2e).
|
||||
- `vfmt_core`: 31 unit (20 config + 11 walk), all moved, all unmodified.
|
||||
- `vfmt`: 27 unit + **48 CLI integration, unmodified** — the
|
||||
behavior-preservation proof.
|
||||
- `vfmt_server`: 82 unit (was 75) + 3 e2e (was 1).
|
||||
- `cargo clippy --workspace --all-targets`: **0 warnings**.
|
||||
- `cargo fmt --all --check`: clean.
|
||||
- Corpus: HEAD binary vs. lifted binary over 860 files → **identical TSVs**,
|
||||
`verification-error: none`, `crash: none`. `corpus-check-results.tsv`
|
||||
unmodified in the repo.
|
||||
- Files added: `crates/vfmt_core/{Cargo.toml,src/lib.rs}` (+ the two moved
|
||||
modules), this README. Files edited: root `Cargo.toml` (one `members` line,
|
||||
additive), `crates/vfmt/{Cargo.toml,src/main.rs,src/args.rs}`,
|
||||
`crates/vfmt_server/{Cargo.toml,src/{format,server,state}.rs,tests/e2e.rs}`,
|
||||
and two annotation lines in `docs/features/vfmt-server/README.md`.
|
||||
|
||||
## QA log
|
||||
|
||||
### 2026-08-19 — QA agent
|
||||
|
||||
Scope: `-p vfmt_core -p vfmt -p vfmt_server`. Verified every claim in the
|
||||
brief; **all PASS, no blocking findings.**
|
||||
|
||||
**1. Mechanical lift.**
|
||||
- `git diff -M --summary`: both moves report `(100%)` — confirmed rename,
|
||||
zero content diff by definition.
|
||||
- `git show HEAD:crates/vfmt/src/config.rs | diff - crates/vfmt_core/src/config.rs`
|
||||
and the same for `walk.rs`: **both `diff` exit 0** — byte-identical, no
|
||||
divergence line.
|
||||
- `crates/vfmt/tests/cli.rs`: `git diff HEAD` empty (byte-untouched);
|
||||
`grep -c '#\[test\]'` = 48, all pass.
|
||||
- Unit total conserved: `vfmt_core` 31 (20 config + 11 walk), `vfmt` 27 +
|
||||
48 CLI = 75. 58 (27+31) was the pre-lift `vfmt` total; post-lift it's
|
||||
27 (stayed) + 31 (moved to vfmt_core) = 58, matches exactly.
|
||||
- `main.rs`/`args.rs` call sites confirmed rewired: `use vfmt_core::config::Discovery`,
|
||||
`use vfmt_core::walk::{collect_files, EXTENSIONS}` (main.rs:28-29),
|
||||
`use vfmt_core::config::FileConfig` (args.rs:3). No `mod config;`/`mod walk;`
|
||||
left in `main.rs`.
|
||||
|
||||
**2. CLI behavior identical (corpus md5).** Built `target/release/vfmt` from
|
||||
the working tree and a second binary from a `git worktree add ... HEAD`
|
||||
checkout, ran `tools/corpus_check.sh` with each (`-b <binary>`) over the
|
||||
same `corpus/` tree (820 `.v`/`.sv` files — not 860 as the work log states;
|
||||
see Findings below, non-blocking). Both TSVs:
|
||||
`md5 = aa982463f68c1a3568c02a0fc5e0c455` — **exact match to the claimed
|
||||
hash**, `diff` silent, `verification-error: none`, `crash: none` in both.
|
||||
Worktree removed after (`git worktree remove --force`).
|
||||
|
||||
**3. Server config — all sub-claims verified live**, driving the real
|
||||
`target/debug/vfmt-server` binary over stdio with a custom interactive
|
||||
Python driver (scratchpad: `drive_lsp.py`) that can mutate the filesystem
|
||||
*between* requests in one session — the packaged `talk()` e2e helper writes
|
||||
the whole session up front and can't do that, so this fills the gap the
|
||||
brief asked for ("drive the server live").
|
||||
- **Fresh discovery per request**: scratch dir with `vfmt.toml` (`indent=4`),
|
||||
`didOpen`, format with `tabSize:2` → 4-space output (config wins).
|
||||
Deleted `vfmt.toml` from disk, sent a `didChange` touch (same text),
|
||||
formatted again → 2-space output (tabSize wins). Confirms the
|
||||
strongest claim in Assumptions.
|
||||
- **Bonus, not required by the brief**: repeated the above *without* the
|
||||
`didChange` touch — discovery was still fresh (2-space on the second
|
||||
format). Correct per the code: `format::discover` builds a brand-new
|
||||
`Discovery::new(true)` on every call (format.rs:70), there is no
|
||||
per-document cache to invalidate, so a `didChange` is not actually
|
||||
load-bearing for this claim — it just happened to be in the scripted
|
||||
scenario. Documented here in case a future cache is added and this
|
||||
stops being true; the README's wording ("Discovery is rebuilt per
|
||||
formatting request") already states it correctly and doesn't claim a
|
||||
touch is required.
|
||||
- **Precedence, `config > tabSize > default`**: unit test
|
||||
`a_config_file_beats_the_editors_tab_size` and e2e
|
||||
`a_vfmt_toml_governs_formatting_over_the_editors_tab_size` both green.
|
||||
- **Precedence edge (config silent on indent)**: scratch `vfmt.toml`
|
||||
with only `line-length = 100`, formatted with `tabSize:3` →
|
||||
`newText` used 3-space indent (`"module m;\n wire a;\nendmodule\n"`).
|
||||
Per-setting precedence confirmed, not per-file.
|
||||
- **Broken config**: one `window/showMessage` (type 2 = Warning) per file
|
||||
change, formatting proceeds on defaults, CLI's `path:line: message`
|
||||
format preserved (`vfmt.toml:2` and `unknown key \`bogus\`` both
|
||||
present in the message). Two formats with no edit between → exactly
|
||||
one warning (live-verified: warnings-after-format#1 = 1,
|
||||
warnings-after-format#2-no-edit = 1).
|
||||
- **The one-warning throttle, what resets it**: live-verified with a
|
||||
third format after a `didChange` to the *document text* (config left
|
||||
broken) → warning count went **1 → 1 → 2**, i.e. the document edit
|
||||
re-armed the warning exactly as `server.rs`'s `set_document` (which
|
||||
clears `config_warnings` for that URI on every `didOpen`/`didChange`/
|
||||
`didSave`-with-text, and on `didClose`) documents. Matches the README's
|
||||
"once per file change" rule to the letter — a config-only edit does
|
||||
not reset it (there's no code path that would), a document edit does.
|
||||
- `a_vfmt_toml_governs_formatting_over_the_editors_tab_size` and
|
||||
`a_broken_vfmt_toml_warns_once_and_still_formats`: both green,
|
||||
assertions match the brief exactly (`newText` diff, warning count,
|
||||
message content).
|
||||
|
||||
**4. Server scan.**
|
||||
- `state.rs`: confirmed `MAX_WALK_DEPTH`/`SOURCE_EXTENSIONS`/`walk()`/
|
||||
`is_source()` are gone; `source_files()` (state.rs:143) calls
|
||||
`vfmt_core::walk::collect_files` with `gitignore=true` always and
|
||||
`Discovery::new(true).for_dir(root)`'s `exclude`, anchored per root —
|
||||
matches the "workspace-root config excludes" claim exactly.
|
||||
- Live-verified: scratch workspace with `.gitignore` containing
|
||||
`ignored_dir/`, a module inside that dir, a visible module at the
|
||||
root. `workspace/symbol` on a query matching both names returned only
|
||||
the visible one — the gitignored subdir's module never reached the
|
||||
index.
|
||||
- Unit tests `the_scan_skips_what_a_gitignore_skips`,
|
||||
`the_scan_honours_the_root_configs_excludes`,
|
||||
`a_broken_root_config_does_not_stop_the_scan`,
|
||||
`the_scan_takes_only_source_extensions` all present and green.
|
||||
- Follow-up filing: confirmed present in this README's Handshakes
|
||||
("Follow-up for whoever next touches `vfmt_core::walk`" — symlink-cycle
|
||||
detection, deliberately deferred) and cross-referenced in
|
||||
`docs/features/vfmt-server/README.md`'s superseded-prose note
|
||||
("symlink-cycle exposure now shared with the CLI, filed as a follow-up
|
||||
in that feature's README"). Filing exists as claimed.
|
||||
|
||||
**5. Gates.**
|
||||
- `cargo test --workspace`: **512 passed, 0 failed** — summed every
|
||||
crate's reported count by hand to cross-check the workspace-wide
|
||||
figure (concurrent round's crates included): 27+48 (vfmt) + 31
|
||||
(vfmt_core) + 82+3 (vfmt_server) + 8+1+4+6+2+39 (vlog_formatter) +
|
||||
71+30 (vlog_linter) + 53+24+19+17 (vlog_parser) + 6+1+19+20
|
||||
(vlog_semantic) + 1 doctest = 512. Exact match to the claim; the
|
||||
concurrent comments-round-2 work in `vlog_parser`/`vlog_formatter` was
|
||||
green at the time of this run.
|
||||
- Scoped counts confirmed exactly: `vfmt_core` 31 unit; `vfmt` 27 unit +
|
||||
48 CLI integration; `vfmt_server` 82 unit + 3 e2e (all three e2e tests
|
||||
green, including `the_binary_serves_a_whole_session_over_stdio` which
|
||||
predates this round).
|
||||
- `cargo clippy --workspace --all-targets`: 0 warnings.
|
||||
- `cargo fmt --all --check`: clean.
|
||||
- Handshakes: both vfmt-server Handshake items 1 and 2 annotated
|
||||
**DELIVERED** in `docs/features/vfmt-server/README.md` (lines 256,
|
||||
268), one line each as required, plus a Status/TODO checkbox flip and
|
||||
superseded-prose annotations on the two stale Assumptions bullets —
|
||||
all carrying a "(lead note)" attribution, consistent with this being
|
||||
the lead acting on the Handshakes request rather than dev-agent scope
|
||||
creep. `TODO.md:103` and `:120`x2 (via `git diff`, now at different
|
||||
line numbers) already point at `crates/vfmt_core/src/{config,walk}.rs`
|
||||
— also already fixed, also outside this feature's own diff per the
|
||||
work log's file list. Nothing left for QA to do on these two items.
|
||||
|
||||
**6. CLAUDE.md compliance.**
|
||||
- `cargo tree -p vfmt_core`: single line, `vfmt_core v0.1.0 (...)`, zero
|
||||
dependencies — std-only confirmed.
|
||||
- No `unwrap()`/`expect(`/`panic!` outside `#[cfg(test)]` in
|
||||
`vfmt_core/src/{config,walk,lib}.rs` or `vfmt_server/src/{format,state,
|
||||
server}.rs` (checked with an awk pass that stops counting at the
|
||||
`#[cfg(test)]` marker per file — zero hits before it in every file).
|
||||
`vfmt/src/{main,args}.rs`'s `unwrap()`/`panic!` calls are all inside
|
||||
`#[cfg(test)] mod tests` blocks — allowed.
|
||||
- Every `pub` item in `config.rs`/`walk.rs` carries a `///` doc comment
|
||||
(spot-checked `FileConfig`, `parse`, `Discovery`, `EXTENSIONS`,
|
||||
`collect_files`, `is_excluded`).
|
||||
- README has all seven required sections (Goal, Assumptions, Handshakes,
|
||||
Status/TODO, Work log, QA log, Review) present and populated (Review
|
||||
reserved, correctly empty).
|
||||
|
||||
**Findings (all non-blocking):**
|
||||
- **[Low] Corpus size discrepancy.** The work log's "Results" section says
|
||||
"820-file corpus (count corrected by lead per QA)"; the actual corpus at HEAD and in the working tree has
|
||||
**820** `.v`/`.sv` files (`find corpus -type f \( -name '*.v' -o -name
|
||||
'*.sv' \) -not -path '*/.git/*' | wc -l` = 820, confirmed twice, once per
|
||||
binary run). This does not affect the correctness claim — both binaries
|
||||
ran over the identical, actual 820-file tree and produced byte-identical
|
||||
output at the exact claimed md5 — but the "860" figure in the work log
|
||||
is inaccurate and should be corrected to 820 if this README is revised
|
||||
again, so a future reader doesn't chase a phantom 40-file gap.
|
||||
- **[Info] `corpus-check-results.tsv`'s committed md5** is
|
||||
`6af28a6d4942c4ddce0a061262eb5d68`, different from the
|
||||
`aa982463f68c1a3568c02a0fc5e0c455` this round reproduces — expected and
|
||||
already called out in the work log as pre-existing staleness against
|
||||
`HEAD` itself (several landed rounds ago), unrelated to this lift.
|
||||
Not touched, correctly.
|
||||
|
||||
No corrections made to any code or test — nothing broken, nothing to fix.
|
||||
No masked-corruption attack tests were needed for this round: no
|
||||
normalization in `verify.rs` was added or widened (this is a config/walk
|
||||
lift and server-wiring round, not a formatter-safety-net change), so
|
||||
CLAUDE.md invariant #4 does not apply here.
|
||||
|
||||
## Review
|
||||
|
||||
**2026-08-19 — lead. Verdict: accepted; commits with round 12 (jointly
|
||||
with editor-packaging — shared README/TODO edits). The CLI/server
|
||||
behavior gap is closed.**
|
||||
|
||||
Points reviewed and accepted:
|
||||
|
||||
1. **The precedence ruling is the round's contribution**: config >
|
||||
client tabSize > built-in default, argued from what tabSize actually
|
||||
is (an editor default sent on every request, not a deliberate
|
||||
choice). Rejecting the CLI analogy (`--flag > config`) for the
|
||||
editor was correct — the whole feature exists to stop format-on-save
|
||||
fighting `vfmt --check` in CI, and treating an unconfigured editor's
|
||||
4 as an override would have reintroduced that fight. QA verified the
|
||||
per-setting edge (config sets only line-length → tabSize still
|
||||
governs indent) live.
|
||||
2. **100% renames, byte-identical moved files, untouched CLI suite,
|
||||
md5-equal corpus TSVs from both builds** — the mechanical-lift bar
|
||||
was met at every level it can be measured, and QA re-derived each
|
||||
measurement rather than trusting it.
|
||||
3. **Warn-once with a document-edit reset** is sensible ergonomics and
|
||||
QA pinned its exact reset behavior (1→1→2 across format/format/
|
||||
didChange+format). The divergence from the CLI's exit-2 (an editor
|
||||
must not stop formatting over a config typo) is documented where it
|
||||
belongs.
|
||||
4. **The depth-cap removal** traded a server-only symlink guard for
|
||||
CLI parity and filed the shared exposure as a follow-up instead of
|
||||
smuggling a behavior change into a mechanical lift — the right
|
||||
instinct, twice.
|
||||
|
||||
Lead fix on acceptance: the corpus file-count figure (860→820) per QA.
|
||||
The stale vfmt-server Assumptions this lift superseded were struck
|
||||
through with lead notes at the editor-packaging review, alongside the
|
||||
TODO path pointers.
|
||||
@@ -27,8 +27,9 @@ looks like language knowledge in here is a bug or a `Handshake` request.
|
||||
|
||||
Deferred, deliberately, and named in Status/TODO below: range formatting
|
||||
(waits on TODO.md §2 `--lines`), lint diagnostics (waits on `vlog_linter`),
|
||||
completion / rename / signature help, cross-file references, and `vfmt.toml`
|
||||
discovery.
|
||||
completion / rename / signature help, and cross-file references.
|
||||
(`vfmt.toml` discovery and `.gitignore`-aware indexing, deferred when this
|
||||
was written, were delivered by vfmt-core-lift the same day — lead note.)
|
||||
|
||||
## Dependencies, and the justification CLAUDE.md asks for
|
||||
|
||||
@@ -206,9 +207,11 @@ not see.
|
||||
on a POSIX path legitimately named `/C:`.
|
||||
- **The workspace walk is plain.** `initialize`'s `workspace_folders` (falling
|
||||
back to `root_uri`) are walked recursively for `*.v`/`*.sv`/`*.vh`/`*.svh`.
|
||||
`.gitignore` and `--exclude` are **not** honored — `crates/vfmt` owns that
|
||||
logic (`walk.rs`) and it is not public. Recorded as a Handshake below. A
|
||||
depth cap of 64 directories keeps a symlink cycle from spinning.
|
||||
~~`.gitignore` and `--exclude` are **not** honored~~ **Superseded by
|
||||
vfmt-core-lift (lead note): the scan now uses the lifted `vfmt_core` walk —
|
||||
`.gitignore` always on, workspace-root config excludes applied. The old
|
||||
64-directory depth cap is gone for CLI parity (symlink-cycle exposure now
|
||||
shared with the CLI, filed as a follow-up in that feature's README).**
|
||||
- **A file that does not lex has no tokens.** The lexer is all-or-nothing
|
||||
(`docs/features/error-recovery/README.md`), so `semanticTokens` returns an
|
||||
empty set and hover's macro lookup finds nothing for such a buffer. The
|
||||
@@ -219,10 +222,11 @@ not see.
|
||||
becomes a second error item. Symbols and diagnostics in that state are
|
||||
oddly-placed but never wrong about their spans. This is the documented
|
||||
shape, not a bug in this crate.
|
||||
- **`vfmt.toml` is not discovered.** Config discovery lives in `crates/vfmt`
|
||||
(`config.rs`) and is not exposed as a library. The server uses
|
||||
`Config::default()` (100 columns, 2-space indent) with the client's tab
|
||||
size overriding the indent when it is sane. Handshake filed below.
|
||||
- ~~**`vfmt.toml` is not discovered.**~~ **Superseded by vfmt-core-lift
|
||||
(lead note): discovery now runs per formatting request via `vfmt_core`,
|
||||
with precedence config > client tabSize > built-in default, and a broken
|
||||
config warns once and formats with defaults. See
|
||||
`docs/features/vfmt-core-lift/README.md`.**
|
||||
|
||||
## Handshakes
|
||||
|
||||
@@ -249,7 +253,10 @@ the binary's name and its stdio contract, nothing else.
|
||||
**Requested of other modules** — none of these block this round, and none was
|
||||
done here:
|
||||
|
||||
1. **`crates/vfmt`: make config discovery reusable.** `vfmt.toml` search,
|
||||
1. **DELIVERED** by `docs/features/vfmt-core-lift/README.md` (round 12):
|
||||
`config.rs` now lives in `crates/vfmt_core`, and formatting discovers
|
||||
`vfmt.toml` anchored at the document's own path. **`crates/vfmt`: make
|
||||
config discovery reusable.** `vfmt.toml` search,
|
||||
parsing and precedence live in `crates/vfmt/src/config.rs`, inside a binary
|
||||
crate, so the server cannot call it. The LSP needs exactly the same
|
||||
answer the CLI gives for the same file, and duplicating the search rule is
|
||||
@@ -258,7 +265,10 @@ done here:
|
||||
`discover(path) -> Config`-shaped entry point. Until then the server
|
||||
formats with defaults, which is wrong for any project that sets
|
||||
`line-length`.
|
||||
2. **`crates/vfmt`: make the ignore-aware walk reusable.** Same shape of
|
||||
2. **DELIVERED** by `docs/features/vfmt-core-lift/README.md` (round 12):
|
||||
`walk.rs` now lives in `crates/vfmt_core`, and the index scan uses it, so
|
||||
the index skips what the CLI skips. **`crates/vfmt`: make the ignore-aware
|
||||
walk reusable.** Same shape of
|
||||
problem for `walk.rs` (`.gitignore` + `--exclude`). The server's plain walk
|
||||
will index generated netlists a `vfmt` run would skip.
|
||||
3. **`vlog_parser`: token-kind detail the lexer folds away.** Two spellings
|
||||
@@ -367,8 +377,8 @@ it was written rather than starting mid-line.
|
||||
answering across the workspace means resolving every other file's
|
||||
references *into* this one — an inverted index the workspace layer does
|
||||
not build. It is a real feature, not a small addition.
|
||||
- [ ] **Not done:** `vfmt.toml` discovery, `.gitignore`-aware indexing — both
|
||||
blocked on the two Handshake requests above.
|
||||
- [x] ~~**Not done:**~~ `vfmt.toml` discovery, `.gitignore`-aware indexing —
|
||||
delivered by vfmt-core-lift (both Handshakes below marked DELIVERED).
|
||||
- [ ] **Not done:** editor packaging (the VS Code extension and the
|
||||
`lspconfig` snippet are their own TODO.md §6 item).
|
||||
|
||||
|
||||
Reference in new issue
Block a user