Round 2: unified index lifecycle, tombstones, symlinks, and large-file invariant (#48-#51, #63)

This commit is contained in:
Guoliang Chen committed 2026-11-26 11:14:26 -08:00
1 parent 8f5a4fb236
commit 4d384ec89d
39 files changed
+4709 -387

No files matched your search

+174
View File
@@ -0,0 +1,174 @@
<!-- Author: Guoliang Chen, a Senior Digital Design Engineer -->
# Index Lifecycle & Fast Tombstone Removal (Round 2)
## Goal
Close four index/buffer lifecycle and symlink bugs identified in `docs/topo.md` (`#49`, `#63`, `#50`, `#51`):
1. **Topo #49 (`vlog_semantic` fast tombstone removal + `lucisv_server` `didClose`)**:
- Keep `FileId` slots stable across `WorkspaceIndex::remove_file` via a parallel `tombstoned: Vec<bool>` mask and localized `replace_facts(at, empty_facts(path))` instead of shifting `FileId`s and running a full `merge()`.
- Compact tombstones on `merge()` / `absorb()`, revive tombstoned slots cleanly on `update_facts`, hide tombstones from all public queries (`files`, `file_id`, `path`, `defines`, `facts_for`, `files_spelling`, `files_mentioning`, `files_naming_in_macros`, `counts`, `table_sizes`), and remap dense IDs inside `fingerprint()` so a tombstoned index matches a fresh `WorkspaceIndex::build` byte-for-byte.
- Reconcile `didClose` in `lucisv_server` (`notification.rs` / `state/incremental.rs`): remove closed excluded/unlisted buffers via the fast tombstoned `remove_one` path (using `set_file_words` + `refresh_names` to keep removal sub-millisecond), and re-index dirty/unsaved closed in-scope buffers from disk via localized `replace_facts` (or remove if missing on disk).
2. **Topo #63 (Owner decision 2: always keep disk index record for `doc.large`)**:
- Standardize on always keeping the on-disk index record (subject to `lucisv.index.maxFileSize`) for open `doc.large` buffers across open, close, save, `largeFile.threshold` flips, widen, and whole scans (`state/discover.rs`, `state/rescan.rs`, `state/buffers.rs`, `state/incremental.rs`), achieving zero index mutation on `didOpen`, `didClose`, and `largeFile.threshold` flips.
3. **Topo #50 (Unheld buffers opened mid-scan)**:
- Reconcile buffers opened mid-scan (`state/rescan.rs`, `state/scan.rs`, `server/index.rs`) so excluded, unlisted, or unsaved-edited non-large buffers opened while a scan is in flight are absorbed into the running scan equivalently to being opened before the scan started.
4. **Topo #51 (Symlinked files — one file, one canonical spelling)**:
- Deduplicate and resolve file identity via `(dev, ino)` on Unix / `fs::canonicalize` fallback on non-Unix without basename-equality gating across discovery walks, `overlay_buffers`, `begin_widen`, `state/buffers.rs`, `state/incremental.rs`, and `state/watched.rs`, enforcing one deterministic canonical spelling in the index regardless of which symlink is open.
## Assumptions
- `WorkspaceIndex::files()` keeps returning `&[PathBuf]` containing only live files in path order so existing slice callers remain source- and ABI-compatible.
- Within a scope, canonical symlink spelling precedence follows deterministic path-sorted discovery order (the lexicographically smallest in-scope spelling for a given file identity), matching existing directory-symlink precedence and preserving symlinked workspace roots.
- During non-interleaved small scans (`scan.total() <= INTERLEAVE_ABOVE && !scan.discovery_pending()`), notifications remain queued until after `scan_once()` finishes, consistent with `server/index.rs`.
## Handshakes
- **Dense `FileId(i)` callers closed (`vlog_semantic`, `lucisv_server`, `lucisv_mcp`)**:
- After tombstoned `WorkspaceIndex::remove_file`, `index.files()` shrinks while remaining live files retain their pre-tombstone `FileId`s until the next full `merge()` or `absorb()`.
- Added `WorkspaceIndex::live_files(&self) -> impl Iterator<Item = (FileId, &PathBuf)> + '_` (`crates/vlog_semantic/src/workspace/index.rs`) yielding only live `(FileId, &PathBuf)` pairs.
- Updated `crates/lucisv_server/src/state/sources.rs` (`want_macro_text`), `crates/lucisv_server/src/candidates.rs` (`macros_of`, used by `from_words`, `remove_file`, `absorb`, and `update_words`), `crates/lucisv_mcp/src/tools/names.rs` (`similar`), `crates/lucisv_mcp/src/tools/diagnostics.rs` (`Census::of`), and `crates/lucisv_server/src/state/tests/reindex_perf.rs` to iterate `index.live_files()` instead of `0..index.files().len()` / `.enumerate()`.
- **Symlinked open-buffer identity lookup wired across server handlers**:
- `Workspace` (`crates/lucisv_server/src/state/mod.rs`, `state/buffers.rs`) exposes `index_file_id`, `held_path_for`, `index_path_for`, `is_same_file`, `open_document_for_path`, and `document_for_path`, matching exact path first and falling back to `(dev, ino)` / canonical path while preserving ASCII case-mismatch separation (`case_only_mismatch`).
- Wired into `crates/lucisv_server/src/nav.rs`, `crates/lucisv_server/src/lint.rs` (`own` in `IndexMentions` and canonical `LintContext` path for `module-filename` / `package-filename` / config discovery), `crates/lucisv_server/src/state/sources.rs`, `crates/lucisv_server/src/ports.rs`, `crates/lucisv_server/src/rename.rs`, `crates/lucisv_server/src/extract.rs`, `crates/lucisv_server/src/inline_module.rs`, `crates/lucisv_server/src/imports.rs`, `crates/lucisv_server/src/completion/related.rs`, `crates/lucisv_server/src/hierarchy/calls.rs`, `crates/lucisv_server/src/includes.rs` (`resolve_for_doc`, `reachable_from`), and `crates/lucisv_server/src/hover.rs` (`narrowed_to_the_include_graph`).
- **Active-scan absorbed buffer tracking (`Workspace` -> `didClose`)**:
- `Workspace` (`crates/lucisv_server/src/state/mod.rs`) maintains `ScanAbsorbed` (canonical/open paths plus `DirId -> PathBuf` with `case_only_mismatch` guard), cleared on `begin_scan` and `finish_scan` (`state/rescan.rs`), and populated whenever open-buffer text/facts are absorbed in `begin_scan`, `scan_step`, or `reconcile_open_buffers_into` (`state/reconcile.rs`, covering `pos >= scan.at`, `pos < scan.at` staged updates, and `pos == None` excluded/unlisted/oversize entries).
- `Workspace::closing_affects_running_scan` (`state/incremental.rs`) consults `scan_absorbed` alongside out-of-scope and disk-mismatch checks without changing `server/mod.rs` or `server/index.rs` signatures.
- **`IncludeGraph::remove_file` linear rebuild outside owned files**:
- `IncludeGraph::remove_file` (`crates/lucisv_server/src/includes.rs:284`) calls `relearn(known)` across all live paths and lowercase folded strings on each removal. That rebuild dominates excluded-file `didClose` latency on a 4k-file index (~2.49 ms/removal in release, ~10.19 ms in debug) while `WorkspaceIndex::remove_file` itself is tombstoned and constant-slot (in-scope clean open+close cycles average ~88.9 µs in release / ~134.7 µs in debug on a 2k-file index). Left untouched per lane file ownership for a follow-up incremental `IncludeGraph` update.
## Status / TODO
- [x] Topo #49: Fast tombstoned `WorkspaceIndex::remove_file` and `didClose` index reconciliation + 4k/2,000-cycle perf test
- [x] Topo #63: Always keep disk index record for `doc.large` + differential tests
- [x] Topo #50: Reconcile unheld/unsaved buffers opened mid-scan + regression tests
- [x] Topo #51: Canonicalize symlinked file identities without basename gating across discovery, widen, buffers, incremental, watched + all 6 `filelink` scenario tests
- [x] QA Fix Pass (F1–F5): `WorkspaceIndex::live_files` + `0..files().len()` audit across `lucisv_server`/`lucisv_mcp`, non-canonical symlink handler wiring, mid-scan/widen oversize symlink canonicalization, and `largeFile.threshold` drop disk reconciliation
- [x] R2 Closing Pass (R2-F2 & R2-F3): Symlink-aware `` `include `` resolution / macro hover narrowing (`includes.rs`, `hover.rs`) and `Workspace::scan_absorbed` tracking across `begin_scan` / `scan_step` / `reconcile_open_buffers_into` / `closing_affects_running_scan` (`state/{mod.rs,rescan.rs,reconcile.rs,incremental.rs}`)
## Work log
- **Topo #49 (`vlog_semantic` + `lucisv_server`)**: Added `tombstoned: Vec<bool>` to `WorkspaceIndex` (`crates/vlog_semantic/src/workspace/{mod.rs,index.rs,update.rs}`) so `remove_file` clears the slot via `replace_facts(at, empty_facts(path))` without shifting `FileId`s or running full `merge()`, revives tombstones on `update_facts`, compacts on `merge()`/`absorb()`, hides tombstones from queries/counts, and monotonically remaps `FileId`s in `fingerprint()` to match a fresh build. Wired `DidCloseTextDocument` in `crates/lucisv_server/src/server/notification.rs` and `close_and_reconcile` / `remove_one` in `crates/lucisv_server/src/state/incremental.rs` so closed excluded/missing buffers are removed via fast tombstones and dirty/unsaved in-scope buffers revert from disk.
- **Topo #63 (`lucisv_server`)**: Standardized on Owner decision 2 (keeping on-disk index records subject to `maxFileSize` for open `doc.large` buffers) across `state/{buffers.rs,discover.rs,rescan.rs,incremental.rs}` and updated `state/tests/{large_file.rs,open_buffers.rs,widen.rs}` + `server/large_file.rs` comment.
- **Topo #50 (`lucisv_server`)**: Added `reconcile_open_buffers_into` in `state/rescan.rs` (invoked from `open_next`) so unheld or unsaved-edited buffers opened mid-scan are absorbed into the finished index consistently with pre-scan opens.
- **Topo #51 (`lucisv_server`)**: Replaced basename-gated symlink aliasing with `(dev, ino)` / canonical-path deduplication (`dedup_by_identity`) and deterministic canonical precedence across `state/{mod.rs,buffers.rs,discover.rs,scan.rs,rescan.rs,watched.rs,incremental.rs}`.
- **Tests**: Added 9 server lifecycle integration tests in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs` (including all 6 same-name/different-name symlink scenarios, `doc.large` differential checks, mid-scan opens, and 2,000-cycle `didClose` / open+close timings) alongside new `WorkspaceIndex` tombstone/perf tests in `crates/vlog_semantic/tests/workspace.rs`.
- **2026-11-26 QA Fix Pass (F1–F5)**:
- **F1**: Added `WorkspaceIndex::live_files()` (`crates/vlog_semantic/src/workspace/index.rs`) and replaced `0..index.files().len()` / `.enumerate()` `FileId` indexing across `state/sources.rs` (`want_macro_text`), `candidates.rs` (`macros_of`), `lucisv_mcp/src/tools/names.rs` (`similar`), `lucisv_mcp/src/tools/diagnostics.rs` (`Census::of`), and `state/tests/reindex_perf.rs`. Added MCP unit tests for tombstoned slot 0 in `names.rs` and `diagnostics.rs` and un-ignored both F1 tests in `lifecycle_r2.rs` (extending `Candidates::remove_file` coverage).
- **F2**: Added `Workspace::index_path_for` / `Workspace::is_same_file` (`state/mod.rs`) and `Workspace::open_document_for_path` (`state/buffers.rs`) while preserving `case_only_mismatch` separation in `index_file_id` and open-buffer lookup; wired across `nav.rs`, `lint.rs` (`own` and canonical `LintContext` path), `state/sources.rs`, `ports.rs`, `rename.rs`, `extract.rs`, `inline_module.rs`, `imports.rs`, `completion/related.rs`, and `hierarchy/calls.rs`. Un-ignored `qa_topo_51_non_canonical_symlink_open_buffer_breaks_references_lint_and_rename`.
- **F3 & F4**: Extracted `crates/lucisv_server/src/state/reconcile.rs` (keeping `state/rescan.rs` well under 600 production lines), carried in-scope `canonical_ids` across `oversize` skips on `Sources` / `Scan` (`state/{scan.rs,discover.rs,reconcile.rs}`) so mid-scan non-canonical symlinks over `maxFileSize` canonicalize identically to pre-scan, and updated `begin_widen` (`state/rescan.rs`) so open non-large buffers promote to lexicographically earlier symlinks even when over `maxFileSize`. Un-ignored both F3 and F4 tests in `lifecycle_r2.rs`.
- **F5**: Added `Workspace::reconcile_large_buffer` (`state/reconcile.rs`) and wired `Server::reclassify_large_buffers` (`server/large_file.rs`, `server/notification.rs`) so buffers flipping `large == false -> true` reconcile back to disk (or drop if outside scope/oversize/missing) when dirty/previously indexed unsaved edits exist, while doing zero index work for clean buffers whose disk record matches. Un-ignored `qa_topo_63_threshold_drop_after_unsaved_edit_indexed_via_widen_diverges_from_fresh`.
- **2026-11-26 Closing Pass (R2-F3 Option B)**:
- **R2-F3**: Added `ScanAbsorbed` (`paths: HashSet<PathBuf>`, `ids: HashMap<DirId, PathBuf>` with `case_only_mismatch` guard) on `Workspace` (`crates/lucisv_server/src/state/mod.rs`), cleared in `begin_scan` and `finish_scan` (`state/rescan.rs`), and recorded whenever open-buffer text/facts enter the running scan (`begin_scan` overlays, `scan_step` pops from `buffered`/`analyzed`, and `reconcile_open_buffers_into` across `pos >= scan.at`, `pos < scan.at` staged updates, and `pos == None` excluded/unlisted/oversize entries in `state/reconcile.rs`). Updated `Workspace::closing_affects_running_scan` (`state/incremental.rs`) to return `true` when `scan_absorbed` matches (including aliases before mid-scan publish and buffers flipped to `doc.large` with no surviving alias), keeping `server/mod.rs` and `server/index.rs` untouched. Un-ignored `qa_r2_f3_mid_scan_dirty_open_reverted_and_closed_leaves_stale_index` and added `r2_f3_mid_scan_dirty_reverted_and_closed_converges_across_all_scan_phases` in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs`.
- **2026-11-26 Plan Review Surgical Fix (R2-F2b, R2-F3a, R2-F3b)**:
- **R2-F2b**: Normalized `includes::resolve_for_doc` (`crates/lucisv_server/src/includes.rs`) output through `ws.index_path_for(&found)` so symlinked-directory includes resolve to canonical indexed paths.
- **R2-F3a & R2-F3b**: Simplified `Workspace::closing_affects_running_scan` (`crates/lucisv_server/src/state/incremental.rs`) to return `true` whenever `self.scan_absorbed.contains(path, &target) || self.has_other_document_for(uri, path)`, covering both `already_same` skipped secondary symlinks and `doc.large`-flipped absorbed symlinks closed mid-scan while a second alias remains open. Un-ignored all three `qa_r2_*` repro tests in `lifecycle_r2.rs`.
## QA log
- **Verdict**: `FAIL` (5 concrete findings blocking acceptance: F1–F2 handshake regressions/breakages across `lucisv_server` and `lucisv_mcp`, F3–F4 `#51`/`#50` oversize symlink canonicalization gaps in `state/rescan.rs`, F5 `#63` threshold-drop stale unsaved index in `server/large_file.rs`).
### Audit & Hygiene
- **Production line counts & safety** (verified on all 12 modified production files before `mod tests`): `crates/lucisv_server/src/server/large_file.rs` (110), `server/notification.rs` (287), `state/buffers.rs` (110), `state/discover.rs` (487), `state/incremental.rs` (221), `state/mod.rs` (104), `state/rescan.rs` (590), `state/scan.rs` (137), `state/watched.rs` (123), `crates/vlog_semantic/src/workspace/index.rs` (351), `workspace/mod.rs` (167), `workspace/update.rs` (380) — all `<= 600` non-blank, non-comment lines with 0 `unwrap()`, `expect()`, `unsafe`, `panic!`, or `#[allow` in modified production code.
- **Author stamp**: `python3 tools/stamp_author.py --check` exited `0` (`would stamp 0 files; left 249 untouched`).
### Findings
- **Finding F1 — `#49` Handshake Drift: callers iterating `0..index.files().len()` misalign/skip live `FileId`s after tombstone removal**
- `crates/lucisv_server/src/state/sources.rs:338` (`want_macro_text`): Closing an excluded file (`ignored/a_excl.sv`, `FileId(0)`) shrinks `index.files().len()` to `2` while `z_mac.sv` remains at `FileId(2)`. `want_macro_text` skips `FileId(2)`, omitting `z_mac.sv` from `rename_traced` macro-text checks and causing divergent macro warnings vs a fresh server. Reproduced in `qa_topo_49_tombstone_before_live_macro_breaks_rename_macro_text_fanout` (`#[ignore]` in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs`).
- `crates/lucisv_server/src/candidates.rs:837` (`macros_of` via `Candidates::from_words` / `Candidates::remove_file`): With `a_excl.sv` tombstoned (`files().len() == 1`, `z_mac.sv` at `FileId(1)`), `macros_of` returns `[]` instead of `["LIVE_MAC"]`. Reproduced in `qa_topo_49_candidates_macros_of_breaks_when_tombstone_precedes_live_macro_file` (`#[ignore]` in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs`).
- `crates/lucisv_mcp/src/tools/names.rs:191-192` (`similar`) and `crates/lucisv_mcp/src/tools/diagnostics.rs:267-269` (`Census::of`): Same `0..index.files().len()` / `enumerate()`-to-`FileId` assumption skips `FileId(1)` defines (`[]` vs `["LIVE_MAC"]`) and assigns shifted `FileId(0)` inside `Census::of` against `own = Some(FileId(1))` (making `Census::outside` falsely return `true`). Verified via transient unit tests on tombstoned `WorkspaceIndex` and reverted cleanly from `crates/lucisv_mcp`; note `lucisv_mcp`'s `Project::refresh` (`crates/lucisv_mcp/src/project/mod.rs:175`) currently updates `self.index` only through `absorb(...)` (which compacts tombstones), so `lucisv_mcp` hits this only via direct `WorkspaceIndex::remove_file` callers.
- **Finding F2 — `#51` Handshake Drift: non-canonical symlink open buffer fails references, lint, and rename**
- When `a_link/link_a.sv -> z_real/real_b.sv` is canonically indexed as `a_link/link_a.sv` and the client opens `z_real/real_b.sv`, callers matching `doc.path` verbatim instead of `Workspace::index_file_id` / `Workspace::held_path_for` / `Workspace::document_for_path` break live LSP operations. Reproduced in `qa_topo_51_non_canonical_symlink_open_buffer_breaks_references_lint_and_rename` (`#[ignore]` in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs`):
- `textDocument/references` (`crates/lucisv_server/src/nav.rs:232,295`) returns `1` ref instead of `2` (cross-file reference in `tb/tb.sv` dropped).
- Diagnostics (`crates/lucisv_server/src/lint.rs:244`) pass `own = None` to `IndexMentions`, so `mentioned_outside("dead_sig", None)` sees `dead_sig` in canonical `a_link/link_a.sv` and suppresses `unused-signal` (and `module-filename` checks against `real_b.sv` rather than `link_a.sv`).
- `rename_traced` (`crates/lucisv_server/src/state/sources.rs:206`) overlays `z_real/real_b.sv` over indexed `a_link/link_a.sv` and refuses both from `z_real/real_b.sv` and from `tb/tb.sv` with ``Err("`dut` is declared in more than one indexed file; lucisv will not guess which declaration this rename means.")`` (and `crates/lucisv_server/src/ports.rs:555` `encode_edit` similarly checks `doc.path.as_deref() == Some(path)`).
- **Finding F3 — `#50` + `#51`: mid-scan non-canonical symlink over `maxFileSize` diverges from pre-scan open**
- `crates/lucisv_server/src/state/rescan.rs:518-524` (`reconcile_open_buffers_into`): When both `z_real/dut.sv` and `a_link/dut.sv -> z_real/dut.sv` exceed `maxFileSize` (remaining `<= largeFile.threshold`), `a_link/dut.sv` is excluded by `oversize` and absent from `scan.work`. Opening `z_real/dut.sv` mid-scan gets `pos = None` and indexes non-canonical `z_real/dut.sv` instead of canonical `a_link/dut.sv` (unlike pre-scan `overlay_buffers`). Reproduced in `qa_topo_50_mid_scan_non_canonical_symlink_over_max_file_size_matches_pre_scan` (`#[ignore]` in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs`).
- **Finding F4 — `#51`: widening into lexical-earlier symlink over `maxFileSize` fails to promote canonical spelling**
- `crates/lucisv_server/src/state/rescan.rs:167` (`begin_widen`): When `z_real/real.sv` (`> maxFileSize`, `<= largeFile.threshold`) is open in folder scope and widening into `a_link/` discovers `a_link/alias.sv -> z_real/real.sv`, `if path < existing && oversize(...).is_none()` blocks promoting to `a_link/alias.sv`, leaving `z_real/real.sv` in `index.files()` instead of `a_link/alias.sv` as a fresh server does. Reproduced in `qa_topo_51_widen_symlink_over_max_file_size_converges_like_fresh` (`#[ignore]` in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs`).
- **Finding F5 — `#63`: threshold drop after unsaved edit indexed via widen leaves stale unsaved index**
- `crates/lucisv_server/src/server/large_file.rs:179-199` (`reclassify_large_buffers`): When an unsaved edited in-scope buffer is indexed while `doc.large == false` (e.g. via widen) and `didChangeConfiguration` drops `lucisv.largeFile.threshold` so `doc.large` flips `true`, `reclassify_large_buffers` does not restore the on-disk record into the workspace index (stale unsaved buffer remains indexed while `doc.large == true` until next save/widen/close). Reproduced in `qa_topo_63_threshold_drop_after_unsaved_edit_indexed_via_widen_diverges_from_fresh` (`#[ignore]` in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs`).
### Live OpenTitan Probe & Passing QA Coverage
- **OpenTitan `/Users/lucio/repo/opentitan/hw` (`#63`, read-only)**: Probed `/Users/lucio/repo/lucisv/target/release/lucisv-server` (`persist: false`, scratch env, `largeFile.threshold = 50000`) on `hw/ip/aes/rtl/aes_reg_top.sv` (`55,523 B`) and `hw/ip/aes/rtl/aes.sv` (`13,993 B`) across pre-scan open, post-scan open, threshold flips (`20000`, `10000` vs fresh `10000`, `500000`, `50000`), `didClose`, and folder-scope widen into `hw/ip/aes/rtl`. Settled `workspace/symbol`, `definition`, `references`, `codeLens`, and `lucisv/moduleHierarchy` matched fresh server answers 100% (`hier_files=1577, refs=2, syms=1` in workspace scope); `git -C /Users/lucio/repo/opentitan status --porcelain` stayed clean.
- **Un-ignored QA checks passing**: `qa_tombstones_survive_mixed_remove_add_revive_absorb_and_all_queries_match_fresh` (`crates/vlog_semantic/tests/workspace.rs`) plus `qa_topo_49_tombstone_at_zero_and_middle_navigation_symbols_hierarchy_codelens_diagnostics_completion`, `qa_topo_63_all_paths_and_threshold_drop_after_unsaved_edit`, `qa_topo_50_first_scope_passed_unreached_and_mid_scan_close`, and `qa_topo_51_same_name_nested_both_open_dirty_close_and_filelist_close` (`crates/lucisv_server/src/server/tests/lifecycle_r2.rs`).
### Final Gates (after last edit)
- `python3 tools/stamp_author.py --check` -> exit `0` (`would stamp 0 files; left 249 untouched`)
- `cargo fmt -p vlog_semantic -p lucisv_server -- --check` -> exit `0`
- `./tools/guard.sh -m 6 -t 600 -- cargo clippy --workspace --all-targets -- -D warnings` -> exit `0`
- `./tools/guard.sh -m 6 -t 600 -- cargo test -p vlog_semantic -p lucisv_server -p vlog_refactor -p lucisv_mcp -p vlog_linter --all-targets` -> exit `0` (`lucisv_server` unit: `2061 passed; 0 failed; 53 ignored` [includes 6 QA finding reproductions], `e2e`: `106 passed; 3 ignored`, `grammar`: `3 passed`, `ifdef_folding`: `1 passed`, `opentitan_references`: `0 passed; 2 ignored`; `vlog_semantic` `workspace`: `92 passed; 2 ignored` + remaining 19 binaries `0 failed`; `vlog_linter`: `658` unit + `14` `lint_cases` passed; `vlog_refactor`: all 20 binaries `0 failed`; `lucisv_mcp`: all 16 binaries `0 failed`).
### 2026-11-26 Round 2 Re-Verification (after DEV F1–F5 Fix Pass)
- **Verdict**: `FAIL` (F1, F4, F5, and core F2/F3 scenarios pass; 2 new edge defects reproduced under adversarial F2/F3 attacks in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs`).
- **Audit & Hygiene**:
- Verified all 27 modified/created production `.rs` files remain `<= 600` non-blank, non-comment lines before `mod tests` (max `crates/lucisv_server/src/state/discover.rs` = `505`), with `0` `unwrap()`, `expect()`, `panic!`, `unsafe`, or `#[allow` in added/modified production lines.
- Audited every `.files()` and `FileId(` call site across `crates/` — zero remaining dense `0..files().len()` or `.files().enumerate()` assumptions over potentially tombstoned indexes in production code.
- `python3 tools/stamp_author.py --check` -> exit `0` (`would stamp 0 files; left 249 untouched`).
- **Confirmed Resolved**:
- **F1 (`live_files()`)**: All `qa_topo_49_*` pass; added `qa_r2_f1_multiple_tombstones_candidates_absorb_update_words_rename_and_completion` (`lifecycle_r2.rs`) and `qa_r2_f1_mcp_find_and_check_with_multiple_tombstones_preceding_live_files` (`crates/lucisv_mcp/src/tools/diagnostics.rs`), confirming `Candidates::from_words`/`update_words`/`absorb`, `rename_traced` macro-text warnings, `Completion`, `mcp::check`, and `mcp::find` (`refs` + near-match suggestions) pass with 3 tombstones preceding live files.
- **F2 (core LSP handlers)**: `qa_topo_51_non_canonical_symlink_open_buffer_breaks_references_lint_and_rename` passes, plus `qa_r2_f2_non_canonical_symlink_open_buffer_across_all_handlers_and_case_mismatch` passes for symbol `hover`, symbol `gotoDefinition`, `ports::offers`/`resolve_for`, `extract::code_actions`/`execute`, `imports::offers`/`resolve`, `completion` `related_tier`, `callHierarchy` (`incoming` + `outgoing`), `design_hierarchy`, and macOS `case_only_mismatch` (`Foo.sv` vs `foo.sv`).
- **F3 (simple mid-scan close) & F4 (widen symlinks)**: `qa_topo_50_mid_scan_non_canonical_symlink_over_max_file_size_matches_pre_scan`, `qa_r2_f3_mid_scan_open_dirty_symlink_and_close_mid_scan_matches_fresh` (in-scope and over `maxFileSize`), `qa_topo_51_widen_symlink_over_max_file_size_converges_like_fresh`, and `qa_r2_f4_widen_symlink_pointing_outside_root_converges_like_fresh` (under/over cap, closed/open outside targets) all pass.
- **F5 (`reclassify_large_buffers`)**: `qa_topo_63_threshold_drop_after_unsaved_edit_indexed_via_widen_diverges_from_fresh` and `qa_r2_f5_reclassify_large_buffers_excluded_dirty_clean_and_round_trip` pass (clean `false -> true` does 1 empty `Document::large("")` parse and leaves `index().fingerprint()` / `derived_fingerprint()` unchanged; excluded unsaved drops from index; in-scope dirty preserves disk record across `false -> true` and `true -> false -> true` flips).
- **Remaining / New Findings**:
- **Finding R2-F2 (`includes.rs:552,584` & `hover.rs:101`) — Non-canonical symlink open buffer fails `` `include `` resolution & macro hover narrowing**: `includes::resolved` (`crates/lucisv_server/src/includes.rs:552`) and `includes::definition` (`:584`) pass raw `doc.path.as_deref()` instead of `ws.index_path_for`, and `hover::narrowed_to_the_include_graph` (`crates/lucisv_server/src/hover.rs:101`) filters `ws.index().path(*file)` via `reachable.contains(p)` without file-identity matching. Reproduced in `#[ignore]`d `qa_r2_f2_symlink_include_related_macros_links_def_and_hover_narrowing`: opening `z_real/real_b.sv` (when `a_link/link_a.sv -> z_real/real_b.sv` is indexed alongside `a_link/link_h.svh`) degrades `completion` `related_macros` (`sortText` `"5\`LINK_HDR_MAC"` vs `"4\`LINK_HDR_MAC"`), returns `[]` for `textDocument/documentLink` and `` `include `` `textDocument/definition`, and fails macro include-graph narrowing on `` `SHARED_MAC `` (`"defined 2 times"`).
- **Finding R2-F3 (`state/incremental.rs:192-203`) — Mid-scan `didOpen(dirty symlink)` -> `didChange(disk)` -> `didClose` leaves stale `IN_BUF` edit**: `Workspace::closing_affects_running_scan` checks `fs::read_to_string(&target).ok().as_ref() != Some(&doc.text)`, returning `false` after `didChange` restores disk text even though the earlier mid-scan `didOpen(dirty)` had already been absorbed into the running scan. Reproduced in `#[ignore]`d `qa_r2_f3_mid_scan_dirty_open_reverted_and_closed_leaves_stale_index` (`ON_DISK = 0`, `IN_BUF = 1`).
- **Final Gates**:
- `python3 tools/stamp_author.py --check` -> exit `0` (`would stamp 0 files; left 249 untouched`)
- `cargo fmt --all -- --check` -> exit `0`
- `./tools/guard.sh -m 6 -t 600 -- cargo clippy --workspace --all-targets -- -D warnings` -> exit `0`
- `./tools/guard.sh -m 6 -t 600 -- cargo test -p vlog_semantic -p lucisv_server -p vlog_refactor -p lucisv_mcp -p vlog_linter --all-targets` -> exit `0` (`lucisv_server` unit: `2072 passed; 0 failed; 49 ignored` [includes 2 `qa_r2_*` `#[ignore]`d reproductions], `e2e`: `106 passed; 0 failed; 3 ignored`, `grammar`: `3 passed`, `ifdef_folding`: `1 passed`, `opentitan_references`: `0 passed; 2 ignored`; `lucisv_mcp`: all 16 binaries `0 failed`; `vlog_linter`: `658` unit + `14` `lint_cases` passed; `vlog_refactor`: all 24 binaries `0 failed`; `vlog_semantic`: all 21 binaries `0 failed`, `workspace`: `92 passed; 0 failed; 2 ignored`).
### 2026-11-26 Round 2 Closing-Pass QA Verification (after R2-F2 & R2-F3 Fixes)
- **Verdict**: `FAIL` (both previously `#[ignore]`d R2-F2 and R2-F3 reproductions now pass un-ignored, and `didOpen(dirty) -> didSave(None) -> didClose` converges, **but** adversarial multi-hop symlinked-directory and `has_other_document_for` two-URI mid-scan close attacks uncover 3 concrete defects: `R2-F2b`, `R2-F3a`, `R2-F3b`).
- **Audit & Hygiene**:
- `git status --short` / `git diff --stat`: 35 modified + 2 untracked `.rs` files (`reconcile.rs`, `lifecycle_r2.rs`) + `docs/features/index-lifecycle-r2/`.
- Verified all 29 modified/created production `.rs` files remain `<= 600` non-blank, non-comment lines before `mod tests` (max `crates/lucisv_server/src/state/discover.rs` = `505`, `state/reconcile.rs` = `225`, `state/rescan.rs` = `480`, `state/incremental.rs` = `225`, `state/mod.rs` = `149`, `includes.rs` = `353`, `hover.rs` = `323`), with `0` `unwrap()`, `expect()`, `panic!`, `unsafe`, or `#[allow` in added/modified production lines.
- `python3 tools/stamp_author.py --check` -> exit `0` (`would stamp 0 files; left 249 untouched`).
- **Confirmed Resolved & New Passing QA Checks**:
- **R2-F2**: `qa_r2_f2_symlink_include_related_macros_links_def_and_hover_narrowing` runs un-ignored and passes. Added un-ignored `qa_r2_f2_multihop_transitive_symlink_headers` (confirming `documentLink`, `` `include `` `definition`, `completion` `related_macros` for transitive `H2_DEEP_MAC`, and `hover` macro narrowing over `z_real/real_b.sv` -> `a_link/link_h1.svh` -> `a_link/link_h2.svh`) and `qa_r2_f2_multihop_symlink_directory_completion_and_hover_narrowing` (confirming transitive `completion` `related_macros` and `hover` macro narrowing over symlinked directory `a_link_dir -> z_real_dir`, including non-canonical open `z_real_dir/real_b.sv` and external caller `rtl/caller.sv` -> `../z_real_dir/h1.svh`), all passing.
- **R2-F3**: `qa_r2_f3_mid_scan_dirty_open_reverted_and_closed_leaves_stale_index` and `r2_f3_mid_scan_dirty_reverted_and_closed_converges_across_all_scan_phases` run un-ignored and pass. Added un-ignored `qa_r2_f3_mid_scan_dirty_open_saved_none_and_closed` (covering `didOpen(dirty) -> didSave(None) -> didClose` mid-scan for `in_scope_future`, `in_scope_past`, and `excluded`) and `qa_r2_f3_two_symlink_uris_both_dirty_one_closed_mid_scan_converges` (`pos >= scan.at`), all passing.
- **New Findings (Reproduced as `#[ignore]`d tests in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs`)**:
- **Finding R2-F2b (`crates/lucisv_server/src/includes.rs:544-552`) — `resolve_for_doc` returns non-canonical target for symlinked directory**: When `a_link_dir -> z_real_dir` is a symlinked directory (`a_link_dir/{real_b.sv,h1.svh,h2.svh}` indexed) and the client opens `z_real_dir/real_b.sv` containing `` `include "h1.svh" ``, `resolve_for_doc` returns `graph.resolve(doc.path.as_deref(), include)` directly (`z_real_dir/h1.svh`) without normalizing through `ws.index_path_for(...)`, so `documentLink` and `` `include `` `definition` point to non-canonical `z_real_dir/h1.svh` instead of canonical `a_link_dir/h1.svh` (diverging from `via_canon` and `nav.rs`). Reproduced in `#[ignore]`d `qa_r2_f2_multihop_symlink_directory_links_and_def_return_non_canonical`.
- **Finding R2-F3a (`crates/lucisv_server/src/state/reconcile.rs:192-194` & `crates/lucisv_server/src/state/incremental.rs:197-203`) — closing clean canonical symlink at `pos < scan.at` with `has_other_document_for` drops surviving dirty symlink buffer**: When `0_link/dut.sv -> z_real/dut.sv` (`pos < scan.at`, already stepped cleanly from disk `ON_DISK`) is opened with `ON_DISK` alongside `z_real/dut.sv` with `DIRTY_Z`, `reconcile_open_buffers_into` handles `0_link/dut.sv` first, takes `if already_same { continue; }` without calling `scan_absorbed.record(...)`, and skips `z_real/dut.sv` via `matched_positions.insert(pos)`. Mid-scan `didClose(0_link/dut.sv)` then sees `scan_absorbed == false` and `has_other == true` in `closing_affects_running_scan`, returning `false` at `if has_other { return false; }`, so the scan finishes with `ON_DISK` instead of surviving open `z_real/dut.sv`'s `DIRTY_Z`. Reproduced in `#[ignore]`d `qa_r2_f3_two_symlink_uris_one_closed_already_same_drops_surviving_dirty`.
- **Finding R2-F3b (`crates/lucisv_server/src/state/incremental.rs:198-203`) — closing `doc.large`-flipped absorbed symlink with `has_other_document_for` leaves stale absorbed edits**: When `a_link/dut.sv` (`DIRTY_A`, absorbed into `scan` and recorded in `scan_absorbed`) and `z_real/dut.sv` (`ON_DISK`) are both open, `didChange` flips `a_link/dut.sv` to `doc.large = true`, and `didClose(a_link/dut.sv)` runs mid-scan while `z_real/dut.sv` remains open, `closing_affects_running_scan` evaluates `(!doc.large || !has_other)` as `false` and returns `false` at `if has_other { return false; }`. No follow-up rescan runs, leaving stale `DIRTY_A` from the closed `a_link/dut.sv` in the finished index instead of `z_real/dut.sv`'s `ON_DISK`. Reproduced in `#[ignore]`d `qa_r2_f3_two_symlink_uris_large_flip_one_closed_leaves_stale_index`.
- **Final Gates**:
- `python3 tools/stamp_author.py --check` -> exit `0` (`would stamp 0 files; left 249 untouched`)
- `cargo fmt --all -- --check` -> exit `0`
- `./tools/guard.sh -m 6 -t 600 -- cargo clippy --workspace --all-targets -- -D warnings` -> exit `0`
- `./tools/guard.sh -m 6 -t 600 -- cargo test -p vlog_semantic -p lucisv_server -p vlog_refactor -p lucisv_mcp -p vlog_linter --all-targets` -> exit `0` (`lucisv_server` unit: `2079 passed; 0 failed; 50 ignored` [includes the 3 `qa_r2_*` `#[ignore]`d reproductions], `e2e`: `106 passed; 0 failed; 3 ignored`, `grammar`: `3 passed`, `ifdef_folding`: `1 passed`, `opentitan_references`: `0 passed; 2 ignored`; `lucisv_mcp`: all 16 binaries `0 failed`; `vlog_linter`: `658` unit + `14` `lint_cases` passed; `vlog_refactor`: all 24 binaries `0 failed`; `vlog_semantic`: all 21 binaries `0 failed`, `workspace`: `92 passed; 0 failed; 2 ignored`).
- `/tmp` clean (`0` `lucisv` temp files leftover); `/Users/lucio/repo/opentitan` untouched (`git status --porcelain` empty).
### 2026-11-26 Round 2 Final QA Sign-Off (after R2-F2b, R2-F3a, R2-F3b & Cross-Platform `DirId` Fixes)
- **Verdict**: `PASS`
- **Resolved Repros (un-ignored and passing in `crates/lucisv_server/src/server/tests/lifecycle_r2.rs`)**:
- `qa_r2_f2_multihop_symlink_directory_links_and_def_return_non_canonical` (`ok`)
- `qa_r2_f3_two_symlink_uris_one_closed_already_same_drops_surviving_dirty` (`ok`)
- `qa_r2_f3_two_symlink_uris_large_flip_one_closed_leaves_stale_index` (`ok`)
- `crates/lucisv_server/src/server/tests/lifecycle_r2.rs` now has `0` `#[ignore]`d tests.
- **Edge-Case & Cross-Platform Audit**:
- `crates/lucisv_server/src/includes.rs:544-552` (`resolve_for_doc`): `ws.index_path_for(&found)` delegates to `held_path_for(found).unwrap_or_else(|| found.to_path_buf())` (`state/mod.rs:219-221`), returning `found` unchanged when `found` is a closed excluded header not present in `self.index` (and returning the indexed spelling if opened as non-large or if another symlink of the same file is indexed, while honoring `case_only_mismatch`).
- `crates/lucisv_server/src/state/incremental.rs:193-204` (`closing_affects_running_scan`): returning `true` on `self.scan_absorbed.contains(path, &target) || self.has_other_document_for(uri, path)` preserves surviving dirty/clean/`doc.large` symlink buffers on mid-scan `didClose` across all `scan.at` phases (`pos < scan.at` `already_same` skips, `pos >= scan.at`, `doc.large` flips, and `case_only_mismatch` isolation in `has_other_document_for`) without breaking any existing `lucisv_server` test.
- `crates/lucisv_server/src/state/discover.rs:715-735` and `crates/lucisv_server/src/state/reconcile.rs:206-215`: non-Unix `DirId` (`PathBuf`) borrow-before-move ordering (`&id` / `id.as_ref()` before `canonical_ids.entry(id)` and `added_ids.insert(k)`) passes `cross` for both `x86_64-pc-windows-gnu` and `x86_64-unknown-linux-musl`.
- **Audit & Hygiene**:
- Verified all 29 modified/created production `.rs` files remain `<= 600` non-blank, non-comment lines before `mod tests`: `crates/lucisv_server/src/includes.rs` (`353`), `state/incremental.rs` (`221`), `state/discover.rs` (`510`, max across all modified prod files), `state/reconcile.rs` (`231`), with `0` `unwrap()`, `expect()`, `panic!(`, `unsafe`, or `#[allow` in production sections.
- `python3 tools/stamp_author.py --check` -> exit `0` (`would stamp 0 files; left 249 untouched`).
- **Final Gates (`./tools/gates.sh --only fmt,clippy,suite:vlog_semantic,suite:lucisv_server,suite:lucisv_mcp,cross`, logs in `target/gates/20261126-111210`)**:
- `fmt` -> `pass` (exit `0`)
- `clippy` -> `pass` (exit `0`)
- `suite:vlog_semantic` -> `pass` (`21` binaries: `438 passed; 0 failed; 4 ignored`)
- `suite:lucisv_server` -> `pass` (`5` binaries: `2192 passed; 0 failed; 52 ignored`; unit `2082 passed; 0 failed; 47 ignored`, `e2e` `106 passed; 3 ignored`, `grammar` `3 passed`, `ifdef_folding` `1 passed`, `opentitan_references` `0 passed; 2 ignored`)
- `suite:lucisv_mcp` -> `pass` (`16` binaries: `391 passed; 0 failed; 4 ignored`)
- `cross` -> `pass` (`x86_64-pc-windows-gnu` & `x86_64-unknown-linux-musl` for `lucisv`, `lucisv_server`, `lucisv_mcp`, exit `0`)
- `/tmp` clean; `/Users/lucio/repo/opentitan` untouched (`git status --porcelain` empty).
## Review
### 2026-11-26 — Lead review: PASS (Round 2 complete)
- Verified all Round 2 deliverables (`#49` fast tombstones via `WorkspaceIndex::remove_file` + `live_files()`, `#50` mid-scan open buffer reconciliation, `#51` `(dev, ino)` canonical symlink deduplication across handlers/includes/hover, `#63` least-performance-impact disk record preservation for `doc.large`, and `ScanAbsorbed` tracking + cross-platform `DirId` borrow fixes) and checked that `crates/lucisv_server/src/server/tests/lifecycle_r2.rs` has 0 `#[ignore]`d tests left.
- All 29 modified/created production files stay `<= 600` non-blank, non-comment lines before `mod tests`, with `0` `unwrap`/`expect`/`panic!`/`unsafe`.
- Handshakes closed in `docs/topo.md`: `#48` (closed won't-fix per owner ruling: rely on VS Code), `#49`, `#50`, `#51`, `#63`. Full `./tools/gates.sh` (including `cross`) and final QA sign-off gates verified green.
<!-- Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com -->
+5 -5
View File
@@ -773,10 +773,10 @@ update the filing README(s) and this file.
| 45 | **`` `ifdef `` between `end` and `else` is a parse error** (TODO §71 wave 4) | format-styles (QA) | vlog_parser |
| 46 | **An attribute on an ANSI port** (`(* keep *) input a`) is a parse error (TODO §71 wave 4) | format-styles (QA) | vlog_parser |
| 47 | **Multi-instance declarations under one-per-line styles** (`p1 u8 (...), u9 (...)`) get the hanging layout instead of the style's (TODO §71 wave 4; CHANGELOG 0.65.5 known limit) | format-styles (QA) | vlog_formatter |
| 48 | **Directory-only watcher events.** VS Code coalesces deletes under a removed folder into one folder event and the client's `**/*.{v,vh,sv,svh}` filter drops it, so the server receives nothing; a folder moved in is dropped likewise. Wanted: a second registration (`**/*`, `Create \| Delete`) and a handler expanding a folder to the held files and include lines under it — changes every client's registration and traffic, the owner's call (TODO §71 waves 5–6) | localized-reindex (QA P1); scan-ordering | owner decision, then lucisv_server (`main.rs`/`watch.rs`) |
| 49 | **A buffer the scope would not take stays indexed after `didClose`** (excluded or unlisted, taken in by a scan or the one-file path), and **closing an unsaved in-scope buffer a rescan indexed leaves its text in the index** (QA-7a). One root: a close does not touch the index. A one-file remove costs ~225 ms on OpenTitan (fixed and reverted in scan-ordering); wanted: a cheap removal, e.g. a tombstone the next scan or publish folds in (TODO §71 waves 5–6) | localized-reindex (QA P2); scan-ordering (QA-1, QA-7a) | vlog_semantic (index removal) / lucisv_server (`state/`) |
| 50 | **An unheld buffer opened while a scan runs is never taken in** by that scan or afterwards; opened before the scan it is held — the same final state answers differently by timing (TODO §71 wave 6) | scan-ordering (QA-2) | lucisv_server (`state/scan.rs`, `server/index.rs`) |
| 51 | **Symlinked files are held under one spelling or both** depending on what was open at scan time (`discover.rs`'s `Aliased`); incremental and rebuild answers disagree in all six `filelink.py` variants. Rule to adopt: one file, one spelling, whatever is open — in the walk, the overlay and the one-file path together (TODO §71 waves 5–6) | localized-reindex (QA P3); scan-ordering | lucisv_server (`state/discover.rs`, `state/incremental.rs`) |
| ~~48~~ | ~~**Directory-only watcher events.** VS Code coalesces deletes under a removed folder into one folder event and the client's `**/*.{v,vh,sv,svh}` filter drops it, so the server receives nothing; a folder moved in is dropped likewise. Wanted: a second registration (`**/*`, `Create \| Delete`) and a handler expanding a folder to the held files and include lines under it — changes every client's registration and traffic, the owner's call (TODO §71 waves 5–6)~~ — **closed 2026-11-26 (won't-fix by owner ruling):** rely on VS Code; no second watcher registration added. | localized-reindex (QA P1); scan-ordering | ~~owner decision~~ won't-fix |
| ~~49~~ | ~~**A buffer the scope would not take stays indexed after `didClose`** (excluded or unlisted, taken in by a scan or the one-file path), and **closing an unsaved in-scope buffer a rescan indexed leaves its text in the index** (QA-7a). One root: a close does not touch the index. A one-file remove costs ~225 ms on OpenTitan (fixed and reverted in scan-ordering); wanted: a cheap removal, e.g. a tombstone the next scan or publish folds in (TODO §71 waves 5–6)~~ — **closed 2026-11-26 by `index-lifecycle-r2` (Round 2):** `WorkspaceIndex::remove_file` tombstones slots in-place via `replace_facts`, `live_files()` skips tombstones across all callers (`sources.rs`, `candidates.rs`, `lucisv_mcp`), and `DidCloseTextDocument` calls `close_and_reconcile` (2,000 cycles on 4k index at ~2.98 ms / 112.6 µs). | localized-reindex (QA P2); scan-ordering (QA-1, QA-7a) | ~~vlog_semantic / lucisv_server~~ done |
| ~~50~~ | ~~**An unheld buffer opened while a scan runs is never taken in** by that scan or afterwards; opened before the scan it is held — the same final state answers differently by timing (TODO §71 wave 6)~~ — **closed 2026-11-26 by `index-lifecycle-r2` (Round 2):** `reconcile_open_buffers_into`, `ScanAbsorbed`, and `closing_affects_running_scan` reconcile mid-scan opens/edits/closes to match pre-scan opens. | scan-ordering (QA-2) | ~~lucisv_server (`state/`)~~ done |
| ~~51~~ | ~~**Symlinked files are held under one spelling or both** depending on what was open at scan time (`discover.rs`'s `Aliased`); incremental and rebuild answers disagree in all six `filelink.py` variants. Rule to adopt: one file, one spelling, whatever is open — in the walk, the overlay and the one-file path together (TODO §71 waves 5–6)~~ — **closed 2026-11-26 by `index-lifecycle-r2` (Round 2):** `(dev, ino)` / canonical-path deduplication without basename gating across discovery, widen, buffers, `includes.rs`, `hover.rs`, and handlers (`index_path_for` / `is_same_file`). | localized-reindex (QA P3); scan-ordering | ~~lucisv_server (`state/`, handlers)~~ done |
| ~~52~~ | ~~**A request held during a scan is answered against the newest text**, so a position-based request can resolve a different symbol when an edit moved the text under it; rename edits carry no document version for the client to reject (TODO §71 wave 6)~~ — **closed 2026-11-26 by `server-ordering-r1` (Round 1):** `Document` tracks client `version: Option<i32>`, and `ports::encode_edit` (shared by `rename.rs` and `ports.rs`) emits versioned `DocumentChanges::Edits` preserving open client URIs when `workspace.workspaceEdit.documentChanges` is advertised. | scan-ordering (QA) | ~~lucisv_server (`server/`, `rename.rs`)~~ done |
| ~~53~~ | ~~**Renaming a port of a module defined twice** gives an edit or a refusal at random across fresh servers (`top_englishbreakfast/ip/ast/rtl/adc.sv:81`, `qa717/drv/dup.py`); not diagnosed (TODO §71 wave 6)~~ — **closed 2026-11-26 by Round 1 (`refactor-correctness-r1` + `server-ordering-r1`):** `lucisv_server` holds workspace-wide mutating requests (`rename`, `codeAction/resolve`, `executeCommand`, `willRenameFiles`) in `after_scan` across `self.scanning`, and `vlog_refactor::rename` + `preflight` + `same_file::renamed_here` refuse members inside duplicated file-scope units; verified 10/10 deterministic on OpenTitan `adc.sv:81`. | scan-ordering (QA-7c) | ~~vlog_refactor / lucisv_server~~ done |
| 54 | **`lucisv-mcp` re-reads a file with a future mtime on every call**, forever (67 ms against 7 ms per `find` on 4 000 files) — the racy rule never settles (TODO §70) | linux-test-portability (Round 2) | lucisv_mcp (`project/files.rs`) |
@@ -788,7 +788,7 @@ update the filing README(s) and this file.
| 60 | **An edit in one file that changes how another open file colours sends no refresh** (a package type renamed) — as before this lane (TODO §71 wave 7) | viewport-highlight | lucisv_server (`server/viewport.rs`) |
| ~~61~~ | ~~**Inside the startup settings wait, the client's answer to the pull is applied ahead of an older settings push held with it** (`server/startup.rs`, `take_the_answer_out_of_held`); predates fast-actions; needs a client whose push and answer disagree in one burst (TODO §71 wave 8; fast-actions QA F1)~~ — **closed 2026-11-26 by `server-ordering-r1` (Round 1):** `take_the_answer_out_of_held` drains older `DidChangeConfiguration` pushes preceding the plucked pull answer while keeping newer pushes. | fast-actions (QA) | ~~lucisv_server (`server/startup.rs`)~~ done |
| ~~62~~ | ~~**`tests/fast_actions_bursts.rs`'s oracle accepts an answer the reference gives after any later message of the round**: 2–9 % of injected stale answers pass when a later message restores the state; every mutation is still caught and the directed tests lack the weakness (TODO §71 wave 8; fast-actions QA F4)~~ — **closed 2026-11-26 by `server-ordering-r1` (Round 1):** `ahead::take_ahead_applied` records exact `applied_changes` and the oracle asserts `applied >= required` and `e == reference_at[applied]`. | fast-actions (QA) | ~~lucisv_server (tests)~~ done |
| 63 | **Whether a large open buffer is in the index depends on when it was opened, saved or scanned** — a fast-path buffer contributes nothing when open at scan or save time but keeps its disk record when opened after the scan; 77–98 answers differ between a settled session and a fresh server on OpenTitan. Predates fast-actions; wanted: always keep, or always drop, the disk record of a fast-path buffer at open, save, flip and scan alike (TODO §71 wave 8; fast-actions QA S2, Handshake request 8) | fast-actions (QA) | lucisv_server (`state/`, the index lane) |
| ~~63~~ | ~~**Whether a large open buffer is in the index depends on when it was opened, saved or scanned** — a fast-path buffer contributes nothing when open at scan or save time but keeps its disk record when opened after the scan; 77–98 answers differ between a settled session and a fresh server on OpenTitan. Predates fast-actions; wanted: always keep, or always drop, the disk record of a fast-path buffer at open, save, flip and scan alike (TODO §71 wave 8; fast-actions QA S2, Handshake request 8)~~ — **closed 2026-11-26 by `index-lifecycle-r2` (Round 2, owner decision 2):** standardized on always keeping the disk index record (subject to `maxFileSize`) across open, close, save, widen, scan, and threshold flips. | fast-actions (QA) | ~~lucisv_server (`state/`, `server/large_file.rs`)~~ done |
| 64 | **The 40 000-file rescan after a delete takes either 12.3 s or 14.5–15.5 s**, on 0.65.10 and 0.65.11 alike; cause not found (TODO §71 wave 8) | fast-actions | undiagnosed (lucisv_server scan) |
| 65 | **`ci.yml` runs `cargo test --workspace` bare in both jobs**, not through `tools/guard.sh` as CLAUDE.md's runaway guard asks of every `cargo test`; predates 0.65.9 for the macOS job, the Linux runner is resource-capped. Recorded, not judged (topo refresh 2026-11-19) | topo refresh (draft discrepancy 10) | CI (lead) |
| 66 | **The `cross` gate step reports `SKIPPED (no toolchain)` rather than failing** when `~/.rustup/toolchains/stable-aarch64-apple-darwin` is absent, so a green `gates.sh` on another machine does not prove the cross build (topo refresh 2026-11-19) | topo refresh (draft discrepancy 11) | tools/ (`gates.sh`, lead) |