Every tracked file that can carry a comment (880 of them) now opens with "Author: Guoliang Chen, a Senior Digital Design Engineer" and closes with "Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com", in the file's own comment syntax. No behaviour change: the diff outside the version bump and changelogs is comment lines only. - tools/stamp_author.py: writes the lines; idempotent, `--check` lists what is missing. Headers go under a shebang and under Markdown front matter. - Left alone: test fixtures, cases and snapshots (byte-exact inputs), JSON and JSONL, logs, images, lockfiles, docs/site/dist (regenerated) and the LICENSE files (already carry the copyright line). - tools/linux_check.sh: --help reads its header from line 3, now that the author line sits under the shebang. - tools/gates.sh green on this tree: 5 545 tests, corpus 814/6 as before. Co-Authored-By: Claude Mythos 5.2 <[email protected]>
type-hierarchy
TODO.md §9c: the class extends tree, both directions, over LSP
typeHierarchy.
Goal
"What does this class extend?" and "who extends it?" are the two questions a
verification engineer asks about a UVM testbench they did not write, and until
now lucisv could answer neither without a grep. LSP has had the shape for both
since 3.17: its type hierarchy is a graph of supertypes and subtypes, and
SystemVerilog's extends is exactly that graph — the classes are the nodes and
class d extends b is the edge. So textDocument/prepareTypeHierarchy picks a
class out of the text under the cursor, typeHierarchy/supertypes answers "what
does X extend" and typeHierarchy/subtypes answers "who extends X", and every
LSP client draws the tree with its own hierarchy view — no editor code at all.
Each request answers one hop. The client drives the expansion, so a cycle
needs no handling here beyond not crashing: class a extends a; simply appears
again one level down, and an a → b → a pair unrolls as far as the user keeps
clicking.
Scope decision, made by the lead before the round: classes only. The module
hierarchy stays on callHierarchy, where it shipped and is tested
(docs/features/hierarchy/README.md). Mapping modules onto typeHierarchy as
well was considered and rejected: an instantiation is a containment edge and
extends is an inheritance edge, and serving both from one request would put
two unrelated relations behind one node kind with no way for a client — or a
reader — to tell them apart. One item kind, done well.
Assumptions
-
extendsandimplementsare both edges. (Amended 2026-09-02 byvendor-formal-grammar; the original assumption is kept below because it explains the shape of the code.)vlog_parsernow modelsinterface class ic; ... endclassas an ordinaryClassDeclcarrying the wordinterfacein itsprefix, so animplementstarget is a class declaration this server holds, andbases_offollows it through the sameclasses_athopextendstakes — base first, then the interfaces, in source order. Pinned byan_implements_clause_names_a_supertype,an_interface_class_is_a_nodeandextends_and_implements_are_both_edges_of_the_same_answer.Superseded: until 2026-09-02,
implementscontributed no supertype, becauseinterface classwas rejected as an unsupported construct and matching animplementstarget by name would have claimed an unrelated ordinary class of that name. The two tests that pinned that answer were named so this round would be forced past them, and it was. -
Every item is still
SymbolKind::CLASS. An interface class declares aSymbolKind::Classlike any other — deliberately, and argued indocs/features/vendor-formal-grammar/README.md: a distinct kind would have to round-trip through the on-disk index (aFACTS_FORMATbump) and nothing downstream asks the question.ClassDecl::is_interface_class()is there for the first consumer that ever does. -
A class has exactly one base, which is what the AST gives (
ClassDecl::extendsis anOption<ClassExtends>) and what the LRM says for ordinary classes.supertypesis therefore a list of at most one — except under the workspace's documented duplicate policy, below. -
The base is resolved by the same two layers
textDocument/definitionuses, and by nothing of this feature's own: the file's symbol table first, then the workspace overlay.vlog_semanticalready recordsextends Baseas a reference (docs/features/class-semantics/README.mdrule 5), and the overlay-promotion round made a bare cross-file class name reachable through that same reference, so a base in another file needs no lookup here. The one thing this feature computes is which offset to ask about: the last byte of the extends clause'sname_span. For a barebasethat is that one reference; forpkg::baseit is inside the tail's reference, which is the one that names a class (the head names the package), and it is the right byte whatever spacing the source used around the::. -
A parameterized base needs no unwrapping. The parser keeps
#( ... )on its own field, soextends base #(8)storesbaseinClassExtends::nameand itsname_spancoversbasealone. This is the class-semantics policy already, verified by readingparse_class_extends, and pinned bya_parameterized_base_resolves_by_its_bare_name. -
An unresolvable base yields no item, never a guess.
extends uvm_objectin a workspace that does not index UVM has nowhere honest to point: an item carries auriand arange, and a wrong one sends the user to the wrong file with no way to tell. So the chain simply stops. This is not rare — it is the normal top of every UVM chain in the corpus — and it is what the corpus test asserts atcore_ibex_base_test extends uvm_test. -
subtypesmatches the base name exactly as written, which is thehierarchyfeature's own "the walk is by name" assumption applied toextends. Two consequences, both deliberate:- A qualified base is not matched:
class d extends other_pkg::base;is not offered as a subtype of a file-scopebase, because matching on the trailing segment would silently claim it. Measured: 0 of the 270extendsclauses in the checked-in 860-file corpus are qualified, so this costs nothing observable here. It does make the two directions asymmetric —supertypesdoes followpkg::base, through the package — which is stated rather than hidden, and pinned bya_qualified_base_is_not_claimed_by_the_bare_name_it_ends_with. - Two classes of the same name in different files get the same subtype
list.
subtypesreads the item'sname, not itsuri— exactly ascallHierarchy/incomingCallsdoes for a module name — because the textextends basesays which name was extended and nothing more.
- A qualified base is not matched:
-
Ambiguity is answered the same way in both directions, and differently from
outgoingCalls. A base name two files declare gives two supertype items. This is a deliberate departure fromhierarchy::outgoing, which skips an ambiguous target: an outgoing call carriesfromRanges, so two items would double one edge, whereas a supertype is a bare item in a flat list — the same list shapepreparereturns, where showing both is how the user is told the ambiguity exists. It also comes for free from the shared overlay, whose documented policy is to offer every declaration (docs/features/workspace-index/README.md). -
A cursor immediately after the last character of a name is on that name.
TextRange::containsexcludes the end, which is right for a span of text and wrong for a caret — that is where a double-click and an end-of-word motion leave it. Same conventionhierarchy.rsstates. -
The scope ladder decides which files are searched.
subtypesreadsWorkspace::sources(), so a file a filelist or anexcludekeeps out of the index extends nothing, exactly as it references nothing. Open buffers beat disk, so anextendsjust typed and not yet saved is already a subtype. -
Classes are found wherever they can be written: at file scope, inside a
package(the dominant UVM shape), inside amodule, and nested inside another class. A generate block is not descended into. QA traced the parser and corrected the original justification: classes inside generate blocks DO parse into realClassDeclnodes — the walk simply does not recurse there. Zero such classes exist in the 860-file corpus, so the gap is theoretical today; the pinning test (a_class_declared_inside_a_generate_block_is_not_found_by_this_walk) makes a future round close it on purpose.
Handshakes
- Consumes
vlog_parser—parse_source_tolerant,ast::ClassDecl/ClassExtends(read-only, forname,name_spanandextends),Item::span,LineIndex. Nothing new is asked of the crate. - Consumes
vlog_semantic—ExternalResolutions::definition_ofandDefinition,Semantics::reference_at,SymbolKind::Class,WorkspaceIndex::path. Nothing was changed in the crate. The whole cross-file half of this feature is the overlay-promotion round's work being consumed:extends Basewas already a reference carrying the bare name as its last candidate path, so the workspace already had the answer and this feature only had to ask for it at the right offset. - Consumes
crate::state::{Workspace, Document}—document,index,text_of,sources, andDocument::newfor the one case an item names a file no editor has open (see the work log). Nothing instate.rswas changed; the workspace stays immutable through all three handlers, and no cache was added. - Promises
lucisv_server—type_hierarchy::{prepare, supertypes, subtypes}never panic, never return an item whoseselectionRangeis outside itsrange, and never return an item for a class the workspace does not really declare. - Requested of
vlog_semantic— delivered (incremental-index, 2026-08-27).WorkspaceIndex::subclasses_ofis the table, keyed by base name and built by the same class walk this module used to run per request — lifted intovlog_semantic::classes, so the census and the declaration a hierarchy item shows cannot drift apart.subtypesis a map lookup and thesources()walk is gone: 82 ms → 0.71 ms over the corpus forcore_ibex_base_test. It landed with the instantiation table, as filed. The request, kept legible:an inheritance edge table inWorkspaceIndex. This is the same Handshakedocs/features/hierarchyfiled for instantiation edges anddocs/features/code-lensrode past — the index records what a file declares and not what it uses, so "who extends X" has to be a workspace walk. One table keyed by base name, built with the index, would makesubtypesa map lookup at the cost of one extra field per class at index time. Filed together with the instantiation table rather than separately: the two want the same shape and should land as one round when something finally justifies widening the index's contract. Today one request in 55 ms does not. - The answer is as of the index (incremental-index, 2026-08-27), which is
as of its last build or update — both of which fold every open buffer in. A
keystroke in another buffer no longer moves the subtype list before a save
does; the trade is argued in
docs/features/incremental-index/README.md. editors/vscodeneeds no change.vscode-languageclient9.0.1 ships the type-hierarchy feature and enables it off the advertised capability; the extension sets noinitializationOptionsthat would suppress it, and Vim/Neovim clients drive it through their own commands.editors/vscode/smoke.jschecks a fixed capability list and was deliberately left untouched (it is editor-packaging's file) — it still passes.
The one thing lsp-types could not spell
lsp-types 0.97 models type hierarchy on the client side only:
TypeHierarchyClientCapabilities exists, the three request types and
TypeHierarchyItem exist, and ServerCapabilities has no
type_hierarchy_provider field. A capability a client cannot see is a feature
that is never requested, however well it is implemented — so initialize_value
in main.rs serializes the InitializeResult and inserts
"typeHierarchyProvider": true into the capabilities object, which is the same
JSON a field would have produced. experimental was not used: it is a different
key and no client reads it for this. Pinned twice — in main.rs (the JSON
carries the key, and the insertion disturbs nothing else) and over the wire in
tests/e2e.rs.
What it looks like
type_mid.sv:
class type_mid extends type_base;
int y;
endclass
Cursor on type_mid anywhere — its own declaration, its extends in another
class, or a type_mid handle; — and the hierarchy view shows:
supertypes (what type_mid extends) subtypes (who extends type_mid)
type_base type_base.sv:1 type_leaf type_leaf.sv:1
Cost
Release build, this machine, the checked-in 860-file corpus, worst of three
(printed by the_corpus_uvm_classes_answer_all_three_requests):
| request | measured |
|---|---|
subtypes for core_ibex_base_test (10 subclasses across the corpus) |
55 ms |
— of which reading the 860 files (Workspace::sources()) |
53 ms |
| — of which the substring prefilter over all of them | 0.28 ms |
| — of which parsing + walking the 3 files that mention the name | ~2 ms |
supertypes for core_ibex_debug_intr_basic_test |
0.69 ms |
the same subtypes in a debug build |
101 ms |
Superseded (incremental-index, 2026-08-27): subtypes is 0.71 ms. The
table above is what the walk cost; the edge table named as "the place a future
win lives" is where it went. The rest of the paragraph, kept legible:
The shape is the same one The prefilter itself is not a
heuristic — callHierarchy/incomingCalls measured (56 ms), and
for the same reason: what is left after the prefilter is almost entirely file
I/O, because sources() reads every in-scope file whether it will be parsed
or not. That is the shared cost of every cross-file answer in this server and
the place a future win lives (the edge table above, or a cheaper sources());
nothing in this feature can shave it alone.extends base has to write base — and here it skips 857 of 860
files.
supertypes never walks the workspace at all: it parses one file (the item's
own) and, at most, re-reads the one file that declares the base. The same
worst-case caveat hierarchy records applies to subtypes in principle — a
class name that is a substring of nearly every file defeats the prefilter — but
UVM class names are long and specific, and no such name exists in the corpus.
Status / TODO
crates/lucisv_server/src/type_hierarchy.rs: the class walk,prepare,supertypes,subtypestypeHierarchyProviderinmain.rs(inserted into the serialized capabilities, becauselsp-types0.97 has no field for it); three dispatch arms inserver.rsprepareon a declaration / on a use (extendsbase, a property's type, a method local's type) / on anything else (null), including a property name, a module, a wire and theclasskeyword- Ambiguity: every declaration from
prepareand fromsupertypes, with the departure fromoutgoingCallsargued - Bases in-file, cross-file through the overlay, package-qualified, parameterized, and unresolvable (no item)
subtypesin-file, cross-file, sorted deterministically and stable across two calls; scope ladder and unsaved-buffer overlay honoured- Self-extends and a two-class cycle: one hop each, no duplicate, no hang
- Classes in a package, in a module and nested in a class
- UTF-16 positions, an untitled buffer, an unopened document, a file that has since moved, a nameless item, a buffer that does not parse
selectionRangeinsiderangeasserted for every item the feature can hand out, in three tests including the corpus one- Unit tests (31 in
type_hierarchy.rs, 1 capability test inmain.rs) and one e2e stdio round trip: prepare → supertypes → subtypes across three files - Corpus smoke: 30 classes of
core_ibex_test_lib.svthrough all three requests, plus the realcore_ibex_debug_intr_basic_test → core_ibex_base_test → (uvm_test, unindexed)chain - Cost measured over the 860-file corpus, with the I/O split out
cargo fmt --all -- --check,cargo clippy --all-targets --workspace,cargo test --workspace,editors/vscode/smoke.jsdocs/features/lucisv-server/README.mdcapability table + work log; TODO.md §9c- Not done, backlog: the inheritance edge table in
WorkspaceIndex, filed with the instantiation-edge table it should ship beside (Handshakes above). - Interface classes — unblocked and done 2026-09-02 by
vendor-formal-grammar: the parser models them,classes::declarationscollects them unchanged, andimplementsjoinedsupertypes. No new kind and no walk arm were needed; see the amended assumption above. - Not done, filed:
subtypesdoes not answer the reverseimplementsedge. The forward hop reads the parse tree, but the reverse one isWorkspaceIndex::subclasses_of, whose edge table recordsextendsonly. "Who implements this interface class?" therefore returns nothing. Filed against the index rather than worked around here, because a name match would be exactly the wrong answer the original assumption warned about. - Not done, deliberately: chasing a chain server-side (the client drives it), a whole-tree "show me every class" view, and typedef/struct hierarchies — SystemVerilog has no inheritance for them.
- Extended (call-hierarchy-everywhere, 2026-10-14):
prepareinside a class body (a property, a method body, a keyword,this) answers the innermost enclosing class, and onsuperits base. The "anything else isnull" contract above holds now only outside every class; classes-only scope is kept — modules stay off this view. Seedocs/features/call-hierarchy-everywhere/README.md.
Work log
-
2026-08-26 (dev) — read CLAUDE.md, then
lucisv-server,hierarchy,class-semanticsandoverlay-promotionREADMEs, thenhierarchy.rs,instantiations.rs,type_def.rs,nav.rs,state.rs,vlog_semantic'sworkspace.rsandvlog_parser'sparse_classbefore writing anything.What the class model gave, and what it did not. It gave everything the cross-file half needs and it gave it already resolved:
ClassDeclcarries a parsername_span,ClassExtendscarries the base name with its::chain and its own span,extendsis recorded as a reference byvlog_semantic, and since the overlay-promotion round that reference reaches the workspace unit table carrying the bare name. Sosupertypesis not a lookup this feature wrote — it isdefinition_ofasked at one computed offset. What the model did not give is interface classes:interface classdoes not parse at all, soimplementsis a dead end andSymbolKind::INTERFACEis unreachable. Checked rather than assumed, and recorded in Assumptions with the parser's own test as the citation.Design decision 1 — resolve the base through the semantic reference, not through the index. The alternative was
WorkspaceIndex::units(base_name), which is whathierarchy::outgoingdoes for an instantiated module. It would have been wrong here for two reasons: it cannot see a base declared in the same file (a very common shape — a base and its children in one_lib.sv, which is exactly what the corpus test file is), and it cannot followpkg::base(the unit table holds no package-scoped class).definition_ofhandles both, in the documented order, and is the same answer F12 gives on the same token — so the two can never disagree about whatextends basenames. That is also what made the round small: the only new idea is which offset.Design decision 2 — the offset is the last byte of the extends name span. For
pkg::basethe clause records two references (head and tail); the head names the package and the tail names the class, so the answer has to come from the tail. Takingname_span.end - 1lands inside the tail under every spelling, including thepkg :: baseone that class-semantics warns can glue its::. Takingname_span.startwould have answered the package for every qualified base — a wrong file, silently.Design decision 3 —
subtypesis a name walk, likecallers_of_each. The brief asked for the census to be modelled on it and it is: onesources()pass, a substring prefilter before any parse, and a deterministic sort at the end. The precision question it raises — shouldother_pkg::basecount as extendingbase? — was settled by measurement rather than taste: 0 of 270extendsclauses in the corpus are qualified (count per QA's reproducible grep — the work log's original 309 did not reproduce), so the precise version (resolve every candidate's base semantically and compare identities) would have bought nothing measurable for a large multiple of the cost and a second resolution path to keep honest. The asymmetry it leaves withsupertypesis documented and pinned rather than papered over.Design decision 4 — ambiguity is shown, not skipped.
hierarchy::outgoingskips an ambiguous target and says why: a call carriesfromRanges, so two items for one edge would double the edge. A supertype has no such payload — it is one item in a flat list, the same shapepreparereturns — so listing both candidate declarations tells the user the ambiguity exists instead of hiding it behind silence. Argued in Assumptions so the inconsistency with the neighbouring feature is on the record.The capability had to be hand-written.
ServerCapabilitiesinlsp-types0.97 has notype_hierarchy_providerfield (grepped the crate: the onlytype_hierarchyinlib.rsis the client capability at line 1453). Rather than fork the crate or abuseexperimental,initialize_valueinserts the key into the serialized object. It is three lines, it returnsResultrather than unwrapping, and it is pinned at both layers. Recorded here because it is the one place this feature is not simply "call the crate".Document::newfor a closed file. Items carry nodatapayload — they are re-derived per request, like the call hierarchy's — so a client is free to send back an item naming a file no editor has open, which is exactly what happens the moment a user expands a subtype and then asks it for its base.hierarchy::outgoingneeds only a parse there and re-parses;supertypesneeds a resolution, so it builds a fullDocument(parse + analyze + overlay) for that one file. Pinned bysupertypes_answer_for_a_file_no_editor_has_open, which walks base → subtype → base across an unopened file.Three one-line helpers restated rather than shared (
touches,span,key). Each is a statement of a convention this handler makes — a caret at the end of a name is on it; a range sorts by line then character — and the two handlers share no logic a common helper would keep honest. Said out loud in the source so the duplication reads as a choice.Files touched. New:
crates/lucisv_server/src/type_hierarchy.rs, this README. Edited:crates/lucisv_server/src/main.rs(one module declaration,initialize_value, one test),crates/lucisv_server/src/server.rs(three dispatch arms and their imports),crates/lucisv_server/tests/e2e.rs(one new test),docs/features/lucisv-server/README.md(capability table and work log),TODO.md(§9c).Not touched, deliberately:
hierarchy.rsandinstantiations.rs(the module hierarchy is untouched by the scope decision),vlog_semantic,vlog_parser,vlog_refactor,editors/,docs/site/. No version bump, no new dependency, no commits.Gates.
cargo fmt --all -- --checkclean;cargo clippy --all-targets --workspacezero warnings;cargo test --workspacegreen at 2 060 passed, 4 ignored, 0 failed (2 027 before; +33 = 31 intype_hierarchy.rs, 1 inmain.rs, 1 e2e round trip).cargo build --release -p lucisv_server && node editors/vscode/smoke.js target/release/lucisv-server:smoke: OK.
QA log
-
2026-08-26 (QA) — re-ran every gate, then attacked the seven surfaces the lead named plus three of my own. Verdict: committable as-is. Two findings filed, both non-blocking (documentation/completeness, not correctness or corruption); everything else verified clean. +12 tests added (11 in
type_hierarchy.rs, 1 inmain.rs); all green alongside the dev's +33. Full workspace total after this round: 2 072 passed, 4 ignored, 0 failed (2 060 before QA, +12 from this pass; confirmed on two full runs).Gates.
cargo fmt --all -- --check: clean (aftercargo fmt --allreformatted two lines in the tests I added — reflowing, not a substantive change; re-checked clean).cargo clippy --all-targets --workspace: zero warnings, before and after my additions.cargo test --workspace: 2 072 passed, 4 ignored, 0 failed, both before and after my +12 tests landed (2 060 → 2 072), 0 failed throughout.cargo build && node editors/vscode/smoke.js target/debug/lucisv-server:smoke: OK. Confirmedsmoke.jschecks a fixed capability list (documentFormattingProvider,definitionProvider,hoverProvider,semanticTokensProvider,documentHighlightProvider,inlineCompletionProvider—editors/vscode/smoke.js:140-145) that does not includetypeHierarchyProvider, matching the README's claim that this file was deliberately left untouched.
1.
initialize_value()JSON injection — verified clean, one test added.git diff 24e8eab -- crates/lucisv_server/src/main.rsshowscapabilities()andinitialize_result()are byte-for-byte unchanged; the only new code isinitialize_value()itself, which calls the sameserde_json::to_value(initialize_result())as before and then does exactly onecaps.insert(...). SinceServerCapabilitieshas notype_hierarchy_providerfield (confirmed by grep — the crate's onlytype_hierarchyhit is the client-side capability), the inserted key cannot collide with or overwrite an existing one — structurally, not just by test luck. Addedthe_json_insertion_disturbs_nothing_else_in_the_initialize_result(main.rs), which strips the one inserted key back out ofinitialize_value()'s output and asserts the remainder equalsserde_json::to_value(initialize_result())exactly — every key, every value, not just the two the dev's existing test spot-checked. Passes.to_valuefailing: propagated via?all the way out ofmain()(Result<(), Box<dyn Error + Sync + Send>>), nounwrap/expect— the process exits with an error rather than sending a malformed or partialinitializeresponse.serverInfoand other siblings: covered by the new test's full-object comparison. The e2e test decodescapabilities["typeHierarchyProvider"] == trueoff the real stdio wire (tests/e2e.rs,the_class_hierarchy_round_trips_over_the_wire_in_both_directions) — confirmed by reading it and by re-running it standalone.2. Last-byte offset — verified clean, 5 tests added. Read
parse_class_extends/parse_scoped_nameinvlog_parser:extendsis called with?fromparse_class, so every one of "empty target" (extends ;), "EOF right after the base name", and "pkg::with nothing after the::" fails the entireclassitem's parse (it becomesItemKind::Error) rather than producing aClassExtendswith an empty or truncatedname_span— the defensiveif extends.name_span.is_empty()guard attype_hierarchy.rs:156-158is therefore not reachable through any input the parser can produce today, but it costs nothing and is the right thing to keep given that guarantee lives in a different crate. Addedan_extends_clause_with_no_base_name_never_panics,an_extends_clause_at_eof_never_panics,a_qualified_base_with_nothing_after_the_double_colon_never_panics,a_single_character_base_name_resolves, andmultibyte_text_immediately_after_the_extends_name_does_not_shift_the_offset(the last puts a🎉 日本語block comment starting at the very next byte after the base name, sincename_spanis measured in bytes independent of what follows). All pass, none panic.TextRange::containsexcludesend(vlog_parser/src/span.rs), which is exactly why.end - 1rather than.endis needed to land on the tail reference ofpkg::base— confirmed by readinguse_scoped_unitinvlog_semantic/src/bind.rs, where the tail reference's span ends exactly atext.name_span.endand the head reference's ends earlier.3. The supertypes/subtypes asymmetry — pinned correctly, one gap in coverage found and closed.
a_qualified_base_is_not_claimed_by_the_bare_name_it_ends_withexercises exactly the shape asked for:pkg::basewritten by a real class, a file-scopebase,subtypes(base)empty. The README's "two consequences" prose also claims same-named classes in different files get the same subtype list (name-only match), but this was not previously pinned by a test — addedsubtypes_of_two_same_named_classes_in_different_files_share_one_list, which declaresbaseina.svandb.sv, hassubextend the bare name, and asserts bothbaseitems'subtypes()includesub. Passes, confirms the documented (not hidden) imprecision and gives it a regression test it didn't have.4. Ambiguous-base = two items — verified clean.
a_class_two_files_declare_prepares_both_rather_than_guessingalready distinguishes the two items by file name, which isuriunder the hood — no additional test needed for identity (uri+range differ, per spec equality).5. Census correctness — verified clean, two tests added, one real gap found.
- Substring prefilter vs. match step: added
a_file_containing_the_name_as_a_substring_but_no_matching_extends_is_not_a_false_positive— a file withclass database;andclass d extends database;alongsideclass base;;subtypes(base)is empty. Passes: the match step (extends_name(decl.class) != Some(item.name.as_str())) is a full string compare, so the prefilter's looseness never leaks through. - Self-extends / cycle: re-read the existing
a_self_extending_class_answers_one_hop_in_both_directions_without_duplicatinganda_two_class_cycle_terminates_in_both_directions— both correctly assert one item per hop, not a duplicate or a hang. Fine as written. - Finding (informational, non-blocking): generate-block classes are
invisible to this feature, and the README's given reason is not quite
right. The Assumptions section says "A generate block is not descended
into — no class lives there." Traced the parser:
parse_gen_blockdispatches through the sameitem_or_recover/parse_keyword_itempath ordinary module items use, soclass Foo; ... endclasswritten insidegenerate/if-generate/for-generate does parse into a realItemKind::Class(ClassDecl)node — it is just nested one level insideItemKind::GenerateRegion/GenIf/GenFor/GenCase, whichtype_hierarchy::collect()(lines ~262-274) does not recurse into. Confirmed empirically: addeda_class_declared_inside_a_generate_block_is_not_found_by_this_walk, which parses a module withgenerate if (1) begin class Foo; endclass end endgenerateand assertsprepareonFooanswersNonetoday. This does not corrupt anything and does not violate a hard invariant — it is a completeness gap for a construct that is legal per IEEE 1800 (package_or_generate_item_declarationincludesclass_declaration) but vanishingly rare in real UVM code (0 occurrences in the 860-file corpus). Recommend the dev correct the README's wording from "no class lives there" to something like "the walk does not descend intoGenerateRegion/GenIf/GenFor/GenCase, so a class declared inside one is not found — legal per the LRM, not observed in the corpus" — a one-line wording fix, not a redesign, so left for the dev/lead rather than changed here.
6. Corpus test honesty — mostly confirmed, one citation could not be reproduced. Ran
the_corpus_uvm_classes_answer_all_three_requeststwice: stable both times (860 files, 30 classes incore_ibex_test_lib.sv, 30 with an indexed base,core_ibex_base_testhas 10 subtypes;subtypes99.7 ms / 100.9 ms on the two runs,supertypes3.3 ms both — both inside the stated debug-build budget, and roughly matching the dev's own "101 ms" debug figure). The 860-file count reproduces exactly via an independentfind corpus -name '*.sv' -o -name '*.svh' -o -name '*.v' -o -name '*.vh'. The "0 of 309extendsclauses are qualified" claim: the "0 qualified" half reproduces — a plaingrep -c '::'over everyextendsoccurrence in the corpus returns 0, confirming the safety-relevant part of the claim. The 309 denominator did not: an independentgrep -ohE '\bextends\b'count over the same file set returns 270, not 309 (checked for multi-lineextendsclauses and backtick-macro bases as possible explanations for undercounting — found zero of either, so that gap is not explained). No script computing "309" is checked intotools/. This does not change any correctness verdict (the load-bearing claim, zero qualified, holds under both my recount and the existinga_qualified_base_is_not_claimed_by_the_bare_name_it_ends_withunit test), but the specific number in two README passages (docs/features/type-hierarchy/README.md:80,298anddocs/features/lucisv-server/README.md:49) is currently uncited and unreproducible — flagging for the dev to either recheck the corpus snapshot they measured against or drop the precise figure in favor of "a small double-digit number, all unqualified."7. CLAUDE.md compliance — verified clean.
grep -n "unwrap()\|expect(\|panic!" crates/lucisv_server/src/type_hierarchy.rsshows every hit inside#[cfg(test)] mod tests(line ≥ 326 in the post-QA file); none inprepare/supertypes/subtypesor their helpers. Same check onmain.rs'sinitialize_value— clean, uses?. Public items (prepare,supertypes,subtypes) all carry doc comments. README sections (Goal,Assumptions,Handshakes,Status / TODO,Work log,QA log,Review) each appear exactly once.TODO.md's §9c item text is intact — checkbox flipped[ ]→[x], original sentence unchanged, a→ delivered …paragraph appended after it rather than replacing anything.Beyond the list.
- Deep chain: added
a_ten_deep_chain_answers_each_hop_without_recursing(c0 extends c1 extends … extends c9, 10 files) — walks all nine hops ofsupertypes, one call at a time, asserting each answers exactly the next link and the chain terminates. No recursion in the implementation (each call isO(1)hops by construction), and the test's own structure never recurses either. Passes. prepareon theextendskeyword itself: addedprepare_on_the_extends_keyword_itself_prepares_nothing— offset inside the literal wordextends(not the name after it) answersNone. Passes, because the keyword is outside every reference spandefinition_of/reference_atwould match.- Class name shadowed by a local variable: added
a_class_name_shadowed_by_a_local_variable_prepares_the_variable_use_as_nothing— a classbase, a method-localint base;, and a usebase = base + 1;;prepareat that use answersNonebecausedefinition_ofresolves it to the local variable'sSymbol(kindVar, notClass), andclasses_atcheckssymbol.kind != SemanticKind::Classbefore ever looking at the name. Passes — confirms the feature keys off semantic kind, not name matching, exactly as claimed.
Files touched (QA only).
crates/lucisv_server/src/type_hierarchy.rs(+11 tests),crates/lucisv_server/src/main.rs(+1 test). No production code changed — every finding above is either a passing defensive check, a documentation wording gap, or an unreproducible citation, none of which rose to "small unambiguous fix" territory in the sense of a code change; the README wording fix is left for the dev per the workflow (don't touch files outside the stated scope of a fix that isn't mine to make).
Review
2026-08-26 — lead
Reviewed the diff, the work log and the QA log; re-ran all gates myself (2072 workspace tests, 0 failed), clean. The round's hard problem was handled the right way twice over. First, the lsp-types gap: injecting the one missing key into the serialized initialize result is the honest minimal answer, and QA's strip-and-compare test — remove the inserted key, assert full object equality with the plain serialization — turns "disturbs nothing else" from a claim into a property. Second, the last-byte offset for qualified bases: the design reasoning was good and QA's parser trace showed the degenerate spans it guards against cannot even be constructed, which is the best kind of defensive code.
The supertypes/subtypes asymmetry is accepted as designed and now pinned from both directions, including the same-name/different-file consequence QA added a regression test for. Both QA findings were accepted and fixed by the lead before commit: the extends-clause denominator corrected to QA's reproducible 270 (in both READMEs), and the generate-block justification rewritten to what the parser actually does — the walk not recursing is a scoped choice with a pinning test, not a fact about where classes can live. The inheritance-edge-table want is filed beside the instantiation-edge request, correctly, as one future index round. Interface classes stay blocked on the parser and are pinned. Accepted as shipped.