282 KiB
Performance implementation tracker — take 5
Status (2026-09-08): complete. Every stage the plan sequenced has run and been measured — P0; P1a, P1b, P1c; P2a, P2b, P2c; handshake 33 and P2d (measured, no narrowing shipped: the proof was negative) with the warnings dedupe; P3; P4a and P4b (three passes). P5 stays deferred (no stage's measurement reopened it). Baseline cells are the owner's and untouched; REF cells are the P0 re-take; every later cell names its experiment.
Do not overwrite the baseline, silently replace a workload, omit refusals, or report a proposed target as an achieved result. Use not measured, blocked, or not applicable rather than zero. Update this file after each measured stage, including rejected changes.
Baseline identity
| Field | Recorded baseline | Candidate — agent fills |
|---|---|---|
| Source | bbdbfe9045e8a85f8ea471529ea739af6cade77f, version 0.50.0 |
P0 (§60.0): same binaries. Tree at 9c75b7a4e517bdf91151b85814ecbb43e0d8679d plus the uncommitted P0 working tree; no Rust changed |
| Source modifications | None to implementation; analysis/evidence docs only | None to implementation; tools/perf/* and docs only |
| Server SHA-256 | 27e0a0df5b77102ec79c23279da64e722bffd440c604ad6d03ff66c2f6398ad3 |
27e0a0df5b77102ec79c23279da64e722bffd440c604ad6d03ff66c2f6398ad3 — identical, verified before timing; no rebuild |
| CLI SHA-256 | 894054128495b764bb966e7b923e08267e57aea83fdc611fad4b4ed7a66b51e3 |
894054128495b764bb966e7b923e08267e57aea83fdc611fad4b4ed7a66b51e3 — identical |
| Build | release, locked dependencies, workspace LTO enabled | unchanged artifacts; no cargo command ran in this round |
| Corpus | OpenTitan 00981352642fb65ef2b6c47143a0f6bb31fd4a97 |
same |
| Modified corpus inputs | Three existing files, listed/hashed in metadata.json |
same three; git status --porcelain identical after all 16 timed runs |
| Host / OS | M1 Max; macOS 27.0 26A5425a |
same host |
| Date / zone | 2026-09-07, America/Chicago | 2026-09-07, America/Chicago |
| Load, standard phases | 1-minute samples 2.92–4.59 | 1-minute samples 2.92–5.21, recorded before and after every phase |
| Guard | 8 GiB / 1800 s; zero kills in retained runs | 8 GiB / 1800 s on every phase, lucisv run and sweep; zero kills |
| Harness | tools/perf at baseline HEAD, supplementary probes in evidence README |
tools/perf in the working tree of §60.0, uncommitted — schema 2; the two supplemental probes promoted to the offerkinds / offerqueue phases; the CLI probe re-run as a scratch script |
| Warmth / scope / capabilities | Warm workspace, lazy client unless metric says otherwise | same, and the shape is now in every row (client: resolveSupport / applyEdit / createFiles); execute is the only phase advertising applyEdit + createFiles |
| Raw evidence | take5-baseline/*.jsonl, metadata.json |
~/.cache/lucisv-perf/take5-p0/{results.jsonl,results-scan2.jsonl,cli-results.jsonl,runs.jsonl,logs/} |
Before timing, record the exact revision/diff, binaries, compiler, machine, corpus hashes, enabled rules/settings, client capabilities and open-buffer set. Build first and stop all builds before measurements. Keep reference/candidate caches separate; alternate run order. Record actual commands and whether each trial is a new process. Three samples are the historical comparison minimum; for a close decision use at least three sessions and 20 measured requests per session, keep first requests separate and record the full distributions. Do not derive p95/p99 from the three-repeat baseline.
Stage ledger
The order follows the plan. Later stages are conditional on the preceding measurements. All candidate statuses start unimplemented.
| Stage | Work | Depends on | Owner / commit | Status | Evidence and decision |
|---|---|---|---|---|---|
| P0 | Harness status/units/command execution/cold-cache corrections | — | dev (Opus) → QA PASS → lead; committed 2026-09-07 | Done | docs/features/perf5-p0/README.md; experiment P0-2026-09-07 below. Schema 2 shipped; execute phase measures the extract/inline commands for the first time; cold sweep tries verified at 0 hits, warm at 30; baseline reproduced on the unchanged binary |
| P1a | Gate lint/fence/config by requested kinds; avoid fence work without fixes | P0 | dev (Opus) → QA PASS → lead; committed 2026-09-07 | Done | docs/features/perf5-p1/README.md; experiment P1a-2026-09-07 below. Pinmux only: [] 82.80 → 0.064 ms; quickfix 84.13 → 23.53; all families 309.60 → 258.06. Separates the base at last: lint+config 23.5 ms, fence parse 59.3 ms |
| P1b | Shared parsed selectors; revision-bound fence reuse; invalidate any additional cache correctly | P1a | dev (Opus) → QA PASS → lead; committed 2026-09-07 | Done | Same README; experiment P1b-2026-09-07. Pinmux all families 24.02 ms (−92.2% on REF), queued definition 24.61 (−92.0%). Lint-result reuse not done — reason and number in the experiment entry |
| P1c | Engine-owned lightweight ports/import offers | Reprofile P1b | dev (Opus) → QA REWORK on one documentation point, ruled and applied by the lead → committed 2026-09-07 | Done | docs/features/perf5-p1/README.md; experiment P1c-2026-09-07 below. aes_reg_top lazy offer 21.83 → 5.46 ms, its ports family 21.15 → 3.27; aes 7.76 → 1.74; the organize-imports offer 15.39 (REF) → 4.88. All three targets met. Answers identical to P1b on 50 rows and to the REF on 65, field by field; the three resolve fingerprints unchanged |
| P2a | Rename per-stage timings and selected/watched/input counts | P0 | dev (Opus); release bf584aa0daf6… → QA PASS → lead; committed 2026-09-07 |
Done | docs/features/perf5-p2/README.md; experiment P2a-2026-09-07 below. The tail rename's 780 ms is 238 input files / 4.55 MB and 717 whole-file parses: Scope::build 228.5 ms, the occurrence walk 116.3, rebuilt_index 228.4 (the same build again), the after analyses 71.5, warnings 83.6, selection 13.4. 73 % of the request is whole-file parsing and two thirds of that parsing is repeated |
| P2b | Reuse per-file input analysis in request-local scope | P2a | dev (Opus); release e555e6c79d8d… → QA PASS → lead; committed 2026-09-07 |
Done | Same README; experiment P2b-2026-09-07. Additive FileFacts::analyzed; Scope::build_keeping analyses the request's file first, reads the cursor's name off it and retains the analyses the rest of the request will ask for. Tail rename 781.7 → 676.6 ms, parses 717 → 582; peak RSS unchanged or lower on all eight rows |
| P2c | Reuse unchanged after-facts/semantics; re-resolve external references | P2b | dev (Opus); release 1601b13a9bac… → QA PASS → lead; committed 2026-09-07 |
Done | Same README; experiment P2c-2026-09-07. New vlog_refactor/src/check/after.rs: the after-index is the before-index cloned and absorbed, and an untouched watched file's after-print is its existing analysis re-resolved. Tail rename 419.9 ms (−46.2 % on REF, 1.86×), parses 240 = K + E; every fingerprint identical. Target ≥2× missed by 29.7 ms; the remaining stage is Scope::build's one parse of each of the 238 selected files (225 ms), which only §P2d can reach |
| H33 | Topology handshake 33 — the transitive hierarchical user module_sources could not see |
P2c | dev (Opus); release da2aa9433e11…; committed 2026-09-07 |
Done | docs/features/perf5-p2/README.md; experiment H33-2026-09-07 below. A fifth rung, opt-in and asked for by inline-module alone: every file whose token census (files_mentioning, i.e. FileFacts::words) writes the dissolved instance's name. That census is exactly what no_hierarchy can refuse from, so the selected set now answers that refusal as sources() would — pinned by a six-shape whole-workspace equivalence test. Costs +1.2 ms at the measured site (8 files added); the four rungs, and therefore extract and every port action, are unchanged in answer and in cost |
| P2d | Exact-name postings; source-set narrowing only with whole-scope proof | Reprofile P2c; topology 33 for shared module selector | dev (Opus); same release; committed 2026-09-07 → QA PASS → lead; committed 2026-09-07 | Done — no narrowing (proof negative); handshake 33 closed; warnings dedupe; tail rename 2.01× | Same README; experiment P2d-2026-09-07 below. The census says 133 of the tail rename's 238 selected files (56 %, 58 % of the bytes, ~130 ms) write neither name down — all of them on the container rungs. They are not droppable: they are what fold_path hops through for a multi-level hierarchical tail and what base_chain climbs, so dropping them turns a resolved tail StillUnresolved (a missed edit, §49's own feature) and, where a reference has two paths, lets it fall through onto the target (an extra edit). Exact-name postings not implemented: selection is 13.6 ms of 420 (3.2 %), below the plan's own materiality gate. The target-scoped selector — fan out from the one declaration the cursor resolves to — is filed with its full shape list as a lane of its own |
| P2d-W | The warnings stage stops repeating itself: one lex and one LineIndex per file per call |
P2d's finding | dev (Opus); release 18ef6d60c548…; 2026-09-07 |
Done | Same README; experiment P2d-warnings-2026-09-07 below. The pure dedupe §P2d filed: FileScan memoizes tokenize and LineIndex::new per file, the five scans share it, and their sentences are concatenated in the order the five loops emitted them. The warnings stage 82.2 → 51.4 ms on the tail rename, 22.9 → 8.3 on aes, 848.5 → 437.9 on the clk_i fallback. Tail rename 387.9 ms = 2.01× the §P0 REF — the ≥2× target is met. The second dedupe P2d proposed (gate macro_argument_sites on files_naming_in_macros) is not taken and the reason is in the code: macro_words skips double-quoted runs, so `uvm_info("state_q", …) is a site the scan reports and the census cannot see. Warning lists compared as lists across 13 renames, old binary vs new: identical, order included |
| P3 | Reuse CLI census parse for package exports/interfaces | P0; coordinate semantic ownership | dev (Opus); release CLI sha256 2c16b321cb2d…; 2026-09-07 → QA PASS → lead; committed 2026-09-07 |
Done — 96 % of the increment removed, outputs byte-identical | docs/features/perf5-p3/README.md; experiment P3-2026-09-07 below. Additive vlog_linter::package_exports_in(path, file, tokens, src): the census parses each file once and both halves read that parse, and a file whose tree holds no package item never builds an index — 1 624 of hw/ip's 1 805 files (181 declare a package). No vlog_semantic change was needed; FileFacts::from_analysis + IndexBuilder::add_facts already existed. All-style hw/ip 0.6333 → 0.4817 s (−23.9 %), the rule's paired increment 141.7 → 5.0 ms, default check unchanged (medians identical), all-style peak RSS 219.1 → 202.0 MiB. Every cell's stdout byte-identical to the reference's, hw/vendor and hw/dv included |
| P4a | Attribute scan/prelude/table-build/cache/RSS cost | P0 | dev (Opus); release sha256 08093a3a2b9c…; 2026-09-07 → QA pending → QA PASS → lead; committed 2026-09-08 |
Done — breakdown measured; ruling: P4b = skip unchanged-store compaction + no store I/O for an empty scan; store reuse across rescans refused | docs/features/perf5-p4/README.md; experiment P4a-2026-09-07 below. A --verbose scan now says its stages, counts and end-state sizes in three timing: scan <n> … lines. A workspace session pays three scans and the first indexes zero files; warm that empty scan still costs 183.7 ms opening and compacting a 44.3 MiB store it does not use. Warm settle 1 332.7 ms has no dominant stage — discovery 255.9 / absorb 218.1 / decode 202.8 / cache_open 183.5 / compact 182.4 / candidates 113.3 / lookup 51.3 / includes 46.3 — and the store's own I/O is 27.5 % of it. Cold settle 2 893.6 ms is 58.9 % parse. The §P0 first-answer puzzle is closed arithmetically: cold 82.1 = 0.54 + 81.58, warm 207.5 = 181.19 + 26.31 |
| P4b | Implement the dominant measured startup/memory fix | P4a; serialize with state/index changes | dev (Opus); release sha256 623c0ea62df4… against a same-window HEAD 2434729 control 5957b0826249…; 2026-09-08 → QA pending. The one regression it named is closed by P4b2 below, and the store I/O it could not remove is removed there too |
Done (three passes: compaction skip + deferred open; staged startup; lazy read + folder-first + drain rule) — QA PASS → lead; committed 2026-09-08 | docs/features/perf5-p4/README.md §P4b; experiment P4b-2026-09-08 below. §P4a's 274.9 ms estimate was not additive: (b1) moves scan 1's cache_open onto the widen rather than removing it, so the ledger is −180.2 ms of compaction + 10.1 ms of skip check. Warm < 1 s needs the refused (b2) (cache_open is still paid twice, 181.7 ms) |
| P4b2 | Stage the initial scan until configuration arrives (the plan's §P4 work order, ruled 2026-09-08) | P4b | dev (Opus); release sha256 shipped 7522696e894a… (matrix measured on 3ff0db0920d1…, a pure move apart) paired against the previous P4b release 623c0ea62df4…; 2026-09-08 → QA pending |
Done — one scan per session, at the answered scope, with a bounded fallback. Server::started sends workspace/configuration first and waits up to CONFIGURATION_WAIT (2 s) on recv_timeout; the empty default-scope scan and the widen behind it are gone. Paired: warm settled 1 181.34 → 1 097.98 ms, −7.1 % and, on the shipped binary re-run, 1 190.48 → 1 037.31, −12.9 %; cold 2 963.21 → 2 843.84, −4.0 %; scopeDepth 0 −89.2 % cold / −72.6 % warm; 1/10/100 open buffers −28.4 / −26.8 / −21.0 %; warm cache_open 183.70 → 91.91 ms (the refused (b2)'s saving, without store reuse); warm idle RSS −5.8 %, cold +0.0 %; store byte- and mtime-identical; all 24 scope answers identical; didOpen pinmux −6.3 %; mismatched_answers 0. The scanserve "queued behind the configured rescan" mode is gone — nothing above 476 ms cold / 382 ms warm, against 2 622–2 934 / 934–1 234 |
docs/features/perf5-p4/README.md §P4b2; experiment P4b-staged-2026-09-08 below. One regression, named and filed: the first useful answer is now unimodal but empty — 293–411 ms with result count 0, where P4b answered 87–126 ms with count 1 in its fast mode and 1 205–2 903 ms in its slow one. The floor is begin_scan's discovery (292.74 ms warm, traced) and the prefix at the first drain is the open buffer alone. The fix is an open_first ordering change in state.rs, which this lane holds calls-only: filed as Handshake 11 |
| P4b3 | The lazy read and the folder-first order — §P4b2's empty first useful answer, closed (Handshake 11, granted 2026-09-08) | P4b2 | dev (Opus); release sha256 7ab4955ee0ac… paired against the shipped P4b2 release 7522696e894a…; 2026-09-08 → QA pending |
Done — the first useful answer is useful again: result count 1 in 12 sessions of 12, where P4b2 was 0 in 12 of 12, and faster too: cold 287.40 → 249.00 ms (−13.4 %), warm 332.68 → 277.37 (−16.6 %) in scan, confirmed in scanwait (−11.0 % / −13.5 %). collect_sources reads nothing off disk; scan_step reads a file when it indexes it and drops it there, so work_kib 34 973 → 0–16 and idle RSS −7.0 % cold / −7.2 % warm, peak still equal to idle. discovery 227 → 158 ms warm with a new read stage at 86, and includes 42 → 8.6 ms. The work list leads with the open buffers and the folders they raise to (crate::scan_order), and a held request — or one behind a mid-scan didOpen — waits for that folder (Server::head_owed, a fifth must_wait clause). Settled unchanged within noise (−5.2 % / −3.0 % in scan, +0.9 % / +1.9 % in scanprofile); all 24 scope answers identical; the store byte-identical from both binaries; mismatched_answers 0; §46's didOpen untouched and unreachable from this change |
docs/features/perf5-p4/README.md §P4b3; experiment P4b-lazy-2026-09-08 below. The latency target is missed and the reason is now measured: the first useful answer is walk-bound. discovery is 158 ms of pure scope walk with no read left in it — 58 % of the 274 ms warm answer — and cache_open is another 89 ms (the refused (b2)). The §P0 REF's 84/208 ms was answered off a 124-file folder scan that never walked the workspace, so it is not reachable by ordering. Filed for the next lane, with two things to measure first: the cap taking its size from the walk's own metadata (lucisv_core::walk is not this lane's file — a handshake request) and handing the first folder to scan_step before the walk finishes |
| P5 | Parser or cancellable snapshot work only if a new measured case justifies it | Reprofile P1–P4 | — | Deferred | — |
Before / after performance
Ordinary latency cells are first / min–max of three repeats, milliseconds. Fresh-session rows instead show all-session range. Baseline raw row names below make the comparison auditable. Fill candidate raw samples, median/distribution and counts in an experiment entry; this table is the readable overview. Use paired reference/candidate medians for improvement: 100 × (reference − candidate) / reference. A cross-day comparison is context only.
P0 note. P0 changed no production code, so its "candidate" is the same binary re-measured with the corrected harness. Those cells are marked REF and are the reference P1+ must be compared against; their "paired change" is the reference-against-baseline agreement check, never an improvement claim. Baseline cells are untouched.
P1 note. P1's numbers are appended to the Candidate cell behind the
REF value they are measured against; no REF or baseline text is replaced.
Both stages were taken with the committed harness on their own release
binaries — P1a 0bf7cf21…, P1b 540b8b7e… — three tries per row, lazy
client, warm workspace scope, scratch index caches, load 3.0–5.6 recorded
before and after every phase, corpus verified unchanged after every phase,
zero guard kills. Paired change is 100 × (REF − candidate) / REF on repeat
medians. Raw rows: ~/.cache/lucisv-perf/take5-p1/results-p1{a,b}.jsonl.
P1c note. Taken on release server sha256
33a6888af3f2bc9b3b2d1fb2844f3d93f9f5950839446866838244f913d56cf1, three
tries per row, lazy client, warm workspace scope, scratch index caches, load
3.8–4.9 recorded before and after every phase, corpus verified unchanged after
every phase, zero guard kills, no cargo command during any timed phase. Raw
rows: ~/.cache/lucisv-perf/take5-p1c/results-p1c.jsonl. The refactor phase
was not run at P1a or P1b, so its rows below are paired against the §P0
REF and part of each delta is §P1b's.
| Metric / baseline source | Baseline | Proposed goal or guardrail | Candidate | Paired change | Verdict |
|---|---|---|---|---|---|
Pinmux comment, lazy all families (offer-breakdown) |
328.41 / 296.78–311.73 ms; 0 actions | Repeated <16 ms; first-after-edit separate | REF (P0, same binary, offerkinds) 333.89 / 307.35–312.97 ms; 0 actions — REF repeat median 309.60. P1a 289.33 / 251.87–258.91, median 258.06. P1b 50.07 / 23.79–24.43, median 24.02; 0 actions in every try. P1c 25.42 / 23.05–23.61, median 23.55; 0 actions |
REF vs baseline +4.1%. P1a −16.6%, P1b −92.2%, P1c −1.9% on P1b | REF agrees. P1b is a 12.9× reduction with an identical (empty) answer. Target <16 ms still missed, and P1c cannot move it: this cursor offers nothing, so no predicate runs — the remaining 23.6 ms is the lint pass, which is the deferred lint-memo item |
Pinmux comment, only: [] |
78.88 / 79.43–81.62 ms; 0 actions | Return near transport floor; no lint/parse | REF 81.72 / 82.27–84.11 ms; 0 actions — REF median 82.80. P1a 0.13 / 0.053–0.070, median 0.064. P1b 0.12 / 0.049–0.054, median 0.053 | REF vs baseline +1.7%. P1a −99.9%, P1b −99.9% | Goal met: an empty filter answers at the transport floor (that row is itself 0.061–0.102 ms), with no config read, no lint and no parse — asserted by parse count in an_empty_only_filter_answers_empty_and_does_no_work_at_all |
| Pinmux comment, quickfix only | 79.54 / 79.73–80.06 ms; 0 actions | Avoid repeated lint/fence work safely | REF 82.76 / 82.50–85.06 ms; 0 actions — REF median 84.13. P1a 24.03 / 23.47–23.85, median 23.53. P1b 23.57 / 23.92–24.25, median 24.05 | REF vs baseline +5.5%. P1a −72.0%, P1b −71.4% | The 60 ms P1a removed here is the fence parse, skipped because no finding in this buffer carries a fix. P1b cannot improve it further: what is left is the configuration read plus the lint pass, and no lint-result reuse was added (see P1b-2026-09-07) |
Pinmux comment → queued definition (offer-queue) |
300.66–304.11 ms follower, 3 pipelines | Repeated follower <16 ms if no other blocker | REF (offerqueue) follower 339.47 / 309.07 / 309.72 ms; leader 339.53 / 309.08 / 309.73; 3 pipelines, now in leader_ms/follower_ms — REF follower mean of pipelines 2–3 309.40. P1a follower 275.77 / 253.20 / 251.68 (mean 2–3 = 252.44). P1b follower 43.62 / 25.57 / 23.65 (mean 2–3 = 24.61). P1c follower 38.02 / 25.83 / 23.85 (mean 2–3 = 24.84) |
REF vs baseline +2.0%. P1a −18.4%, P1b −92.0%, P1c −0.9% on P1b | The queued definition falls with its blocker, as the plan predicted. Target <16 ms missed by the same lint the leader pays; the leader here offers nothing, so P1c has nothing to remove |
tb.sv comment, lazy (codeaction) |
6.15 / 3.22–3.50 ms; 0 actions | Repeated <5 ms; no added parse | REF 5.53 / 3.80–4.79 ms; 0 actions — REF median 4.46. P1a 5.99 / 3.89–4.76, median 4.02. P1b 5.49 / 3.48–4.29, median 3.65. P1c 3.70 / 2.63–2.98, median 2.73 | REF vs baseline +27.9% (outside tolerance, see the P0 entry). P1a −9.9%, P1b −18.3%, P1c −25.1% on P1b | Target <5 ms met. The same file's offerkinds cursor is a sub-millisecond row and is not read (0.60 → 0.84) |
aes lazy offer (codeaction) |
12.39 / 8.15–9.11 ms; 1 action | Repeated <5 ms | REF 13.87 / 7.33–9.66 ms; 1 action — REF median 8.17. P1a 14.30 / 7.21–9.60, median 7.92. P1b 11.41 / 7.11–9.70, median 7.76; 1 action in every try. P1c 2.72 / 1.60–2.03, median 1.74; 1 action in every try | REF vs baseline −8.0%. P1a −3.1%, P1b −5.0%, P1c −77.6% on P1b | Target <5 ms met at P1c. The other three fan-out cursors fall with it: 42 → 0.77, 67 → 1.78, 128 → 1.38 ms lazy |
aes_reg_top lazy offer (codeaction) |
32.81 / 22.45–25.09 ms; 2 actions | Repeated <10 ms | REF 30.64 / 22.72–24.42 ms; 2 actions — REF median 23.31. P1a 32.24 / 22.08–24.17, median 23.60. P1b 31.50 / 20.93–24.42, median 21.83; 2 actions in every try. P1c 6.92 / 4.80–5.62, median 5.46; 2 actions in every try | REF vs baseline +1.0%. P1a +1.3% (no change), P1b −6.3%, P1c −75.0% on P1b (−76.6% on REF) | Target <10 ms met at P1c. P1b's residue was the discarded ports plan; §P1c replaced it with a predicate. The 5.46 ms left is dominated by the one parse of aes_reg_top.sv (52 461 B, 2.16–2.43 ms standalone) |
aes_reg_top ports-only offer (offer-breakdown) |
21.72 / 21.55–21.78 ms; 0 port actions | Remove throwaway edit computation | REF (offerkinds) 22.27 / 22.46–22.56 ms; 0 port actions — REF median 22.47. P1a 21.68 / 21.28–21.89, median 21.84. P1b 20.86 / 21.14–21.48, median 21.15; 0 port actions. P1c 3.51 / 3.08–3.45, median 3.27; 0 port actions |
REF vs baseline +3.3%. P1a −2.8%, P1b −5.8%, P1c −84.6% on P1b (−85.5% on REF) | The row P1c existed for. All four planners refuse at plan time here, and the offer used to pay four WorkspaceIndex::builds (3.89 ms each, measured) to be told so. The all-family cell at the same cursor is 21.79 → 4.70 |
state_q tail rename (tailrename) |
821.59 / 789.50–809.83 ms; 2 files | At least 2× faster; stretch <200 ms | REF 813.44 / 778.77–782.13 ms; 5 edits / 2 files / 0 created, fingerprint b39defb21265… — REF repeat median 780.45. P2a 817.45 / 789.49–782.21, median 784.19. P2b 706.50 / 676.19–673.57, median 674.68. P2c 451.54 / 421.27–419.86, median 419.86; 5 edits / 2 files / 0 created, fingerprint identical. H33/P2d 448.80 / 420.90–424.44, median 420.90; renametrace's own tail row 419.95; fingerprint identical. P2d-W three takes of tailrename, medians 389.82 / 387.95 / 385.29 → median of the three 387.95; renametrace's own tail row 395.45; 5 edits / 2 files / 0 created, fingerprint identical |
REF vs baseline −1.4%. P2a +0.5% (no change), P2b −13.6%, P2c −46.2%, P2d-W −50.3% on REF | Target ≥2× MET at P2d-W: 2.01× (780.45 → 387.95). Stretch <200 ms not approached. Against the same day's pre-change binary the paired fall is −7.1% (417.63 → 387.95), all of it the warnings stage (82.2 → 51.4 ms). What is left is Scope::build — one parse of each of the 238 selected files, 233 ms of the 388 — which only a narrower selector can reach. Whole-file parses still 240 = K + E |
Ordinary aes rename (rename) |
168.67 / 139.34–140.35 ms; 9 files | No regression; exact edit/warning parity | REF 167.60 / 140.46–142.13 ms; 14 edits / 9 files / 0 created, fingerprint fa7e31c78382… — REF repeat median 141.30. P2a 168.44 / 141.31–140.15, median 140.15. P2b 142.71 / 123.11–123.08, median 123.08. H33/P2d 131.03 / 106.75–106.99, median 106.75, fingerprint identical. P2c 126.13 / 107.15–105.95, median 106.31; 14 edits / 9 files, fingerprint identical. P2d-W 112.28 / 93.56–90.35, median 91.79; 14 edits / 9 files, fingerprint identical |
REF vs baseline +1.2%. P2a −0.8%, P2b −12.9%, P2c −24.8%, P2d-W −35.0% on REF | Goal was no regression; it is 35 % faster, with byte-identical edits and warnings. Parses 51 → 22 = K + E. P2d-W's share is the warnings stage, 22.9 → 8.3 ms |
Common port name clk_i at its declaration (renametrace, new) |
not measured | Measure the fan-out's escape hatch | P2a 7 249.73 / 7 158.16–7 142.58, median 7 158.16; the ambiguity hatch fires, so the input is the whole workspace — 3 976 files / 35.8 MB, 10 399 parses, peak RSS 1 864 MiB; 2 edits / 2 files, fingerprint 31aadc134628…. P2b median 6 286.13, 9 150 parses, 1 840 MiB. P2c 3 985.94 / 3 888.95–3 860.05, median 3 860.05, 3 977 parses, 1 830 MiB, fingerprint identical. P2d-W 3 654.95 / 3 569.67–3 478.44, median 3 478.44, 3 977 parses, 1 795 MiB, fingerprint identical; the same day's pre-change binary reads 3 825.66 |
P2c −46.1% on P2a; P2d-W −9.1% on that day's pre-change binary | New row, new phase. The worst rename on this corpus, and the one the fallback's cost is really made of. Still 3.5 s: 1 888 ms of it is one parse of each of the 3 976 files, 438 ms warnings (was 848), 248 ms selection |
Unique internal name (renametrace, new) |
not measured | The shape the fan-out is built for | P2a median 23.05 ms; 4 files / 68 KB, 10 parses, fingerprint 5f53e977da59…. P2b 21.84, 9 parses. P2c median 19.84, 5 parses, fingerprint identical |
−13.9% | New row. cipher_alert in aes_core.sv — the case the six rungs exist to make cheap, and they do |
Conflicting new name, refused (renametrace, new) |
not measured | A refusal is timed as a refusal | P2a median 640.81 ms, 638 parses, status: refused. P2b 530.26, 498 parses. P2c median 331.18, 244 parses; same sentence, same empty-edit fingerprint 96f32d4243b1… |
−48.3% | New row. state_q → state_d in entropy_src_main_sm.sv; the verifier still refuses, in the same words, in half the time |
All-sources fallback, ambiguous references (renametrace, new) |
not measured | Do not lose the refusal it exists for | rstmgr_por (declared in four files): P2a median 2 146.63 ms, P2c 2 137.42; 3 975 parses at both, peak 922 → 927 MiB, same refusal sentence. A cursor on no symbol takes the same road through rename.rs: 2 136.20 → 2 160.63 |
~0 % | New rows, both unmoved — and correctly so. Both refuse inside locate, having paid one whole-workspace Scope::build (1 840 ms) and nothing else; there is no repeated work in either for §P2b/§P2c to remove |
Definition behind ordinary rename (blockers) |
145.99–168.79 ms, 3 pipelines | Falls with rename work | REF 163.43 / 161.55 / 161.11 ms, 3 pipelines (now follower_ms.definition) — REF mean of pipelines 2–3 161.33. P2a 158.88 / 158.80 / 154.17 (mean 2–3 = 156.48). P2b 148.86 / 138.02 / 145.25 (141.64). P2c 130.87 / 123.37 / 120.32 (121.85). H33/P2d, three takes: (131.83, 130.51, 111.93) → 121.2, (135.47, 129.87, 110.00) → 120.0, and one outlier take (134.46, 130.83, 132.47) → 131.65; median of the three means 121.2. P2d-W, three takes: 116.97, 114.32, 115.91 → median 115.91, against the same day's pre-change binary at 127.67 and 124.12 |
REF inside the baseline range; P2c −24.5%, P2d-W −28.2% on REF | The queued definition follows its blocker exactly as the plan predicted |
Connect missing ports resolve (refactor) |
170.77 / 164.79–165.82 ms; 1 file | Measure collateral benefit; exact edit parity | REF 171.37 / 165.77–167.45 ms; 1 file, REF median 166.51, fingerprint 4b534a16bca7…. P1c 168.01 / 165.15–209.85, median 169.13; 1 file, 2 edits, fingerprint identical. P2a median 164.91, P2b 165.29, P2c 142.25 / 131.21–132.72, median 132.72; 1 file, 2 edits, fingerprint identical |
REF vs baseline +0.4%; P1c +1.6%; P2c −20.3% on REF | The collateral the plan asked to be measured: verify_splice reaches the same after-index and the same re-resolution §P2c gave the rename, and the edit is byte-identical |
Expand wildcard resolve (refactor) |
73.02 / 70.35–70.73 ms; 1 file, 32 connections | No lost connections/refusals | REF 73.61 / 71.67–73.01 ms; 1 file, 32 connections, REF median 71.89, fingerprint 8f3a26dd147b…. P1c 76.61 / 69.34–71.40, median 70.22; 1 file, 32 connections, fingerprint identical. P2a median 70.31, P2b 70.29, P2c 66.31 / 54.91–55.85, median 54.91; 1 file, 32 connections, fingerprint identical |
REF vs baseline +2.2%; P1c −2.3%; P2c −23.6% on REF | Agrees; no connection and no refusal moved, and the same §P2c collateral |
Eager 128-fan-out offer (codeaction) |
518.32 / 495.60–499.69 ms | Compatibility/perf guardrail; not first priority | REF 523.16 / 495.13–496.77 ms; 2 actions — REF median 496.24. P1b 519.49 / 492.71–494.57, median 493.92; 2 actions. P1c 516.78 / 492.51–496.34, median 492.54; 2 actions | REF vs baseline +0.1%. P1b −0.5%, P1c −0.3% | Unchanged, which is the guardrail: the eager path's cost is the module's fan-out, and neither P1b nor P1c touched it — code_actions still computes and verifies every plan |
Port-actions offer, aes_wrap.sv 78:2 (refactor, new) |
not measured as a row — take 4's §6b prose only | Repeated <5 ms; identical titles | REF (P0) 38.79 / 24.57–27.80 ms; 2 actions, REF median 24.84. P1c 1.53 / 1.13–1.45, median 1.19; 2 actions, same titles | −95.2% on REF | New row. The site that actually offers a port refactoring on opentitan. Part of the delta is §P1b's gate (0.06–0.14 ms per family), the rest is §P1c. Not run at P1a/P1b |
Organize-imports offer, aes_sbox_canright_masked.sv 42:2 (refactor, new) |
not measured as a row — take 4 §6c put it at 30.1 / 13.8–19.5 | Repeated <5 ms; identical counts | REF (P0) 32.25 / 13.70–18.04 ms; 2 actions, REF median 15.39. P1c 8.42 / 4.69–6.59, median 4.88; 2 actions, title lucisv: organize imports (removes 1, sorts 1) unchanged |
−68.3% on REF | New row. Target <5 ms met. The residue is one Scope::build over the buffer and its two packages (2.05 ms standalone); the buffer's own share of it is the handshake request in perf5-p1's README |
Organize-imports resolve (refactor, new) |
not measured | No lost removal, sort or refusal | REF (P0) 9.87 / 9.45–10.15 ms; 1 file, 1 edit, fingerprint 0ee027e37d07…, REF median 9.45. P1c 14.62 / 9.96–11.97, median 11.03; 1 file, 1 edit, fingerprint identical |
+16.7% on REF, inside this document's ±20% band for a 1–20 ms row | New row. The resolve path is unchanged by §P1c — organize's middle was lifted into planned and it still verifies the splice |
First offer after a didChange, same cursor (offeredit, new) |
not measured — the gap the P0 entry named | Track separately from the repeated offer | P1a pinmux 383.61 / 366.93–369.71 (median 368.32); aes_reg_top instance 35.82 / 23.38–26.30 (24.84); tb.sv comment 4.80 / 3.28–3.42 (3.35). P1b pinmux 152.88 / 132.68–135.04 (median 133.86); aes_reg_top 28.82 / 22.58–22.75 (22.66); tb.sv 2.29 / 1.90–2.00 (1.95) |
P1a → P1b: pinmux −63.7%, aes_reg_top −8.8%, tb.sv −41.8% |
New row, new phase offeredit. Each try is the first codeAction after its own didChange, so the document rebuild is inside the number; the paired "repeated offer on the unchanged buffer" rows sit beside them in the same session (P1b: pinmux 24.18, aes_reg_top 21.65, tb.sv 0.54). No REF exists — P0 could not measure it |
Extract command actually executed (execute, new) |
not measured — take 4's extract-module resolve rows are invalid |
Measure the command, not a refusal | REF lucisv.extractModule at aes.sv 220:0–222:53: 257.33 / 245.05–247.00 ms executeCommand→applyEdit; 2 edits / 2 files / 1 created; deliver_ms 0.015–0.033; status capture; fingerprint 090e92e7736e… — REF median 246.03. P2a median 244.53, P2b 244.78, P2c 161.41 / 149.25–149.86, median 149.25; 2 edits / 2 files / 1 created, fingerprint identical |
new row; P2c −39.3% on REF | The gap the tracker's work-count table named is closed — and §P2c's verify_move reuse is worth 39 % of the one refactoring command that really runs |
Inline command actually executed (execute, new) |
not measured | Measure the command, not a refusal | lucisv.inlineModule at aes_wrap.sv 66:2 is refused (generate construct); 6.58 / 5.87–6.20 ms. Not a timing of an inline. P2c 5.62 / 5.49–5.05, median 5.33. H33 6.95 / 6.74–6.17, median 6.55, same refusal sentence |
new row; H33 +1.2 ms on P2c | Refusal recorded as refused; not quotable as an inline cost. The H33 delta is the fifth rung's own census walk plus the 8 files it adds — the price of the refusal handshake 33 was missing |
Extract offered at the inline cursor, refused (execute, new) |
not measured | — | lucisv.extractModule at aes_wrap.sv 66:2 refused after 817.37 / 793.77–809.07 ms — REF median ~801. P2a 802.03, P2b 802.07, P2c median 801.23, H33/P2d 819.36 / 797.00–790.80, median 794.12, same sentence |
new row; 0 % at P2c, −0.9 % in the second lane | Unchanged, and correctly so: it refuses immediately after Scope::build, so there is no repeated analysis for §P2b/§P2c to remove. Its cost is module_sources selecting hundreds of files for a package name — §P2d and handshake 33 territory |
Cold workspace scan (scan, 3 fresh sessions) |
2830.30–2853.06 ms; mean 2843.00 | Investigation goal <2300 ms | REF 2860.12–2868.45 ms; mean 2863.85 — P4a (instrumented binary, quiet) 2846.95 / 2875.49 / 3046.12, mean 2922.85 — P4b 2816.59 / 2813.47 / 2818.56, mean 2816.21, against a same-window HEAD 2434729 control's 2857.77 / 2834.77 / 2848.29 (mean 2846.94) — P4b2 2859.99 / 2869.28 / 2802.25, mean 2843.84, against the previous P4b release re-run in the same window (3125.88 / 2885.50 / 2878.26, mean 2963.21) |
+0.7% on means; P4a +2.1% on means, −0.5% excluding the first try; P4b −1.1 % paired | Agrees. The first try is the first cold session after a link and is an outlier by 170 ms; the trace itself costs nothing measurable |
Warm workspace scan (scan, 3 fresh sessions) |
1322.24–1344.03 ms; mean 1332.41 | Investigation goal <1000 ms | REF 1346.02–1352.80 ms; mean 1348.94 — P4a 1327.12 / 1331.64 / 1369.46, mean 1342.74 — P4b 1132.60 / 1143.54 / 1136.83, mean 1137.66, against the same-window control's 1325.28 / 1324.62 / 1330.64 (mean 1326.85) — P4b2 1097.51 / 1094.56 / 1101.88, mean 1097.98, against the previous P4b release re-run in the same window (1169.60 / 1159.20 / 1215.23, mean 1181.34), and on the shipped binary re-run paired at load 8.7–9.1 1040.79 / 1036.88 / 1034.28, mean 1037.31 against 1198.25 / 1175.12 / 1198.07 (mean 1190.48), −12.9 % | +1.2% on means; P4a −0.5%; P4b −14.3 % paired | Agrees |
First useful answer during the scan (scan, new, 3 fresh sessions) |
not measured | Stay responsive during a scan (P4) | REF cold 84.42–85.87 ms, warm 206.12–218.72 ms; 1 location in every session — P4a cold 84.51 / 85.71 / 86.17, warm 209.07 / 209.52 / 212.08 — P4b cold 85.62 / 86.83 / 84.45 (control 84.06 / 84.01 / 84.60); warm 116.77 / 1133.53 / 1137.51 (control 208.94 / 206.16 / 208.85) — P4b2 cold 293.04 / 300.26 / 294.82, warm 396.86 / 404.88 / 411.39, against the previous P4b release re-run in the same window (cold 2902.62 / 2884.55 / 86.97, warm 1205.18 / 1204.50 / 125.84). Unimodal at last — and empty: result count 0 in all six P4b2 sessions, 1 in all six P4b ones | new row; P4a +0.3% cold, inside the REF range warm; P4b cold +1.6 %, warm bimodal | Explained at P4a, arithmetically. The definition is answered when the widen the didOpen triggered ends: cold 0.54 + 81.58 = 82.1, warm 181.19 + 26.31 = 207.5. Warm is slower because the empty startup scan ahead of the widen spends 181 ms opening and compacting a 44.3 MiB store. Not the publish cadence, not the decode — the config wait, and specifically that scan's store I/O |
Cold idle RSS (rss, 3 fresh sessions) |
528.0–530.9 MiB | Investigate ≥15% reduction; counts unchanged | REF 526.7 / 530.2 / 535.2 MiB (rss_kib, no longer in ms) — P4a 531.0 / 529.0 / 529.9 — P4b 527.08 / 529.25 / 530.45 MiB against the same-window control's 493.56 / 532.58 / 529.44 — P4b2 532.44 / 525.05 / 532.11 MiB against the previous P4b release re-run in the same window (529.64 / 530.14 / 529.61) |
+0.8% on the maximum; P4a −0.8%; P4b −0.4 % on the maximum | Agrees |
Warm idle RSS (rss, 3 fresh sessions) |
566.4–573.8 MiB | Investigate ≥15% reduction; measure peak too | REF 575.0 / 572.5 / 575.6 MiB — P4a 574.8 / 565.2 / 564.8 — P4b 482.55 / 481.67 / 482.75 MiB against the same-window control's 563.81 / 569.95 / 569.75 — P4b2 455.53 / 456.25 / 454.86 MiB against the previous P4b release re-run in the same window (484.63 / 482.34 / 484.08), −5.8 % on the maximum | +0.3% on the maximum; P4a −0.1%; P4b −15.3 % on the maximum | Agrees. P4a names what the warm-minus-cold 34–46 MiB is: the encoded facts IndexCache holds beside the decoded index, measured at 45 260 KiB = 44.20 MiB, 7.7 % of warm idle — the plan's hypothesis, confirmed, and worth at most half the −15 % goal |
Peak RSS across the scan (rss, new) |
not measured | Measure peak, not only idle | REF cold 526.7 / 530.2 / 535.2 MiB, warm 575.0 / 572.5 / 575.6 MiB — equal to idle to the KiB in all six sessions (ps -o rss= at 50 ms). P4a: equal to idle to the KiB again, all six sessions — P4b: equal to idle to the KiB in all six sessions again, and so is the control's |
new row | The resident set rises monotonically; there is no transient above idle on this workload — reproduced at P4a. The scan's own 34.15 MiB of held source text (work_kib) is released at finish_scan and does not show |
Startup scans per session (scanprofile, new, P4a) |
not measured — the plan expected "a 124-file default scan before the final scope" | Name every scan a session pays | P4a: a workspace session pays three. Scan 1 (whole, at the default settings) indexes 0 files — the folder scope is derived from directories a buffer has been opened from and none has; scan 2 is a widen (124 files) the first didOpen triggers; scan 3 is the configured whole scan (3 976 files). scopeDepth 0 pays the same three and ends with 1 file. Cold 0.8 / 94.0 / 2 760.0 ms; warm 183.7 / 26.6 / 1 112.7 ms — P4b, warm: scan 1 (whole, 0 files) 180.72 → 0.15 ms (opens 0, compactions 0); scan 2 (widen, 124) 26.21 → 116.51, which is scan 1's cache_open moved onto it (90.62); scan 3 (whole, 3 976) 1087.84 → 1016.23 with compact 90.20 → 10.13 and compactions 1 → 0. Session sum 1294.77 → 1132.89, −12.5 % — P4b2: a workspace session pays ONE. The empty scan and the widen behind it are both gone; warm the one scan reads 3 976 files in 1 093.67 ms with cache_open 91.91 once against P4b's 91.38 + 92.32 = 183.70, settled 1 233.39 → 1 110.48, −10.0 %. scopeDepth 0 pays two trivial scans (0 files, then a 1-file widen) totalling 1.4 ms against P4b's three totalling 106 ms |
new row | The plan's "124-file default scan" is real but is a widen, and the startup scan proper is empty — and warm it still costs 183.7 ms (cache_open 92.5 + compact 91.0 on a store it does not use) |
Warm scan stage breakdown (scanprofile, new, P4a) |
not measured | Attribute the warm settle | P4a, summed over the session's three scans, against a settled mean of 1 332.7 ms: discovery 255.91 (19.2 %), absorb 218.08 (16.4 %), decode 202.75 (15.2 %), cache_open 183.46 (13.8 %), compact 182.39 (13.7 %), candidates 113.34 (8.5 %), lookup 51.31 (3.9 %), includes 46.30 (3.5 %), publish_absorb 4.34, everything else 4.40, parse 0.00. Named total 1 262.28 = 94.7 %; unattributed 70.44 (the scan loop, the progress/log callbacks, the per-file word Vec, the staging pushes) — P4b, same session shape: discovery 246.11, absorb 208.40, decode 195.10, cache_open 91.12 + 90.62 = 181.74, candidates 105.81, lookup 48.84, includes 44.51, compact 10.13 (the skip's existence sweep, not a rewrite), parse 0.00 |
new row | No dominant stage — the top five are within 1.4× of each other — but the store's own I/O (cache_open + compact) is 365.9 ms, 27.5 %, and half of that is spent by the scan with no files in it |
Cold scan stage breakdown (scanprofile, new, P4a) |
not measured | Attribute the cold settle | P4a, against a settled mean of 2 893.6 ms: parse 1 703.63 (58.9 %), discovery 299.59 (10.4 %), absorb 218.40 (7.5 %), encode 183.26 (6.3 %), store_write 118.46 (4.1 %), candidates 110.66 (3.8 %), compact 93.89 (3.2 %), includes 45.52 (1.6 %), decode 5.87, publish_absorb 4.41, cache_open 3.39, lookup 2.86, rest 4.15. Named total 2 794.09 = 96.6 %; unattributed 99.49 | new row | Cold is a different problem from warm: 58.9 % is parsing, which nothing on §P4b's list touches |
Open buffers 1 / 10 / 100 (scanprofile, new, P4a) |
not measured | Measure what open buffers cost a scan | P4a, warm workspace, buffers opened right after initialize: settled mean 1 841.6 / 1 859.1 / 2 173.9 ms; a fourth scan appears (a second widen, 352–372 ms, for the folders those files live in, 1 685 files). Overlay refresh on the final scan 0.31 / 1.33 / 19.67 ms; order (open-buffers-first) 1.30 / 3.97 / 60.64 ms; a buffer's own record written through 0.49 / 2.21 / 21.20 ms; buffers indexed from their own analysis 2 / 11 / 101; config round trip 388–404 / 401–417 / 561–570 ms |
new row | The overlay refresh is not the cost — 100 buffers refresh in 19.7 ms. What scales is open_first: 60.6 ms at 100 buffers, one linear scan of a 3 976-entry work list per buffer. 3 % of that session's settle; filed, not recommended |
Requests arriving during a scan (scanserve, new, P4a) |
not measured | Definition stays responsive; no mismatched tables | P4a, a definition every 200 ms for as long as the scan reports, 3 fresh sessions per cache state, three answers each and three distinct modes: during scans 1–2 cold 83.66 / 83.97 / 84.95, warm 210.26 / 212.58 / 214.34; queued behind the configured rescan cold 2 558.85 / 2 563.65 / 2 567.24, warm 897.12 / 904.12 / 907.90; after settle cold 0.39–0.43, warm 0.24–0.40. mismatched_answers = 0 across all 18 requests — P4b: during scans 1–2 cold 84.63 / 85.61 / 85.87, warm 117.98 / 118.88 (control 206.77 / 208.49 / 209.67); queued behind the configured rescan cold 2582.51 / 2588.46 / 2600.39, warm 824.36 / 826.06 / 1150.43; after settle under 0.4 ms. mismatched_answers = 0 in every row of both binaries — P4b2: the queued mode is GONE. Every mid-scan answer cold falls between 0.20 and 475.41 ms across 37 answers and warm between 0.21 and 381.54 across 12, against the same-window P4b run's 2 621.84 / 2 658.83 / 2 933.71 cold and 933.86 / 942.65 / 1 233.87 warm. mismatched_answers 0 in all four rows of both binaries |
new row; P4b warm mid-scan −43 %; P4b2 removes the third mode entirely | A request arriving during the configured rescan waits the whole rescan — 2.56 s cold, 0.90 s warm. Correct per the scan-interleave contract (only a scan nobody asked for interleaves), but the scan that interleaves is the empty one. Coherence holds: every mid-scan answer named exactly what the settled index names, or nothing |
Configuration round trip (scanprofile/scanwait, new, P4a) |
not measured — the plan names "discovery + config wait" | Separate the wait from the work | P4a, timing: configuration answered in: cold 82.8–97.4 ms, warm 27.3–35.9 ms, and 388–570 ms with open buffers. The harness answers workspace/configuration from its reader thread instantly in every case |
new row | The number is not the client thinking — it is when the server got back to reading the answer, i.e. the work queued ahead of it. Cold that is the 124-file widen; warm it is the empty scan's store I/O |
Index store allocated size (rss, du -sk) |
44.34 MiB | Record codec/version and contents | REF 45 404 KiB = 44.34 MiB (store_kib) — P4b 45 404 KiB, identical to the control's on the same corpus; and byte-identical and mtime-identical across two warm sessions, where the control rewrote the same 46 486 433 bytes on each one — P4b2 45 404 KiB, same sha256 e49bc5c176ea…, same 46 486 433 bytes and the same mtime after a cold session and two warm ones on both binaries |
0.0% | Identical |
Pinmux open → definition (didopen, 3 fresh sessions) |
128.13–129.96 ms | Preserve §46 benefit | REF 119.01–131.85 ms — P4b 109.68 / 122.74 / 114.53 (median 114.53) against the same-window control's 107.12 / 128.13 / 118.38 (median 118.38) — P4b2 110.39 / 128.48 / 107.26 (median 110.39) against the previous P4b release re-run in the same window (122.67 / 118.75 / 128.15, median 118.75) | −3.8% on medians; P4b −3.3 % on medians | Agrees; §46's fix intact |
tb.sv dirty-buffer folding barrier (flush) |
1.05 / 0.65–0.72 ms | No material regression | REF 1.90 / 0.93–1.01 ms | +35.5% — outside tolerance, see experiment entry | Disagrees; a ~1 ms row, neither number adjusted |
Diagnostics publication (diagnostics) |
158.02 / 155.95–157.62 ms | Preserve debounce/burst coalescing | REF 156.72 / 152.74–160.55 ms | +1.6% | Agrees |
Unblocked definition (nav) |
0.365 / 0.048–0.084 ms; 1 location | Transport-sensitive regression control | REF 0.528 / 0.145–0.206 ms; 1 location | +132% but sub-millisecond: not read | Not read, per the round's own rule |
Transport floor (baseline) |
0.240 / 0.066–0.070 ms | Record contemporaneous noise | REF 0.207 / 0.061–0.102 ms; status: error with expected_status: error (an unknown method, rejected without work) |
+10.6% but sub-millisecond: not read | Not read; the row's rejection is now explicit |
| CLI default, hw/ip | 0.59 / 0.40–0.40 s; 445 findings | First trial outlier; compare paired repeats | REF 0.39 / 0.38–0.39 s; 445 findings; stdout sha256 identical to baseline — P3 mean 0.4233 s, median 0.420, n=6 against the reference's 0.4183 / 0.420 and a same-toolchain trunk build's 0.4450 / 0.420; 445 findings; stdout sha256 c2444712e23e… on all three binaries |
−3.0% on repeats (baseline's first trial excluded as the owner flagged); P3 0.0% on medians, +1.2% on means — the trunk control's mean is higher than either, so the mean spread is the machine, not the change | Agrees on repeats; outcome byte-identical. P3: default time unchanged, as the code path predicts (a default check never asks for the package half) |
| CLI all-style, hw/ip | 0.58 / 0.56–0.58 s; mean 0.573 s; 7751 findings | Retain all findings | REF 0.58 / 0.59–0.59 s; mean 0.587 s; 7751 findings; stdout sha256 identical — P3 mean 0.4817 s (median 0.480, range 0.47–0.49, n=6) against the same-day reference's 0.6333 and the trunk control's 0.6333; 7751 findings, stdout sha256 97201de03bca… byte-identical to the reference's |
+2.4% on means; P3 −23.9% on the same-day paired means (−17.9% on the §P0 REF's 0.587, which was taken at a lower machine load) | Agrees; reference for P3. P3 target ≤ ~0.52 s met at 0.482 |
| CLI all-style minus unused-import, attribution only | 0.44 / 0.44–0.47 s; mean 0.450 s; 7734 findings | Save ≥half of 123 ms increment with rule enabled | REF 0.46 / 0.43–0.46 s; mean 0.450 s; 7734 findings; stdout sha256 identical — P3 mean 0.4767 s against the reference's 0.4750 and the trunk control's 0.4917 (n=6 each); 7734 findings, stdout sha256 58780c3e81b8… identical |
0.0% on means; the increment reproduces at 137 ms (23.3% of all-style) against the baseline's 123 ms (21.5%). P3: the control is flat (+0.4% on the reference, −3.1% on the trunk build), so the whole all-style saving is the rule's own path — the paired increment falls 141.7 → 5.0 ms, 96% removed | Agrees; P3's target is ≥half of the increment measured on its own reference — met, and then some |
| CLI all-style peak RSS | 208.4 MiB max of 3 | No material memory increase | REF 217.0 MiB max of 3 — P3 max of 6 202.0 MiB, against the reference's 220.9 and the trunk control's 219.1 on the same runs (/usr/bin/time -l maximum resident set size) |
+4.1%; P3 −8.6% on the same-day reference maximum | Agrees. P3 removes memory rather than trading for speed: the one-file index is built for 181 files instead of 1 805 |
CLI all-style, hw/vendor and hw/dv (new, P3) |
not measured | Show the saving is not an hw/ip artefact |
P3 hw/vendor (285 files, 24 declare a package) 0.1125 → 0.0875 s; hw/dv (365 files, 40 packages) 0.0813 → 0.0663 s; eight alternating trials each, stdout sha256 1ce51659c4ab… and d7913e5f5846… identical to the reference's |
−22.2% and −18.5% on means | New row; no REF exists — P0 measured hw/ip only. The two smaller trees move by the same fraction, which is what a per-file cost predicts |
| Format check independently cold, hw/ip | 0.67 / 0.59–0.68 s | 0 cache hits; unchanged outcomes | REF 0.67 / 0.61–0.70 s; 0 cache hits in all three tries; 1772 would reformat, 30 unchanged, 4 failed; stdout sha256 identical | +2.0% on means | Agrees, and cold is now provably cold |
| Format check warm, hw/ip | 0.69 / 0.61–0.63 s | 30 hits; unchanged outcomes | REF 0.67 / 0.65–0.66 s; 30 hits in all three tries; same outcomes; stdout sha256 identical | +2.6% on means | Agrees |
Work counts and gaps that must be filled before attributing gains
| Measurement | Baseline knowledge | Reference — agent fills | Candidate — agent fills |
|---|---|---|---|
| Additional parses per no-offer all-family action | 5 text-parse entry points confirmed in source; no runtime counter | Still no runtime counter — P0 is harness-only and adds no production instrumentation. The wire-side attribution is reproduced (offerkinds): 82.80 ms shared base at the pinmux cursor, +52.7 to +57.6 ms for any one selector family |
Counter added and asserted on. vlog_parser::stats::parses() counts whole-file parses (thread-local; a request is answered on one thread). At a no-offer cursor a repeated all-family codeAction performs 0 parses, an only: [] request 0, and the first request after a didChange ≤2 (the document's own parse, plus the fence answer when a fix exists) — server::tests::code_action. On the wire the five parses are gone: a single selector family fell from 58.6–59.7 ms to 0.06–0.14 ms at the pinmux cursor. P1c: at a cursor that does offer, a repeated ports offer performs 1 parse — the instantiated module's declaring file — and a repeated organize-imports offer 3, one Scope::build over the buffer and the two packages it imports. Both are asserted by count in server::tests::code_action against a resolveSupport client, which is the path the offer predicates are on |
| Lint/config/fence time separately | About 80 ms combined on generated file; unseparated | Reproduced but still unseparated: pinmux only: [] 82.80 ms, quickfix 84.13 ms. Separating them needs P1's counters |
Separated by P1a's gates. only: [] now answers in 0.064 ms, so none of the 82.8 ms was unavoidable. Quickfix-only is 23.53 ms — the configuration read plus the lint pass. The difference, 59.3 ms, was the fence parse, and it vanished at this cursor because no finding in pinmux_reg_top.sv carries a fix, so §P1a's "no fix, no fence" gate skips it outright |
| Selector time by family and file size | Filtered ablations preserved in raw data | Promoted to the committed offerkinds phase: 7 families × 5 cursors × 4 requests, result counts in every row. All-family repeat medians by cursor — tb 1.54 / aes-reg-instance 23.51 / aes-core 10.42 / spi 14.43 / pinmux 309.60 ms. Pinmux by family: [] 82.80, quickfix 84.13, extract 140.42, inline 136.37, ports 137.97, organizeImports 135.45 |
P1b, same phase. All-family repeat medians by cursor — tb 0.60 / aes-reg-instance 21.79 / aes-core 2.30 / spi 3.16 / pinmux 24.02 ms. Pinmux by family: [] 0.053, quickfix 24.05, extract 0.107, inline 0.074, ports 0.063, organizeImports 0.060 — every selector family is now under a seventh of a millisecond on a 1.3 MB buffer. The one family that did not move is ports at an offering cursor (aes-reg-instance 22.47 → 21.15), which is P1c's row. P1c, same phase: aes-reg-instance all families 4.70, its ports family 3.27 — the last selector family to be measured in whole milliseconds at an offering cursor is now measured in fractions of one, and the 3.27 is dominated by the single parse of the 52 KB declaring file |
| Tail rename selected paths / input bytes / selection reasons | Not measured; 2 output files is not input count | Still not measured (needs P2a's server-side instrumentation). What P0 adds is the output side, exactly: 5 edits / 2 files / 0 created, fingerprint b39defb21265… |
Measured, §P2a. 238 files / 4 554 326 bytes, by rung: request 1, declaration 95, reference 122, instantiation 19, macro text 0, speller 0, open buffer 1, fallback false. So the input is 119× the output, and it is the declaration and reference rungs of a name 95 files declare. Unchanged at §P2b/§P2c — this lane narrows nothing |
| Tail rename watched vs edited paths | Edited 2; watched unmeasured | Edited 2, confirmed by files; watched still unmeasured — P2a |
Measured, §P2a: watched 106 files / 1 919 528 bytes, edited 2. Before §P2c all 106 were re-parsed for the after-print; now 2 are (the edited ones) and 104 are re-resolved from the analysis the before-pass made |
| Tail rename index / parse / analysis / resolution / verification stage times | Not measured | Not measured — P2a | Measured, §P2a (ms / whole-file parses): selection 13.4/0, Scope::build 228.5/238, locate 0.5/1, occurrence walk 116.3/134, token identity 4.3/0, before-prints 14.0/0, rebuilt_index 228.4/238, after-prints 71.5/106, warnings 83.6/0 — 717 parses, 73 % of the request. §P2c: 13.4 / 225.1 / 0.0 / 12.1 / 4.5 / 14.0 / 37.2 / 7.9 / 83.3 — 240 parses = K + E |
| Ordinary rename selected bytes / stages | Edited 9; other counts unmeasured | Edited 9 confirmed (14 edits, fingerprint fa7e31c78382…); stages unmeasured — P2a |
Measured, §P2a: 13 files / 400 051 bytes (request 1, declaration 4, reference 8), watched 12 / 398 160 bytes, edited 9; 51 parses; index 23.4, occurrence walk 19.2, verify 63.3 (rebuild 22.4, after 20.3), warnings 23.4 ms. §P2c: 22 parses = K + E, verify 46.8 (rebuild 23.4, after 2.9) |
| Ambiguous-use all-sources fallback frequency | Not measured | Not measured — P2a | Measured, §P2a. Of the eight renames the renametrace phase walks, four take the whole scope: a common port name (clk_i, whose declarations carry ambiguous references), a duplicate module name (rstmgr_por, declared in four files), a new name a great many external uses spell, and a cursor on no symbol at all (which rename.rs answers with ws.sources() outright, without consulting the ladder). Each costs a 3 976-file / 35.8 MB Scope::build, ~1 840 ms, before anything else happens |
| Per-file parses for CLI census and lint | Multiple paths confirmed; runtime counts unmeasured | Not measured — P3 | Counted by construction, §P3. Before: an all-style run over hw/ip did 1 805 ParsedSource::parse (the interface census) + 1 805 WorkspaceIndex::build (each a lex + parse + analyse + record) + 1 805 lint parses = 5 415 whole-file parses. After: 1 805 census parses + 181 analyses (no parse — the record is read off the census's own tree, and only for the files whose AST holds a package item) + 1 805 lint parses = 3 610 parses + 181 analyses. The third parse, the lint pass's own, is untouched and is the remaining duplicate |
| CLI package-census vs unused-import body time | Combined 123 ms wall increment; stages unseparated | Increment reproduced on the same binary at 137 ms, 23.3% of all-style (means 0.587 vs 0.450 s, three trials, alternating order, stdout hashes identical to baseline). Stages still unseparated — P3 | Separated, §P3. The increment is 141.7 ms on a same-toolchain trunk build and 5.0 ms on the candidate: the census's per-file index build was 136.7 ms of it, 96%, and the rule body plus the surviving 181-file census is the remaining 5.0 ms (1.0% of all-style). Measured as the paired difference all-style − (all-style with --ignore unused-import) on each binary, six alternating trials |
| Startup discovery / hash / decode / merge / candidates / includes / compact | Only combined scan time measured | Still only combined — P4a. P0 adds the scan's other half: first useful answer, cold 84.42–85.87 ms vs warm 206.12–218.72 ms, and the settle of those same perturbed sessions (cold 2855–2877, warm 1340–1358 ms) | Separated, §P4a, by the server's own trace (three timing: scan <n> … lines under --verbose; docs/features/perf5-p4/README.md holds the field list). Every stage the gate names, in ms, summed over a session's scans — warm (settle 1 332.7): discovery 255.91, hash/lookup 51.31, decode 202.75, merge/absorb 218.08 + 4.34 mid-scan, candidates 113.34, includes 46.30, cache_open 183.46, compact 182.39, parse 0.00, overlay 0.15 + 0.05; cold (settle 2 893.6): parse 1 703.63, discovery 299.59, absorb 218.40 + 4.41, encode 183.26, store_write 118.46, candidates 110.66, compact 93.89, includes 45.52, decode 5.87, cache_open 3.39, lookup 2.86. The trace accounts for 94.7 % warm / 96.6 % cold of the settle; the remainder is the scan loop and the per-file callbacks, left unattributed rather than folded into a neighbour. Counts on every row: read / read_kib / skipped / hits / misses / buffers / records / decoded_kib / written_kib / publishes / published / first_publish / overlays |
| Peak server RSS during startup and refactoring | Idle RSS only; peak unmeasured | Startup peak measured (peak_rss_kib, ps -o rss= at 50 ms across the scan): cold 526.7 / 530.2 / 535.2 MiB, warm 575.0 / 572.5 / 575.6 MiB — equal to idle to the KiB in all six sessions, i.e. no transient above idle. Refactoring peak still unmeasured — P2a. P4a re-measures startup: cold 531.0 / 529.0 / 529.9 MiB, warm 574.8 / 565.2 / 564.8, peak equal to idle to the KiB in all six sessions again, and the scan's 34.15 MiB of held source text is released before idle |
Measured, §P2a, and re-measured at §P2b/§P2c (MiB, ps -o rss= at 50 ms across each rename): tail 590 → 610 → 593; aes 582 → 577 → 585; unique internal 570 → 579 → 579; clk_i fallback 1 864 → 1 840 → 1 830; conflict 647 → 639 → 641; cipher_alert → clk_i 1 809 → 1 695 → 1 590; rstmgr_por fallback 922 → 901 → 927; no-symbol 914 → 905 → 918. No row's peak rose by more than 20 MiB and the two heaviest fell — retention is bounded to the files the request was going to analyse anyway |
| First useful response during scan; open buffers 1 / 10 / 100 | Not measured in this round | First useful response measured (above), each session a fresh process, kept in separate sessions from the settled rows so the settled series stays comparable. Open buffers 1 / 10 / 100 not measured — P4a | Both measured, §P4a. The first useful response is now explained rather than only measured (the row above). Open buffers 1 / 10 / 100, warm workspace: settle 1 841.6 / 1 859.1 / 2 173.9 ms, a fourth scan (a 1 685-file widen, 352–372 ms), overlay refresh 0.31 / 1.33 / 19.67 ms, order 1.30 / 3.97 / 60.64 ms. Also new: requests arriving during a scan (scanserve), three modes and 0 mismatched answers |
| Actual inline/extract command time and applyEdit payload | Not measured; existing resolve rows invalid for this purpose | Measured, phase execute. lucisv.extractModule (aes.sv 220:0–222:53): 257.33 / 245.05–247.00 ms from executeCommand to workspace/applyEdit, payload 2 edits / 2 files / 1 created, label lucisv: lucisv.extractModule, fingerprint 090e92e7736e…, declined with applied: false (status capture), delivery half 0.015–0.033 ms. lucisv.inlineModule (aes_wrap.sv 66:2) refused (generate construct) in 6.58 / 5.87–6.20 ms; the extract offer at that same cursor refused after 817.37 / 793.77–809.07 ms. Take 4's *-module resolve rows are removed, not reinterpreted |
— |
| First offer after didChange vs repeated unchanged offer | Separate distribution needed | Not measured. Every row separates the first request of a session from its repeats, but no row yet issues a didChange and then re-offers — P1's measurement |
Measured, new phase offeredit (tools/perf/phases_p1.py): three didChange → codeAction pairs, then three repeats at the same cursor in the same session. P1b medians — pinmux 133.86 first-after-edit against 24.18 repeated; aes_reg_top instance 22.66 against 21.65; tb.sv comment 1.95 against 0.54. So on the generated file the edit itself (one Document::new: lex, parse, analyze, resolve, line-index 1.3 MB) is ~110 ms and dwarfs the offer; on ordinary files the two are within 1 ms |
Correctness and integration gates
P0 changed no production code, so most of these gates have nothing to test at this stage; each says so rather than being left ambiguous.
| Gate | Required evidence | Candidate result / log |
|---|---|---|
| Action parity | Titles/kinds/counts/commands/data or edits/refusals; empty/prefix filters; cursor and selection | P0: recorded, not yet a comparison. Every offer row now carries titles, the shape of each offer (edit/command/data), result_count and the only filter it asked with; offerkinds walks 7 filters at 5 cursors. This is the reference P1 must match — P1a/P1b: matched. Every one of the 60 rows in each stage carries the REF's own result_count, and the codeaction rows the REF's own titles; all 7 filters at all 5 cursors agree. In tests, vlog_refactor/tests/parsed_selectors.rs compares old against new at every byte offset of five fixtures, and server/tests/code_action.rs pins order, prefix filters, the empty filter, a cursor-width extraction and a fix spanning the cursor. P1c: matched again — every row of offerkinds, codeaction and offerqueue compared field-by-field against P1b's own record (result_count, titles, shapes, status, fingerprint, edits, files, created): 50 rows, 0 differences; against the P0 REF, 65 rows, 0 differences. In tests, vlog_refactor/tests/port_offers.rs compares the offered menu against port_actions' menu — titles included, in order — at every byte offset of eight fixtures, and import_offers.rs compares organize_offer against organize_counts — counts and refusal sentence — at every byte offset of seven |
| Reuse freshness | didChange, unsaved overlays, config/options/tab width/waiver changes, index generation, closed files changed on disk | Not applicable at P0. P1b: one memo exists, the fence answer, and it is bound to the Document that owns the text — Workspace::set_document builds a whole new Document on every didOpen/didChange/text-carrying didSave, and answer_request flushes pending changes before any handler runs, so there is no revision to compare and no way to hold the wrong one. Pinned by a_fence_typed_into_the_buffer_is_seen_by_the_next_request (fix → fence typed in → fix withheld → fence removed → fix back). Configuration is not memoized: an_external_waiver_still_keeps_its_fix_out_of_the_offer writes a lucisv.toml between two requests and the second obeys it. An index rebuild between two requests changes nothing at the cursor (an_index_refresh_does_not_change_what_the_cursor_offers). Lint results are not cached — see the P1b-2026-09-07 entry for why and for the number |
| Fence parity | All aliases, class/statement fences, malformed source, raw scan backstop, insertions and multi-edit fixes | Not applicable at P0. P1: vlog_formatter/src/fence.rs is untouched and the shared-fence-filter contract is not amended — the question asked is still protected_regions(&doc.text), byte for byte, so every alias, class/statement fence, malformed-source case and scan backstop is answered by the same code as before. What changed is when it is asked (only when a violation carries a fix) and how often (once per document revision). vlog_formatter's own suite is green |
| Refactor whole-scope parity | Exact edits, warnings, refusal sentences; old/new common names, unresolved and ambiguous uses | P0 supplies the instrument: fingerprint (sha256 over sorted edits + created paths + warnings) and edits/files/created on every edit-bearing row, plus refusal sentences captured verbatim in message. First reference values recorded (tail rename, aes rename, extraction). P2: matched on every row of every stage. All thirteen edit-bearing rows of renametrace, tailrename, rename, refactor and execute carry byte-identical fingerprints at §P2a, §P2b and §P2c and equal to the §P0 REF's — b39defb21265…, fa7e31c78382…, 5f53e977da59…, 31aadc134628…, 4b534a16bca7…, 8f3a26dd147b…, 0ee027e37d07…, 090e92e7736e… — and the three refusal rows carry the same sentences and the same empty-edit fingerprint 96f32d4243b1…. The common-name, unresolved-new-name and ambiguous-use cases the gate names are the renametrace phase's own rows. Second lane (H33/P2d): matched again on every row — the four renametrace edit fingerprints, the shared refusal 96f32d4243b1… on all three refusal rows, the extract capture 090e92e7736e… and the three refactor resolves, all byte-identical; and inline-module gains a whole-workspace equivalence test in the suite (the_selected_set_answers_the_inline_exactly_as_the_whole_workspace_does), which is this gate asserted in code rather than only on the corpus |
| Topology handshake 33 | Transitive wrap.u_S.x refusal coverage before sharing/narrowing module sources |
CLOSED 2026-09-07 (second lane). module_sources gains an opt-in fifth rung (module_select::hierarchical_users, Workspace::module_sources_reaching), asked for by inline_module::execute alone: every file whose token census (WorkspaceIndex::files_mentioning, i.e. FileFacts::words) writes the dissolved instance's name down. words::harvest records every Ident token and the words inside macro/directive/attribute raw text, so every file no_hierarchy can refuse over is in it — the selected set now answers that refusal exactly as sources() does, asserted by the_selected_set_answers_the_inline_exactly_as_the_whole_workspace_does on six shapes. Sixteen tests (twelve through the real dispatch): two and three wrapper levels, the level the four rungs already saw, a bind from a file that instantiates nothing (the fixture that discarded the transitive-instantiator walk the topology row names — the walk cannot reach it), a generated path, a macro-hidden path (pinned not refused, with the reason), a package/interface/class name, duplicate modules, an unsaved buffer, a clean ladder, and the four-rung answer asserted unchanged as a list. Cost +1.2 ms at aes_wrap.sv 66:2 (8 files added); worst instance spelling in the corpus selects 79 of 3 975 files (2 %), on a command, never on a keystroke. Extract and the port actions ask for Reach::none() and are unchanged in answer and cost. Historical: not applicable at P2a–P2c: module_sources, offer_sources, imports::sources and rename_sources' six rungs are untouched, and no source set was narrowed or shared — the ladder's only change is that the set it fills now records which rung filled it. Handshake 33 remains §P2d's prerequisite. Not applicable at P0 — no selector shared or narrowed. Still not applicable at P1: the four *_in selectors take the same decisions over the same tree, and no source set was narrowed or shared — module_sources / offer_sources / imports::sources are untouched. Handshake 33 stays P2's prerequisite |
| Refactor verification | Token identity, semantic identity, parse-diagnostic preservation, comments/attributes, span remapping | P2: the checks are untouched; their inputs changed. Print, print, Shifts, Excluded, watched_files, tokens_match, first_difference, the ledger and the parse-diagnostic comparison are the same code and the same comparisons; what moved is where a Semantics and an after-index come from (check/after.rs, new). Every existing attack still refuses — check::tests' eight tokens_match pairs, check/ledger.rs's, removing_an_import_a_reference_needs_is_rejected, the rename/tests.rs refusals — and three new attack pairs aimed at the reuse were added and pass: a stale retained analysis (a_rename_whose_edit_rebinds_a_name_in_the_edited_file_is_refused), an after-index that forgot an unedited file (a_rename_that_would_make_a_third_files_use_ambiguous_is_refused), and shifted file ids (a_print_names_paths_so_shifted_file_ids_cannot_change_it). Not applicable at P0 — the engine's verifiers are untouched. Unchanged at P1: nothing below the four gates moved; extract_module, inline_module, organize_imports, port_actions and check::verify are the same code, and vlog_refactor's own suites are green. P1c: still unchanged where it matters. check::verify_splice, check::verify and ports::confirm are untouched, and every resolve/execute path still runs them — the three resolve rows measured above carry fingerprints byte-identical to the REF's. The offer predicates deliberately do not run them; that is the only widening, it is confined to a menu, it was already the lazy offer's stated contract, and the every-offset parity suites find zero cursors on their fixtures where it changes the answer |
| CLI output | Compare full findings/fixes/waivers/exit codes, not just counts; disabled-rule run stays attribution-only | Passed. stdout sha256 of all five configurations byte-identical to the baseline's; exit codes 1 (lint findings) / 2 (four pre-existing format failures) as before; the --ignore unused-import run is recorded as attribution only. P3: passed again, this time against a changed binary — the candidate's stdout is byte-identical to the reference's on all five cells (hw/ip default 445, all-style 7 751 including 17 unused-import, minus rule 7 734; hw/vendor 1 666; hw/dv 1 158), diffed as files. Exit codes unchanged. The --ignore unused-import run stays the attribution control and is never quoted as the optimization |
| Index parity | Fresh/incremental/absorbed fingerprints, unsaved wins, coherent partial publication, scope/filelist/rootless behavior | P2c pins the absorbed-against-fresh equality where the verifier now stands on it: an_absorbed_after_index_is_the_index_a_rebuild_would_give compares fingerprint, file list and a query-level print (units, references_to, instantiations_of, hierarchical_declarations, workspace_symbols) on nine cases including a file gaining and losing a declaration, an edit that changes what another file resolves to, a re-export chain, an edited package and a file that stops lexing; absorbing_an_edited_file_keeps_every_file_id pins id stability; an_index_from_analyzed_facts_is_the_index_a_build_gives pins the §P2b assembly. Not applicable at P0. Store size unchanged at 44.34 MiB and the scan's own $/progress end messages recorded per cell (124 → 3976 files indexed, 3975 from cache, 3 skipped warm) |
| Persistence | Corrupt/truncated/old-format stores rebuild safely; interrupted writes; content hash retained | Not applicable at P0. P4a: the store's behaviour is unchanged and its counters are new. open, facts_for, record and compact take the same decisions over the same bytes — the content hash is still the whole key, a record that no longer decodes is still a miss, compact still writes to a temp file and renames — and what was added is timing/byte counters and a rename of the body to compact_now behind a measuring wrapper. index_cache.rs's own suite (including the truncate-at-every-offset attack) is green |
| Resources | Guard outcomes, idle and peak memory, allocated/actual store size, stack-size requirement | P2: zero guard kills across nineteen timed phases and every cargo gate; largest resident set 1 864 MiB (23 % of the 8 GiB limit), on the §P2a all-sources fallback — and §P2b/§P2c lowered it. Peak RSS re-measured per rename at all three stages (the row above); no row rose by more than 20 MiB. The one new retention is a request-local HashMap<usize, Semantics> bounded to the files whose text spells one of the two names, which are the files the request analyses anyway. No new parsing thread, so the 16 MiB stack contract is untouched. Passed. Every run under tools/guard.sh -m 8 -t 1800; zero kills; largest resident set 575.6 MiB (7% of the limit). Idle and peak RSS now recorded in their own KiB fields; store 44.34 MiB. P1: zero guard kills across ten timed runs and every cargo gate. Memory not re-measured (P4a's phase); the only new retention is one Vec<Region> per open buffer that ever needed a fence answer. No new parsing thread, so the 16 MiB stack contract is untouched. P4a: zero guard kills across five timed phases, the workspace test run, clippy and two release builds; largest resident set 574.8 MiB (7 % of the limit). Idle and peak RSS re-measured (cold 531.0/529.0/529.9, warm 574.8/565.2/564.8 MiB; peak equal to idle to the KiB), store 44.34 MiB, and the retentions that explain them are now numbers rather than hypotheses (encoded facts 44.20 MiB, scan-held source text 34.15 MiB). The only new retention is one ScanTrace per scan — a fixed-size bag of counters — and a Cell<CacheWork> on the cache. No new parsing thread |
| Formatting | cargo fmt --all -- --check, appropriate formatter snapshot/idempotency and corpus gates |
P2: cargo fmt --all -- --check clean at every stage; the formatter is not on this change's path (vlog_formatter is untouched) and its suite ran green inside each workspace run. python3 -m py_compile tools/perf/*.py clean for the new phases_p2.py. Not applicable at P0 — no Rust changed, and no cargo command may run during a timed round. python3 -m py_compile tools/perf/*.py and bash -n tools/perf/*.sh clean. P1: cargo fmt --all -- --check clean; cargo test -p vlog_formatter green inside the workspace run (the formatter is not on this change's path — fence.rs is untouched — but it was run anyway). python3 -m py_compile tools/perf/*.py clean for the new phase. P4a: cargo fmt --all clean; python3 -m py_compile tools/perf/phases_p4.py clean. The formatter is not on this change's path and its suite ran green inside the workspace run |
| Lint/tests | Guarded affected tests then clippy/workspace tests at integration, no benchmark overlap | P2: guarded cargo test --workspace green before every release build — 4 215 (before the lane) → 4 225 (§P2b) → 4 231 (§P2c), 0 failed, no test removed or weakened; guarded cargo clippy --all-targets clean at each stage with no new #[allow]; cargo fmt --all -- --check clean. No cargo command ran during any timed phase: each stage built once, to completion, then measured. Not applicable at P0 (no Rust). No benchmark overlapped a build. P1: cargo clippy --all-targets clean at both stages (one needless_borrow introduced by the P1b diff was fixed; no new #[allow]), cargo test --workspace green before each stage's build, all guarded. No cargo command ran during any timed phase: each stage built once, to completion, then measured. Second lane (H33/P2d): guarded cargo test --workspace 4 231 → 4 248 passed / 0 failed (+17, none removed or weakened); guarded cargo clippy --all-targets clean with no new #[allow]; cargo fmt --all -- --check clean; one release build, then eight timed phases with no cargo running; zero guard kills; corpus unchanged after every phase. **P1c: cargo fmt --all -- --check clean, guarded cargo clippy --all-targets clean, guarded cargo test --workspace 4215 passed / 0 failed (4194 at P1b, +21), then one guarded release build, then four timed phases with no cargo running; zero guard kills; corpus unchanged after every phase. One new #[allow(clippy::too_many_arguments)], on imports::planned, with the reason on the line. P4a: guarded cargo test --workspace 4 272 passed / 0 failed (4 262 before the lane, +10 new, none removed or weakened); guarded cargo clippy --all-targets clean with no new #[allow]; cargo fmt --all clean; then one release build, then five timed phases with no cargo running; zero guard kills; corpus unchanged after every phase |
| Documentation | Feature README, handshake updates in topo, accepted numbers in perf README; reserved lead Review untouched by dev | P2: docs/features/perf5-p2/README.md created with all seven sections, QA and Review left empty, the work log kept as the work went. topo.md is not edited by this lane — four additive edges (FileFacts::analyzed; vlog_refactor::rename_traced and its trace values; the server's rename_trace module; rename::rename_traced / Workspace::rename_sources_traced replacing their untraced forms at the one production call site) are written as requests in that README's Handshakes for the lead to apply. docs/perf/README.md untouched until the lead accepts these numbers. Done. docs/features/perf5-p0/README.md created with the required sections (QA and Review left empty); no topo.md edge changed because no interface changed; docs/perf/README.md carries a note that two take-4 row meanings are superseded. P1: docs/features/perf5-p1/README.md created with all seven sections, QA and Review left empty, the work log kept as the work went. topo.md is not edited by this lane — the two additive edges (vlog_parser::stats, the four vlog_refactor *_in selectors, the server's fences module) are written as requests in that README's Handshakes for the lead to apply. docs/perf/README.md untouched until the lead accepts these numbers. P1c: the same README gains a P1c section in Goal, Handshakes, Status and Work log, a dated empty QA heading, and two further handshake requests for the lead — the port_offers / organize_offer topo edges, and a vlog_semantic request to expose a FileFacts built from an existing analysis (worth ~0.8 ms of the organize-imports offer). Review still untouched by the dev. P4a: docs/features/perf5-p4/README.md created with all seven sections, QA and Review left empty, the work log kept as the work went. topo.md is not edited by this lane — the additive edges (vlog_semantic::WorkspaceIndex::table_sizes / IndexTableSizes; the server's scan_trace module; the trace: bool on begin_scan/begin_widen and Workspace::take_scan_trace; Candidates::sizes / IncludeGraph::sizes; IndexCache::work/entry_count/encoded_bytes) are written as requests in that README's Handshakes for the lead to apply, together with the amendment to verbose-timing's "nobody parses these lines" assumption. docs/perf/README.md untouched until the lead accepts these numbers |
Experiment record — P0-2026-09-07 (stage P0)
- Experiment ID / stage / date / owner:
P0-2026-09-07/ P0 (TODO §60.0) / 2026-09-07, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: none — P0 changes no
production code. The hypothesis is about the instrument: that four named
defects (command-bearing offers timed as resolves, responses discarded by
Session.ms, RSS in a field calledms, the format cache reset once per cold cell instead of once per cold try) made specific rows mean something other than their names, and that fixing them leaves the surviving rows agreeing with the owner's baseline within tolerance. - Reference commit, candidate commit or diff hash, binary hashes: tree at
9c75b7a4e517bdf91151b85814ecbb43e0d8679dplus the uncommitted §60.0 working tree (tools/perf/*and docs only). Binaries unchanged and unrebuilt: server27e0a0df5b77102ec79c23279da64e722bffd440c604ad6d03ff66c2f6398ad3, CLI894054128495b764bb966e7b923e08267e57aea83fdc611fad4b4ed7a66b51e3, both verified againsttake5-baseline/metadata.jsonbefore any timing. - Files changed / API contracts amended / topology references:
tools/perf/{schema.py (new), phases_p0.py (new), lspclient.py, harness.py, bench.py, phases_new.py, sweep.sh, sweeptable.py, README.md};docs/features/perf5-p0/README.md(new); this file; a note indocs/perf/README.md; TODO §60.0's dev lines. No production Rust, notopo.mdedge. The only new contract is the record schema, stated intools/perf/README.mdand enforced byharness.record()andschema.quotable(). - Workload, corpus/input hashes, open files, cursor/range, rules, client
capabilities: OpenTitan
0098135264, the same three pre-existing modified files (hashes intake5-baseline/metadata.json), unchanged after all 16 timed runs. Cursors and selections aretools/perf/sites.py's, resolved from file text at run time:aes.sv220:0–222:53 (extract selection),aes_wrap.sv66:2 (inline), pinmux/spi/aes-core/tb comments, the five fan-out cursors,entropy_src_main_sm.svstate_q. Client shape is in every row;executeis the only session advertisingworkspace.applyEditandresourceOperations: ["create","rename","delete"]. - Machine, compiler/profile, threads, load before/after, competing
activity: M1 Max, macOS 27.0
26A5425a, release+LTO artifacts, default worker count. Load 2.92–5.21, recorded before and after every phase. A CI runner'scargo build --release -p lucisv(anacthost executor in~/.cache/act, not this tree) was at 100% of a core at session start; no timing was taken until it exited. The desktop session ran throughout, as in take 4 and the baseline. - Commands, cache reset/prime steps, trial ordering and fresh-session
count: 15 guarded
bench.py <phase>runs (baseline codeaction offerkinds offerqueue refactor execute tailrename rename blockers didopen scan rss flush diagnostics nav,--tries 3), thenscanonce more (below), then the paired CLI script. Every child throughtools/guard.sh -m 8 -t 1800. Index caches under a scratch--storage; the formatter cache under a scratch--cache-dirdeleted before each cold try. CLI configuration order alternated per trial; three trials. Fresh-process rows:scan(3 per cell),rss(3 per cell),didopen(3),blockers(3 per leader). - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p0/—results.jsonl(114 rows, schema 2),results-scan2.jsonl(the secondscanrun),results-execute2.jsonl(the secondexecuterun),cli-results.jsonl,runs.jsonl(per-phase command, exit, load before/after, corpus check),logs/. Units are in every row (units); latency ismsonly, memory isrss_kib/peak_rss_kib, store size isstore_kib, CLI iss. - Reference first / repeat median / range; candidate first / repeat median /
range: the Before/after table above carries all of them; the arrays are in
results.jsonl. P0 has no candidate distinct from the reference. - Work counts: reads, parses, analyzed/selected/watched/edited files and
bytes: no production counters (P0 adds none). Output-side counts are now
in the rows: tail rename 5 edits / 2 files / 0 created;
aesrename 14 / 9 / 0; extract command 2 / 2 / 1; every offer row carries itsresult_countand the shape of each offer (edit/command/data). - Result/status/count/fingerprint comparisons, warnings and refusal
checks: 114 rows — 110
ok, 1capture(the extraction's declinedapplyEdit), 2refused(both engine sentences ataes_wrap.sv66:2), 1error(the transport floor, carryingexpected_status: "error"). Result counts match the baseline everywhere they are comparable. The five CLI configurations' stdout sha256 are byte-identical to the baseline's. Fingerprints recorded for the tail rename (b39defb21265…), theaesrename (fa7e31c78382…) and the extraction (090e92e7736e…); the baseline has none to compare against, so these are the first reference values. Theexecutephase was run a second time (after a cosmetic fix to a refused row'snoteandfingerprint) and reproduced within 1.5% — with the identical extraction fingerprint090e92e7736e…, which is the first independent check that the fingerprint is stable across runs. - Idle RSS / peak RSS / cache size / guard outcomes: idle cold 526.7 / 530.2 / 535.2 MiB, warm 575.0 / 572.5 / 575.6 MiB; peak equal to idle to the KiB in all six sessions; store 44.34 MiB (unchanged); CLI peak 190.3 (default) / 217.0 (all-style) / 191.4 (all-style minus the rule) / 246.5 (format cold) / 217.3 (format warm) MiB. Zero guard kills.
- Target achieved or missed; paired improvement and variability: P0's
targets are the plan's four acceptance criteria, all met: a deliberately
rejected request is recorded as an error (the transport floor, and both
engine refusals); the inline/extract rows show a command and either an
applyEditpayload or a refusal sentence; cold formatter tries report 0 / 0 / 0 cache hits and warm 30 / 30 / 30 onhw/ip; RSS and peak RSS have their own fields with explicit units. No performance claim is made — the binary did not change. - Where the reference disagrees with the baseline beyond tolerance
(neither number adjusted):
tb.svcomment, lazy: repeat median 4.46 ms against the baseline's 3.49, +27.9%, outside the ±20% band a 1–20 ms row gets. A ~4 ms row on a desktop machine; the same cursor'sofferkindsreading (1.54 ms at a different comment on the same file, with acontextthe phase builds slightly differently) shows how sensitive this row is. Flagged for QA to re-take.didChangefolding barrier: 0.96 ms against 0.71, +35.5%. A ~1 ms row, above the round's 0.5 ms floor but only just.nav definition(+132%) and the transport floor (+10.6%) are both sub-millisecond and are not read, per take 4 §9's rule that nothing under 0.5 ms is a reading. Recorded, not treated as movement.format-coldpeak RSS 246.5 MiB against the baseline's 202.2 (+21.9%). Not a tracker cell; recorded here because it is the one memory number that moved by more than a few percent.- Everything else agrees within ±5.5%.
- Correctness tests and logs:
python3 -m py_compile tools/perf/*.pyandbash -n tools/perf/*.shclean. No Rust changed, so the cargo gates were not run (and could not be, mid-round). The corpus check is the correctness gate that mattered:git -C ~/repo/opentitan status --porcelainafter every phase and every CLI trial, always the same three files, plus a direct check thataes_extracted.sv— the file the extraction's own warning says its edit would create — does not exist. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
the instrument now says what it measures, and the two rows take 4 could not
measure are measured. Two findings came out of the new
executephase: the extraction costs ~250 ms of edit computation (delivery is 0.02 ms, so it is all engine), and the extract offer ataes_wrap.sv66:2 spends 793–817 ms to produce a refusal — a second ~800 ms user-command path beside the tail rename, and one that returns nothing. A third observation for P4a: the first useful answer during a cold scan arrives in 85 ms, while during a warm scan it takes 210 ms. Rejected alternatives: wrapping the server in/usr/bin/time -lfor a kernel peak-RSS figure (the guard already owns that slot, so a 50 mspspoll is used and the row says so); folding the CLI--ignore unused-importcell intosweep.sh(it would change the committed sweep's cell set for all five trees, so the paired CLI experiment stayed a scratch script as the owner's was); measuring the first-useful-answer inside the same sessions as the settled scan (serving a request perturbs the scan and would have broken comparability with take 4). - Decision: retain / revise / reject / defer; next stage justified by evidence: retain. P1 is justified and unblocked: it now has a same-binary reference for every row it will move, measured by the instrument it will be judged with, plus the family attribution (82.80 ms shared base at the pinmux cursor, +52.7 to +57.6 ms per selector family) it must reduce.
- QA result and lead review link: pending —
docs/features/perf5-p0/README.md.
Experiment record — P1a-2026-09-07 (stage P1a)
- Experiment ID / stage / date / owner:
P1a-2026-09-07/ P1a (TODO §60.1) / 2026-09-07, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: the ~82.8 ms a pinmux
code-action paid before any refactoring family was considered is optional
work — a configuration read, a lint pass and a fence parse — done before the
request's own
context.onlywas looked at. Checking the filter first should takeonly: []to the transport floor and a refactor-only request to its selector alone; and because the fence answer protects fixes, a pass whose findings carry no fix should not compute it at all. - Reference commit, candidate commit or diff hash, binary hashes: reference
is §P0's REF rows on
27e0a0df…(tree9c75b7a4…). Candidate is the working tree at501b36d8b8871ef6af39d6418ffd9290eede411bplus the §60.1 P1a diff; release binary sha2560bf7cf211108a67eb5e695a2ff8b473b669cac22b6e8502e8ff22879d4482ecd. - Files changed / API contracts amended / topology references:
lucisv_server/src/server/dispatch.rs(theCodeActionRequestarm),code_action.rs(wants_fixes, additive),lint.rs(fixable's fence gate);vlog_parser/src/stats.rs(new) + two increments inparser/mod.rs+ onepub modline; tests inlucisv_server/src/server/tests/code_action.rs(new) and itsmodline;tools/perf/phases_p1.py(new) + one import inbench.py. No contract amended.fence.rsuntouched, shared-fence-filter unchanged. The one new interface isvlog_parser::stats::parses(); atopo.mdedge is requested indocs/features/perf5-p1/README.md, not applied — the dev does not edittopo.md. - Workload, corpus/input hashes, open files, cursor/range, rules, client
capabilities: OpenTitan
0098135264, the same three pre-existing modified files,git status --porcelainverified identical after every phase. Cursors aretools/perf/sites.py's. Client shape recorded in every row (lazy:resolveSupporttrue,applyEdit/createFilesfalse), exceptcodeaction's eager half. - Machine, compiler/profile, threads, load before/after, competing
activity: M1 Max, macOS 27.0
26A5425a, release profile, default worker count. Load 3.04–4.54 before each phase and 3.04–4.50 after.cargo build --release -p lucisv_serverran once, to completion, before the first timed phase; no cargo command ran during any timed phase. - Commands, cache reset/prime steps, trial ordering and fresh-session
count: five guarded runs,
tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py <phase> … --tries 3forofferkinds codeaction offerqueue blockers offeredit, in that order, one scratch--storageper stage.blockersis the only fresh-process phase here (3 per leader). - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p1/results-p1a.jsonl(60 rows, schema 2),logs-p1a/,runs-p1a.txt(per-phase load and corpus check). Latency ismsand nothing else. - Reference first / repeat median / range; candidate first / repeat median / range: in the Before/after table above; arrays in the JSONL.
- Work counts: reads, parses, analyzed/selected/watched/edited files and
bytes: the counter (
vlog_parser::stats::parses()) is asserted in tests, not sampled on the corpus — a released server prints nothing. What the wire shows:only: []82.80 → 0.064 ms (the whole base was skippable), quickfix 84.13 → 23.53 (the fence parse gone), one selector family unchanged at 58.6–59.7 ms (still a whole-file parse each). - Result/status/count/fingerprint comparisons, warnings and refusal
checks: 60 rows, all
status: ok. Every result count is identical to the REF row's — the pinmux cursor still offers 0 actions under all seven filters,aes1,aes_reg_top2,prim_flop_2sync2 eager. No refusal, no warning, no created file; the corpus is unchanged. - Idle RSS / peak RSS / cache size / guard outcomes: not re-measured (P1
changes no allocation path;
rssis P4a's phase). Zero guard kills in all five runs. - Target achieved or missed; paired improvement and variability: P1a is a
step, not the stage's target. Achieved:
only: []−99.9%, quickfix −72.0%, all families −16.6%, queued definition −18.4%. The plan's three timing goals are all still missed at this point, by design — the four selector parses are P1b's subject. - Correctness tests and logs:
cargo fmt --all -- --checkclean,cargo clippy --all-targetsclean,cargo test --workspacegreen (all suites,vlog_formatterincluded), all undertools/guard.sh -m 8 -t 1800. Eight new tests pin the empty filter, the two gates, the no-fix case, prefix semantics, action order, a fix spanning the cursor and the empty-range extraction. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
the round's best result is the attribution, which no previous take could
make: at the pinmux cursor the 82.8 ms base was 23.5 ms of configuration
and lint plus 59.3 ms of fence parse, and 23.5 + 4 × 58.7 = 258.3 against
the 258.1 measured — the whole remaining cost is accounted for with nothing
left over. Rejected: returning for an empty
onlybefore the document lookup (it would turnnullfor an unknown buffer into[], a wire change for a hash-map lookup's worth of time); memoizing the fence answer here (it would have contaminated P1a's number with P1b's). - Decision: retain / revise / reject / defer; next stage justified by evidence: retain, and P1b is justified: four whole-file parses of a 1.3 MB buffer, 58.6–59.7 ms each, are 91% of what is left.
- QA result and lead review link: pending —
docs/features/perf5-p1/README.md.
Experiment record — P1b-2026-09-07 (stage P1b)
- Experiment ID / stage / date / owner:
P1b-2026-09-07/ P1b (TODO §60.1) / 2026-09-07, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: each of the four cheap
gates parses the same bytes the open
Documentalready parsed. Handing them that parse should remove four whole-file parses per all-family request — ~235 ms of the pinmux cursor's remaining 258 — and leave the lint pass as the residue. The fence answer, memoized per document revision, should remove one more parse on buffers that do carry a fix (not this one). - Reference commit, candidate commit or diff hash, binary hashes: the same
§P0 REF rows are the reference; P1a's rows are reported beside them as the
intermediate. Candidate is the working tree at
501b36d8…plus the full §60.1 diff; release binary sha256540b8b7ed42218c12fd662b552ddd3cd24026301912e7dc16c14d4d5c29d33e4. - Files changed / API contracts amended / topology references: engine —
vlog_refactor/src/{ports/mod.rs,imports.rs,extract/mod.rs,inline/mod.rs, lib.rs}, four additive*_inselectors, the text forms retained as wrappers. Server —fences.rs(new, 33 lines), oneOnceLockfield instate.rsand its two initializers, one private…_at(doc, …)helper each inports.rs/imports.rs/extract.rs/inline_module.rs,lint.rs::fixableaskingfences::of, onemodline inmain.rs. Tests —vlog_refactor/tests/parsed_selectors.rs(new), more ofserver/tests/code_action.rs.fence.rsuntouched and the shared-fence-filter contract not amended: the fence answer is stillprotected_regions(&doc.text), only memoized. Topology edges requested in the feature README. - Workload, corpus/input hashes, open files, cursor/range, rules, client capabilities: identical to P1a's, same three modified corpus files, corpus verified unchanged after every phase.
- Machine, compiler/profile, threads, load before/after, competing
activity: same host and profile. Load 3.70–5.01 before each phase,
3.70–4.50 after — higher than P1a's band by about 1.0, which matters only
for the sub-millisecond rows and is stated rather than corrected for. One
cargo build --release -p lucisv_serverbefore the first timed phase; no cargo during timing. - Commands, cache reset/prime steps, trial ordering and fresh-session
count: the same five phases in the same order,
--tries 3, a separate scratch--storage(caches/p1b) so no cache is shared with P1a. - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p1/results-p1b.jsonl(60 rows, schema 2),logs-p1b/,runs-p1b.txt. - Reference first / repeat median / range; candidate first / repeat median / range: in the Before/after table above; arrays in the JSONL.
- Work counts: reads, parses, analyzed/selected/watched/edited files and
bytes: asserted by count in
server::tests::code_action— a repeated all-familycodeActionat a no-offer cursor: 0 parses; anonly: []request: 0; extract+inline at an offering cursor: 0; the first request after adidChange: ≤2 (the document's own parse plus the fence answer). The ports family at an offering cursor still parses (the_port_offer_still_reaches_the_engine_and_that_is_what_p1c_is_for) — that is the engine plan, and the test exists so it cannot grow unnoticed. - Result/status/count/fingerprint comparisons, warnings and refusal
checks: 60 rows, all
status: ok; every result count identical to the REF and to P1a (pinmux 0 under all seven filters,aes1,aes_reg_top2, eagerprim_flop_2sync2). Offer titles recorded in thecodeactionrows are unchanged. No refusal, no warning, corpus unchanged. - Idle RSS / peak RSS / cache size / guard outcomes: not re-measured (see
P1a). The one new allocation is one
Vec<Region>per open buffer that ever needed a fence answer. Zero guard kills in all five runs. - Target achieved or missed; paired improvement and variability:
- Pinmux no-offer comment, unchanged buffer: goal <16 ms — missed at
24.02 ms (−92.2% on REF). Remaining stage, measured, not inferred: the
lint pass.
only: []is 0.053 ms and quickfix-only is 24.05 ms, so 100% of what is left is the configuration read pluslint_withover a 42 192-line buffer. - Ordinary repeated lazy offer, goal <5 ms — met on
tb.sv(3.65 ms on thecodeactioncursor, 0.60 ms on theofferkindsone), missed onaes(7.76 ms). aes_reg_topoffer, goal <10 ms — missed at 21.83 ms (−6.3%). Remaining stage, measured: the ports family alone is 21.15 ms of it and every other family together is under 0.6 ms, so it is entirely theport_actionsplan the offer computes and discards — P1c.- Queued definition: 309.40 → 24.61 ms (−92.0%), goal <16 ms missed by the leader's own lint residue.
- First-after-edit, tracked separately: pinmux 368.32 → 133.86 ms (−63.7% against P1a).
- Pinmux no-offer comment, unchanged buffer: goal <16 ms — missed at
24.02 ms (−92.2% on REF). Remaining stage, measured, not inferred: the
lint pass.
- Correctness tests and logs:
cargo fmt --all -- --checkclean,cargo clippy --all-targetsclean (oneneedless_borrowthe change introduced was fixed, no#[allow]added),cargo test --workspacegreen — 51 suites,vlog_formatter's snapshot/idempotency suite included — all undertools/guard.sh -m 8 -t 1800, zero kills. New: 7 engine parity tests that compareX_inagainstXat every byte offset of five fixtures (clean, non-parsing, CRLF, non-BMP, non-ANSI, empty), and 12 server tests covering the counters, the fence memo acrossdidChangein both directions, a waiver, alucisv.tomlwritten between requests, an index refresh, anuntitled:buffer, CRLF + astral positions, a non-parsing buffer, and a large buffer answering its command from its text. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
the offer path no longer parses anything it already has: on the generated
file a single refactoring family went from 58.6–59.7 ms to 0.06–0.14 ms, and
the all-family answer from 309.6 to 24.0 ms. Two named residues remain, and
neither is guesswork: the lint pass (24.0 ms, the whole of the pinmux
row) and the discarded ports plan (21.2 ms, the whole of the
aes_reg_toprow — P1c). Lint-result reuse was considered and not done. The condition the brief set is met — lint is 100% of the pinmux row for a client that wants quick fixes — but the memo is a differently-shaped change: its key must span the document revision (free, it lives on theDocument), the tab width, the effective rule set, the merged rule options, the line width, the contents of every external waiver file, and the workspace index generation — and that last one is not reachable fromfixable's signature at all, sincegenerationlives onServerand not onWorkspace. Wiring it means threading a generation through the code-action path and hashing four independent configuration surfaces, whose failure mode is a stale fix offer — the class of bug this repository's fourth invariant is about. It deserves its own item with its own attack tests (one per key component), beside the P1c ruling, rather than a tail on this lane. The number to decide with: 24.0 ms, of whichonly: []proves 0.05 ms is transport; and the first request after every keystroke pays it regardless of any memo. It may also be cheaper to ask which rules cost 24 ms on a 1.3 MB generated buffer than to cache their answer. Other rejected alternatives: giving the fence answer a parsed-input API (would amend the shared-fence-filter contract, which this lane may not do); making the large-file path readdoc.tree(its tree is the empty file's, so offers would silently disappear — today's behaviour is preserved instead and pinned by a test, with the question left to the lead). - Decision: retain / revise / reject / defer; next stage justified by
evidence: retain. P1c is justified by 21.15 of 21.83 ms at the
aes_reg_topcursor; a lint-reuse item is justified by 24.0 of 24.0 ms at the pinmux cursor. Both are lead rulings, not this lane's. - QA result and lead review link: pending —
docs/features/perf5-p1/README.md.
Experiment record — P1c-2026-09-07 (stage P1c)
- Experiment ID / stage / date / owner:
P1c-2026-09-07/ P1c (TODO §60.1, plan §P1c) / 2026-09-07, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: the lazy code-action offer
computes four verified port refactoring plans and one verified
organize-imports edit and discards every edit. Replacing them with engine-owned
predicates that ask only the plan-time questions should remove four
WorkspaceIndex::builds from the ports offer (measured at 3.89 ms each over the two files at theaes_reg_topcursor) and onecheck::verify_splicefrom the imports offer, leaving one parse of the declaring file and one index over the imported packages respectively. Expected:aes_reg_topbelow 10 ms,aesbelow 5 ms, the organize-imports offer below 5 ms, and every offered title, count and shape identical. - Reference commit, candidate commit or diff hash, binary hashes: reference
is §P1b's own record (server
540b8b7e…) for theofferkinds,codeactionandofferqueuerows, and §P0's REF (server27e0a0df…) for therefactorrows, which P1a/P1b did not run. Candidate: the P1c working tree over the §P1b tree, built as server sha25633a6888af3f2bc9b3b2d1fb2844f3d93f9f5950839446866838244f913d56cf1, CLI3f7bfd25cdbd16eeb5c16504c9b18181dddc1a26877447688f71b570234108cb(release,--locked), verified before and after the timed run. - Files changed / API contracts amended / topology references:
crates/vlog_refactor/src/ports/offer.rs(new, 282 production lines),ports/{mod,remove,propagate,expand,ansi}.rs(helpers madepub(super)and given parsed-input twins; no behaviour change),imports.rs(plannedextracted fromorganize;organize_offer,organize_offer_in),lib.rs(four new re-exports plusPortOffer/PortOfferKind);crates/lucisv_server/src/{ports.rs,imports.rs}(offered,counts_at); testscrates/vlog_refactor/tests/{port_offers,import_offers}.rs(new),crates/lucisv_server/src/server/tests/code_action.rs, and one import line inserver/tests/mod.rs. Notopo.mdedit — two additive edges are requested indocs/features/perf5-p1/README.md's Handshakes.tools/perfuntouched: every cell comes from a phase that already existed. No verifier, nocheck/, nostate.rs, nofence.rs. - Workload, corpus/input hashes, open files, cursor/range, rules, client
capabilities: OpenTitan
0098135264, the same three pre-existing modified files,git status --porcelainidentical before and after all four phases. Cursors aretools/perf/sites.py's, resolved from file text at run time. Lazy client (resolveSupport) in every offer row, warm workspace scope, scratch--storageper label. - Machine, compiler/profile, threads, load before/after, competing activity:
M1 Max, macOS 27.0
26A5425a, release+LTO, default worker count. Load recorded before and after every phase: 3.81–4.90. The release build was finished andpschecked clear ofcargo/rustcbefore the first phase; the load was allowed to settle below 4.5 before timing began. - Commands, cache reset/prime steps, trial ordering and fresh-session count:
four guarded
bench.py <phase>runs —offerkinds,codeaction,refactor,offerqueue— each--tries 3throughtools/guard.sh -m 8 -t 1800, with the corpus checked and the load recorded between each. No fresh-process rows in this set;offerqueue's three pipelines are in one session, as always. - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p1c/—results-p1c.jsonl(schema 2, 65 rows),runs-p1c.txt(per-phase command, exit, load before/after, corpus check),logs-p1c/. Latency ismsand nothing else. - Reference first / repeat median / range; candidate first / repeat median /
range: in the Before/after table above, and in
results-p1c.jsonl. Headline pairs, repeat medians:aes_reg_toplazy 21.83 → 5.46, its ports family 21.15 → 3.27, all families 21.79 → 4.70;aeslazy 7.76 → 1.74; fan-out 42 / 67 / 128 lazy 6.79 → 0.77, 6.90 → 1.78, 7.36 → 1.38; the port-actions offer ataes_wrap.sv78:2 24.84 (REF) → 1.19; the organize-imports offer ataes_sbox_canright_masked.sv42:2 15.39 (REF) → 4.88. - Work counts: reads, parses, analyzed/selected/watched/edited files and
bytes: counted in tests, not on the wire. A repeated ports offer at an
offering cursor performs 1 parse — the instantiated module's declaring file
— where §P1b's own test could only assert "> 0"; a repeated
organize-imports offer performs 3, one
Scope::buildover the buffer and the two packages it imports; at a cursor the gate refuses, 0. The source set is unchanged:offer_sourcesandimports::sourceswere not touched, so the offer still reads the buffer plus one or two declaration files. - Result/status/count/fingerprint comparisons, warnings and refusal checks:
every row of
offerkinds,codeactionandofferqueuecompared field-by-field with §P1b's record onresult_count,titles,shapes,status,fingerprint,edits,files,created— 50 rows, 0 differences. Every comparable row compared with the §P0 REF — 65 rows, 0 differences. The three edit-bearing resolves carry the REF's own fingerprints byte for byte: connect-missing-ports4b534a16bca7…, expand.*8f3a26dd147b…, organize-imports0ee027e37d07…. - Idle RSS / peak RSS / cache size / guard outcomes: memory not
re-measured (P4a's phase); the only new retention is the predicate's own
short-lived parse of one declaring file, dropped when the request ends.
Zero guard kills across the four timed phases, the release build and all
three
cargogates. - Target achieved or missed; paired improvement and variability: all
three met.
aes_reg_top< 10 ms → 5.46;aes< 5 ms → 1.74; the organize-imports offer < 5 ms → 4.88. Variability: the three repeats of each headline row sit within ±10% of their median except the connect-missing-ports resolve, whose try 2 (209.85 ms) is an outlier against 165.15 / 169.13 — a row §P1c does not touch, whose fingerprint is unchanged. - Correctness tests and logs:
crates/vlog_refactor/tests/port_offers.rs(10 tests) compares the offered menu withport_actions' menu — the titles themselves, in order — at every byte offset of eight fixtures; a fixture's every-offset run is what proves it rather than a chosen cursor.import_offers.rs(9 tests) comparesorganize_offerwithorganize_counts— the counts and the refusal sentence — at every byte offset of seven. Both include CRLF, a buffer that does not parse, a duplicate declaration, nested and package-nested modules, positional andbindand.*shapes, an unknown package and an already-tidy run. Zero differences. In the server: the two parse-count assertions above, andan_offer_the_fan_out_refuses_says_so_on_resolve_rather_than_crashing, which offers a removal the fan-out refuses and gets the engine's sentence ("lucisv: the action is no longer available.") fromcodeAction/resolve, not a panic. Gates:cargo fmt --all -- --checkclean, guardedcargo clippy --all-targetsclean, guardedcargo test --workspace4215 passed / 0 failed. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
the offer's cost was never the refactoring — at the
aes_reg_topcursor all four planners refuse at plan time — it was the fourScope::builds they each did before refusing. Removing the index from the ports predicate leaves one parse of the declaring file, which is 2.16–2.43 ms of the remaining 3.27 at that cursor and is the named residue: a memo per index generation would remove it and was out of this lane's scope. The imports predicate keeps its index becauseimport_usagegenuinely needs the packages' exports; its residue is the buffer's own share of that index, ~0.8 ms, which needsvlog_semanticto expose aFileFactsbuilt from an existing analysis (a handshake request, filed). Rejected alternatives: (a) sharing oneScopeacross the four planners — simpler, but 3.89 ms floor ataes_reg_top, which misses theaestarget; (b) resolving declarations through the server's workspace index — faster still, but it loses the offer on a module declared only in an unsaved buffer, which today's offer makes; (c) skipping the propagation's append loop and counting missing ports instead — one less loop, but the title counts edits and a connection written after a//comment costs two, so the promised count would have become wrong. - The one widening, stated plainly: the predicates do not run
check::verify_spliceorports::confirm, both of which run after the plan. An offer they would have refused is now made and declined on the click. That is the lazy offer's existing contract (lazy-code-actionREADME: "the offer may be optimistic; the resolve is exact"), it is confined to a menu, and the every-offset parity suites find no cursor on their fixtures where it changes the answer.resolveandexecutestill verify everything they always did; CLAUDE.md invariant 4 is not engaged — the verifier was not widened, and no verification was removed from any path that produces an edit. - Decision: retain. The two open items behind it are the lead's, not this lane's: the lint-result memo (24 ms, the whole of the pinmux row, already deferred to loop 3) and the declaring-file parse memo named above.
- QA result and lead review link: QA pending;
docs/features/perf5-p1/README.mdQA log, heading "2026-09-07 — QA, P1c".
Experiment record — P2a-2026-09-07 (stage P2a)
- Experiment ID / stage / date / owner:
P2a-2026-09-07/ P2a (TODO §60.2) / 2026-09-07, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: none — §P2a changes no
decision. The hypothesis is about the instrument: that a per-stage wall
time and a per-stage
vlog_parser::stats::parses()delta, plus the rung each selected file came in on, are enough to say where the tail rename's 780 ms goes, and that adding them moves no measured row. - Reference commit, candidate commit or diff hash, binary hashes: trunk
dafa4f0plus the §60.2 working tree; release serverbf584aa0daf6909ca4a5fab57d9b2c1ff9619132a9df4d686f58bce292003dde, CLI3f7bfd25cdbd16eeb5c16504c9b18181dddc1a26877447688f71b570234108cb. - Files changed / API contracts amended / topology references:
vlog_refactor/src/{trace.rs (new), rename/mod.rs, rename/tests.rs, check/mod.rs, lib.rs};lucisv_server/src/{rename_trace.rs (new), rename.rs, state.rs, perf.rs, main.rs, server/dispatch.rs};tools/perf/{phases_p2.py (new), bench.py, sites.py};docs/features/perf5-p2/README.md(new). Additive contracts:vlog_refactor::rename_traced+RenameTrace/VerifyTrace/Stage;Workspace::rename_sources_traced. Notopo.mdedge edited — the four requests are in the feature README's Handshakes.check::verifygained a trace parameter and no check changed. - Workload, corpus/input hashes, open files, cursor/range, rules, client
capabilities: OpenTitan
0098135264, the same three pre-existing modified files, unchanged after every phase. Eight renames, positions resolved from file text bytools/perf/sites.py:state_qatentropy_src_main_sm.sv41:19 withentropy_src_core.svopen;aesattb.sv44:2;cipher_alertat its declaration inaes_core.sv;clk_iat its declaration inentropy_src_main_sm.sv;state_q → state_d(conflict);cipher_alert → clk_i(a new name many external uses spell);rstmgr_porat its instantiation inrstmgr.sv(declared in four files); and a cursor on atb.svcomment (no symbol). Lazy client (resolveSupport), warm workspace scope, scratch index caches, servers run with--verbose. - Machine, compiler/profile, threads, load before/after, competing
activity: M1 Max, macOS 27.0
26A5425a, release + LTO, default worker count. Load 3.90 → 3.92 recorded before and after every phase. No build during any timed phase. - Commands, cache reset/prime steps, trial ordering and fresh-session
count: six guarded
bench.pyphases (renametrace tailrename rename blockers refactor execute,--tries 3, so four requests per row), each throughtools/guard.sh -m 8 -t 1800. Everyrenametracerow is its own fresh session with its own scratch--storage;blockersis three fresh leaders. Corpus checked after every phase. - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p2/results-p2a.jsonl(schema 2) andruns-p2a.jsonl(per-phase command, exit, load before/after, corpus check). Latency isms, memorypeak_rss_kib; every trace field is a row field undertrace_and is repeated verbatim innote. - Reference first / repeat median / range; candidate first / repeat median /
range: tail rename REF 813.44 / 780.45 / 778.77–782.13 against P2a
817.45 / 784.19 / 782.21–789.49;
aesrename REF 167.60 / 141.30 / 140.46–142.13 against 168.44 / 140.15 / 140.15–141.31. Every other re-taken row is in the Before/after table. - Work counts: reads, parses, analyzed/selected/watched/edited files and
bytes: the point of the stage. Tail rename 238 selected / 4 554 326 bytes
/ 106 watched / 1 919 528 bytes / 2 edited / 717 whole-file parses
(238 index + 1 locate + 134 occurrence walk + 238 rebuild + 106 after);
aes13 / 400 051 / 12 / 398 160 / 9 / 51; unique internal 4 / 68 475 / 1 / 1 / 10;clk_i3 976 / 35 813 310 / 1 200 / 19 257 967 / 2 / 10 399; conflict 242 / 4 570 234 / 111 / 2 / 638;cipher_alert → clk_i3 976 / 1 200 / 1 / 9 229;rstmgr_por3 976 / 0 / 0 / 3 976; no symbol 3 976 / 0 / 0 / 3 976. Rungs for the tail: request 1, declaration 95, reference 122, instantiation 19, macro 0, speller 0, open 1. - Result/status/count/fingerprint comparisons, warnings and refusal checks:
thirteen edit-bearing rows fingerprinted; the six that have a §P0 REF are
byte-identical to it. Three rows are
refusedwith the engine's own sentences; one iscapture(the extraction's declinedapplyEdit). - Idle RSS / peak RSS / cache size / guard outcomes: peak RSS per rename 590 / 582 / 570 / 1 864 / 647 / 1 809 / 922 / 914 MiB. Zero guard kills. Store not re-measured (unchanged codec).
- Target achieved or missed; paired improvement and variability: §P2a's target is that the instrument answers the question and costs nothing. Both hold: the breakdown above is the answer, and the six re-taken REF rows agree within +0.5 % / −3.0 %.
- Correctness tests and logs: guarded
cargo test --workspace4 215 passed / 0 failed (identical to §P1c's count — §P2a's own tests were added with §P2b),cargo clippy --all-targetsclean,cargo fmt --all -- --checkclean,python3 -m py_compile tools/perf/*.pyclean.git -C ~/repo/opentitan status --porcelainthe same three files after every phase. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
73 % of the tail rename is whole-file parsing, and two thirds of that
parsing is repeated work.
Scope::buildandrebuilt_indexare the sameWorkspaceIndex::buildover the same 238 texts, of which two differ; the occurrence walk re-parses 134 files the build already parsed; the after-pass re-parses 106 files the before-pass already analysed.warnings(83.6 ms) runs zero parses and is a token scan, so §P2b/§P2c cannot reach it. The selection is 13.4 ms and is not the story — but the size of what it selects (238 files for a two-file edit) is what will be left when the duplication is gone. Rejected: returning the trace inside theOkvalue, which would lose it on exactly the refusal rows the plan asks for. - Decision: retain. §P2b/§P2c justified by the two 228 ms stages being one another.
- QA result and lead review link: pending.
Experiment record — P2b-2026-09-07 (stage P2b)
- Experiment ID / stage / date / owner:
P2b-2026-09-07/ P2b / 2026-09-07 / dev agent (Opus). - Hypothesis and exact expected work reduction: building the index already
parses and analyses every in-scope file; keeping those analyses instead of
dropping them should remove every parse after the index build except the
after-side's — the tail rename's 134 occurrence-walk parses and its 1
locateparse, ~135 of 717 — with identical answers, because what is kept is the analysis the on-demand path would have recomputed. - Reference commit, candidate commit or diff hash, binary hashes: the §P2a
working tree plus the §P2b diff; release server
e555e6c79d8d63ffd65e25e48e13e4633d0a2361306f358043e88903607269c5. - Files changed / API contracts amended / topology references:
vlog_semantic/src/workspace/record.rs(additiveFileFacts::analyzed;facts_ofbecomes its.0; no codec change,FACTS_FORMATuntouched);vlog_refactor/src/{scope.rs, rename/mod.rs};vlog_semantic/tests/workspace.rs.Scope::build's behaviour, cost and memory are unchanged for every caller but the rename. - Workload, corpus/input hashes, open files, cursor/range, rules, client capabilities: identical to §P2a's, same phases, same sites.
- Machine, compiler/profile, threads, load before/after, competing activity: same host and profile; load 5.04 → 3.26 across the six phases, recorded per phase. No build during a timed phase.
- Commands, cache reset/prime steps, trial ordering and fresh-session
count: identical to §P2a's,
--tries 3. - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p2/results-p2b.jsonl,runs-p2b.jsonl. - Reference first / repeat median / range; candidate first / repeat median /
range: tail rename REF 780.45 against 674.68 (706.50 first,
673.57–676.19);
aesREF 141.30 against 123.08 (142.71 first, 122.59–123.11). - Work counts: tail rename 717 → 582 parses (index 238, locate 0,
occurrence walk 0, rebuild 238, after 106);
aes51 → 38;clk_i10 399 → 9 150; conflict 638 → 498. Selected/watched/edited counts and bytes unchanged on every row — nothing was narrowed. - Result/status/count/fingerprint comparisons, warnings and refusal checks: all thirteen fingerprints identical to §P2a's and to the §P0 REF's; the three refusals carry the same sentences.
- Idle RSS / peak RSS / cache size / guard outcomes: peak RSS 610 / 577 / 579 / 1 840 / 639 / 1 695 / 901 / 905 MiB — the two heaviest rows lower than §P2a's, none higher by more than 20 MiB. Zero guard kills.
- Target achieved or missed; paired improvement and variability: the
hypothesis's exact reduction was met (135 parses, the predicted set) and is
worth −13.6 % on the tail rename and −12.9 % on
aesagainst the REF. §P2's own targets are judged at §P2c. - Correctness tests and logs: guarded
cargo test --workspace4 225 passed / 0 failed (+10: tworename_traceunit tests, two trace tests, fourscope::tests, twovlog_semanticequality tests); clippy and fmt clean. The load-bearing ones areanalyzed_gives_the_record_of_gives_and_the_analysis_a_caller_would_compute,an_index_from_analyzed_facts_is_the_index_a_build_givesanda_retained_analysis_is_the_one_the_on_demand_path_would_compute. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
after §P2b the tail rename's remaining duplication is entirely on the after
side:
rebuilt_index(238 parses, 228 ms) and the after-prints (106 parses, 72 ms). Rejected: retaining every file's analysis unconditionally — §P2a measured ~0.8 MiB ofSemanticsper file, so the 3 976-file fallback would have peaked near 3.9 GiB against 1 864 MiB. Rejected: rebuilding the record withFileFacts::from_analysis— it needs the token slice the parser consumes, so every file's tokens would have to be cloned to feed it. - Decision: retain; §P2c is the rest of the same finding.
- QA result and lead review link: pending.
Experiment record — P2c-2026-09-07 (stage P2c)
- Experiment ID / stage / date / owner:
P2c-2026-09-07/ P2c / 2026-09-07 / dev agent (Opus). - Hypothesis and exact expected work reduction: the after-index is the
before-index with a handful of records replaced, and an unedited watched
file's after-print is its existing analysis re-resolved. Expected reduction:
the tail rename's 238 rebuild parses and 106 after parses, leaving
K + E= 240, with every check comparing exactly what it compared before. - Reference commit, candidate commit or diff hash, binary hashes: the §P2b
working tree plus the §P2c diff; release server
1601b13a9bacda47095cb23580e475ac8f33a171f446875484439ec67d58eb31(re-verified byte-identical after the rejectedupdate_factsprobe was reverted). - Files changed / API contracts amended / topology references:
vlog_refactor/src/check/after.rs(new, 39 production lines),check/mod.rs(427 → 405 production lines),scope.rs(Scope::against,Scope::sourcesdeleted),rename/tests.rs. No public API changed;WorkspaceIndex::absorb's existing contract (docs/topo.md§3, "absorb must equal one build over the resulting record set") is the one this stage stands on and now pins from a second crate. - Workload, corpus/input hashes, open files, cursor/range, rules, client capabilities: identical to §P2a's and §P2b's.
- Machine, compiler/profile, threads, load before/after, competing activity: same host and profile; load 5.15 → 3.26 across the six phases. No build during a timed phase.
- Commands, cache reset/prime steps, trial ordering and fresh-session
count: identical,
--tries 3. One extra guardedrenametracerun for the rejectedupdate_factsvariant, on its own label and its own binary, before the reverted binary was rebuilt and re-hashed. - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p2/results-p2c.jsonl,runs-p2c.jsonl, andresults-probe-updatefacts.jsonlfor the rejected variant. - Reference first / repeat median / range; candidate first / repeat median /
range: tail rename REF 813.44 / 780.45 / 778.77–782.13 against
451.54 / 419.86 / 418.61–421.27;
aesREF 167.60 / 141.30 / 140.46–142.13 against 126.13 / 106.31 / 105.95–107.15. - Work counts: tail rename 717 → 240 = K + E (238 index + 2 for the
edited files' one new analysis each; locate, occurrence walk, before-prints
and after-prints all 0);
aes51 → 22 = 13 + 9;clk_i10 399 → 3 977; conflict 638 → 244. Selected, watched and edited counts and bytes are unchanged from §P2a on every row. - Result/status/count/fingerprint comparisons, warnings and refusal checks:
all thirteen fingerprints byte-identical to §P2a's, §P2b's and the §P0 REF's;
the three refusals carry the same sentences and the same empty-edit
fingerprint
96f32d4243b1…. - Idle RSS / peak RSS / cache size / guard outcomes: peak RSS 593 / 585 / 579 / 1 830 / 641 / 1 590 / 927 / 918 MiB — the two heaviest rows 34 and 219 MiB below §P2a's. Zero guard kills across all nineteen timed phases of the lane.
- Target achieved or missed; paired improvement and variability:
- tail rename ≥ 2× faster: MISSED, at 1.86× (−46.2 %, 419.86 against
780.45; 2× needed 390.2). Repeat spread 418.61–421.27, so the miss is not
noise. The measured remaining stage is
Scope::build— one parse of each of the 238 selected files, 225.1 ms of the 419.9 (54 %) — withwarnings' token scan second at 83.3 ms (20 %) and the whole verification third at 73.0 ms (17 %). There is no duplicated parsing left; the next lever is the size of the selected set, which is §P2d. - stretch < 200 ms: not approached, for the same reason.
aesrename not slower: met, and 24.8 % faster.- edit/warning fingerprints identical: met, on every row of every stage.
- the queued definition follows: met, 161.33 → 121.85 (−24.5 %).
- collateral: the extract command −39.3 %, connect-missing-ports −20.3 %, expand-wildcard −23.6 %, organize-imports resolve −10 %.
- tail rename ≥ 2× faster: MISSED, at 1.86× (−46.2 %, 419.86 against
780.45; 2× needed 390.2). Repeat spread 418.61–421.27, so the miss is not
noise. The measured remaining stage is
- Correctness tests and logs: guarded
cargo test --workspace4 231 passed / 0 failed (+6 on §P2b: two after-index equality tests, the file-id test, theK + Eparse-budget test, and the two rename-level attack pairs; the third attack pair is the file-id-shift print test).cargo clippy --all-targetsclean, no new#[allow];cargo fmt --all -- --checkclean. Corpus unchanged after every phase. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
the request-local scope now does exactly
K + Ewhole-file parses, which is the floor for a design that reads the selected files itself. Rejected:WorkspaceIndex::update_factsper edited record instead of oneabsorb— the restricted merge is slower than the whole one on every row measured (tail rebuild stage 37.2 ms withabsorbagainst 53.3;aes23.4 against 40.2;clk_i269.7 against 400.9), because it walks the same records and pays a name-set lookup at every declaration. The parse saving is the same either way. The two remaining stages are outside §P2b/§P2c's mandate: the input's size (§P2d, gated on handshake 33) andwarnings' token scan. - Decision: retain. §P2d is now justified by a reprofile that says the selected set is the only thing left — and is a separate lane.
- QA result and lead review link: pending.
Experiment record — H33-2026-09-07 (topology handshake 33)
- Experiment ID / stage / date / owner:
H33-2026-09-07/ handshake 33, TODO §60.2's first unticked line / 2026-09-07, America/Chicago / dev agent (Opus), second §P2 lane. - Hypothesis and exact expected work reduction: none — this is correctness
work and it adds files. Hypothesis: a file that reaches an inlined
instance through modules it does not itself instantiate is in no rung of
module_sources, soinline/mod.rs::no_hierarchycannot refuse over it and the inline is silently accepted. Expected cost: the files the new rung adds, read and parsed byScope::build, on the inline command only. - Reference commit, candidate commit or diff hash, binary hashes: reference
e51a2c7(§P2a–c merged), server sha2561ee55becdec9799ed9bfb1d329bc4a13d16300ddfed87276b0c3bce9d47e601ffor the handshake-only build; final candidate (handshake 33 + the §P2d census) server sha256da2aa9433e1156731846a1f6c70a2ee44cd88e21af8be9375e7e6909b84ff1ea. Release,--locked, workspace LTO. - Files changed / API contracts amended / topology references: new
crates/lucisv_server/src/module_select.rs(24 production lines,Reach,hierarchical_users);state.rsgainsmodule_sources_reaching(+25 lines net,git diff --numstat28/3,module_sourcesdelegates to it, the four rungs byte-identical);inline_module.rsnames the dissolved instance as itsReach;main.rsandserver/tests/mod.rsonemodline each; newcrates/lucisv_server/src/server/tests/hierarchy_reach.rs. ConsumesWorkspaceIndex::files_mentioning, unchanged and already public. Topology row 33 wants the lead's strike and an amendment: the delivered rung is the instance's word census, not the transitive-instantiator walk the row asks for — see the feature README for thebindfixture that discarded the walk. - Workload, corpus/input hashes, open files, cursor/range, rules, client
capabilities: opentitan
00981352642fb65ef2b6c47143a0f6bb31fd4a97with the same three pre-existing modified files. Phasesexecuteandrefactor, bothtools/perf/bench.py, workspace scope,resolve_support+applyEdit+create_filesas §P0 set them. Cursors:aes_wrap.sv66:2 (the inline-module offer site) and 78:2 (port actions); the extract selectionaes.sv220:0–222:53. - Machine, compiler/profile, threads, load before/after, competing activity:
M1 Max, macOS 27.0
26A5425a; release profile; single-threaded server. Load before/after 4.72/4.13 (execute) and 4.13/3.9 (refactor). Nocargocommand ran during any timed phase. - Commands, cache reset/prime steps, trial ordering and fresh-session count:
tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py <phase> --server target/release/lucisv-server --label H33 --opentitan "$OT" --storage /tmp/perf-h33/caches/h33 --out ~/.cache/lucisv-perf/take5-p2d/results-h33.jsonl --tries 3. One fresh session per row; the storage cache is primed by the first session and warm thereafter, as §P0 set it. - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p2d/results-h33.jsonl;msis wire latency in milliseconds.executeinline row[6.95, 6.74, 6.36, 6.17]; extract capture[169.49, 151.35, 147.65, 148.78]; extract refusal[819.36, 797.00, 794.12, 790.80];refactorport-actions resolve[135.43, 131.51, 130.81, 130.73], expand-wildcard[60.69, 54.37, 54.57, 54.20], organize-imports[12.17, 10.51, 9.27, 8.47]. - Reference first / repeat median / range; candidate first / repeat median / range: inline command §P2c 5.62 / 5.33 / 5.05–5.49 against H33 6.95 / 6.55 / 6.17–6.74. Extract capture §P2c 161.41 / 149.25 / 148.65–149.86 against 169.49 / 148.78 / 147.65–151.35. Extract refusal §P2c 831.57 / 801.23 / 791.88–801.48 against 819.36 / 794.12 / 790.80–797.00. Port resolve §P2c 132.72 against 130.81.
- Work counts: reads, parses, analyzed/selected/watched/edited files and
bytes: the rung added 8 files at
aes_wrap.sv66:2 — the instance there is spelledtlul_cmd_intg_gen, and 8 corpus files write that word. Bound on the rung, derived from the corpus rather than assumed: the most-mentioned instance spellings areu_reg79 files,u_chk72,u_prim_buf32,u_bus_intg12, of 3 975 — so the worst inline this rung can reach selects about 2 % of the tree, on an explicit command. No keystroke path is affected:ports::code_actionsasks forReach::none(). - Result/status/count/fingerprint comparisons, warnings and refusal checks:
extract capture fingerprint
090e92e7736e…identical; both refusal sentences identical word for word (the inline'sgenerate-construct refusal, the extract'sh2d_intgrefusal); port resolve titlelucisv: connect 2 missing portsand expand-wildcardlucisv: expand .* (32 connections)unchanged. - Idle RSS / peak RSS / cache size / guard outcomes: not sampled by
execute/refactor(they carry no sampler); the rename rows' peaks are in theP2d-2026-09-07entry. Zero guard kills. - Target achieved or missed: not a performance target. The correctness
target — a hierarchical use the whole workspace refuses over is refused over
here too — is achieved and asserted, not argued:
the_selected_set_answers_the_inline_exactly_as_the_whole_workspace_doesrunsvlog_refactor::inline_moduleover the narrowed set and overws.sources()on six shapes and requires the same answer. - Correctness tests and logs: sixteen new tests — twelve in
server/tests/hierarchy_reach.rsdriven through the real dispatch, four inmodule_select.rs. Two and three wrapper levels; the level the four rungs already saw; abindwritten in a file that instantiates nothing in the chain; a generated path; a macro-hidden path (pinned not refused, with the reason —no_hierarchytokenizes and a directive is one opaque token, and the whole workspace answers identically); a package/interface/class name; duplicate modules (the ambiguity refusal, unchanged); an unsaved buffer that adds the path; a ladder nobody reaches into (still inlines); the four-rung answer asserted as a list, so a file appearing is a failure whatever its name; and the six-shape equivalence test. Guardedcargo test --workspace4 248 passed / 0 failed. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
the postings for a hierarchical path are keyed to the path's last
segment, not its hops —
references_toon theu_subinstance def is empty even when another file writesu_wrapper.u_top.u_sub.s— so §49's surface could not answer this by itself; that was measured with an index probe before anything was written. Rejected alternative: the transitive-instantiator walk the topology row names. It was implemented and tested, and its own fixture killed it:bind tb.u_wrapper.u_top.u_sub chk u_chk (…)in an SVA file that instantiates nothing in the chain is a refusal the whole workspace makes and the walk cannot reach, and$root-anchored and macro-built paths are the same shape. The walk also selects files that instantiate up the chain and never spell the instance, which no refusal can turn on. Rejected alternative: folding the rung intomodule_sourcesfor every caller, which the brief expected —ports::code_actionscallsmodule_sourceson every cursor move (§P1's whole subject) and neither it nor extract has a whole-workspace hierarchy refusal to feed, so they ask forReach::none()and pay nothing. - Decision: retain. Handshake 33 is closed, and the closure is the prerequisite §P2d was gated behind.
Experiment record — P2d-2026-09-07 (stage P2d)
- Experiment ID / stage / date / owner:
P2d-2026-09-07/ P2d / 2026-09-07, America/Chicago / dev agent (Opus), second §P2 lane. - Hypothesis and exact expected work reduction: after §P2c the tail rename is 420 ms of which 225 is one parse of each of 238 selected files. If a large share of those files contributes nothing to the four verifier checks, a narrower selector removes that share of the 225 ms and the missed ≥2× target is met. Expected reduction if the share is ~55 %: ~130 ms, taking the tail rename to ~290 ms (2.7×).
- Reference commit, candidate commit or diff hash, binary hashes: reference
§P2c server sha256
1601b13a9bacda47095cb23580e475ac8f33a171f446875484439ec67d58eb31; candidateda2aa9433e1156731846a1f6c70a2ee44cd88e21af8be9375e7e6909b84ff1ea. - Files changed / API contracts amended / topology references:
rename_trace.rsgainsindirect_census/census_line/SelectionTrace::indirect, andWantedholdsBTreeMap<PathBuf, Rung>instead ofBTreeSet<PathBuf>so the census can ask which rung a file came from;state.rscalls the census in one line. No selector's answer changed. Thetiming: rename traceline gains oneindirect{…}group, whichtools/perf/phases_p2.pyreads back astrace_indirect_*with no harness change. - Workload, corpus/input hashes, open files, cursor/range, rules, client
capabilities: the eight
renametracerenames plustailrename,renameandblockers, all as §P2a defined them, on the same opentitan commit and the same three pre-existing modified files. - Machine, compiler/profile, threads, load before/after, competing activity:
M1 Max, macOS 27.0
26A5425a, release. Load 8.83 → 4.05 across therenametracetake (high at the start and noted), 4.80 → 3.91 fortailrename/rename/blockers. Nocargocommand ran during any timed phase. - Commands, cache reset/prime steps, trial ordering and fresh-session count:
tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py <phase> … --label FINAL --storage /tmp/perf-h33/caches/final --out ~/.cache/lucisv-perf/take5-p2d/results-p2d.jsonl --tries 3; one fresh session per row;blockersrun three times because its first take was an outlier. - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p2d/results-p2d.jsonlandresults-blockers-retakes.jsonl; ms. Tail renamerenametrace[429.63, 419.95, 420.38, 420.57],tailrename[448.80, 420.90, 420.25, 424.44];aes[124.77, 106.90, 106.08, 106.69]andrename[131.03, 107.00, 105.61, 106.75];clk_ifallback[3927.21, 3958.95, 3796.36, 3802.35]. - Reference first / repeat median / range; candidate first / repeat median /
range: tail rename §P2c 419.86 against 420.90 (
tailrename) and 419.95 (renametrace);aes§P2c 106.31 against 106.75; fallback §P2c 3 860.06 against 3 802.35. Nothing moved, which is the point: the census is a diagnostic and had to be free. Selection time 13.6 ms against §P2c's 13.4. - Work counts — the census itself, which is this experiment's result. Tail
rename, 238 selected / 106 watched / 2 edited: request 1 (0 indirect),
declaration 95 (0), reference 122 (113), instantiation 19 (19), macro 0,
speller 0, open buffer 1 (1) — 133 of 238 (56 %) write neither
state_qnorstate_q_xdown. Their bytes are 2.63 MB of the input's 4.55, so about 130 ms ofScope::build's 225. The conflict row is the same shape (242 selected, 132 indirect); theaesrename has 1 of 13; the unique internal name 3 of 4 (a 4-file request, so the ratio says nothing). The fallback rows climb no rung and have no census by construction. - Result/status/count/fingerprint comparisons, warnings and refusal checks:
every
renametracefingerprint byte-identical to the §P0 REF's —b39defb21265…,fa7e31c78382…,5f53e977da59…,31aadc134628…— and the three refusal rows carry the same sentences and the same96f32d4243b1…. - Idle RSS / peak RSS / cache size / guard outcomes: peak RSS, tail rename
606 MiB (§P2c 593, QA 584);
clk_ifallback 1 802 MiB (§P2c 1 830, QA 1 574); conflict 638 (653 at §P2c's take). Nothing rose outside the spread the first lane's two takers already showed. Zero guard kills. - Target achieved or missed: the ≥2× tail-rename target stays missed at
1.85×, because §P2d ships no narrowing. The measured remaining stages are
Scope::build226 ms (54 %) andwarnings83 ms (20 %). - Correctness tests and logs: one new test,
the_census_counts_only_the_files_that_write_neither_name, and a strengthenedthe_first_rung_to_ask_for_a_path_is_the_one_countedwhich now asserts the map as well as the counts — the first version of the census usedBTreeMap::insert, which overwrites, so the map recorded the last rung and the corpus run reportedindirect_instantiation=122againstrungs_instantiation=19. Caught by that arithmetic being impossible, fixed withentry(…).or_insert(…), and pinned. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
the 133 cannot be dropped, and the census is what says why. Every direct
input of the four verifier checks is a file spelling one of the two names —
an occurrence is a use of the old name,
check::watched_filesiscontains_wordover the two,Scope::warningsspeaks only about them, the edited files are a subset of the watched — so the 133 are in the request to shape how the others resolve. They arefan_out_of's container rungs, and they are load-bearing: a two-level tailu_a.u_b.state_qfoldsu_a::u_bthroughmember_unit(A, u_b), contributed by A's declaring file, which instantiates the container and need never writestate_q; drop it andfollow_onereturns&[],follow_pathsruns out of paths and the reference isStillUnresolved— the edit §49 exists to make, silently not made. Worse is available on the same route:follow_pathstakes the first non-empty path, so a reference with two paths (the ordinaryimport a_pkg::*; import b_pkg::*;shape) that resolved into a dropped file falls through onto the next, which may be the target — an extra edit in a file the whole-workspace rename does not touch. That is the corruption route rung 1 was madeworkspace_symbolsfor. Exact-name postings, the plan's other §P2d idea, are gated on selection still being material: it is 13.6 ms of 420 (3.2 %), so they are not implemented. The narrowing that is left is the onedocs/features/refactor-rename/README.mdfiled itself — fan out from the one declaration the cursor resolves to, using the buffer's ownsemantics/external— which on the tail rename would cut the input to a handful of files. It needs a fall-through argument covering multi-path references, wildcard imports of a package declaring the old name, package members,extends/alias chains,bind,defparam,$root,`included fragments, generate-block shadows, class members and unsaved buffers that add either a reference or a same-named declaration, and the brief's own gate for it is a whole-scope oracle over thirteen named renames, those adversarial fixtures and a seeded 200-site corpus sweep with zero differences.warnings, filed not fixed: it is second at 83 ms, not dominant, so the brief's condition for touching it is not met. What it scans, so the next lane need not re-derive it — per selected file spelling the name,define_sitesbuilds aLineIndex,macro_argument_sitestokenizes and builds another,sva_fallback_warningstokenizes again and builds a third,unresolved_candidate_warningsbuilds a fourth; none shared, and none of them the parse the scope already made. Two changes look like pure dedupes: tokenize and index each file once per call (collecting the four scans into four vectors and concatenating them in today's order, so the output is byte-identical), and gatemacro_argument_sitesonWorkspaceIndex::files_naming_in_macros— which isFileFacts::macro_words, exactly the words inside the raw text that scan looks in, so the gate cannot hide a site. Together they should take the tail rename to roughly 375 ms and over the ≥2× line this stage missed. - Decision: retain the census, reject the narrowing for the 56 % it
measures, defer the target-scoped selector to its own lane with the shape
list above, and file the
warningsdedupe for the lead.
Experiment record — P2d-warnings-2026-09-07 (stage P2d, the warnings dedupe)
-
Experiment ID / stage / date / owner:
P2d-warnings-2026-09-07/ P2d's filedwarningsfinding / 2026-09-07, America/Chicago / dev agent (Opus), §P2d follow-up lane. -
Hypothesis and exact expected work reduction: §P2d measured
warningsat 82.9 ms of the tail rename's 420 and named the cause — per file spelling the name the stage tokenizes up to twice and builds up to fourLineIndexes, none shared. Sharing one lex and one index per file per call is a pure dedupe; it should remove most of that 83 ms and take the tail rename over the ≥2× line (≤ 390 ms). -
Reference commit, candidate commit or diff hash, binary hashes: reference = a clean clone at HEAD
e51a2c7(the §P2a–c commit), release server sha256644e11dd3cb3ecf63cad3cf8e6cae0be88af3bb26bdb9556d4c39a8158d9db86; candidate = the working tree (that commit plus the second lane's uncommitted handshake 33 + §P2d census, plus this change), release server sha25618ef6d60c54897d9512c3f98653db0c3c2e7b610ffee50801eb5444f2ce9f03b. Handshake 33 and the census touch neither rename warnings nor their timing, so the reference is a valid before for this stage; the tracker's §H33/§P2d numbers agree with it (warnings82.9 there, 82.2 re-measured here). -
Files changed / API contracts amended / topology references:
crates/vlog_refactor/src/rename/warnings.rsonly. New privateFileScan(tokens/lines/tokens_and_lines, memos oftokenize(text).ok()andLineIndex::new(text));Scope::warningsruns the four whole-scope scans in one per-file loop and concatenates their sentences in the order the four loops emitted them; the edited files' scans are kept for the fifth scan.macro_warningsbecame the per-filedefine_warnings;define_sitesandmacro_argument_siteskeep theirpub(crate)signatures forports::remove, each a three-line wrapper over a_withtwin. No public API, no handshake, no topology edge changed. -
Workload, corpus/input hashes, open files, cursor/range, rules, client capabilities: the eight
renametracerenames,tailrename,renameandblockersas §P2a defined them, plus a 13-rename warning-list parity run (those eight and the five sites the §P2a–c QA pass chose: a portentropy_clearing_ack_i, a parameterSecStartTriggerDelay, a package memberaes_pkg::AES_OP_WIDTH, the 128-instantiation moduleprim_flop_2sync, anddelay_cntr_qinsidetlul_delayer.sv'sgen_delay_logicgenerate block). Same opentitan commit, same three pre-existing modified files, verifiedgit status --porcelainafter every phase. -
Machine, compiler/profile, threads, load before/after, competing activity: M1 Max, macOS 27.0, release. Load 4.91 → 3.93 (
renametrace), 3.35 → 4.49 (tailrename/rename/blockers), 4.05 → 5.35 (the reference binary's phases), 3.92–5.90 across the retakes. Nocargocommand ran during any timed phase (both binaries were built before the first phase started). -
Commands, cache reset/prime steps, trial ordering and fresh-session count:
tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py <phase> --server <binary> --label <P2W|HEAD> --opentitan ~/repo/opentitan --storage <scratch>/caches/<binary> --out <scratch>/results-<binary>.jsonl --tries 3; one fresh session per row, scratch index stores per binary.tailrenameandblockerswere taken three and two times respectively per binary, alternating binaries, and the median of the takes' medians is quoted. -
Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p2w/—results-p2w.jsonl,results-head.jsonl,results-p2w-retakes.jsonl,results-blockers.jsonl, and the two warning dumpswarnings-{head,p2w}.jsonlwith the scratchpad clientwarnparity.pythat wrote them. Units ms exceptpeak_rss_kib.tailrenamecandidate[429.14, 390.97, 387.62, 389.82],[423.18, 390.68, 387.89, 387.95],[414.50, 393.28, 385.29, 383.91]; reference[450.88, 423.52, 422.46, 421.67],[440.53, 424.44, 415.62, 415.59],[440.66, 424.40, 415.28, 417.63].renamecandidate[112.28, 93.56, 91.79, 90.35], reference[131.90, 107.54, 106.49, 107.89].renametracetail candidate[404.91, 395.45, 393.61, 398.34], reference[449.37, 419.11, 422.97, 419.63];clk_ifallback candidate[3654.95, 3569.67, 3445.99, 3478.44], reference[3975.36, 3895.00, 3820.79, 3825.66]. -
Reference first / repeat median / range; candidate first / repeat median / range: tail rename (
tailrename) reference medians 422.46 / 415.62 / 417.63 → 417.63; candidate 389.82 / 387.95 / 385.29 → 387.95.aesrename reference 107.54, candidate 91.79. Definition behind the rename (blockers, mean of pipelines 2–3) reference 127.67 and 124.12, candidate 116.97 / 114.32 / 115.91 → 115.91. -
Work counts: reads, parses, analyzed/selected/watched/edited files and bytes: unchanged in every field, which is the point — the dedupe removes repeated token scans, not files. Tail rename: 238 selected / 4 554 326 B / 106 watched / 2 edited / 240 parses = K + E on both binaries;
clk_ifallback 3 976 selected / 3 977 parses on both;aes13 / 22 on both. The per-stage split moved in exactly one place:Row warningsreferencewarningscandidatechange tail rename 82.2 51.4 −37.5 % aesrename22.9 8.3 −63.8 % unique internal 2.7 0.9 −66.7 % clk_ifallback848.5 437.9 −48.4 % Every other stage is inside run-to-run noise (tail
index225.8 → 233.5,select14.0 → 14.4,verify73.7 → 74.6). -
Result/status/count/fingerprint comparisons, warnings and refusal checks: all eight
renametracefingerprints byte-identical to the reference and to the §P0 REF —b39defb21265…,fa7e31c78382…,5f53e977da59…,31aadc134628…and the shared refusal96f32d4243b1…on all three refusal rows — with the same refusal sentences. The warning lists themselves were compared as lists, not as counts: 13 renames × 2 binaries, everywindow/logMessagethe request produced captured verbatim in arrival order; the two 189 541-byte dumpsdiffclean. That includes the tail rename's 217 warnings and theclk_ifallback's 652, in order. -
Idle RSS / peak RSS / cache size / guard outcomes: peak RSS across the request, reference → candidate: tail rename 572 → 596 MiB,
clk_ifallback 1 801 → 1 795 MiB,aes583 → 585, duplicate module 911 → 914. The tail's +24 MiB is inside the spread the earlier lanes' own takers showed for that row (584 / 593 / 606 MiB) and is the only row that rose; what the change retains is the two edited files' token vectors, for the length of onewarningscall. Zero guard kills; everycargocommand and every server session ran undertools/guard.sh -m 8 -t 1800. -
Target achieved or missed; paired improvement and variability: the ≥2× target is MET. Tail rename 387.95 ms against the §P0 REF's 780.45 = 2.01×, −50.3 %; the stretch goal (<200 ms) is not approached. Paired against the same day's pre-change binary the fall is −7.1 %, and the whole of it is the
warningsstage's 30.8 ms.aesrename is not slower — it is −35.0 % on REF (−14.7 % on the day's reference). Take-to-take spread ontailrenamewas 385.29–389.82 (candidate) against 415.62–422.46 (reference): the two ranges do not overlap. -
Correctness tests and logs:
cargo fmt --all -- --checkclean;cargo clippy --all-targetsclean, no new#[allow];cargo test --workspace4 250 passed, 0 failed (4 248 before, +2 new). The new pin isrename::warnings::tests::the_shared_scan_says_exactly_what_the_per_scan_one_did: a#[cfg(test)]Scope::warnings_referencereproducing the five-loop, scan-builds-its-own-inputs control flow, asserted equal as a list to the shared implementation over fifteen fixtures — every warning-producing shapecrates/vlog_refactor/tests/rename.rspins, three silent controls, a macro argument in a file the rename does not edit, an SVA fallback, an unresolved candidate, a`definenaming the name plus one whose body spells it plus an`undef, two stray-occurrence shapes, a comment-only mention, a file that does not lex, and one workspace holding all of them with two files edited. The table asserts all six warning sentences are exercised, so it cannot pass vacuously. Three sabotages, each caught and reverted: swapping two groups in the concatenation (fails on the all-shapes fixture), sharing oneFileScanacross files (fails on the macro-invocation fixture), and keying the kept scan to the wrong file (fails on the resolved-tail control). -
Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
warningsis now what it always claimed to be — five scans of one token stream. The remaining stage isScope::build, 233 ms of the tail rename's 388 (60 %): one parse of each of the 238 selected files, which only a narrower selector reaches, and §P2d's census says that narrowing needs the target-scoped lane rather than the container rungs. Rejected: the second dedupe §P2d proposed — gatingmacro_argument_sitesonWorkspaceIndex::files_naming_in_macros. That census isFileFacts::macro_words=words::harvest_raw, which reads the same invocation tokens but skips every double-quoted run inside them (and any word a'precedes), while the scan askscontains_wordof the raw argument text. So`uvm_info("state_q", …)— the commonest shape in which a testbench names an RTL signal — is a site the scan reports and the census does not hold, and the gate would silently drop that warning. The non-equivalence is written intomacro_argument_sites' doc comment so the next reader does not re-propose it. -
Decision: retain. The dedupe is pure, pinned against the code it replaced, and it is what carries §P2's ≥2× target over the line. Next stage justified by evidence:
Scope::build's 233 ms, i.e. the target-scoped selector §P2d filed as a lane of its own. -
QA result and lead review link: QA pending (the second §P2 lane's QA covers handshake 33, §P2d and this follow-up).
Experiment record — P3-2026-09-07 (stage P3)
-
Experiment ID / stage / date / owner:
P3-2026-09-07/ P3, one parse for the CLI package census / 2026-09-07, America/Chicago / dev agent (Opus). -
Hypothesis and exact expected work reduction:
Census::ofcalledvlog_linter::package_exports(path, src)for every file wheneverunused-importwas enabled, and that function built a one-fileWorkspaceIndex— a lex, a parse, an analysis and a record read-off — even for a file declaring no package. The census had already parsed the same text a line earlier for the interface table. Two removals were expected: share the parse, and gate the index on the AST. Onhw/ip181 of 1 805 files declare a package, so the gate alone should remove ~90 % of the index work. Target: at least half of the 137 ms all-style increment, default time and peak RSS not materially worse. -
Reference commit, candidate commit or diff hash, binary hashes: reference = trunk
5c9fdb2(the §P2d lane's commit); reference binary = the tracker's own~/.cache/lucisv-baselines/lucisv-0.50.0, sha256894054128495b764bb966e7b923e08267e57aea83fdc611fad4b4ed7a66b51e3. A third binary was added as a control: the same trunk source rebuilt on this machine with this toolchain, sha25681bb40a28802e713233519c0e390f518c6cc32f31f535332ba4b7c3295c5deff(the four edited files were replaced withgit show HEAD:<path>output, built, then restored from copies — no git state was changed). Candidate = the working tree, release sha2562c16b321cb2d10835129c809af1acb8c6cb680bb7fa56cf9b4b2b9c25c220215, built twice from the restored sources to the same hash. The control exists because the first eight-trial pass showed defaultcheck+4 % on the candidate with no code path behind it; it separates a build/machine difference from a source one, and it answered: the trunk rebuild is +6.4 % on default against the cached reference while the candidate is +1.2 %, and all three medians are 0.420 s. -
Files changed / API contracts amended / topology references:
crates/vlog_linter/src/interfaces.rs(newpackage_exports_in(path: &Path, file: &SourceFile, tokens: &[Token], src: &str), the privatedeclares_a_packagegate andone_file_index;package_exports(path, src)is now a two-line wrapper),crates/vlog_linter/src/lib.rs(one re-export),crates/lucisv/src/lint.rs(Census::of's closure lifted to a freeharvest_one, which parses once and feeds both halves),crates/lucisv/tests/cli.rs(+6 tests).crates/vlog_semantic/is untouched:FileFacts::from_analysis(added by §P2b) andIndexBuilder::{add_facts, finish}were already exactly what was needed, so the additive semantic API the plan allowed was not required. Topology: two edges need amending by the lead —lucisv ──▶ vlog_linter(addpackage_exports_inbesideParsedSource) andvlog_linter ──▶ vlog_semantic(the edge now also readsFileFacts::from_analysis+IndexBuilder). Requested indocs/features/perf5-p3/README.md;topo.mdwas not edited by this lane.cargo tree -p lucisv -e normalstill listslucisv_core,rayon,vlog_formatter,vlog_linter,vlog_parserand notvlog_semantic— the CLI keeps no direct semantic dependency. -
Workload, corpus/input hashes, open files, cursor/range, rules, client capabilities: opentitan
00981352642fb65ef2b6c47143a0f6bb31fd4a97with the same three pre-existing modified files, verifiedgit status --porcelainbefore the run and after every phase. Three configurations onhw/ip(1 805.sv/.svh): defaultcheck;check --select error,warning,style; the same with--ignore unused-import(attribution control). Plus all-style onhw/vendor(285 files) andhw/dv(365). Package-declaring files,grep -lE '^[[:space:]]*package[[:space:]]+':hw/ip181,hw/vendor24,hw/dv40. Default worker count. -
Machine, compiler/profile, threads, load before/after, competing activity: M1 Max, macOS 27.0, release profile, workspace LTO. Load was high and rising for the first pass — 5.77 to 9.92 one-minute — and 3.63 to 5.83 for the three-way control pass, against the §P0 baseline's 2.92–4.59. The competing load was ordinary desktop work (WindowServer, browsers), no build and no benchmark; nothing was killed. This is why the headline is quoted as the paired difference against a binary measured in the same alternating pass, and why absolute seconds here are higher than §P0's REF cells across the board — the reference binary is 8 % slower here than it was there. No
cargocommand ran during any timed pass. -
Commands, cache reset/prime steps, trial ordering and fresh-session count: every child
tools/guard.sh -m 8 -t 1800 -- /usr/bin/time -l <binary> <args> <tree>, the owner's paired-CLI method from take5-baseline with the binary order alternating between trials. Three passes:probe.py(2 binaries × 5 cells × 8 trials),default-only.py(defaultcheckalone, 12 alternating pairs, to settle the ambiguous default cell),threeway.py(3 binaries × 3 cells × 6 trials). The lint cache is not involved (checkdoes not use the format cache); no cache reset step applies. -
Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5-p3/—probe.py,default-only.py,threeway.py,p3-results.jsonl,p3-default-focus.jsonl,p3-threeway.jsonl, the ten saved stdout captures andbinaries.sha256. Units:wall_sseconds,peak_rss_bytesbytes (/usr/bin/time -l's maximum resident set size). Three-way pass, wall seconds in trial order:Cell ref-0.50.0trunk-rebuildcand-p3default [0.40, 0.40, 0.42, 0.43, 0.42, 0.44][0.59, 0.40, 0.42, 0.44, 0.40, 0.42][0.42, 0.43, 0.42, 0.41, 0.41, 0.45]all-style [0.60, 0.65, 0.63, 0.60, 0.64, 0.68][0.61, 0.64, 0.61, 0.64, 0.62, 0.68][0.47, 0.49, 0.49, 0.48, 0.48, 0.48]minus rule [0.47, 0.47, 0.49, 0.46, 0.47, 0.49][0.46, 0.48, 0.49, 0.48, 0.47, 0.57][0.47, 0.47, 0.47, 0.47, 0.48, 0.50]Eight-trial pass,
hw/ipall-style: reference[0.58, 0.61, 0.71, 0.62, 0.59, 0.62, 0.64, 0.58], candidate[0.48, 0.48, 0.53, 0.46, 0.50, 0.51, 0.47, 0.48]; minus rule reference[0.50, 0.47, 0.47, 0.46, 0.49, 0.48, 0.47, 0.48], candidate[0.50, 0.48, 0.48, 0.47, 0.48, 0.47, 0.46, 0.49].hw/vendorreference[0.11, 0.11, 0.12, 0.11, 0.11, 0.11, 0.12, 0.11], candidate[0.08, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.08];hw/dvreference[0.08]×6 + [0.09, 0.08], candidate[0.07, 0.06, 0.06, 0.06, 0.06, 0.09, 0.06, 0.07]. Default-only pass, 12 pairs: reference[0.42, 0.40, 0.41, 0.38, 0.42, 0.41, 0.43, 0.40, 0.40, 0.39, 0.42, 0.52], candidate[0.40, 0.44, 0.42, 0.47, 0.41, 0.41, 0.44, 0.40, 0.45, 0.43, 0.46, 0.47]. -
Reference first / repeat median / range; candidate first / repeat median / range: three-way pass, means (medians): all-style reference 0.6333 (0.635), trunk control 0.6333 (0.630), candidate 0.4817 (0.480); minus rule 0.4750 / 0.4917 / 0.4767; default 0.4183 / 0.4450 / 0.4233, all three medians 0.420.
-
Work counts: reads, parses, analyzed/selected/watched/edited files and bytes: every file is still read once and linted once — the selected set is unchanged and no file is skipped. What changed is per-file work in the census. All-style over
hw/ip, before: 1 805 census parses + 1 805 one-fileWorkspaceIndex::builds (each its own lex, parse,analyzeand record) + 1 805 lint parses. After: 1 805 census parses + 181 analyses built on the census's own tree + 1 805 lint parses — 1 805 lexes, 1 805 parses and 1 624 analyses removed. Defaultcheckis unchanged in every count (packagesis false there;unused-importisSeverity::Style). -
Result/status/count/fingerprint comparisons, warnings and refusal checks: all five cells' stdout is byte-identical between the reference and the candidate, diffed as files rather than compared as counts —
hw/ipdefaultc2444712e23e…(445 findings),hw/ipall-style97201de03bca…(7 751 findings, 17 of themunused-import),hw/ipminus rule58780c3e81b8…(7 734),hw/vendorall-style1ce51659c4ab…(1 666),hw/dvall-styled7913e5f5846…(1 158). The hashes also match what §P0 recorded for the reference. Exit codes 1 (findings) and 2 (the four pre-existing format failures) as before. -
Idle RSS / peak RSS / cache size / guard outcomes: all-style peak RSS, maximum over the three-way pass's six trials: reference 220.9, trunk control 219.1, candidate 202.0 MiB — −8.6 %. Default peak 188.7 / 182.2 / 183.7 MiB; minus rule 191.1 / 185.8 / 189.9 MiB (both inside the run-to-run spread, which is ±20 MiB on this workload). Zero guard kills; every build, every suite and every timed child ran under
tools/guard.sh -m 8 -t 1800. Corpusgit status --porcelainwas the same three files before the run, after every single invocation (asserted by the probe, which raises otherwise) and at the end. -
Target achieved or missed; paired improvement and variability: MET, by a wide margin. The rule's paired increment
all-style − minus-rule: reference 158.3 ms, trunk control 141.7 ms, candidate 5.0 ms — 96 % removed against the same-toolchain control (97 % against the cached reference), where the target was ≥ 50 %. All-stylehw/ip0.4817 s against the ≤ ~0.52 s goal. The eight-trial pass agrees independently: increment 141.3 → 10.0 ms, all-style 0.6188 → 0.4888 s. Default time is unchanged (medians identical on all three binaries; the mean spread is the machine — the trunk build's default mean is the highest of the three). Peak RSS fell rather than rose. Candidate all-style spread 0.47–0.49 does not overlap the reference's 0.60–0.68. -
Correctness tests and logs:
cargo fmt --allclean;cargo clippy --all-targetsclean, no new#[allow];cargo test --workspace4 262 passed, 0 failed, 44 ignored (4 250 before, +12). The equality pin isinterfaces::package_tests::every_fixture_answers_what_a_text_built_index_answers: a#[cfg(test)]from_textreproducing the pre-P3 body verbatim (WorkspaceIndex::build([(path, src)])and the same three queries), asserted equal over 15 fixtures — no package, one, two,export *::*,export q::*, a named re-export, a package behind an`ifdef, a package after a module, text that does not lex, a parse error inside a package body, a class in a package, the wordpackagein a string, the same in a comment, one name declared twice, and an empty file. Three more pin the parts the equality test cannot see:only_a_package_item_opens_the_gateasserts the gate's answer fixture by fixture (so a gate that always opened would fail),the_unlexable_fixture_does_not_lexstops that fixture going stale, anda_name_declared_twice_in_one_file_answers_with_the_firstpins the one surprising pre-existing answer: a duplicate inside one file reports the first declaration's members, notNone— theNoneis the cross-file rule, applied byCensus::of's merge. Six CLI tests drive the real binary end to end (crates/lucisv/tests/cli.rs): an unused import reported and a used one not, a defaultchecksilent about imports, an import of a package outside the run silent, an import of a re-exporting package silent, an import of a package two files declare silent, and a run whose extra files saypackageonly in a string and a comment producing the identical finding set. -
Interpretation, remaining bottleneck, tradeoffs, rejected alternatives: the CLI's package census is no longer a whole-project index build. What remains of the increment is 5.0 ms (1.0 % of all-style): the
unused-importrule body's ownimport_usageon the files that import, and the 181 surviving one-file index builds — now analysis and record only, no lex and no parse. Neither is worth a stage. The third parse — the lint pass's own, 1 805 of them — is untouched, and is the next measurable CLI duplicate: the census's parse could be retained and handed tolint_with, but that holds 1 805 ASTs of a 39 MB tree alive at once against a current all-style peak of 202 MiB, which is exactly the memory-for-speed trade the plan told this stage to measure before taking. It is not taken here. Rejected: a textualcontains("package")gate — the plan forbids it and the fixtures say why ($display("package p; endpackage")and a comment both pass a text search). Rejected: an additivevlog_semanticAPI — it was the plan's contingency and turned out unnecessary;FileFacts::from_analysisalready takes exactly(path, tree, defines, sem, src, lines, tokens). -
Decision: retain. Every output is byte-identical, the target is met at 96 %, memory improved, and the whole change is one gate plus one re-use of a parse the census already paid for.
-
QA result and lead review link: QA pending.
Experiment record — P4a-2026-09-07 (stage P4a)
- Experiment ID / stage / date / owner:
P4a-2026-09-07/ P4a (TODO §60.4) / 2026-09-07, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: none — this is a
measurement lane and it implements no optimization. The hypothesis under
test is the plan's own §P4 sentence, that a warm start's cost is spread
across reading text to hash it, decoding records, merging tables, building
the completion/include tables and refreshing overlays, "their individual
time/memory shares unmeasured", plus its memory hypothesis that
IndexCacheretains encoded facts beside the decoded index. The expected output is a per-stage attribution accounting for most of the settle, and a number for that retention. - Binary / provenance: release
lucisv-serversha25608093a3a2b9c0b8796e5f9214ac7bda59e068e49e32a9c2393f29d116fca10bd, built once undertools/guard.sh -m 8 -t 1800before any timing; nocargocommand ran during a timed phase. An earlier release of the same lane (ca5910bf1434…) was measured, two instrument defects were found in its output —total_msincluded the size-measuring walks, and the cache retention was read at the start of a scan rather than the end — both fixed and everything re-measured on08093a3a…. The earlier run is kept as~/.cache/lucisv-perf/take5-p4/results-preliminary.jsonland is not quoted. - Corpus / machine: opentitan
00981352642fb65ef2b6c47143a0f6bb31fd4a97with its three pre-existing modified files, verifiedgit status --porcelainafter every phase and unchanged throughout. Same M1 Max, macOS 27.0. One-minute load 4.1–5.0 during the timed phases (the §P0 REF was taken at 2.92–4.59, so this round is slightly busier — recorded, not adjusted for). Scratch caches andstoragePathunder the session scratchpad; results in~/.cache/lucisv-perf/take5-p4/results.jsonl. - What changed in the tree: new
crates/lucisv_server/src/scan_trace.rs(the trace type and its three lines); calls only instate.rs; counters inindex_cache.rs(Cell<CacheWork>, always on: the hash/decode split needs a&selfsite);Candidates::sizesandIncludeGraph::sizes; an additiveWorkspaceIndex::table_sizesinvlog_semantic(no codec change,FACTS_FORMATuntouched); the emit sites inserver/index.rsand the config round-trip line inserver/client.rs;Server::bornand a payload onPending::Configurationinserver/mod.rs; a new phase filetools/perf/phases_p4.py. No behaviour changed. Off is the shipped state: without--verboseno line is sent, no clock is read instate.rs, and no size is walked. - Phases run:
scan(the tolerance check, on the quiet binary),scanprofile,scanwait,scanserve,rss. Three fresh sessions per cell. - Result — the structural finding: a workspace session pays three
scans, and the first indexes zero files.
Server::startedbuilds the index at the default settings beforeinitializedcan bring any; the folder scope is derived from directories a buffer has been opened from, and none has. The 124-file "default scan" the plan expected is the widen the firstdidOpentriggers. Warm, the empty scan 1 still costs 183.7 ms — it opens the 44.3 MiB store (cache_open92.5 ms) and then compacts it (compact91.0 ms), rewriting 45 396 KiB into a byte-identical file, becausefinish_whole_scancompacts unconditionally. - Result — warm, settled mean 1 332.7 ms: discovery 255.91 (19.2 %),
absorb 218.08 (16.4 %), decode 202.75 (15.2 %), cache_open
183.46 (13.8 %), compact 182.39 (13.7 %), candidates 113.34
(8.5 %), lookup 51.31 (3.9 %), includes 46.30 (3.5 %),
publish_absorb 4.34, everything else 4.40, parse 0.00. Named total
1 262.28 = 94.7 %. No dominant stage — the top five are within 1.4×
— but
cache_open+compactis 365.9 ms, 27.5 % of the warm settle. - Result — cold, settled mean 2 893.6 ms: parse 1 703.63 (58.9 %), discovery 299.59, absorb 218.40, encode 183.26, store_write 118.46, candidates 110.66, compact 93.89, includes 45.52, decode 5.87, cache_open 3.39, lookup 2.86. Named total 2 794.09 = 96.6 %. Cold and warm are different problems.
- Result — the §P0 first-answer puzzle, closed: cold 0.54 + 81.58 =
82.1 against a measured 83.4 / 85.7 / 84.9; warm 181.19 + 26.31 =
207.5 against 208.7 / 208.9 / 209.2. The definition is answered when the
widen the
didOpentriggered ends. Cold that wait is the widen's 123 parses; warm the widen is 3× cheaper but the empty startup scan ahead of it has spent 181 ms on store I/O. So it is the config wait — specifically that scan's store I/O — and neither the publish cadence nor the decode. - Result — memory: idle RSS cold 531.0 / 529.0 / 529.9 MiB, warm 574.8 /
565.2 / 564.8; peak equal to idle to the KiB in all six sessions again. The
plan's retention hypothesis is confirmed and quantified:
IndexCacheholds 45 260 KiB = 44.20 MiB of encoded facts beside the decoded index, 7.7 % of warm idle RSS. The scan additionally holds 34 973 KiB = 34.15 MiB of source text for its whole life, released atfinish_scanand therefore absent from idle. Index sizes: 3 976 files, 3 067 unit names / 4 013 declarations, 91 894 connection members, 56 913 hierarchical members, 59 529 reference keys / 457 666 reference sites, 1 358 defines, 13 894 instantiation edges, 345 127 census words (4.64 MiB); completion tables 50 726 units / 658 macros / 105 042 words (1.84 MiB); include graph 1 984 edges over 3 976 known files. - Result — open buffers 1 / 10 / 100: settle 1 841.6 / 1 859.1 /
2 173.9 ms; a fourth scan appears (a second widen, 352–372 ms, 1 685
files). Overlay refresh 0.31 / 1.33 / 19.67 ms — not the cost. What
scales is
order(open_first), 1.30 / 3.97 / 60.64 ms, one linear scan of a 3 976-entry work list per buffer. - Result — requests during a scan: three distinct modes, not a spread.
During scans 1–2: cold 83.66 / 83.97 / 84.95, warm 210.26 / 212.58 / 214.34.
Queued behind the configured rescan: cold 2 558.85 / 2 563.65 / 2 567.24,
warm 897.12 / 904.12 / 907.90. After settle: cold 0.39–0.43, warm
0.24–0.40. Table coherence:
mismatched_answers= 0 across all 18 requests — every mid-scan answer named exactly what the settled index names or was empty. The row's status turnserrorif that is ever violated. - Tolerance of the instrumented binary (quiet, no
--verbose): warm scan −0.5 % on means against the §P0 REF, cold +2.1 % on means and −0.5 % excluding a first-try outlier 170 ms above its own siblings; first useful answer cold +0.3 %, warm inside the REF range; idle RSS −0.8 % cold, −0.1 % warm. The always-onIndexCachecounters (four clock reads per file over 3 976 files) cost under a millisecond of a 1.3–2.9 s scan. Within tolerance; no re-work needed. - Recommendation for §P4b (the lead rules, not this lane): the dominant
measured stage is the store's own I/O on a warm start. (a) Avoid
compaction on an unchanged store: −182.4 ms warm, 13.7 %, ~0 cold — both
warm compactions rewrite a byte-identical file. (b) Do not open the store
for a scan with an empty work list: −92.5 ms, 6.9 %; reusing a store the
session already read is another −91.0 ms, 6.8 %, but that amends
index-persistence's "re-opened at the start of every whole rescan" rule and is a contract question. (c) Reduce repeated full merges: nothing to remove — one mid-scan publish (4.3 ms) and one final absorb (218 ms). Against the plan's goals: warm < 1 s reachable (1 057.8 ms with (a) and the safe half of (b); 966.8 ms with all three); cold < 2.3 s not reachable by anything on §P4b's list — it needs 35 % of a parse stage the plan rules out touching; idle RSS −15 % not reachable — the retention is real but is 7.7 %, and the rest is in the decoded index where only a representation change reaches it. Outside §P4's list and worth the lead's attention: navigation queued behind the configured rescan waits 2.56 s cold / 0.90 s warm, because the only scan that interleaves is the empty one. - Guard outcome: zero kills across five timed phases, the workspace test run, clippy and two release builds. Largest resident set observed 574.8 MiB (7 % of the 8 GiB limit).
- Refusals / gaps:
scanserve's first draft never terminated — under--verbosethe server logs a line per request, so a "has the server gone quiet" test that counted every notification was listening to itself. Fixed to count$/progressandpublishDiagnosticsonly, and the phase re-run; the abandoned run produced no rows.cache_entries/cache_encoded_kibare read at the end of a scan (after the fix above), so a cold scan's row reports what it leaves, not what it started from.
Experiment record — P4b-2026-09-08 (stage P4b)
- Experiment ID / stage / date / owner:
P4b-2026-09-08/ P4b (TODO §60.4) / 2026-09-08, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: §P4a's recommendation as the lead ruled it. (a) skipping a compaction that would rewrite an unchanged store: −182.4 ms warm. (b1) not opening the store for a scan with an empty work list: −92.5 ms warm. Together −274.9 ms, landing warm at ~1 058 ms; cold unchanged; RSS not higher. (b2) refused.
- Binary / provenance: release
lucisv-serversha256623c0ea62df4fe154947725605071fee93e54f02dec3f45e6c566620ed5c0ee3. Control: a release built in the same window from agit clone --localat HEAD2434729, sha2565957b0826249a0354b270d2ec865e7cfc702b187bd359049cc5c73b2170354d4. Both built undertools/guard.sh -m 8 -t 1800; nocargocommand ran during any timed phase. An earlier release of this lane (c5ceb40cf740…, (a) and (b1) without the record short-circuit) was measured and is kept unquoted as~/.cache/lucisv-perf/take5-p4b/results-compaction-defeated.jsonl— it is the evidence that (a) alone is worth nothing. - Corpus / machine: opentitan
00981352642fb65ef2b6c47143a0f6bb31fd4a97with its three pre-existing modified files,git status --porcelainchecked after every phase of both binaries and unchanged throughout. Same M1 Max, macOS 27.0. One-minute load 3.6–6.7 — busier than the §P0 REF window (2.92–4.59), which is exactly why the control was built and every phase run alternating HEAD then P4b. Cross-day REF comparisons are context only; the paired control is the claim. Scratch caches andstoragePathunder the session scratchpad; rows in~/.cache/lucisv-perf/take5-p4b/results.jsonlunder labelsHEADandP4b. - What changed in the tree:
index_cache.rs—Loadcounters atopen(lines read / kept / dropped / duplicated / in path order),IndexCache::already_compact, andIndexCache::recordreturning early for a record the store already holds byte for byte;state.rs— aStoreOpenstate so a whole rescan's re-open is deferred to its first file, the compaction gated on that scan having opened the store at all, and the three §P4a trace helpers moved out (1 098 → 1 073 production lines);scan_trace.rs—ScanTrace::opened/measure_work/landedreceived, and three newCacheWorkcounters (opens,compactions,repeats) rendered on the count line. Notools/perfchange was needed:phases_p4.pysplitskey=value. - Phases run:
scan,scanprofile,scanwait,scanserve,didopen,rss— each once per binary, alternating, three fresh sessions per cell — plus a dedicatedstorecheck.pybyte-identity probe on both binaries. - Result — the startup, per scan (warm,
--verbose): scan 1 (whole, 0 files) 180.72 → 0.15 ms,opens0 andcompactions0; scan 2 (widen, 124) 26.21 → 116.51, which is scan 1'scache_openmoved onto it (90.62 ms); scan 3 (whole, 3 976) 1 087.84 → 1 016.23,cache_open90.57 → 91.12,compact90.20 → 10.13,records1 → 0,repeats0 → 1,compactions1 → 0. Session sum 1 294.77 → 1 132.89, −12.5 %. - Result — settled, paired: warm 1 326.85 → 1 137.66 ms, −14.3 % (1 132.60 / 1 143.54 / 1 136.83 against 1 325.28 / 1 324.62 / 1 330.64); cold 2 846.94 → 2 816.21, −1.1 %.
- Result — memory: warm idle RSS 569.75 → 482.75 MiB on the maximum,
−15.3 % — the plan's −15 % investigation goal, met, and §P4a had ruled it
out. It is not the encoded-facts retention (44.20 MiB, untouched and
still resident): it is the allocator retention of the two 44.3 MiB
Strings a warm HEAD session renders to rewrite the store with, which P4b renders none of. Warm idle is now below cold idle (530.45 MiB max, −0.4 %). Peak equals idle to the KiB in all twelve sessions. - Result — the store is left alone, checked by hash: two warm workspace
sessions over one store. HEAD: sha256
e49bc5c176ea…after each, size 46 486 433 each, mtime moving every time — it rewrites the same bytes twice. P4b: same hash, same size, same mtime to the nanosecond — it never opens the file for writing. - Result — everything that had to stay still: the scope ladder answers
identically in all four scopes × two cache states (
0 | 124fordefaultand{"index":{}},124 | 1forscopeDepth 0,124 | 3 976with 123/3 975 from cache and 3 skipped forworkspace, on both binaries);didOpenpinmux median 118.38 → 114.53 (§46 intact) and spi_device 12.40 → 8.16 (a sub-15 ms row, not read);mismatched_answers0 in all fourscanserverows across both binaries; store on disk 45 404 KiB either way. - Result — the one regression: warm first useful answer is bimodal,
116.77 ms or ~1 135 ms, two of six sessions fast. Cold is unaffected (six
of six fast, both binaries). The mechanism is
Server::must_wait'sanswering_a_rescanclause — the scan-interleave order contract — which §P4b did not change but did make reachable: warm scan 1's 181 ms of store I/O used to give the client'sdidOpena head start over its ownworkspace/configurationanswer, won in 15 of 15 sessions ever measured (§P0's three, §P4a's three, QA's three, this control's six). A warm mid-scan answer that does win the race falls 207 → 118 ms. Filed for the lead with the narrow fix (a fourth state distinguishing a rescan a client message asked for from the one the server's own settings pull asked for) indocs/features/perf5-p4/README.md; not taken in this lane, because it is a documented promise and the plan says file it if it is not routing. It is not routing: the configured rescan already runs through the same stepper the startup scan does, publishes all three tables mid-scan, and is held only atprocess_batch'smust_waittest. - Deviation from the ruling, reported:
IndexCache::recordreturning early for a record the store already holds was not in the ruling. It is kept because (a) is worth nothing without it — an open buffer is indexed from its own analysis on every scan and its record is written through with it, sorecordsis never 0 and the store is never canonical. Measured with (a) alone: warm scan 3records1,compactions1,compact88.19 ms. Oneifand one counter; the lead can back it out at the cost of (a) entirely. - Targets: warm settled ≤ ~1.06 s missed at 1 137.66 (−189.2 ms against
the estimated −274.9; §P4a's arithmetic double-counted, because (b1) moves
scan 1's
cache_openonto the widen rather than removing it — the honest ledger is −180.2 ms of compaction plus 10.1 ms of skip check). The plan's warm < 1 s missed, and is unreachable without the refused (b2): the warm session still payscache_opentwice, 181.7 ms, which is now the largest single thing the store costs. Cold unchanged met. RSS not higher beaten, −15.3 % warm. Store bytes identical met. Scope ladder unchanged met.mismatched_answers0 met. First useful answer warm ≈ cold missed as stated — 117 ms in the fast mode, the configured rescan in the slow one. - Gates:
cargo fmt --all -- --checkclean; guardedcargo clippy --all-targetsclean with no new#[allow]; guardedcargo test --workspacegreen, 4 272 → 4 284 (twelve new tests, none lost). Zero guard kills; largest resident set observed 591 MiB of the 8 GiB cap.
Experiment record — P4b-staged-2026-09-08 (stage P4b2)
- Experiment ID / stage / date / owner:
P4b-staged-2026-09-08/ P4b2 (TODO §60.4) / 2026-09-08, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: the plan's §P4 work order,
as the lead ruled it — "if the default scan is routinely discarded, stage
the initial scan until configuration arrives, with a bounded fallback for
clients that never answer; keep rootless and scope precedence behavior
intact." Expected: one scan per session instead of three, the empty scan and
the widen behind it gone, one
cache_openinstead of two (which is the refused (b2)'s saving arriving another way), and the bimodal warm first answer §P4b filed replaced by a single fast mode. - Binary / provenance: release
lucisv-serversha2563ff0db0920d1b86bee5237ea7b7827c7383a402ef73ec138c111cf7a867d7ca8for the seven-phase matrix; the shipped binary is7522696e894a94d8d431f148d4e08e6a9ab7727eb0aaac36f8daa57a684b9076, which differs from it by a pure move only (started's struct literal intoServer::empty, for the file-size rule's 80-line mark) and on which thescanphase was re-run, paired, at load 8.7–9.1: warm settled 1 190.48 → 1 037.31, −12.9 %, cold 2 876.17 → 2 803.60 (−2.5 %),scopeDepth 0−90.4 % / −75.6 %, first useful answer cold 304.64 / 301.75 / 304.31 and warm 348.74 / 350.54 / 352.14, result count 0. Both runs are quoted; neither is dropped. Paired against the previous §P4b release, sha256623c0ea62df4fe154947725605071fee93e54f02dec3f45e6c566620ed5c0ee3, kept in the session scratchpad before the rebuild and re-run in this window. Both built undertools/guard.sh -m 8 -t 1800; nocargocommand ran during any timed phase. An earlier release of this lane (cb3878a02802…, staging withouttake_the_answer_out_of_held) was measured and is kept unquoted as~/.cache/lucisv-perf/take5-p4b2/results-preliminary-stranded-answer.jsonl— it is the evidence for the defect described below. - Corpus / machine: opentitan
00981352642fb65ef2b6c47143a0f6bb31fd4a97with its three pre-existing modified files,git status --porcelainchecked after every phase of both binaries and unchanged throughout. Same M1 Max, macOS 27.0. Load is not uniform across this run:scan— the headline phase — ran at one-minute load 4.7–5.1; a macOSXProtectremediation sweep andmediaanalysisdthen took the machine to 20–26 forscanwait/scanprofile/scanserveand 12–16 forscopes/didopen/rss. Every phase alternates P4b then P4b2, so both binaries met the same weather within a phase; absolute values in the busy phases are not comparable with §P4b's own window and are not quoted as if they were. Scratch caches andstoragePathunder the session scratchpad; rows in~/.cache/lucisv-perf/take5-p4b2/results.jsonlunder labelsP4bandP4b2. - What changed in the tree: a new
crates/lucisv_server/src/server/ startup.rsholdingServer::new,Server::started(six trailing parameters folded into aStartupstruct),stage_for_configuration,await_configuration,take_the_answer_out_of_heldandCONFIGURATION_WAIT = 2 s;server/mod.rsloses both constructors (576 → 153 production lines) and gainsstaging, a fourthmust_waitclause andscan_owed;server/index.rsgainswaiting_for_this_scanand routes the threereindex*deferral guards throughscan_owed;server/client.rs'ssay_heldline gainsstaging=. No crate edge moves; nothing touches the store format, the scope ladder orstate.rs. - Phases run:
scan,scanwait,scanprofile,scanserve,scopes,didopen,rss— each once per binary, alternating, three fresh sessions per cell — plus astorecheck.pybyte-identity probe on both binaries. - Result — one scan (
scanprofile, warm workspace): P4b traced three scans (whole 0 files 0.13 ms, widen 124 files 119.47, whole 3 976 files 1 082.46;cache_open0 + 91.38 + 92.32 = 183.70); P4b2 traces one (whole 3 976 files, 1 093.67 ms,cache_open91.91). Settled 1 233.39 → 1 110.48, −10.0 %.opens2 → 1,compactions0 → 0. - Result — settled, paired (
scan, the quiet window): warm 1 181.34 → 1 097.98 ms, −7.1 %; cold 2 963.21 → 2 843.84, −4.0 %;scopeDepth 0114.95 → 12.45 cold (−89.2 %) and 51.32 → 14.07 warm (−72.6 %); the two default-scope cells move −4.7 % to +5.8 %, all inside 6 ms, which is the config round trip now serialized ahead of the scan instead of overlapping an empty one. - Result — open buffers (
scanprofile): 1 / 10 / 100 buffers settled 1 555.37 → 1 113.56 (−28.4 %) / 1 555.93 → 1 139.27 (−26.8 %) / 1 721.70 → 1 360.10 (−21.0 %), and the fourth scan §P4a named (a second widen over 1 685 files) does not happen. - Result — requests during a scan (
scanserve): the third latency mode is gone. P4b answers cold at 0.22 / 0.23 / 0.28 / 84.88 / 89.22 / 2 621.84 / 2 658.83 / 2 933.71 and warm at 0.24 / 0.28 / 0.38 / 121.91 / 124.44 / 933.86 / 942.65 / 1 233.87; P4b2 answers cold across 37 requests spanning 0.20–475.41 and warm across 12 spanning 0.21–381.54, with nothing above those.mismatched_answers0 in all four rows of both binaries. A genuine settings-change rescan mid-session still queues requests — that ismust_wait's first clause, untouched, andserver/tests/startup.rsdrives a late answer and shows the request behind it answered after the rescan. - Result — memory: cold idle 542 512 → 542 581 KiB (+0.0 %, maximum +0.4 %); warm idle 495 291 → 466 480 KiB (−5.8 %), maximum −5.9 %. Peak equals idle to the KiB in all twelve sessions of both binaries.
- Result — everything that had to stay still:
scopesanswers identically in all 24 cells (eight requests × three scopes × both binaries); the store is left byte-, size- and mtime-identical after a cold session and two warm ones on both binaries (sha256e49bc5c176ea…, 46 486 433 bytes),store_kib45 404 either way;didOpenpinmux median 118.75 → 110.39 and mean −6.3 %, spi_device 11.05 → 8.40 (§46 intact). - Result — the one regression, named: the warm first useful answer is
unimodal at last, and empty.
scan, quiet window: cold 293.04 / 300.26 / 294.82 and warm 396.86 / 404.88 / 411.39, with result count 0 in all six — against P4b's cold 2 902.62 / 2 884.55 / 86.97 and warm 1 205.18 / 1 204.50 / 125.84, result count 1 in all six. The mechanism is arithmetic and the trace says it: warm,discovery292.74 ms,first_publish389.27, definition answered at 389.92.begin_scanreads all 3 976 files' text before the firstscan_step, so ≈ 293 ms is the floor of the one-scan design; the request is then answered at the first drain, off a prefix holding the open buffer and nothing else. §P4b's fast mode was served by the widen — 124 files, run to completion becausereindex_wideneddoes not interleave — so its 124 ms answer was complete for that scope. Staging traded the fast mode's quality for the slow mode's disappearance. Filed as Handshake 11: order the startup scan's work list by the open buffers' raised scope directories, not only by the buffers. Ordering only —IndexBuilder::finishsorts by path — but it isWorkspace::open_firstinstate.rs, which this lane holds calls-only. - Defect found by measuring, before it shipped: the first paired
scanrun showed one warm session in three at 2 125 ms — the two-second bound.process_batchmoves everything behind a request that must wait intoheld, and the client's answer to the pull can be in that burst behind the editor's opening definition; the wait then blocked until the bound.Server::take_the_answer_out_of_heldtakes only aPending::Configurationanswer back out. Pinned byan_answer_behind_a_held_request_is_not_stranded_for_the_whole_bound. - Targets: warm settled ≤ ~1.06 s met on the shipped binary at
1 037.31 (−12.9 % paired) and narrowly missed on the first run at
1 097.98 (−7.1 %); the two runs bracket the target at loads 8.7–9.1 and
4.7–5.1 (the
scanprofiletraced session settles at 1 110.48). The plan's warm < 1 s missed — what is left is discovery 300.84, absorb 213.84, decode 200.05, candidates 108.96,cache_open91.91, lookup 51.09, includes 45.30, and none of those is store I/O any more. The (b2)-equivalent saving met: onecache_openper session, 183.70 → 91.91. Cold within tolerance met (−4.0 %). RSS not higher beaten (warm −5.8 %). Store bytes identical met.mismatched_answers0 met. Scope answers identical met (24/24). Open-buffer cells beaten (−21 to −28 %). The queued-behind-the-rescan mode gone for the startup case met. First useful answer 85–120 ms in 6 of 6 missed — unimodal 293–411 ms and empty, filed above as the one regression. - Correctness tests and logs:
cargo fmt --all -- --checkclean; guardedcargo clippy --all-targetsclean, no new#[allow]; guardedcargo test --workspace4 290 passed, 0 failed across 58 binaries (4 284 at the start of the round, plus six new wire tests). One pre-existing test amended in place —settings.rs's startup-pull wire order, whose subject is exactly the contract that changed. No guard kill. - Decision: retain, pending the lead's ruling on the empty first answer
(Handshake 11) and on
folders-and-config's Assumptions sentence (Handshake 10). QA pending. - QA result and lead review link:
docs/features/perf5-p4/README.md§P4b2 (QA log placeholder dated 2026-09-08).
Experiment record — P4b-lazy-2026-09-08 (stage P4b3)
- Experiment ID / stage / date / owner:
P4b-lazy-2026-09-08/ P4b3 (TODO §60.4) / 2026-09-08, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: the plan's §P4 sentence
— "shorten temporary source/encoded-buffer lifetimes; reduce redundant
transient copies" — plus Handshake 11, granted. Expected:
work_kibfrom 34 973 to ~0; each file's bytes read exactly once; the first useful answer of a workspace session useful (result count 1) rather than empty, at ≈ walk + the open buffer's folder; settled and the scope answers unchanged;mismatched_answersstill 0. - Binary / provenance: release
lucisv-serversha2567ab4955ee0ac174840fbe4c02528e178f0c7824a3836fa87aa90e35bf47cdd3b, built undertools/guard.sh -m 8 -t 1800, paired against the shipped §P4b2 release7522696e894a94d8d431f148d4e08e6a9ab7727eb0aaac36f8daa57a684b9076, copied into the session scratchpad before the rebuild and re-run in this window. An earlier release of this lane (b8edb28ab949778793453acb9a5b292c4b0e256de1d2319bbb8ee4bdebcff364) was measured first and its rows are kept unquoted at~/.cache/lucisv-perf/take5-p4b3/results-preliminary-clone.jsonl: it had the same behaviour and cloned every file's include list at the end of the scan, which the final binary borrows instead. The first, pre-drain-rule release (b50ea341d274…) is the one that found the defect below and its rows are in the same file. Nocargocommand ran during any timed phase. - Corpus: opentitan
00981352642fb65ef2b6c47143a0f6bb31fd4a97, with its three pre-existing modified files.git -C … status --porcelainchecked after every phase of both binaries: three, always, never anything else. - Method: seven phases —
scan,scanprofile,scanwait,scanserve,didopen,rss,scopes— each run alternating P4b2 then P4b3 so the two meet the same weather, three fresh sessions per cell, scratchstoragePathper label, every session undertools/guard.sh -m 8 -t 1800. One-minute load recorded before and after each phase: 2.8–7.5 across the matrix. Zero guard kills. - Result — the headline. The first useful answer of a warm workspace
session is result count 1 in twelve sessions of twelve (six in
scan, six inscanwait), where §P4b2 was 0 in twelve of twelve, and it is faster:scancold 287.40 → 249.00 ms (−13.4 %), warm 332.68 → 277.37 (−16.6 %);scanwaitcold 277.27 → 247.66 (−10.7 %), warm 319.12 → 274.17 (−14.1 %). - Result — memory.
work_kib, the source text a scan holds for its whole life, 34 973 → 0–16. Idle RSS max 530.30 → 493.36 MiB cold (−7.0 %) and 455.33 → 422.59 MiB warm (−7.2 %); peak equals idle to the KiB in all twelve sessions of both binaries. - Result — stages. Warm, traced:
discovery227.02 → 158.32 ms (the walk and the cap'smetadata, with the read taken out), a newreadstage at 85.54,includes42.12 → 8.60 (the line scan moved to the step that read the file, over hot bytes; the graph at the end only resolves),cache_open87.67 → 89.24,first_publish316.74 → 249.70 carrying 125 files instead of 1. - Result — everything that had to not move. Settled unchanged within the
window's noise:
scan−5.2 % cold / −3.0 % warm,scanprofile+0.9 % / +1.9 %; both quoted. All 24 scope result counts identical. The persistent store written by either binary is sha256e49bc5c176ea…, 46 486 433 bytes,store_kib45 404 — byte-identical, which is the strongest available proof that a lazy scan indexes what an eager one indexed, over 3 976 real files.mismatched_answers0 in all fourscanserverows of both binaries.didOpen(§46) medians 123.52 → 127.72 (pinmux), 14.37 → 15.05 (spi_device), 9.80 → 12.05 (aes_core), 4.47 → 5.47 (aes) — every row inside its own spread, and the path is not reachable from this change becausedidopensettles the scan before it opens the buffer. - Defect found by measuring, before it shipped. The first paired run had
the ordering and the drain rule and still answered
[]in five sessions of six. The client answersworkspace/configurationfrom its own reader thread and usually beats the editor'sdidOpen, so the scan begins with no buffer open, its work list is the plain alphabet, and at workspace scope adidOpenwidens nothing — so nothing held the definition behind it. The shipped rule holds a burst's requests behind itsdidOpenand re-orders the rest of the work list around the buffers open now. Rows kept, unquoted, inresults-preliminary-clone.jsonl. - Targets: the quality target (result count 1 in 6 of 6) met, at 12 of
12; the latency target (≤ the §P0 REF's 84 cold / 208 warm) missed at
249 / 274 ms, and the reason is measured rather than guessed — the answer is
walk + folder as the work order asked, and warm the walk alone is 158 ms with
cache_openanother 89 in front of the folder. The REF answered off a 124-file folder scan that never walked the workspace, so ordering cannot reach it. Filed for the next lane:discoveryis 58 % of the warm first answer and is now pure walk; two things to measure before building anything are the cap taking its size from the walk's own metadata (lucisv_core::walk::collect_files— a handshake request, not this lane's file) and handing the first folder toscan_stepbefore the walk has finished the workspace. - Raw rows:
~/.cache/lucisv-perf/take5-p4b3/results.jsonl, labelsP4b2andP4b3; the two unquoted preliminary sets beside it.
Experiment record — copy for every stage or rejected attempt
- Experiment ID / stage / date / owner:
- Hypothesis and exact expected work reduction:
- Reference commit, candidate commit or diff hash, binary hashes:
- Files changed / API contracts amended / topology references:
- Workload, corpus/input hashes, open files, cursor/range, rules, client capabilities:
- Machine, compiler/profile, threads, load before/after, competing activity:
- Commands, cache reset/prime steps, trial ordering and fresh-session count:
- Raw evidence path, explicit units, full sample arrays:
- Reference first / repeat median / range; candidate first / repeat median / range:
- Work counts: reads, parses, analyzed/selected/watched/edited files and bytes:
- Result/status/count/fingerprint comparisons, warnings and refusal checks:
- Idle RSS / peak RSS / cache size / guard outcomes:
- Target achieved or missed; paired improvement and variability:
- Correctness tests and logs:
- Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
- Decision: retain / revise / reject / defer; next stage justified by evidence:
- QA result and lead review link:
Independent review — 2026-09-08, released 0.51.0
An independent paired rerun at 126a6bcdac99e940534c87bce94a5269cdc53ae4
confirms the main improvements. See the review, causes and next plan
and preserved evidence. This section does
not reopen or overwrite the completed P0–P4 implementation records above.
Paired repeat medians: pinmux no-offer 300.4 → 25.0 ms, queued definition 311.7 → 24.2 ms, tail rename 795.1 → 398.3 ms, successful extract edit computation 249.5 → 150.3 ms, CLI style check 660 → 490 ms. Warm scan 1,381.4 → 1,117.9 ms, warm idle RSS 574.4 → 419.0 MiB. Cold scan is unchanged at about 2.91 s. First useful definition is slower in the paired run: 85.6 → 286.8 ms cold, 214.7 → 328.2 ms warm, with a result in every trial. This confirms the documented P4b3 latency tradeoff rather than closing its missed target.
Candidate-only broader rename probes still cost 3,455 ms for a common port and 2,192 ms to refuse a cursor with no symbol. The latter parses 3,975 files before refusing. These are remaining costs; they are not labeled as regressions without paired reference measurements.
Follow-up experiment queue — implementation agent to fill
Status (2026-09-09): every row below has run — R1a, R1b, R2a, R2b, R3a, R3b, R3c, R4 retained (each with its experiment record; the tail trade and the two refused designs recorded in their rows). These were proposed experiments when written, not implemented or accepted improvements at the time. Use the experiment-record template above for each retained or rejected change. Keep the 0.51.0 cells below fixed; enter candidate results and raw evidence in the blank columns. Rebase the comparison explicitly if implementation starts from a different commit. Before accepting any change, fill first/repeat/range, work counts, result parity, peak and idle memory, guard outcome, and correctness checks in its full experiment record. Targets are proposed gates, not promises.
| ID | Hypothesis / proposed work | 0.51.0 review baseline | Proposed gate | Owner / candidate commit | Candidate result / raw evidence | Decision |
|---|---|---|---|---|---|---|
| R1a | Dependency-correct lint-result reuse removes repeated quickfix work | pinmux all 25.0 ms; quickfix 23.1 ms; queued definition 24.2 ms | unchanged all/queued ≤16 ms; current results after every invalidation | dev (Opus), §61.2, tree at 51cbfd2 + the §61.2 diff |
Paired against this session's own reference (51cbfd2, 22.61 / 24.51 / 22.39 ms): all families 0.98 ms (−95.6%), quickfix only 0.11 ms (−99.5%), queued definition leader/follower 0.78 / 0.76 ms (−96.5%). Snapshot on the Document, key compared by value; idle RSS at 100 open buffers 574.0 → 574.6 MiB (+0.1%); diagnostics publish +0.3%. 21 tests added, one per invalidation row plus a stale-fix attack. Record R1a-2026-09-08; ~/.cache/lucisv-perf/take5r-2/ |
Retained — QA PASS → lead; committed 2026-09-08 |
| R1b | Profile then reduce dirty-buffer analysis on the first action after an edit | pinmux 135.9 ms; unchanged repeat about 24 ms | first-edit reduction shown separately; didChange ordering preserved | dev (Opus), §61.2, trace-only build of 51cbfd2 + lint_trace.rs |
Attribution, no behaviour change. The unchanged 22 ms menu is 20.9 ms lint_with, 0.04 ms config I/O, 0.01 ms run build, 0.03 ms serialization, fence skipped (zero violations). Of the 127.5 ms first-after-edit: 99.7 ms flush (1 parse of 1.3 MB + the diagnostics publish, itself 21.1 ms) and 20.2 ms the handler's own second pass — so a lint cache can only remove one 21 ms pass, which R1a then did (125.65 → 106.89 ms, −14.9%). Per-rule ablation: unused-signal +8.2, undriven-net +7.4, multiply-driven +7.5 ms over a 1.3 ms floor; the other 55 default rules ≤ +2.2 ms each. Record R1b-2026-09-08 |
Retained — QA PASS → lead; committed 2026-09-08 |
| R2a | Remove redundant discovery metadata/config work | traced warm discovery 205.0 ms; first useful answer 328.2 ms paired | first useful answer ≤200 ms milestone, correct settled target | dev (Opus), §61.3, tree at a1c77c0 + the §61.3 diff |
Measured first, then fixed — and the measurement is the finding. The warm 165.6 ms discovery splits walk 158.0, cap 6.9 (3 979 metadata), sort 0.5, config 0.00, filelist 0.00, buffers 0.00: the cap's second stat is 6.9 ms, not the ~45 §P4b3 guessed, because the walk has just warmed those inodes, and the walk is 95 % of discovery. The hand-off (lucisv_core::walk::collect_files_with, additive) takes stats 3 979 → 0 and cap 6.92 → 0.10 ms, discovery 165.6 → 154.9 (−6.4 %); the first answer does not move outside its spread. Kept as a tidy-up; R2b is the lever. Record R2a-2026-09-08; ~/.cache/lucisv-perf/take5r-3/ |
Retained — QA PASS → lead; committed 2026-09-08 |
| R2b | Begin useful local-folder work before full discovery/cache loading finishes | warm cache open 92.3 ms in traced session; cold/warm first answer 286.8/328.2 ms | single coherent scan, correct results across startup ordering cases | dev (Opus), §61.3, tree at a1c77c0 + the §61.3 diff |
Paired against this session's own reference (a1c77c0): first useful definition 265.9 → 77.9 ms cold (−70.7 %) and 301.3 → 115.1 ms warm (−61.8 %), result count 1 in 12 of 12 sessions of both binaries; first_publish 274.7 → 92.0 ms warm and 192.0 → 5.7 cold. One scan, one work list, read=3 976 in every cell, store byte-identical (three sha256s over 28 stores), 24 of 24 scope cells equal, mismatched_answers 0 and the new stricter unsettled_answers 0. Warm quiet settle 1 033.9 → 997.4 ms (≤ 1 s, first time); idle RSS −8.6 % cold / −0.7 % warm, peak = idle. Cost named: +2.5 % / +4.8 % settled at 1 / 10 open buffers, the neighbourhood subtree walked twice. The store open's 89 ms is 61 ms of checksum; a bounded local load was designed and measured (~26 ms, ~50 ms first answer) and not shipped — it moves cost rather than removing it and changes Load::canonical. Record R2b-2026-09-08; ~/.cache/lucisv-perf/take5r-3/ |
Retained — QA PASS → lead; committed 2026-09-08 |
| R3a | Engine-owned empty-cursor preflight avoids whole-workspace materialization | no-symbol refusal 2,192 ms; 3,975 parses, candidate-only trace | ≤16 ms; zero closed-workspace parses; exact refusal/precedence | dev (Opus), §61.1, tree at e13ae4c + the §61.1 diff |
0.3 ms repeat median (paired reference 2,012.3 ms, −100.0%); trace_parses 0, trace_selected 0 off the wire; refusal byte-identical; peak RSS 909 → 429 MiB. Record R3a-2026-09-08; ~/.cache/lucisv-perf/take5r-1/ |
Retained — QA PASS → lead; committed 2026-09-08 |
| R3b | Reuse valid source analysis and reduce initial scope construction | tail rename 398.3 ms; traced index stage 229.2 ms; 238 selected files | ≥20% wire improvement milestone; same edits/warnings/refusals; bounded RSS | dev (Opus), §61.5, tree at 07ef771 + the §61.5 diff |
An engine door (vlog_refactor::KnownFacts), one server implementation, no persistent decoded cache. A caller may hand back the index record it already holds for exactly the bytes it is handing over; the engine then skips that file's parse. The tie is IndexCache's own store entry — record and FNV-1a written by one read, compared in one function (entry_for) — never the workspace index's record, which carries no hash. Paired against this session's own reference (07ef771, order alternated per phase): tail rename 380.2 → 314.0 ms (−17.4 %), parses 240 → 137 = (K − 103 reused) + E, peak RSS 615 → 596 MiB. Fallback clk_i 3 346.5 → 2 762.5 (−17.4 %), conflict −18.8 %, new-name-many-uses −18.5 %, duplicate-module refusal 2 053.1 → 695.2 (−66.1 %, 3 975 → 14 parses); aes −0.5 %, extract refusal −0.7 %, both resolves within ±1.4 %. RSS lower or level on every row. Parity: 36 paired rows equal on fingerprint/message/status/counts/titles (0 mismatches) and a new renamewarn phase compared 1 750 warning sentences line by line — identical. check/ has no diff. 4 366 → 4 374 tests. Record R3b-2026-09-08; ~/.cache/lucisv-perf/take5r-5/ |
Retained — QA PASS → lead; committed 2026-09-09 |
| R3c | Profile broad fallbacks, warnings and refused extraction before optimizing | common port 3,455 ms; tail warning stage 50.9 ms; extract refusal 804.9 ms | measured work reduction; no weaker selection or verification | dev (Opus), §61.1 — refused-extraction half only; the broad fallbacks and the warning stage remain open for §61.5 | Extract refusal 761.1 → 767.8 ms (+0.9%, unchanged): its stage is boundary::Crossing::read, which needs flow::read(&scope, …) for instantiated-module port directions, so no bounded preflight reaches it. A region-local preflight was built, measured and removed — site_at (= extract_site_in) already answers the parse and Region::read refusals, and plain_identifier/occupied are already ahead of Extraction::plan. New phase extractrefuse. Record R3c-x-2026-09-08 |
Reject the preflight (no work to remove); defer the 805 ms to §61.5's scope reuse. Second half, §61.5 (dev Opus, tree 07ef771): the split, shipped in the engine trace. The tail's 242.4 ms scope stage is lead 0.4 + kept 133.5 + other 83.1 (34.3 %) + merge 23.4 — other being the 103 container files analysed for their index record and never read again. Inside one analysis (trace-only build, not shipped): lex 34 %, parse 32 %, analyse 20 %, read-off 13 % — the stage is two thirds lexer-and-parser, so the lever is not running it rather than making it faster. The 49.7 ms warning pass is 84 % the macro-argument scan, which is one lex per name-spelling file already shared by all five scans — nothing duplicated left to remove, and retaining the tokens instead is refused on the clk_i row's 1.9 GiB peak. Allocation reported as peak RSS per row (no GlobalAlloc counter: that needs unsafe). Broad fallbacks: 35.8 % / 36.0 % / 87.8 % other. Record R3c-2026-09-08 |
| R4 | Separate publication overhead from quiet scan decode/merge cost | quiet cold/warm 2,907/1,118 ms; scanserve max 337/328 ms | same offered load; improve queue latency and completion; warm quiet ≤1 s | dev (Opus), §61.4, tree at eb54042 + the §61.4 diff |
Measured first, and the split named a different lever than the plan. New phase scanload — a definition every 100/250 ms of wall clock, a fixed count of them, so both binaries are offered the same load. At eb54042, warm, one open buffer, 100 ms: 34 publishes, absorb 2 433 ms (78 %), candidates 623 (20 %), includes 47, overlay 2.4 (0.08 %) — 3 105 ms of publication in a 4 206 ms scan whose quiet form is 1 005 ms; cold 7 973 of 10 675 against 2 766 quiet. absorb dominates because it ends in a whole-index merge; the overlay refresh is not a lever (0.08 % at 1 buffer, 9.6 % at 101), so the selective refresh the plan asked for was not built. Shipped instead: a publication cadence (PUBLISH_EVERY 512, the first-answer drain exempt). Same offered load, requests answered equal in every cell: publication −78 to −88 %, traced scan −48 to −65 %, median wait −98 to −99.5 % (warm 112.3 → 1.9 ms; cold at 2+ buffers 4 706 → 2.1). Tail improved in 10 of 16 loaded cells, level in 2, higher in 4 — three of them single-open-buffer cells (worst warm 168 → 422 ms), against cold 101 buffers 9 308 → 1 583. Quiet warm scan 1 005 → 985 ms, quiet cold 2 724 → 2 694. scanserve cold median 122.2 → 45.6 ms, same 13 requests served; quiet scan matrix, the first useful answer (78.2 → 80.8 cold, 115.1 → 115.8 warm), idle RSS (−0.2 %), the store size and 24 of 24 scope cells all unchanged. mismatched_answers 0 and unsettled_answers 0 everywhere — including a new cross-folder cell where the reference is unsettled 12 of 270 with one buffer open and 270 of 270 with eleven, and the candidate 0 of 270 in both. Also here: the lead's §61.3 empty-answer ruling and the HEAD_WALK_MAX fixture. Record R4-2026-09-08; ~/.cache/lucisv-perf/take5r-4/ |
Retained — QA PASS → lead; the single-buffer tail (max 168 → 422 ms warm, cadence spacing) accepted as the trade for median −98 % and completion −48 to −65 %; a cancel-while-deferred fix by the lead; committed 2026-09-08 |
Maintain the successful P3 CLI result as a control: 7,751 style diagnostics, byte-identical stdout, about 490 ms wall / 2.44 s user CPU here. Preserve the warm idle memory gain and all source-selection/fence/after-index contracts in topo.md. Cross-module API changes need their handshake recorded before implementation; no verifier forgiveness may be weakened for speed.
Experiment record — R2a-2026-09-08 (stage R2a)
- Experiment ID / stage / date / owner:
R2a-2026-09-08/ R2a (TODO §61.3) / 2026-09-08, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: the review's "measure
walk / config-ignore handling / repeated metadata for the size cap / path
sorting / cache container load independently", then "reuse metadata already
obtained by the core walker for the cap". Expected: 3 976
metadatacalls removed per scan, and — per §P4b3's note — something like 45 ms of the 158 ms discovery. - Reference commit, candidate commit or diff hash, binary hashes: reference
trunk
a1c77c053fd940db4e8ac3b112aff1ef3d3d7235, sha256827c7ac222c829d1…(REF). Two candidates:SPLIT(the stage split alone,oversizestill stat'ing), sha256afc5bf04474dd8ab…;R2A(the hand-off), sha256533a364dd18782db…. Release,rustc 1.97.1 (Homebrew),cargo build --release --locked. - Files changed / API contracts amended / topology references:
crates/lucisv_core/src/walk.rs(collect_files_with, additive;collect_filesbecomes a wrapper),crates/lucisv_server/src/scan_trace.rs(eight fields, six on the stage line, two on the count line),crates/lucisv_server/src/state/discover.rs(new; the scope ladder moved out ofstate/mod.rs),state/mod.rs. Topology:lucisv_server ──▶ lucisv_core(walk) — a request for the lead, recorded indocs/features/perf5r-first-answer/README.mdanddocs/features/walk-cycles/README.md. - Workload, corpus/input hashes, open files, cursor, capabilities:
OpenTitan
0098135264with its three known modified files,git status --porcelainchecked after every phase.bench.py scanwait,lucisv.index.scope: "workspace", one open buffer (sites.TB), theaes #(cursor.--verbose, so the traced session is the one that answered. - Machine, profile, load, competing activity: M1 Max, macOS 27.0, release, default worker count. One-minute load 2.4–4.6 across both phases. No cargo command during a timed run.
- Commands, cache state, trial ordering, fresh sessions:
tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py scanwait --server … --tries 3,SPLITthenR2A, three fresh processes per cell, cold and warm store per cell. - Results:
discoverywarm 165.56 → 154.90 ms, cold 186.59 → 179.95;capwarm 6.92 → 0.10, cold 7.53 → 0.49;stats3 979 → 0 in both. First useful answer, three sessions each: cold 273.1/260.9/258.0 → 263.3/257.3/256.1; warm 281.3/300.8/282.8 → 271.1/294.8/290.9 — inside the spread, both ways. The split itself attributes warm discovery aswalk158.01,cap6.92,sort0.52,config0.00,filelist0.00,buffers0.00. - Result parity: result count 1 in every session; the persistent store
byte-identical to the reference's (sha256
1f7799db4885dc8d…, 46 486 433 bytes). - Memory: unchanged by construction (no retention moved); measured with R2b below.
- Guard outcome: no kill.
- Decision: retained, as a tidy-up rather than a fix — 3 976 syscalls
for a number already in hand is work with no defence, and it costs nothing.
The first answer is not what it moved. The finding that mattered is that
walkis 95 % of discovery, which is what sent §61.3 at the order of the scan (R2b) rather than at the walk.
Experiment record — R2b-2026-09-08 (stage R2b)
-
Experiment ID / stage / date / owner:
R2b-2026-09-08/ R2b (TODO §61.3) / 2026-09-08, America/Chicago / dev agent (Opus). -
Hypothesis and exact expected work reduction: hand the raised-folder work to the scan before the remaining discovery finishes — one coherent scan, the folder walked, stepped and published first. Expected: the first useful answer ≈ folder walk + store open + the folder's own steps, i.e. the 155 ms workspace walk out from in front of it.
-
Reference commit, candidate commit or diff hash, binary hashes: reference trunk
a1c77c053fd940db4e8ac3b112aff1ef3d3d7235, sha256827c7ac222c829d1…. CandidateR2= that tree + the whole §61.3 diff, sha2563db0c799a8302696…. Release,rustc 1.97.1 (Homebrew). -
Files changed / API contracts amended / topology references:
lucisv_core/src/walk.rs(collect_files_below, additive),lucisv_server/src/state/{discover.rs (new), mod.rs, scan.rs},scan_trace.rs,server/{index.rs, startup.rs},server/tests/startup.rs,tools/perf/phases_p4.py. Amended in their own READMEs, rules unchanged: index-scope, scan-interleave, indexing-ux, index-persistence, walk-cycles. Requests for the lead are listed indocs/features/perf5r-first-answer/README.md. -
Workload, corpus/input hashes, open files, cursor, capabilities: OpenTitan
0098135264, three known modified files,git status --porcelainchecked after every phase. Phasesscanwait,scan,scanprofile,scanserve,rss,didopen,scopes;sites.TBopen, theaes #(cursor; 0 / 1 / 10 / 100 buffer cells. -
Machine, profile, load, competing activity: M1 Max, macOS 27.0, release. Load 1.8–4.2, except the first
scanprofilepair which ran into asyspolicydburst at 8.6 and was re-run in the quiet window — both runs quoted. No cargo command during a timed run. -
Commands, cache state, trial ordering, fresh sessions:
tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py <phase> --tries 3,REFthenR2per phase,didopenre-run R2/REF/R2/REF alternating. Three fresh processes per cell. -
Results — first / repeat / range (ms, three fresh sessions):
cell REFR2paired scanwaitcold, first useful answer272.1 / 265.9 / 265.1 83.9 / 77.9 / 77.2 −70.7 % scanwaitwarm, first useful answer300.6 / 301.3 / 303.4 113.4 / 115.1 / 115.5 −61.8 % scancold, first useful answer261.3 / 260.7 / 262.7 78.8 / 83.2 / 81.5 −68.8 % scanwarm, first useful answer280.8 / 284.7 / 281.6 114.2 / 115.0 / 116.2 −59.2 % scanworkspace, cold settled2 716.8 / 2 785.9 / 2 740.0 2 703.3 / 2 704.1 / 2 733.1 −1.3 % scanworkspace, warm settled1 045.3 / 999.4 / 1 034.0 995.4 / 997.4 / 1 026.5 −3.5 % scanprofilewarm, 0 / 1 / 10 / 100 buffers1 046.2 / 1 013.7 / 1 020.0 / 1 231.6 991.9 / 1 038.6 / 1 069.3 / 1 169.0 −5.2 / +2.5 / +4.8 / −5.1 % -
Work counts:
read3 976 in every workspace cell of both binaries;stats0;walk_dirs2 (one folder, one root). Tracedscanwait:discovery182.8 → 155.9 warm and 188.4 → 160.3 cold,cache_open89.7 → 88.9,first_publish274.7 → 92.0 warm and 192.0 → 5.7 cold. -
Result parity: result count 1 in 12 of 12 sessions, both binaries.
scopes24 of 24 result counts equal.scanservemismatched_answers0 andunsettled_answers(new: every answer, empty ones included, equal to the settled one) 0 for both binaries, cold and warm, over 54 mid-scan requests. The persistent store is byte-identical: 28 stores over seven phases and both binaries reduce to three sha256s — workspace1f7799db4885dc8d…(46 486 433 B), defaultfea51578039cf937…(1 615 179 B), depth 0d5e641a24188960e…(6 833 B). -
Peak and idle memory: idle RSS cold 549 184 → 501 840 KiB (−8.6 %), warm 429 936 → 426 752 (−0.7 %); peak equals idle in all 12 sessions of both binaries, as in every round since §P4a.
-
Guard outcome: no kill,
-m 8 -t 1800throughout. -
Correctness checks: eight new wire tests over the ordering matrix (configuration before/after
didOpen, late/no reply, unsaved buffer, two buffers in two folders, root-level file, a dependency outside the first folder, the bar's denominator, the opening bound) plus the four existing §P4b2/§P4b3 startup tests — 24 startup tests green. Seven newlucisv_core::walktests, including three that assertcollect_files_belowequals the whole-root walk restricted to that subtree. Workspace suite 4 343 → 4 360, none dropped;cargo fmtclean, guardedcargo clippy --all-targetsclean. -
Decision: retained. Gates: ≤ 200 ms first definition met cold and warm with a wide margin; warm quiet settle ≤ 1 s met for the first time (997 ms, by less than the run-to-run spread); RSS kept; store bytes identical; scope cells identical; coherence 0/0. Two things named rather than hidden: the settled scan is +2.5 % / +4.8 % with 1 / 10 open buffers because the neighbourhood subtree is walked twice, and the "every first definition equals the settled target" gate is met on the measured cursor and on all 54 probe requests but is not true by construction for a cross-folder cursor — pinned by a test, argued in the feature README, and filed as a
server/dispatch.rshandshake.
Experiment record — R1b-2026-09-08 (stage R1b)
- Experiment ID / stage / date / owner:
R1b-2026-09-08/ R1b (TODO §61.2) / 2026-09-08, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: none — this is the
review's "trace the stages first". The expected output is an attribution
of the 23 ms quickfix menu and the 136 ms first-after-edit across config
discovery,
LintRunbuild, lint, fence and serialization, plus the dirty buffer flush measured apart from the handler. - Reference commit, candidate commit or diff hash, binary hashes: the
traced build is trunk
51cbfd27dfd22720856c501c9c17277460cc6a68pluslint_trace.rsand its call sites — behaviour-identical, the trace armed only under--verbose. Release, rustc 1.97.1 (Homebrew). The R1b numbers are candidate-only by construction: the reference has no trace to read. - Files changed / API contracts amended / topology references:
crates/lucisv_server/src/lint_trace.rs(new),lint.rs(two stages around the discovery and the run build, one aroundlint_with),fences.rs(a read-onlyheldpredicate),code_action.rs(the serialization stage),server/dispatch.rs(flush_dirty_traced, and the line). No contract amended.tools/perf/phases_r1.py(new): phasesactionprofileandruleablation. - Workload, corpus/input hashes, open files, cursor/range, rules, client
capabilities: OpenTitan, the three known pre-existing modified files,
git status --porcelainchecked after every phase. Cursors arephases_p1.EDIT_CURSORS— the pinmux comment, thetb.svcomment, theaes.svaes_reg_topinstance — so the profile rows sit beside theoffereditlatency rows they explain. Lazy resolving client. 57 default rules (the workspace set). - Machine, compiler/profile, threads, load before/after, competing activity: M1 Max, macOS 27.0, release profile, default worker count. Load 1.9–3.6 one-minute across both phases. No build or test suite overlapped a timed run.
- Commands, cache reset/prime steps, trial ordering and fresh-session
count:
bench.py actionprofile --tries 3andbench.py ruleablation --tries 3, each throughtools/guard.sh -m 8 -t 1800. One fresh--verbosesession per cursor; the ablation is one warm session withlucisv.lint.selectpushed bydidChangeConfigurationper row (a selection change rescans nothing —notification.rs::apply_settings), with the unrestricted control taken first and last. - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5r-2/results.jsonl, labelr1b-cand. Latency inms; every field of the trace line is atrace_*row field (trace_action_lint,trace_flush_wall,trace_flush_parses, …). - Reference first / repeat median / range; candidate first / repeat median /
range: pinmux comment — first request of a session 25.10; unchanged
repeats 21.97 (21.82–22.01); queued behind a definition 22.33; first
after a
didChange127.54 (121.84–130.67).tb.sv0.52 / 0.98;aes.sv3.20 / 4.19. - Work counts: reads, parses, analyzed/selected/watched/edited files and
bytes: the unchanged menu performs 0 whole-file parses and 1
lint_withpass over 57 rules finding 0 violations; the fence filter is skipped (no fix to protect, §P1a). The first request after adidChangeperforms 1 parse — the flush's — and 2lint_withpasses over the same revision. - Result/status/count/fingerprint comparisons, warnings and refusal
checks: every row
status=ok; result counts unchanged from the reference rows of the same cursors. No edit-bearing row in this phase. - Idle RSS / peak RSS / cache size / guard outcomes: not sampled here (the memory cell belongs to R1a). Zero guard kills.
- Target achieved or missed; paired improvement and variability: not a
target — an attribution. The two numbers the review asked for:
the 23 ms is
lint_with(20.9 of 22.0), config I/O being 0.04 ms; and the 136 ms is 78% dirty-buffer flush (99.7 ms of 127.5, of which 21.1 ms is the diagnostics pass, leaving ~78.6 ms ofDocument::new), with the handler's own 20.2 ms lint pass the only part a cache can remove. - Where the reference disagrees with the baseline beyond tolerance (neither number adjusted): the review's cells are 25.0 (all families), 23.1 (quickfix) and 135.9 (first after change); this session reads 22.0–22.6, 24.5 and 127.5 — within 3–7% and in both directions, on a machine whose load was at the low end of the review's band. Nothing is adjusted.
- Correctness tests and logs: 4 unit tests in
lint_trace.rs(an unarmed trace records nothing and returns the work;close_flushdivides the request; one recompute makes the whole request a miss; the line names every stage in both groups). The whole workspace suite is reported under R1a, which is the change that could break something. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
the per-rule ablation is the finding the previous lane guessed at ("it may
be cheaper to ask which rules cost 24 ms than to cache their answer"):
three semantic rules —
unused-signal+8.2 ms,multiply-driven+7.5,undriven-net+7.4 over a 1.3 ms floor — are effectively the whole pass, and the other 55 default rules together are about 2 ms. Making those cheaper is avlog_linterchange and is not this lane's; a snapshot is what removes the repetition without touching a rule. Rejected alternative: splitting the flush into parse / analysis / overlay stages, which lives insideDocument::newandWorkspace::set_document— outside this lane's file ownership, and unnecessary for the question asked, since flush-minus-diagnostics answers it. - Decision: retain / revise / reject / defer; next stage justified by evidence: retain the trace (it is what R1a is judged by, and what a future lane will read when it goes after the 78 ms rebuild). The rule cost is filed as evidence for whoever takes the semantic rules on.
- QA result and lead review link: pending —
docs/features/perf5r-lint-snapshot/README.md.
Experiment record — R1a-2026-09-08 (stage R1a)
- Experiment ID / stage / date / owner:
R1a-2026-09-08/ R1a (TODO §61.2) / 2026-09-08, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: R1b measured a request
that runs
lint_withtwice on one revision — once to publish diagnostics, once to discover quick fixes — and a repeat menu that runs it again on a revision nothing has touched. If one snapshot per openDocument, keyed by every input of that call, is read by both doors, the expected reduction is the whole 21 ms pass on every unchanged request and one of the two passes on the first request after an edit. - Reference commit, candidate commit or diff hash, binary hashes:
reference = trunk
51cbfd27dfd22720856c501c9c17277460cc6a68(0.51.0 plus §61.1's rename preflight, which this lane does not touch), built from a clean clone in scratch, binary5d2a7aa2a4fd0d1747aec4011a482defd2d8a1dccc08b6156b17d9a820375770. Candidate = that tree plus the §61.2 diff, binary827c7ac222c829d12a4e245b4d720b67a3dca6c799fd6bb8ee525fe697587b12. Both--release --locked, rustc 1.97.1 (Homebrew). - Files changed / API contracts amended / topology references:
crates/lucisv_server/src/lint_snapshot.rs(new),lint.rs,code_action.rs,server/dispatch.rs,state/mod.rs(one field, its two initializers and one line inrefresh_overlay),server/tests/lint_snapshot.rs(new). In-crate signature changes:lint::violations_inandlint::fixablereturnArc<[Violation]>, andfixable/code_action::code_actionsno longer take atab_width— the width is on theLintRun, read throughformat::indent_width, whose call the dispatcher no longer makes.vlog_linter,vlog_formatterandfence.rsare untouched; the shared-fence-filter contract is not amended. Adocs/topo.mdamendment is requested in the feature README's Handshakes and was not applied by this lane. - Workload, corpus/input hashes, open files, cursor/range, rules, client
capabilities: OpenTitan, the three known pre-existing modified files,
git status --porcelainchecked after every phase invocation. Cursors aretools/perf/sites.py's andphases_p1.EDIT_CURSORS', unchanged. Client shapes are in every row. - Machine, compiler/profile, threads, load before/after, competing activity: M1 Max, macOS 27.0, release profile, default worker count. Load recorded before every phase: 2.47–5.88 one-minute, inside the review's own 2.82–6.00 band. No build, test suite or second benchmark overlapped any timed run — both binaries and both test suites finished first.
- Commands, cache reset/prime steps, trial ordering and fresh-session
count: 12 guarded
bench.py <phase>invocations,--tries 3, each throughtools/guard.sh -m 8 -t 1800. Phasesofferkinds offeredit offerqueue codeaction diagnostics didopen snapshotrss, each once per binary, with reference/candidate order alternated between phases (offerkindsref→cand,offereditcand→ref,offerqueueref→cand,codeactioncand→ref,diagnosticsref→cand,didopencand→ref,snapshotrssref→cand), plusactionprofileon the candidate for its trace. Separate--storageper (label, phase);snapshotrssanddidopenopen a fresh process per try. - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5r-2/results.jsonl, labelsr1a-ref,r1a-cand,r1a-cand-2(the corrected trace run). Units in every row: latencyms, memoryrss_kib/peak_rss_kib. Trace fields aretrace_*. - Reference first / repeat median / range; candidate first / repeat median /
range: pinmux all families — reference 30.84 / 22.61 / 21.9–24.5;
candidate 2.42 / 0.98 / 0.41–1.24. Quickfix only — reference 22.35 /
24.51; candidate 0.15 / 0.11.
offereditrepeat — reference 23.88 / 23.44; candidate 0.23 / 0.18. First afterdidChange— reference 128.96 / 125.65 / 123.5–129.0; candidate 106.07 / 106.89 / 105.1–108.6. Queued definition (leader / follower, pipeline 3) — reference 22.39 / 22.38; candidate 0.78 / 0.76. Diagnostics publish — reference 162.29, candidate 162.75. The full arrays are in the JSONL. - Work counts: reads, parses, analyzed/selected/watched/edited files and
bytes: the unchanged menu now runs zero
lint_withpasses (trace_action_lint=0.00ms,trace_action_snapshot=hit) and zero parses. The first request after adidChangeruns one pass, the diagnostics publish's, inside the flush (trace_flush_lint=21.87ms,snapshot=miss) and none in the handler (snapshot=hit) — down from two. Config discovery still runs per request; the indent-width read moved from the dispatcher into the run, so a code-action request does the same twoDiscoverywalks it always did and the diagnostics publish now does two where it did one — about +0.11 ms on the config stage, publish row +0.3%. A handshake request to giveformat::indent_widtha form that takes an already-readFileConfigis recorded in the feature README. - Result/status/count/fingerprint comparisons, warnings and refusal
checks: every row
status=ok, and every row'sresult_countequal between the two binaries — the pinmux cursor offers nothing before and after, theaes_reg_topcursor offers the same port actions, the take-3codeactioncells answer the same counts. The correctness argument is the test matrix rather than a fingerprint: this lane changes no edit, only when one is computed. - Idle RSS / peak RSS / cache size / guard outcomes: a new
snapshotrssphase opens 1 / 10 / 100 RTL buffers, sends one quickfix-onlycodeActioninto each so that every open document holds a snapshot, and reads idle RSS a second after the session goes quiet: 420.9 → 422.2 MiB (1 buffer), 429.4 → 428.4 (10), 574.0 → 574.6 (100, +0.1%). Zero guard kills. - Target achieved or missed; paired improvement and variability:
achieved. Gate ≤16 ms unchanged menu → 0.98 ms (quickfix-only
0.11); gate ≤16 ms queued definition → 0.76 ms; gate "first-after-edit
improved and reported separately with its stage split" → 125.65 → 106.89
ms (−14.9%), with the split saying the remaining 106 ms is 84 ms of
Document::newplus the 22 ms diagnostics pass and 0.00 ms of code-action lint; gate "diagnostics publish must not regress" → +0.3%; gate "no higher retained memory" → +0.1% at 100 buffers. Unchanged rows move −23% to +15% on sub-10 ms cells, in both directions and with no pattern:didopen(median of three fresh processes) 4.53 → 3.49, 5.72 → 5.56, 8.68 → 8.15, and thetb.svmenu 0.19 → 0.23 / 1.26 → 1.45. None of these is read as movement at that scale. - Where the reference disagrees with the baseline beyond tolerance (neither number adjusted): the review's 0.51.0 cells are 25.0 / 23.1 / 24.2 / 135.9 ms; this session's own reference reads 22.6 / 24.5 / 22.4 / 125.7 — within about 8% in both directions. The improvement is stated against this session's own reference, so the ratios are unaffected.
- Correctness tests and logs:
cargo fmtclean; guardedcargo clippy --all-targetsclean, no new#[allow]; guardedcargo test --workspace4 343 passed, 0 failed against the reference tree's 4 322 passed, 0 failed measured the same way — +21, none removed, confirmed by diffingcargo test -- --listbetween the two trees. The 21 are: 11 inserver/tests/lint_snapshot.rs(one per invalidation-table row — an edited buffer, a large buffer, a pushed rule selection, a rewrittenlucisv.toml, a rewritten waiver file, a changed indent width, a change in another file that moves the census, close/reopen, a UTF-16 fix range, the shared pass, and the stale-fix attack), 4 inlint_snapshot.rs(every field of the key forces a recompute; a same-length waiver rewrite is a different key), 4 inlint_trace.rs, 2 inlint.rs(the indent ladder rung by rung; a reused snapshot compared violation for violation and fix for fix against a freshlint_with). - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
the code-action path is now transport-bound on the largest file in
opentitan. What is left of the edit-time pause is not lint: ~84 ms of
Document::newon 1.3 MB, which is a parser/analysis question and belongs with the review's item 4 as a separate lane. Rejected alternatives: hashing the key (a digest would make "no stale fix" a collision argument instead of aPartialEqfact); keying on the waiver files' mtime or length (weaker than the contents, and wrong across a same-second rewrite); memoizing theFileConfigread (the trace measures it at 0.04–0.16 ms, and its failure mode would be a stale rule selection on files nothing watches); an index generation counter (refresh_overlayis already called at every index mutation, so a counter would be a second thing to keep in step); a bounded map keyed by URI (a field on theDocumentis dropped bydidClosefor free and cannot outlive its text). - Decision: retain / revise / reject / defer; next stage justified by
evidence: retain. The next lever on this path is the 84 ms
Document::new, not the linter. - QA result and lead review link: pending —
docs/features/perf5r-lint-snapshot/README.md.
Experiment record — R3a-2026-09-08 (stage R3a)
- Experiment ID / stage / date / owner:
R3a-2026-09-08/ R3a (TODO §61.1) / 2026-09-08, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: a
textDocument/renameon a cursor with no symbol selects all 3 976 in-scope files and performs 3 975 whole-file parses beforeScope::locaterefuses in 0.1 ms from the request buffer's own analysis. If the engine is asked that question from the buffer first, the expected reduction is the whole of it: 3 975 → 0 parses, and the ~1.9 s scope build plus the ~0.25 s selection removed entirely. - Reference commit, candidate commit or diff hash, binary hashes: reference
= tag
v0.51.0(bc59336, "Release 0.51.0"), built from a clean shallow clone in scratch, binary271b7f7ce386a6db0f0c346c3879944b6d2109f4eb985edd6c58ae60da93bb77. Candidate = tree ate13ae4c89b4480d658ec2122a625b54ce000062fplus the uncommitted §61.1 diff, binary5f815542ac16854acb77f545805378324e0025eaaf48662f28bcc8ae8b6ebdb9. Both--release, rustc 1.97.1 (8bab26f4f 2026-07-14) (Homebrew). - Files changed / API contracts amended / topology references:
crates/vlog_refactor/src/rename/preflight.rs(new, 84 lines),crates/vlog_refactor/src/rename/mod.rs(themod/pub use, and the same-name sentence factored intoalready_named),crates/vlog_refactor/src/lib.rs(one export),crates/lucisv_server/src/rename.rs(the call, and the trace on the refusal path). One new public API:vlog_refactor::rename_preflight, additive. Adocs/topo.md§1.2 amendment is requested indocs/features/perf5r-preflight/README.md's Handshakes and was not applied by this lane. - Workload, corpus/input hashes, open files, cursor/range, rules, client
capabilities: OpenTitan, the same three pre-existing modified files,
verified unchanged by
git status --porcelainafter every one of the 12 phase invocations. Cursors aretools/perf/sites.py's, unchanged. The no-symbol row isphases_p2.no_symbol_row's own cursor; the duplicate-module row isrstmgr_por; the common-port row isclk_iinentropy_src_main_sm.sv. Client shape is in every row. - Machine, compiler/profile, threads, load before/after, competing activity: M1 Max, macOS 27.0, release profile, default worker count. Load recorded before every phase: 1.67–4.78 one-minute, inside the review's own 2.82–6.00 band. No build, test suite or second benchmark overlapped any timed run — both binaries were built to completion first, and the workspace test suite finished before the first phase started.
- Commands, cache reset/prime steps, trial ordering and fresh-session
count: 12 guarded
bench.py <phase>invocations,--tries 3(one first + three repeats), each throughtools/guard.sh -m 8 -t 1800. Phasesrenametrace tailrename rename execute refactor extractrefuse, each run once per label. Reference/candidate order alternated between phases (renametraceref→cand,tailrenamecand→ref,renameref→cand,executecand→ref,refactorref→cand,extractrefusecand→ref). Separate--storageper label;renametraceopens a fresh session per row. - Raw evidence path, explicit units, full sample arrays:
~/.cache/lucisv-perf/take5r-1/results.jsonl(andresults2.jsonlfor the correctedextractrefuserun). Units in every row: latencyms, memorypeak_rss_kib. Trace fields aretrace_*; the new one istrace_preflight. - Reference first / repeat median / range; candidate first / repeat median / range: no-symbol — reference 2 039.6 / 2 012.3 / 1 991.8–2 023.3; candidate 3.6 / 0.34 / 0.26–0.42. Duplicate module — reference 2 088.2 / 2 012.6 / 2 003.1–2 021.5; candidate 2 051.7 / 2 032.0 / 2 001.9–2 058.0. Common port — reference 3 345.6 / 3 242.4; candidate 3 387.8 / 3 252.7. Tail — 367.3 vs 365.0. The full arrays are in the JSONL; the feature README carries the whole table.
- Work counts: reads, parses, analyzed/selected/watched/edited files and
bytes: the no-symbol refusal goes from
selected=3976,bytes=35 813 310,parses=3975,index=1 713.7 ms,fallback=truetoselected=0,parses=0,index=0.0 ms,preflight=true. Every other row's counts are byte-for-byte unchanged, including the duplicate-module row's 3 975 parses, which the decision deliberately leaves in place. - Result/status/count/fingerprint comparisons, warnings and refusal
checks: all fingerprints identical — tail
b39defb21265…,aesfa7e31c78382…,clk_i31aadc134628…,cipher_alert5f53e977da59…, extraction090e92e7736e…. Every refusal message compared programmatically and identical, the no-symbol sentence included.aes_extracted.svstill does not exist. - Idle RSS / peak RSS / cache size / guard outcomes: the no-symbol row's peak drops 909.1 → 428.8 MiB (−52.8%) — it no longer holds an index over 35.8 MB of source. Every other row within ±8 MiB except the tail rename (611 → 659 MiB, +7.8%, a single-session sample on an unchanged code path). Zero guard kills.
- Target achieved or missed; paired improvement and variability:
achieved, with margin. Gate ≤16 ms → 0.34 ms; gate zero closed-workspace
parses → 0, read off the wire rather than asserted; gate exact
refusal/precedence → byte-identical sentence, and precedence pinned by
the_preflight_does_not_disturb_the_refusal_order. Unchanged rows vary +0.3% to +4.4%, none read as movement. - Where the reference disagrees with the baseline beyond tolerance (neither
number adjusted): the review's candidate-only cells were 2 192 ms
(no-symbol), 2 200 ms (
rstmgr_por), 3 455 ms (clk_i). This paired rerun's reference reads 2 012, 2 013 and 3 242 — 8–6% below all three, in the same direction, on a machine whose load was lower this session (1.7–4.8 vs the review's 2.8–6.0). The improvement is stated against this session's own reference, not against the review's cells, so the ratio is unaffected. - Correctness tests and logs:
cargo fmtclean; guardedcargo clippy --all-targetsclean, no new#[allow]; guardedcargo test --workspace4 328 passed, 0 failed, exit 0. New: a 10-test equality oracle (crates/vlog_refactor/tests/preflight_oracle.rs) comparing the preflight's refusal against whole-scoperenameat every byte of seven hostile fixtures × six new names, failing on any reworded or invented refusal; 4 server tests including the zero-parse assertion and the large-buffer gate. - Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
the cheap door into
ws.sources()is closed; the two expensive doors are still open and are deliberately open.rstmgr_por(2 032 ms) andcipher_alert → clk_i(2 730 ms) both need the whole scope — the first because the index is not current with respect to unsaved edits andrenameis the authority that re-derives the count, the second because the refusal is the verifier's. Rejected alternatives: taking the duplicate-declaration refusal from the index (evidence and argument in the feature README —state/mod.rs::set_documentreads the index and never writes it, so a refusal from it could be wrong with no later road to correct it); taking theExternalCandidaterefusals from the buffer's overlay (same argument); takingnew_name == moduleunconditionally (it would jump the ambiguity check and change which sentence the user sees). - Decision: retain / revise / reject / defer; next stage justified by
evidence: retain. R3b/R3c's remaining halves are unblocked and now have
a sharper target: with the cheap refusal gone, the ~2.0 s floor on the two
surviving whole-scope rows is entirely
Scope::build, which is exactly what §61.5 proposes to reuse. - QA result and lead review link: pending —
docs/features/perf5r-preflight/README.md.
Experiment record — R3c-x-2026-09-08 (stage R3c, extraction half)
- Experiment ID / stage / date / owner:
R3c-x-2026-09-08/ R3c, the refused-extraction half only / 2026-09-08 / dev agent (Opus). The broad fallback and warning-stage halves of R3c are untouched and remain Pending. - Hypothesis and exact expected work reduction: that the 805 ms refused
extraction at
aes_wrap.sv66:2 spends its time inScope::buildahead of region-local safety checks, and that moving those checks in front of the build would remove most of it. - Reference commit / candidate / binary hashes: as R3a above; the same two binaries and the same session.
- Files changed:
tools/perf/phases_r3.py(new, phaseextractrefuse) and one import line intools/perf/bench.py. No production Rust survives from this half. Anextract_preflight(~130 lines,extract/preflight.rs, plus a server call and eight oracle tests) was written, wired and measured, then removed; three server tests and one factored refusal sentence (extract::does_not_parse) were kept. - Workload:
aes_wrap.sv66:2,sites.REFACTOR_SITES'sinline-modulerow — the review's own site.aes.sv220:0–222:53 is the successful-capture control. Corpus unchanged after every invocation. - Machine / load / commands / ordering: as R3a.
extractrefuserun once per label, candidate first;executerun once per label, candidate first. - Raw evidence:
~/.cache/lucisv-perf/take5r-1/results.jsonl(execute) andresults2.jsonl(extractrefuse, the corrected selection). - Reference / candidate medians: extract refusal 761.1 → 767.8 ms
(+0.9%). Extract capture 143.5 → 143.3 ms. Inline refusal 5.79 → 5.85.
extractrefusebad name 9.3 → 9.8 ms; partial selection 0.22 → 0.13 ms. - Work counts: unchanged. The refusal still builds the scope, because the refusal is about the scope.
- Result/fingerprint/refusal comparisons: extraction fingerprint
090e92e7736e…identical. Both refusal sentences identical. - Peak RSS / guard: unchanged; zero guard kills.
- Target achieved or missed: missed, and correctly so. The hypothesis
was falsified in two independent ways. (1) The 805 ms refusal is
extract/boundary.rs:196inCrossing::read, the last stage ofExtraction::plan; it depends onflow::read(&scope, …), which needs the instantiated modules' port directions from other files. It is scope-dependent at depth, not region-local. (2) The region-local checks were already in front of the scope build, by two mechanisms:extract::execute'ssite_atgate isextract_site_in, whose first two statements are the parse-diagnostic check andRegion::read, so neither can reach the engine; andplain_identifierand the occupied check areextract_module's own first two statements, ahead ofExtraction::plan. The twoextractrefuserows measure exactly this: both refusals are already pre-scope in the reference. - Interpretation, tradeoffs, rejected alternatives: the preflight was
rejected rather than shipped because it would have been a new public API and
a second copy of two checks in exchange for zero measured work, which is the
abstraction CLAUDE.md's "simplicity first" forbids. The reason is recorded as
a comment at the call site in
lucisv_server/src/extract.rsso the next round does not rediscover it, and theextractrefusephase is kept so the claim stays a measurement. The lever that would move the 805 ms is named but not attempted:flowwants port directions the workspace index already holds, so it belongs to §61.5's scope-reuse work, not to a preflight. The review's own instruction — instrument first, "do not implement beyond the region-local checks without the evidence" — is what this record answers. - Decision: reject the extract preflight; defer the 805 ms refusal to §61.5 (R3b/R3c scope reuse) with its stage identified.
- QA result and lead review link: pending —
docs/features/perf5r-preflight/README.md.
Experiment record — R4-2026-09-08 (stage R4)
- Experiment ID / stage / date / owner:
R4-2026-09-08/ R4 (TODO §61.4) / 2026-09-08, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: the review's §4 — "first add a fixed-arrival-rate probe and record publication/overlay costs alongside queue latency and scan completion", then "test incremental table construction or reduced duplicate publication work, preserving the coherent-prefix contract". No number was expected of the probe; the reductions the work order named were the candidates rebuild, a selective overlay refresh and a bounded publish cadence, in that order.
- Reference commit, candidate commit or diff hash, binary hashes: reference
trunk
eb54042, sha256f7a5a27eec773eca…(REF). CandidateCAND= that tree + the whole §61.4 diff, sha2564af863c145dc4d4b…. Release,cargo build --release --locked. - Files changed / API contracts amended / topology references:
tools/perf/phases_r4.py(new —scanload,scanloadcold,scanloadcross,scanloadprobe),tools/perf/lspclient.py(two additive hunks: an arrival stamp in the reader thread andSession.poll_answers),bench.py(registration),tools/perf/README.md;crates/lucisv_server/src/state/scan.rs(PUBLISH_EVERY,Scan::publish_is_due, additive),state/discover.rsandstate/mod.rs(visibility only; no production line added tostate/mod.rs),server/index.rs(the drain's publish decision,answer_what_was_deferred),server/mod.rs(Server::deferredand the rule's call site),server/dispatch.rs(NAVIGATION,names_nowhere,ask_again_if_empty,say_deferred),server/startup.rs(one field),server/tests/startup.rs.candidates.rsandincludes.rsare unchanged — see the decision. No cross-crate contract amended;WorkspaceIndex::absorbis called with the same arguments, fewer times. Amended in their own READMEs, rules unchanged:scan-interleave(a dated entry for the cadence and the empty-answer rule),perf5r-first-answer(its cross-folder[]is now answered here). - Workload, corpus/input hashes, open files, cursor, capabilities:
OpenTitan
0098135264with its three known modified files,git status --porcelainchecked after every phase.lucisv.index.scope: "workspace",--verbose, theaes #(cursor insites.TBforscanload/scanserveand the cross-foldertl_ifcursor forscanloadcross. 1 / 2 / 11 / 101 open buffers. - Machine, profile, load, competing activity: M1 Max, macOS 27.0, release, default worker count. One-minute load 2.0–3.6 across the timed phases (13.1 at session start, before any measurement; the first probe run was taken after it fell). No cargo command during a timed run.
- Commands, cache state, trial ordering, fresh sessions:
tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py <phase> … --tries 3;scanload/scanloadcoldREF then CAND, the remaining phases CAND then REF (the alternation the protocol asks for). Three fresh processes per cell; the store deleted before every cold session. - Results: in
docs/features/perf5r-publication/README.md— the R4 baseline split, the paired warm and cold tables,scanserve, the quiet matrix, the scope cells, RSS and the cross-folder cell. Headline: warm one buffer at 100 ms, publication 3 105 → 588 ms and the traced scan 4 206 → 2 188; cold 7 973 → 922 and 10 675 → 3 686; median wait 112.3 → 1.9 ms warm and 137.7 → 1.5 cold; publishes 34 → 4.7 warm and 88 → 7 cold. - Two metrics that must not be read as one:
scan msis the server's own traced scan wall time and is the honest completion figure. The probe'ssettled_msis floored by the fixed request window whenever the session finishes inside it, so it understates the gain (warm one buffer: 4 215 → 3 417, −19 %, against the scan's −48 %);mid_scan_*misclassifies post-settle answers for the same reason and is not quoted. Neither is needed: both binaries are offered the identical request count over the identical window and answer all of them. - Result parity: requests offered and requests answered equal in every
paired cell;
mismatched_answers0 andunsettled_answers0 onscanload,scanloadcoldandscanservefor both binaries, cold and warm. - Guard outcome: no kill. The first paired
scanloadattempt was stopped by hand when its projected wall time approached the 1 800-second limit, and the phase was split into a warm and a cold half rather than the limit raised; its partial output is kept aspaired-partial-firstattempt.jsonland no number is taken from it. - Decision: retain the cadence and the empty-answer rule. Reject
the selective overlay refresh — 0.08 % of publication at one open buffer, and
the intersection it needs would cost more than it saves. Defer an
incremental candidates rebuild and a targeted
WorkspaceIndex::absorb: the cadence takes both down with it, and the second is avlog_semanticchange this lane's file list excludes.absorb's whole-index merge is named as the next lever for whoever owns that crate next. - QA result and lead review link: pending —
docs/features/perf5r-publication/README.md.
Experiment record — R3c-2026-09-08 (stage R3c, measurement half)
- Experiment ID / stage / date / owner:
R3c-2026-09-08/ R3c, the fallback-and-warning-stage half (TODO §61.5) / 2026-09-08, America/Chicago / dev agent (Opus). The refused-extraction half isR3c-x-2026-09-08above and is unaffected. - Hypothesis and exact expected work reduction: none — this half is measurement only, and its output is a number the lead's go/defer ruling is a function of: if parse-and-analysis of the files a rename does not keep is ≥ 30 % of the scope stage on the tail rename, R3b proceeds.
- Reference commit / candidate / binary hashes: measured on the tree at
07ef771a3513e4deb1ca42f88428eb2799f4efadplus this lane's trace additions; candidate-only, so no reference binary is involved. The intra-analysis split came from a further trace-only build (FileFacts::analyzedexpanded over the public API insideScope), run once and removed — nothing of it shipped. - Files changed / API contracts amended:
vlog_refactor/src/trace.rs(IndexTrace,WarnTrace, two newname{…}groups on the trace line),scope.rsandrename/{mod,warnings}.rs(the trace threaded throughbuild_keepingandwarnings). No contract amended; the harness needed no change, becausephases_p2.parse_tracealready flattensname{…}groups. - Machine / load / commands / ordering:
renametrace,--tries 3, one--verbosesession per row, repeat median of three; load 4.1–5.1; guard-m 8 -t 1800, no kill; corpusgit status --porcelain= the three known files after the phase. - Result — the scope stage (tail rename, 242.4 ms):
lead0.4,kept133.5 (134 files, 2.89 MB),other83.1 (103 files, 1.65 MB) = 34.3 %,merge23.4. Broad fallbacks:clk_i35.8 %, new-name-many-uses 36.0 %, duplicate module 87.8 % (1 740.5 of 1 982.9 ms — 3 962 of 3 976 files are the unread class). The two rows at 0 % / 25 % are the small ones. - Result — inside one analysis: lex +
definetable 34 %, parse 32 %, semantic analysis 20 %, record read-off 13 % (tail; 37/35/16/12 on both 3 976-file rows). The review's "parser versus index" question therefore resolves to parser — and to not running it at all, since no part of the parse is separately optimizable here. - Result — the warning pass (49.7 ms):
define1.9, macro arguments 41.7, SVA 2.6, unfinished 0.4, unaccounted 0.0; 135 files lexed. The macro scan is billed the shared per-file lex because it asks first; §P2d already shares that lex across all five scans, so no duplicated work remains in the pass. Retaining the scope build's tokens instead would remove it, and is refused on memory (clk_ilexes 1 249 files at a 1.9 GiB peak). - Allocation: no per-stage byte counter exists and none was added — one
requires a
GlobalAllocwrapper, which isunsafe. Reported instead as the harness's 50 ms peak-RSS sample per row plus the per-class byte counts now in the trace. - Decision: retain / revise / reject / defer: retain the shipped splits; go on R3b at 34.3 %.
- QA result and lead review link: pending —
docs/features/perf5r-scope-reuse/README.md.
Independent 0.52.0 review — 2026-09-09
Reviewed 3ceba21bb2ef4404a188b076301b170af862075b against a freshly built
0.51.0 reference (126a6bc) using the same current harness. See
the findings and performance assessment and
preserved evidence. No implementation changes
were made by this review. The completed lane records above remain historical
records; the open findings below are follow-up work.
Confirmed gains: unchanged pinmux menu 24.3 → 0.32 ms; queued definition 24.4 → 0.29 ms; no-symbol refusal 2,205 → 0.22 ms / zero parses; tail rename 391.8 → 324.6 ms / 240 → 137 parses; duplicate-module refusal 2,206 → 754 ms. First useful definition 278.6 → 84.4 ms cold and 294.5 → 118.5 ms warm in the one-buffer fixture. Properly warmed fixed-load comparison, two open buffers: server scan 4,247 → 1,771 ms, publishes 34 → 4, 105/105 requests answered on both versions. Cross-folder candidate answers match the settled target in 750/750 cases.
Targets still open: paired tail rename improvement is 17.1%, below 20%;
warm quiet scan 1,065 ms does not reproduce <1 s; cold remains 2.89 s;
first-after-edit pinmux is 114 ms; common-port rename 2.88 s at about 1.8 GiB
peak process RSS. Refused extraction still costs about 807 ms. Whole-window
request latency is valid; the harness's mid_scan_* and settled_ms fields
have finding F3 below and must not be used as scan-only acceptance metrics.
Follow-up findings — implementation agent to fill
Use one full experiment record per fix, including commands, hashes, cache setup, all samples, result parity, guard outcome and correctness tests.
| ID | Finding / cause | 0.52.0 baseline | Required acceptance | Owner / fix commit | Result / evidence | Status |
|---|---|---|---|---|---|---|
| F1 (P2) | Separate head/root directory walks lose shared identity; path-only seen admits two spellings of one module |
Symlink fixture: 2 definitions and false ambiguous prepareRename at startup; 1 definition and accepted prepareRename after unchanged rescan | Startup/rescan/restart agree; alias-before/after-target, multiple aliases, cycle, ignores, unsaved buffer covered; real duplicate modules still ambiguous | dev | lucisv_core::walk::DirectoryTracker shared by the neighbourhood walk and the remaining walk (one directory identity entered once between them); first_scope falls back to the single canonical walk when an alias precedes the open folder or one of its ancestors, and the HEAD_WALK_MAX fallback now discards the head instead of unioning it; an alias the pre-check cannot see (other/link -> z_real) is met by the remaining walk, refused entry, and answered with one ordinary rescan — the canonical walk — with conflict=1 rescan_requested=1 on the trace; an open buffer's own file is recognised under an alias by (dev, ino) in overlay_buffers alone, gated on the file name so an ordinary workspace stats nothing. Measured on opentitan: stats 0 at 0 and 1 open buffers cold and warm (58 in the 2-buffer cell, = its same-named candidates); pre-check 0.17 ms/session; discovery 179.2 → 162.2 ms; warm scan 1 044 → 1 040 ms, cold 2 879 → 2 886 ms, first useful answer 82.0 → 81.9 cold / 115.6 → 117.5 warm; 100-buffer settle 1 251 → 1 218 ms; warm idle RSS 427 856 → 426 048 KiB. Nine #[cfg(unix)] fixtures behind one startup/rescan/restart helper in crates/lucisv_server/src/server/tests/startup.rs, including the sibling alias (rescan asserted once) and the genuine duplicate (still refused, same sentence). |
Closed |
| F2 (P2) | Warm scanload does not prime fresh storage |
First nominally warm trial: 0 hits / 3,974 misses / 1,684 ms parsing; second: 3,974 hits / 0 misses | Explicit untimed prime or validated complete store; per-trial cache counters; brand-new storage test | dev | tools/perf/phases_r4.py::prime runs one untimed session over the same scope and buffers before a warm cell's first timed trial; cache_hits/cache_misses are recorded per trial and cell_status fails a warm cell whose trial found nothing in the store. Verified with a brand-new --storage, 2 tries: 3 975 / 3 975 hits, 0 / 0 misses (0.52.0's first nominally warm trial was 0 / 3 974); a second run over the now-populated store: 3 975 / 3 974 hits, 0 misses. |
Closed |
| F3 (P2) | settled_at treats wait_quiet's positive entry delta/request chatter as scan completion |
Actual scan about 1.77 s, reported settle about 3.41 s; 105 responses labeled mid-scan, zero after-settle | Timestamp actual scan completion; retain response arrival stamps; correctly partition post-scan responses; extending an already-long request window does not move completed scan time | dev | tools/perf/lspclient.py stamps scan_completed_at in the reader thread on the indexing bar's own $/progress end (timing: scan finished: for a client with no bar) and keeps every end in progress_ends, so a row can show there was exactly one; settled_at reads it and its fallback asks "did a notification arrive?" by counting them rather than by testing a clock delta for zero; summary partitions responses on it and keeps each answer's arrival offset. Verified warm, 1 extra buffer: scan_completed_ms 1 774.7 / 1 507.2 ms against the server's own trace total 1 767.8 / 1 499.9 (was ~3 406 for a 1 770 ms scan), scan_ends 1 per session, 32 mid-scan / 38 after-settle out of 70 (was 105 / 0). Widening the window 3 500 → 5 000 ms: completion unmoved at 1 781 / 1 791 ms, mid-scan 36, after-settle 38 → 64. |
Closed |
Remaining performance experiments — conditional, not implemented
| ID | Next work to measure | Fixed 0.52.0 review baseline | Candidate commit | Candidate result / memory / parity | Decision |
|---|---|---|---|---|---|
| N1 | Lexer/parser and dirty-buffer analysis on first action after edit | 113.6 ms first-after-edit, 0.23 ms unchanged repeat in that session | — | — | Pending |
| N2 | Retained-analysis parse work and scope decode/merge costs | Tail 324.6 ms; scope 163 ms including 31 ms reuse decode; common port 2,883.7 ms / 1,251 parses | — | — | Pending |
| N3 | Quiet scan decode/merge and cost per publication, after F2/F3 | Warm quiet 1,064.7 ms; cold quiet 2,886.6 ms; warmed loaded scan 1,771 ms | — | — | Pending |
Keep the engine as the refusal authority, content-tied KnownFacts, shared
fence rules, lint invalidation and coherent publication contracts. No speed
gain justifies weakening check/ or removing necessary selected sources.
Independent gates: fmt and clippy clean; full default workspace suite
4,385 passed / 0 failed / 45 ignored — 4,374 at 0.52.0 plus two
DirectoryTracker unit tests in lucisv_core and nine alias fixtures in
lucisv_server. Recorded outcomes match in 84 paired non-load rows. Corpus
(0098135, its three known modified files) and release-binary hashes
unchanged; no guard kill; load 4.1–6.8 across the timed phases. F1–F3 closed
with regression tests and harness fixes in place; the F1 rows are in
~/.cache/lucisv-perf/f1/results.jsonl, paired against a 0.52.0 server built
from v0.52.0 for this comparison.
Experiment record — R3b-2026-09-08 (stage R3b)
- Experiment ID / stage / date / owner:
R3b-2026-09-08/ R3b (TODO §61.5) / 2026-09-08, America/Chicago / dev agent (Opus). - Hypothesis and exact expected work reduction: the 103 files a tail rename selects but never analyses are parsed only to produce their index record, and the server already holds that record for those exact bytes. Handing it back should remove 103 parses (83.1 ms) and the record read-off of the 134 kept files (~32 ms), against the cost of reading the records.
- Reference commit / candidate / binary hashes: reference = the clean tree
at
07ef771a3513e4deb1ca42f88428eb2799f4efad, built before any edit of this lane, binary50d8315a738103f006a28e1f6ea46c476a776fff1d880b860fc1bbcd83b315e9. Candidate = that tree plus the §61.5 diff, binarya041b5f3272ca8ff39d9d62e4ab46c896e82b43d0f4e37e11d96b27635f7d491. Both--release --locked. - Files changed / API contracts amended / topology references:
vlog_refactor/src/{scope.rs,trace.rs,lib.rs,rename/mod.rs}(theKnownFactstrait,Building,rename_traced_with),lucisv_server/src/{index_cache.rs,state/mod.rs,rename.rs}(entry_for/facts_now,Workspace::known_facts,Known),tools/perf/{phases_r3b.py,bench.py,README.md}. One new topology edge (lucisv_server ──▶ vlog_refactor:rename_traced_with+KnownFacts), additive;vlog_semanticunchanged;check/no diff. - Machine / load / commands / ordering: six phases (
renametrace,tailrename,rename,refactor,execute,blockers), each run twice per binary with the order alternated (head, r3b, r3b, head) and the two repeat medians taken;--tries 3; load 3.9–5.1; nocargoduring any timed phase; guard-m 8 -t 1800on every command, no kill; corpusgit status --porcelainchecked after every phase, always the three known files. - Result — first try / repeat / range: tail rename repeat median
380.2 → 314.0 ms (−17.4 %); the four medians behind it are 380.2/380.0
(head) and 314.0/314.0 (r3b), so the improvement is larger than the
between-run spread. Fallback
clk_i3 346.5 → 2 762.5 (−17.4 %); conflict 320.5 → 260.1 (−18.8 %); new-name-many-uses 2 689.0 → 2 191.5 (−18.5 %); duplicate-module refusal 2 053.1 → 695.2 (−66.1 %);aes89.4 → 88.9 (−0.5 %), 90.8 → 92.0 on therenamephase and 115.1 → 114.9 onblockers; extract refusal 800.2 → 794.7; extract edit 147.7 → 148.3; resolves 131.1 → 130.5 and 54.1 → 54.9 and 8.1 → 8.0; no-symbol preflight 0.17 → 0.19. - Work counts: tail parses 240 → 137, which is
(K − 103) + Ewith 238 records reused; fallback 3 977 → 1 251; duplicate-module refusal 3 975 → 14. Stage split of the tail's 66 ms:other83.1 → 0.0,kept133.5 → 101.6, reuse +31.1,merge22.7 level, everything outside the scope build level (verify71.6 → 71.6,warnings50.1 → 50.2). - Result parity: 36 paired rows compared on
fingerprint,message,status,result_count,edits,files,createdandtitles— 0 mismatches. Because a rename's warnings travel aswindow/logMessageand are in no phase's fingerprint, a newrenamewarnphase dumps them verbatim: 1 750 sentences across four renames (434 / 12 / 0 / 1 304), compared line by line, all identical. - Peak and idle memory: peak RSS lower or level on every row — tail 615 →
596 MiB, fallback 1 881 → 1 787, duplicate-module refusal 887 → 718,
aes448 → 448. The one rise is +16 MiB on a 1.6 GiB refusal, inside the 50 ms sampler's spread. Nothing is retained past the request: no persistent decoded-analysis cache was added, so there is no memory budget to state. - Correctness checks:
cargo test --workspace4 374 passed, 0 failed (4 366 before, +8, none removed);cargo fmtclean; guardedcargo clippy --all-targets --workspaceclean with no new#[allow]. New proofs: index fingerprint + file ids + per-file analyses equal on an index part reused and part parsed; a stale record refused four ways and the scan's work counters untouched; a record filed under another path refused;(K − reused) + Easserted per stage; warm-store vs no-store server parity; an unsaved buffer parsed and renamed from its own text. And an#[ignore]d corpus probe: one rename over 860 files of real RTL asked three ways — no records, every record, every second — byte-identical edits and warnings all three times, parses 865 → 16 → 439, index stage 1 262.4 → 201.3 → 744.7 ms. - Guard outcome: no kill.
- Decision: retain / revise / reject / defer; next stage justified by
evidence: retain, with the gate miss reported rather than rounded.
−17.4 % against the paired reference where the gate asks ≥ 20 %; −21.2 %
against the review's own 398.3 ms baseline, and the brief's absolute form of
the gate (≤ 318 ms) is met at 314.0. The remaining stage is named and
measured: 31.1 ms of store decode, the price of tying record and hash to
one place. Taking the decoded record from
WorkspaceIndexand only the hash from the cache would clear the number and is rejected — a record filed under a path is not evidence about the bytes a rename was handed. Behind it sitverify.rebuild37 ms andmerge23 ms, bothWorkspaceIndex's whole-index merge, already filed by R4 asvlog_semantic's. Collateral for the other refactorings: not taken — the door is engine-wide, but reachingextract/inline/imports/ports/referencesneeds a_withentry point in five files this lane does not own, past the "same three lines each" condition; measured collateral today is nil (±1.4 % on all six rows). - QA result and lead review link: pending —
docs/features/perf5r-scope-reuse/README.md.