vlog-semantic
Goal
crates/vlog_semantic is the analog of ruff's ruff_python_semantic: it takes
the AST vlog_parser produced for one file and builds the tables a
language server needs — a tree of scopes, a symbol per declaration, and a
reference per identifier use, each resolved to the declaration it names.
That is what textDocument/definition, references, hover and
documentSymbol are made of (TODO.md §6), and later what semantic lint rules
(unused signal, undriven net) will read — the rules Verible structurally
cannot write because it is syntax-only. This crate is deliberately
single-file: a name only another file can supply is not an error, it is an
ExternalCandidate carrying the import path, left for the workspace index
(the next feature in §6) to finish.
analyze never fails and never panics. It is written against the
error-tolerant tree, where ItemKind::Error / StmtKind::Error leaves are
opaque — the same treatment macro invocations and directives already get.
API as built
pub fn analyze(file: &SourceFile, src: &str) -> Semantics;
impl Semantics {
fn scopes(&self) -> &[Scope]; // index 0 is the file scope
fn symbols(&self) -> &[Symbol];
fn references(&self) -> &[Reference];
fn scope(&self, ScopeId) -> Option<&Scope>;
fn symbol(&self, SymbolId) -> Option<&Symbol>;
// the LSP queries
fn symbol_at(&self, offset: u32) -> Option<SymbolId>;
fn reference_at(&self, offset: u32) -> Option<&Reference>;
fn definition_of(&self, offset: u32) -> Option<&Symbol>;
fn references_of(&self, SymbolId) -> Vec<&Reference>;
fn document_symbols(&self) -> Vec<DocumentSymbol>;
fn resolution_counts(&self) -> (usize, usize); // (resolved, total)
}
struct Symbol { name, kind: SymbolKind, name_span, decl_span, scope: ScopeId,
child_scope: Option<ScopeId> }
struct Reference{ name, name_span, scope: ScopeId, resolution: Resolution }
struct Scope { kind: ScopeKind, parent, owner: Option<SymbolId>, span,
symbols: Vec<SymbolId>, children, imports: Vec<Import> }
enum Resolution { Resolved(SymbolId), ExternalCandidate { paths: Vec<String> }, NotFound }
SymbolKind is the list the task named: Module, Package, Port, Net,
Var, Param, Genvar, Typedef, EnumVariant, Function, Task,
TfArg, Instance, Block, StructMember. ScopeKind is File,
Module, Package, Function, Task, Block, Generate, Struct.
Deviations from the sketch in the task, and why
analyzetakessrcas well as the tree. Most declarations in the AST keep their name as a plainStringand carry a span only for the whole construct, so the name's range — the thing an editor highlights — is not recoverable from the tree alone.scan.rsfinds it by scanning the construct's own source bytes (comments, strings and macro invocations skipped) inside a window narrowed by the sub-spans that do exist. The corpus test assertssrc[name_span] == namefor all 21 485 symbols and 73 708 references it builds, so the scan is not a guess in practice. A Handshake request to putname_spanon the AST is filed below; when it lands,scan.rsand this parameter go away.Reference.resolution: Resolutioninstead ofresolved: Option<SymbolId>. The task asked for both anOption<SymbolId>and anExternalCandidatestate carrying the import path; one enum says that once.Reference::resolved() -> Option<SymbolId>is kept as the accessor the sketch names, plusis_external_candidate().Symbol.child_scopewas added: the outline needs "what does this declaration contain", andp::xresolution needs "which scope is packagep".references_ofdoes not include the declaration. It returns uses only; the declaration issymbol.name_span, and an LSP honoringincludeDeclaration: trueappends it. Stated because the task asked for the choice to be documented.
Resolution rules
Two passes. Pass one (bind.rs) walks the tree, opens scopes, binds every
declaration and records every use as pending. Pass two (resolve.rs)
resolves the pending uses against the finished tables. Nothing resolves during
the walk, which is what makes forward references work: a net or parameter
used above its declaration resolves exactly like one used below it, as
Verilog requires at module scope — and as an editor needs mid-edit anywhere.
- Lexical chain. From the scope the use is written in, outward through parents to the file scope. In each scope: names declared there first, then the packages that scope imports, then on to the parent.
- Ports and parameters are module-scope names, so a module body sees
them; a
function/task/block scope sees them through its parents. - Enum variants land in the scope holding the enum, per the LRM — not
inside the typedef.
typedef enum { IDLE } state_e;in a module binds bothstate_eandIDLEin that module. - Struct members land in a
Structscope of their own, hung under the typedef. Nothing ever looks up into it (member accessx.fieldis not resolved, see below), so members cannot be reached as bare names — which is correct — but they are still symbols, so the outline can show them. - Imports.
import p::*;/import p::x;is recorded as anImporton the scope that wrote it (module header imports land on the module scope). Resolution consults it only whenpis a package declared in this file; otherwise the use becomesExternalCandidate { paths: ["p::*"] }— every import in the chain that could supply the name, in scope order, for the workspace index to try. An explicitimport p::xis offered only for the namex. - Package-scoped names.
p::xrecords two references: the headp(target: a file-scope package) and the tailx(looked up inp's scope only, never in the lexical chain). Ifpis not in this file, both become external candidates and the tail carries the full pathp::x. Ifpis in this file but has no memberx, the tail isResolution::NotFound— not an external candidate, because the package is fully known locally and no workspace index could change the answer. (QA find, lead-documented.) - Instantiations. The module name is a reference to a file-scope module,
else an external candidate naming the module. A named connection's
.portresolves against that module's scope — so.data_i(x)jumps to the port declaration when the module is in the same file, and is an external candidate when it is not..*records nothing. Parameter overrides#(.W(8))resolve the same way. - Hierarchical names.
a.b.cresolvesaand stops: no reference is recorded for.bor.c. Resolving a tail needs instance elaboration, which is a non-goal. - Type names are uses. A declaration written with a user-defined type
(
my_t x;,pkg::word_t y;) records a reference for the type, so go-to-definition works on it. Built-in type keywords record nothing. - Redeclaration binds once. A name already bound in a scope does not
create a second symbol; the second occurrence becomes a reference to the
first. This is what makes a non-ANSI port work —
module m(a); input a;has oneasymbol (the header port) and one use (the body declaration) — and it keepsreferences_ofhonest everywhere else. - Not recorded at all: system tasks (
$display), anything spelled with a leading backtick (a macro standing where a name belongs), and keywords the parser left in an identifier slot.
Scope tree
File > module | package > function | task | named or unnamed block | generate region | generate block | for-generate header | for/foreach statement.
- A
forgenerate opens a scope for its header, sofor (genvar i = 0; ...)does not leakiinto the module; the body block nests inside it.genvar i;written at module scope binds there instead, as the LRM says. - A
for/foreachstatement opens a scope for the same reason (for (int i = 0; ...)). - A
struct/unionbody opens aStructscope that lookup never enters.
Simplifications (deliberate, all of them LRM-inexact)
- Every
begin/forkopens a scope, named or not. The LRM gives an unnamed block a scope only when it declares something; the difference is invisible unless a program declares a name in an unnamed block and relies on it leaking outward, which is illegal anyway. - Forward references are accepted everywhere, including inside functions and blocks where the LRM requires declaration-before-use. Being more permissive than the language costs an editor nothing and buys mid-edit robustness; a future lint rule can flag the strict violation.
- First declaration wins on a duplicate name (rule 10). The LRM makes a true duplicate an error; reporting it belongs to the linter, not here.
- Explicit imports do not outrank wildcard imports. Imports are consulted
in the order written. The LRM prefers an explicit
import p::xover a wildcard from another package; a file that needs that distinction is already ambiguous to a human reader. - A function's name is not also a variable.
f = expr;insidefunction fresolves to the function symbol, which is where go-to-definition should land anyway. Changed 2026-08-24 by refactor-rename (lead-authorized): an end label (endmodule : mand other end labels record nothing.endmodule/endinterface/endpackage/endfunction/endtask/endclass: name, andend : label/join : labelon a named block or generate block) is recorded as a use of the declaration it closes, through the newTarget::Declaration(SymbolId)— bound directly to that symbol, never looked up, so a label can never attach to a same-named declaration elsewhere. A label that does not spell the declared name, or whose declaration was a redeclaration that bound no symbol of its own, still records nothing.endclockingis unaffected: a clocking block is opaque to this crate and declares no symbol. The parser already carriedend_label_spanon every one of these nodes, sovlog_parserneeded no change.defparampaths,disabletargets and event names are resolved with the ordinary lexical rule (disable blkfinds the named block).- Ordering inside a scope is not modeled:
symbol_atand lookup are position-independent. There is no "this name was not yet visible here".
Non-goals
- No type checking, no width inference, no elaboration. Nothing here knows what a symbol's type is beyond the kind of declaration it came from.
- No cross-file anything. No
`includefollowing, no workspace scan. External names are reported, never resolved. - No macro expansion.
`NAMEand`NAME(...)are opaque tokens; a name a macro would have produced is invisible to this crate, which is the same contract the formatter and the define table keep (TODO.md §7). - No classes/constraints/UVM. The parser does not accept them yet; when it
does, they will need scope kinds of their own. (Since closed for classes:
docs/features/class-semantics/README.md—ScopeKind::Class, member binding,extends/this/super,Resolution::InheritedCandidate. Constraints and covergroups stay opaque verbatim leaves.)
Assumptions
srcpassed toanalyzeis the exact text the tree was parsed from. Spans index into it; a mismatched string yields wrong name spans, not a panic (every slice is bounds-checked and clamped).- A construct's keyword is written before its name (
module m,function automatic int f), and the name is a plain identifier. Where a type name and the declared name are the same token text (function foo_t foo_t;) the scan can pick the first of the two; nothing in the corpus does this. - The parser bounds nesting depth (
MAX_NESTING_DEPTH, TODO.md §1), so the recursive walk here inherits a bounded stack and needs no depth counter of its own. - Identifiers are ASCII in practice; the scanner treats non-ASCII bytes as non-identifier bytes and never slices inside a multi-byte character.
Handshakes
Consumed from vlog_parser (nothing here requires a change to work):
ast::SourceFileand the whole node tree, includingItemKind::Error/StmtKind::Errorfromparse_source_tolerant— treated as opaque leaves.span::TextRangeon items, statements, expressions, declarators, ports, parameters, instances, enum members, struct members, dims and blocks.token::is_keyword— to tell a built-in type keyword from a user type name, and to drop keywords the parser left in identifier slots.
Promised to consumers (lucisv_server, the workspace index, future lint
rules):
analyzenever panics and never fails, on any input, tolerant tree or not.Symbol.name_span/Reference.name_spanare exact byte ranges of the name as written, or empty when the source does not spell the name literally. Empty ranges never matchcontains, so a query never returns one.- Every
ReferencewhoseResolutionisExternalCandidatecarries the workspace-level paths that could finish it; the workspace index may rewrite those references and nothing else.
Requested of vlog_parser (not done here — out of scope for this
feature, and the crate works without it):
name_span: TextRangeon the nodes whose name is a bareString:Module,ItemKind::Package,FunctionDecl,TaskDecl,AnsiPort,ParamPort,TfArg,Typedef,Instantiation::module,Connection::name,ItemKind::Genvar,ItemKind::Import,GenBlock::label,StmtKind::Block::label,StmtKind::Foreach::vars,ExprKind::Member::name,ExprKind::Scope::name. Every one of those is currently recovered by re-scanning source text incrates/vlog_semantic/src/scan.rs, which is ~150 lines this crate should not own and which cannot be right by construction — only right in practice, as the corpus test shows. This is the single change that would most simplify this crate. Delivered 2026-08-19 byname-spans— every declaration listed here now carries its range; seedocs/features/name-spans/README.md.- A span for
DataType(and forExprKind::Cast::ty), so a type reference does not need a window computed from its neighbours' spans. - Nice to have, much smaller: the byte range of
Member/Scopetails, which is today derived asspan.end - name.len().
Corpus baseline
cargo test -p vlog_semantic --test corpus -- --nocapture, over the 860
.v/.sv/.svh files in corpus/ (Ibex, OpenTitan, PULP common_cells,
picorv32), 2026-08-19:
| population | files | symbols | references | resolved in-file | external candidates | unresolved |
|---|---|---|---|---|---|---|
| every file | 860 | 21 485 | 73 708 | 73.4 % | 19.4 % | 7.2 % |
| files that parse with zero errors | 502 | 12 900 | 46 408 | 79.5 % | 19.6 % | 0.9 % |
No panics, and every one of the 95 193 name spans built across the corpus slices back to exactly the name it claims (0 unplaced).
Reading the numbers honestly:
- ~20 % external candidates is the expected steady state, not a defect.
RTL of this size lives on
import prim_pkg::*and instantiates modules declared elsewhere; those references are supposed to leave this crate unfinished. The workspace index converts this bucket, and it is the single biggest lever on perceived LSP quality. - 0.9 % genuinely unresolved on clean files is the interesting number. A
sample of what is in it: names a
`definewould have produced (XLEN,ENABLE_IRQ), class/UVM constructs in files that parse only because their broken parts became error nodes (this,super,null,new), and hierarchical/member tails reached through a path this crate stops at. - The 7.2 % over all files is dominated by the 42 % of corpus files that
still hit a parse error (classes,
bind, queues — README's "not yet supported" list): a declaration swallowed by an error node cannot bind, so every use of it counts unresolved. That number will move when the parser moves, not when this crate does.
The test asserts the two properties, not the percentages: zero unplaced names anywhere, and under 3 % unresolved on cleanly-parsed files.
Status / TODO
- New crate
crates/vlog_semantic, workspace member, no dependency beyondvlog_parser+ std - Scope tree with parent links (file / module / package / function / task / block / generate / struct)
- Symbols for all 15 kinds, with
name_span,decl_span,scope,child_scope - References for expression identifiers, type names, hierarchical heads,
instantiated module names,
.portconnections, package heads and tails, import paths - Two-pass bind-then-resolve (forward references)
- Imports: in-file packages resolved, others kept as
ExternalCandidatewith their paths - Queries:
symbol_at,reference_at,definition_of,references_of,document_symbols Errornodes are opaque; tolerant trees analyze without panicking- Tests: 19 behavior tests + 6 scanner unit tests + corpus smoke test
- TODO.md §6
vlog_semanticcheckbox - Deferred to the workspace index: resolving
ExternalCandidates - Deferred: interfaces/modports — the parser does not accept them.
Classes delivered 2026-08-19 by
class-semantics - Deferred:
Symboltype information (needed for hover text richer than "port, declared at line N")
Work log
2026-08-24 — refactor-rename dev agent (lead-authorized, cross-module).
End labels are now references. bind.rs gains Target::Declaration(SymbolId)
and Binder::use_end_label, called from the module, package, class, function,
task, generate-block and statement-block/fork-join arms; resolve.rs answers
it with Resolution::Resolved(id) directly. Strictly additive: no existing
target, span or symbol changed, and no vlog_parser change was needed
(end_label_span was already on every node). The reason is
docs/features/refactor-rename/README.md: a rename that leaves
endmodule : old_name behind produces non-compiling SystemVerilog, and
fixing it by text matching would have broken the "every edit comes from a
resolved reference" rule. Three tests added to tests/semantics.rs
(all six labelled constructs; a label never attaching to a same-named
declaration elsewhere; a mismatched label recording nothing).
2026-08-19 — dev agent. Built the crate: model.rs (tables), bind.rs
(pass one), resolve.rs (pass two), scan.rs (name-span recovery),
lib.rs (analyze + queries). Key decisions, all argued above:
analyze(file, src), notanalyze(file). Discovered while mapping the AST that onlyDeclarator,EnumMember,Instance,NonAnsiPortand the expression nodes place their name at a span I can compute; everything else keeps the name as aStringinside a construct-wide span. Rather than park go-to-definition for modules, ports, functions, tasks, parameters, block labels, genvars and connections — most of the feature — I took the source text and scan for the name inside a window narrowed by the spans that do exist. Handshake request #1 filed to make this unnecessary.- One
Resolutionenum instead ofOption<SymbolId>plus a parallel external state;resolved()keeps the sketch's accessor. - Redeclaration becomes a reference (rule 10). Found while binding
non-ANSI ports:
module m(a); input [7:0] a;would otherwise produce twoasymbols and split its references between them. - Struct members get a scope lookup never enters. The alternative — put
them in the enclosing scope — would make a bare
fieldresolve to a struct member, which is wrong. - The scanner skips a backtick plus its identifier as one token, so
`WIDTHnever answers a search forWIDTH; anduse_namedrops names that start with a backtick, which is how`PICORV32_REGS regs (...)(a macro used as a module name, twice in picorv32) stopped being an unplaceable reference. That took corpus unplaced names from 2 to 0. - Corpus numbers are reported for two populations because the all-files number is mostly a statement about parser coverage, not about resolution.
Checks at the end: cargo test -p vlog_semantic 26 tests green (19 + 6 + 1),
cargo clippy -p vlog_semantic --all-targets silent, cargo fmt clean,
cargo test --workspace green.
QA log
2026-08-19 — QA agent. Verified against crates/vlog_semantic/src/{lib,model,bind,resolve,scan}.rs
and this README. Scope: -p vlog_semantic only.
Gates:
cargo test -p vlog_semantic: 26 passed (6 scan unit + 1 corpus + 19 behavior), 0 failed, matching the claimed count exactly.cargo clippy -p vlog_semantic --all-targets: silent. No#[allow],unwrap(),expect()orpanic!anywhere insrc/*.rs.cargo fmt -p vlog_semantic -- --check: clean.cargo tree -p vlog_semantic: exactlyvlog_semantic -> vlog_parser, no other dependency. Confirms "no deps beyond vlog_parser + std."- Root
Cargo.tomldiff: themembersline gainsvlog_semantic, as claimed. (The diff also carries an unrelated[workspace.dependencies] rayon = "=1.12.0"hunk — that belongs to the concurrently-workedparallel-files/lucisvfeature, out of my scope, noted only so the "members-line-only" claim for this feature isn't misread against the whole file.) cargo test --workspace: 2 failures, both incrates/lucisv(a_deeply_nested_file_formats_on_a_worker_thread,deeply_nested_file_does_not_kill_the_batch) — outside my gate (-p vlog_semanticis green) and inside the area another QA agent owns concurrently. Flagging only so "workspace green" isn't taken at face value right now; not avlog_semanticfinding.SymbolKindhas exactly 15 variants,ScopeKindexactly 8, matching the claim (counted inmodel.rs).- TODO.md §6's
vlog_semanticline is checked and its numbers (79.5% / 19.6% / 0.9%) match the corpus re-run below verbatim.
Corpus re-run (cargo test -p vlog_semantic --test corpus -- --nocapture),
reproduced exactly, not just within noise:
corpus (every file): 860 files, 21485 symbols, 73708 references — 73.4% resolved in-file, 19.4% external candidates, 7.2% unresolved, 0 names unplaced
corpus (files that parse cleanly): 502 files, 12900 symbols, 46408 references — 79.5% resolved in-file, 19.6% external candidates, 0.9% unresolved, 0 names unplaced
Wall time 0.73s (well under the 2s claim). 0 panics, 0 unplaced names, both populations match the README table exactly.
Attack suite. Wrote a scratch integration test
(crates/vlog_semantic/tests/qa_attack.rs, 20 #[test] fns, deleted after
this pass — not part of the shipped suite) exercising the crate only
through its public API. All 20 attacks passed; no BLOCKING findings. Cases
covered:
- scan.rs / name_span (claim 2): module name shadowed by an identical
string in a leading
//comment (correctly skipped — lands on the realmodule foo, not the comment); a port name that is a whole-word prefix of a sibling port (wvsww—NameScannercompares whole tokens, not substrings, so this class of bug is structurally excluded, not just untriggered here); agenvar ideclared amidii/i_delaylookalikes used throughout a generate-for body; a construct where the name sits at byte 0 of its window and another where it ends exactly at the window's last byte (package p;endpackage); a block comment full of multi-byte UTF-8 sitting between a module's keyword and its ports; an escaped identifier (\a+b) — the lexer passes these through, and both its declaration and its later use land on exactly\a+b(4 bytes), correctly resolved; a non-ANSI port used twice in the body, confirming exactly one symbol exists and both body occurrences are uses whosename_spansits at the body text, not the header; an instantiation where the instance name and the module type name are the same token (dff dff (...)) — the module-name reference and the instance symbol'sname_spanare distinct, non-overlapping ranges. - resolution (claim 3): three-deep shadowing (module net / function arg /
block var all named
x) —references_ofon each binding contains only its own use, verified for all three; an enum variant used textually before itstypedef enum— resolves (two-pass forward reference, as designed);import p::*where packagepis declared below the import in the same file — resolves (two-pass);importof a package not in this file —ExternalCandidate { paths: ["nowhere_pkg::*"] }, exact path confirmed; two wildcard imports of different in-file packages that both define the same name — the first-written import wins (matches the README's documented "consulted in the order written" rule);p::xwherepis an in-file package butxis not a member of it — resolves toResolution::NotFound, notExternalCandidate. This distinction is correct (the workspace index can't help — the package is fully known locally) but is not stated in the README's rule 6, which only describes the "pnot in this file" case. Filed as a documentation gap, not a bug (see Findings below); a named connection.clk(clk)— confirmed the.clktoken resolves into the instantiated module's port scope (SymbolKind::Port) while the(clk)argument resolves against the local net (SymbolKind::Net), two different symbols from one connection, as documented; an instance array (sub u[3:0] (...)) binds and resolves its connections without confusion; a recursive function (fact) — both the self-assignment (fact = ...) and the recursive call (fact(n - 1)) resolve to the function's own symbol; a reference to a generate-for's genvar from inside a nestedif-generate two levels deep — resolves through the header scope as designed. - tolerant-tree safety (claim 4): 10 broken files, including the exact
header-distortion repro from
docs/features/error-recovery/README.md(module m #(parameter W = , parameter X = 4) (input a); wire ok; endmodule— module body re-parses as file-scope items) plus a broken port list, an orphanedendmodulewith no matchingmodule, an unterminated string, garbage tokens mid-body, mismatchedbegin/end, a broken for-generate header, an empty file, a dangling backtick macro with broken arguments, and two broken module headers back to back. No panics; every non-emptyname_span/Reference.name_spanproduced still slices back to exactly the name it claims, even on these malformed trees. - queries (claim 5):
definition_of/symbol_at/reference_atcalled at every byte offset (0..=len) of a small multi-construct file — no panic at any offset, including offsets that land on whitespace, punctuation, or mid-token.
Findings.
- Should-fix (documentation gap, not a bug), LOW. README rule 6
("Package-scoped names") describes only two outcomes for
p::x:pexternal (both refs becomeExternalCandidate), or implicitlypin-file andxfound. It doesn't say what happens whenpis in-file butxis not one of its members. Actual (and, on inspection, correct) behavior perresolve.rs'sTarget::PackageMemberarm: the tail resolves toResolution::NotFound. Recommend adding one sentence to rule 6. Repro:b6_package_member_missing_from_an_in_file_packagein the now-deleted scratch suite —package p; localparam int K = 1; endpackage module m; assign w = p::MISSING; wire w; endmodules.reference_at(<the "MISSING" span>).resolution == Resolution::NotFound. - No BLOCKING findings. No wrong
name_span(pointing at a comment, a use, or the wrong occurrence) and no panic were produced by any attack above, including the specific risky shapes named in the QA brief (comment shadowing, substring siblings, UTF-8 preceding a name, escaped identifiers, same-name instance/module, header-distortion trees).
Everything else (claims 1, 3's remaining rules, 4, 5) verified as
documented: analyze never panicked across the full corpus or the 10
broken-file probe; the 15 SymbolKind/8 ScopeKind counts are exact;
references_of round-trips (pre-existing test plus the shadowing probe
above); document_symbols nesting was not independently re-probed beyond
the existing document_symbols_nest_declarations_under_what_declares_them
test, which already covers module > function > block and passes.
Review
2026-08-19 — lead. Verdict: accepted; commits jointly with parallel-files (both touch the root manifest). The differentiation feature has arrived: this is the layer Verible doesn't have.
What earned it:
- Two-pass bind-then-resolve was the only correct answer to Verilog's forward references, and taking it from the start avoided the incremental-resolution trap. The redeclaration-becomes-reference rule for non-ANSI ports is the kind of language-specific judgment that makes references_of actually useful.
Resolutionas a three-state enum (Resolved / ExternalCandidate carrying paths / NotFound) is the right interface for the workspace index: the index gets exactly the worklist it needs, and QA's documentation find — in-file package misses are NotFound because no index could change the answer — shows the semantics were thought through, now stated in rule 6.scan.rsis honest scaffolding: 95k spans verified against source, every QA attack defeated (comments, substrings, decl-vs-use, escaped identifiers), and a filed handshake whose acceptance deletes the module. Thename_span-in-parser handshake is hereby approved for the next parser-touching round.- The corpus baseline (79.5% in-file resolution, 0.9% unresolved on clean files, 19.6% waiting on the index) is exactly the honest number the workspace-index feature will be measured against.
The workspace-green gate was transiently false during QA (two lucisv deep-nesting tests) — timing overlap with the parallel-files QA's deliberate stack-sabotage check, verified restored before the joint commit.