An instance-oriented hierarchy view in the Activity Bar —
lucisv/moduleHierarchy snapshots (schema 2: uri table, flat ranges,
derived ids; 11.6 MB -> 2.3 MB on opentitan) plus
lucisv/moduleHierarchyChanged invalidation, gated on the extension's
initializationOptions. Format 5 carries decl spans, instance
occurrences and client positions for file-scope declarations
(+1.7-1.9 % store), so a snapshot reads no files at all: handler
145-167 -> 17-20 ms settled, a save with the sidebar open 366 ->
141 ms. complete is !scanning && !must_wait, pinned. Owner UI rounds:
no hover preview, all levels collapsed by default with stable ids
across refreshes, and search over a resident flat model (freeze
diagnosed: materialized expanded tree x undebounced double
fuzzyScore x whole-tree clone per keystroke) — prebuilt lowercased
index, bitmask prefilter, top-K counting, 200-row cap with an honest
remainder, single-digit ms over a 120k-entry fixture.
LineIndex::utf16_position unifies the index's and the wire's position
math under a cross-crate agreement test.
Implementation: codex. Integration fixes + owner items: Opus dev.
QA: lead (measurement pass) + Sonnet (SHIP, independent oracles).
Co-Authored-By: Claude Fable 5 <[email protected]>
The owner's first-level cache, realized on the carrier the index
already had: DeclLines (name line + detail line) on every Decl/Def,
computed at index time from the LineIndex the analysis already holds —
tens of KB for 20k modules, FACTS_FORMAT 3->4, old stores discarded
whole. A closed file's hover heading now costs zero I/O (it survives
the file being deleted), and the snippet's one remaining read is
served from a bounded FileView LRU (4 entries / 8 MiB, newest kept,
dropped on set_document/close/update_one/rebuild): repeat hovers into
a 12 MB file go 5.8 ms -> ~1 us, cross-file hover means 40/157 us ->
4.7/12.9 us. Ports ride the same member entries, so their lines came
free. Stale-disk edits leave heading and snippet stale together, the
spells_exactly guard still omits rather than lies, and QA pinned the
pair. Measured and filed, not fixed here: the first request of a
session waits 287-780 ms behind the startup scan (handshake for the
next round).
Co-Authored-By: Claude Fable 5 <[email protected]>
textDocument/references now reads declaration-to-occurrence postings
merged in WorkspaceIndex from compact per-file reference facts, with
open buffers overlaying live semantics — 0.062 ms/request over 820
files vs 21.7 ms for the old Workspace::sources() walk (~350x). The
walk stays as rename's engine and the equivalence oracle in tests.
FACTS_FORMAT 1->2 discards v1 caches whole. Cursor lookups
(symbol_at/reference_at/token_at) and macro-define lookup move to
binary-searched sorted tables; include definition inspects only the
cursor's line. Ambiguity refusals preserved throughout.
External dev: codex. Lead-reviewed, gates re-run, probe reproduced.
Co-Authored-By: Claude Fable 5 <[email protected]>
Owner-requested round. WorkspaceIndex::update_file/remove_file replace
one file's contribution without reading or parsing anything else;
Server::reindex_one takes the fast path for a didSave of one held file
or a one-file watcher event (33 ms vs 1.5 s on the corpus, 45x), with
everything else — settings, scope, filelist, multi-file events —
keeping the full rebuild, pinned by a trigger-table test. FileIds stay
sorted positions by deliberate deviation: renumbering through the one
merge both finish and update_file end in makes build(W) byte-identical
to build(W minus F).update_file(F) — fingerprint equality, attacked by
QA across long interleaved sequences, disambiguation flips, define
shadowing and the ghost hunt (the affected-keys union reads old and
new records both). The per-file FileFacts the index retains are the
documented memory cost (~1.4 MB on the corpus).
The two oldest filed Handshakes land: instantiation and inheritance
edge tables, built by the byte-for-byte moved census walks, turn
codeLens counts (92 ms to 0.26 ms), incomingCalls and typeHierarchy
subtypes into lookups — census policies pinned unchanged at both the
consumers and now the source. Counts are as of the index, not of
unsaved keystrokes: the freshness delta is documented and pinned from
both sides. Saves no longer raise a progress bar; generation and lens
refresh still ride. Round 18's three inherited scope obligations are
pinned permanent.
36 tests added (dev 27 + QA 9). Left open, filed: wholesale republish,
Candidates re-derivation cost, incremental removal vs include
re-resolution.
docs/features/incremental-index/README.md
Co-Authored-By: Claude Fable 5 <[email protected]>
Delivers the Handshake docs/features/type-definition/README.md filed:
an unqualified lexical miss written where a TYPE goes — bus_if bus;,
my_cls h;, a cross-file typedef — now carries its bare name to the
workspace overlay (last, so imports still win), in both spellings:
ExternalCandidate, and InheritedCandidate inside extending classes,
whose base and count (7,841, bit-identical) are untouched. The
mechanism is a new Target::Type emitted only by bind_data_type's
unqualified arm; value-position identifiers, disable labels and
redeclarations keep their pre-round Target::Lexical behavior — NotFound
stays NotFound, and rename keeps refusing them.
That value/type split is the round's story: QA rejected the first cut
with a kept repro proving a value-position typo could rename an
unrelated same-named module cross-file (write-by-coincidence,
pre-round refused), and disproved the work log's exposure claim
against the pre-round source. The fix is a four-line behavior delta;
QA re-killed the regression from three angles and reproduced every
corpus figure to the digit. Result over the 860-file corpus: NotFound
1,418 -> 1,256, 418 clean-file references gained a jump target, none
lost one, 141 coincidence-answers deliberately given back.
The server's stopgap is deleted whole: type_def.rs::indexed_type,
qualifier guard included — all 45 type-definition tests green
unchanged, and cross-file interface rename from a type window is newly
possible and pinned. Corpus formatter results byte-identical (813/820
both trees). New docs/features/overlay-promotion/README.md; the
vlog-semantic and workspace-index tables re-measured (the committed
baselines had gone stale several rounds ago; both READMEs now carry
the three-state table).
Co-Authored-By: Claude Fable 5 <[email protected]>
workspace-index (vlog_semantic): cross-file resolution -- the
owner's `import pkg::*;`-anywhere requirement delivered.
WorkspaceIndex maps modules/packages/file-scope typedefs, package
exports, module ports/params and per-file define tables; built
tolerantly (broken files still contribute), deterministic by
construction (FileIds assigned after path sort). resolve_external
answers ExternalCandidates in a two-layer overlay keyed by
ReferenceId -- Semantics stays a pure single-file fact; local
declarations outrank imports. Corpus: 87% of external candidates
answered (external rate 19.6% -> 2.6% on clean files), ambiguity
kept honest (OpenTitan prim_generic/prim_xilinx), 0.7s build,
workspace_symbols substring search.
name-spans (vlog_parser): the approved vlog-semantic handshake --
the parser records every declared name's span at parse time (28
fields across 21 node kinds; Name/ImportPath bundles where parallel
Vecs could desync; ImportPath splits p::x for the index). Content-
pinned by the exhaustive walker on every source, mutation-tested
three ways, zero behavior change (corpus md5 exact, QA byte-compared
formatter output against a HEAD worktree). scan.rs is now one
consumer away from deletion (DataType span, handshake item 2).
TODO §6 foundations complete: spans, error recovery, define table,
single-file semantics, workspace index. Next: vfmt_server.
Dev: 2 Opus agents; QA: 2 Sonnet agents; reviews in
docs/features/{workspace-index,name-spans}/README.md.
Co-Authored-By: Claude Fable 5 <[email protected]>