From 2675131f8ccfa2b92d94050b024002ce1e0e3ba5 Mon Sep 17 00:00:00 2001 From: Guoliang Chen Date: Fri, 11 Sep 2026 23:08:51 -0700 Subject: [PATCH] =?UTF-8?q?TODO=20=C2=A763:=20loop=203=20round=201=20?= =?UTF-8?q?=E2=80=94=20the=20bind=20rename=20gap=20(63.1),=20N1=20first-af?= =?UTF-8?q?ter-edit=20(63.2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 --- TODO.md | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/TODO.md b/TODO.md index ff80a39..3568b27 100644 --- a/TODO.md +++ b/TODO.md @@ -6651,3 +6651,119 @@ per publication. Filed with the review's baselines; not started. with assets verified — done 2026-09-09: **0.53.0** (b4a0668, v0.53.0), 8 assets, the darwin-arm64 vsix at 0.53.0 with both binaries, `hierarchySections.js`, `extract.js`, no `*_test.js`. + +## 63. Loop 3, round 1 (planned 2026-09-11) — the `bind` rename gap, then N1 + +Two lanes, serial, in the main tree (§36's protocol: one dev (Opus), then +one QA (Sonnet), then the lead's review; dev and QA both through +`tools/guard.sh`; no `sleep` over 60 s; no `pgrep -f`). Ships as 0.54.0. + +### 63.1 A `bind` file's own occurrence of a renamed name (QA `task_834abda3`) + +Found by §61.5's QA on the real opentitan tree, reproducible at HEAD and +unrelated to facts reuse. Renaming `entropy_masking_req` (a net declared in +`hw/ip/aes/rtl/aes.sv`) edits `aes.sv` but leaves `hw/ip/aes/dv/aes_bind.sv`'s +`.entropy_masking_req(entropy_masking_req)` — the expression half of a +connection inside `bind aes aes_reseed_if u_aes_reseed_if (…)`, which the +binder resolves in the bind target's scope (`Target::BindScope { target: +"aes" }`, `vlog_semantic/src/resolve.rs`) — neither edited nor warned about. +Renaming `seed_en` (declared in `aes_prng_clearing.sv`) leaves the same file's +two-level tail `u_aes_core.u_aes_prng_clearing.seed_en` neither edited nor +warned about, while §49's hierarchical tail from an ordinary instantiating +file (`u_entropy_src_main_sm.state_q` in `entropy_src_core.sv`) is edited. +The whole-scope engine is the refusal authority, so a silent miss is a +wrong answer: after the rename the design no longer elaborates. + +The contract to reach: an occurrence in a `bind` directive's connection is +**edited** when the engine resolves it to the renamed declaration — a bare +name in the bind target's scope, or a hierarchical path whose root is the +bind target (the target module, a `: u_x` instance list, or a hierarchical +target path) — through the same rungs an instantiating file's occurrences +use; **warned about** (file:line, the sentence shape `rename/warnings.rs` +already uses) when the name occurs in a `bind` connection the engine cannot +resolve; never silent. Source selection (`rename_sources_traced`'s rungs, +`module_select::hierarchical_users`, `files_mentioning`) must bring the +`bind` file in — find out which rung drops it before adding one. Refusal +parity with `rename_preflight` stays one-directional (the preflight may +refuse only what the engine refuses); `check/after.rs`'s rebinding check +runs over the edited `bind` file like any other. + +Feature README: `docs/features/rename-bind-occurrences/README.md`. Files: +`crates/vlog_refactor/src/{rename/,references.rs,scope.rs,check/}`, +`crates/vlog_semantic/src/{resolve.rs,workspace/}` only if a resolver rung is +missing (a Handshake entry in the README either way), +`crates/lucisv_server/src/{rename.rs,rename_trace.rs,module_select.rs,state/}` +for selection, `tools/perf/` only to add a fixture row. Nothing else. + +- [ ] the reproduction pinned first: engine-level fixtures in + `vlog_refactor` (a `bind` file beside the declaring file) for the + bare-name connection, the positional connection, the two-level tail, + a `: u_x` instance-list target, a hierarchical target path, a `bind` + inside a generate block (`if (…) begin : gen … end`), and one the + engine must *not* resolve (a bind whose target module is not in the + workspace) — each asserting today's silent miss, then flipped +- [ ] the fix: occurrences resolved through `Target::BindScope` and tails + rooted at the bind target edited; unresolvable ones warned about; + the rung that dropped `aes_bind.sv` named in the README +- [ ] parity: `renamewarn`'s 1 750 sentences and the 36-row `paired` + fingerprints re-taken against 0.53.0 — every difference is a `bind` + file's new edit or warning and is listed in the README, nothing else + moves; the eight rename shapes' timings within noise (the tail rename + ≤ 330 ms median) +- [ ] the three QA renames (`WidthPRDSBox`, `entropy_masking_req`, + `seed_en`) run against the real opentitan tree through + `rename_traced_with` under all three reuse modes: identical answers, + and `aes_bind.sv` now edited +- [ ] QA: fixtures re-attacked (a `bind` whose connection names a + *different* declaration of the same name; the new name colliding in + the bind target's scope — refused; an escaped-name target; a + `defparam`-only bind file), parity re-derived, opentitan sweep + +### 63.2 N1 — the first request after an edit (the 0.52.0 review, item 3) + +The review's cell: `pinmux_reg_top.sv` (40 267 lines), one-character +`didChange`, then the all-family `codeAction` menu — **113.6 ms**, against +0.23 ms for the unchanged repeat. The lint snapshot cannot help a fresh +revision; what remains is the debounced `Document::new` the request wrapper +performs before any handler runs (`tokenize`, `parse_tolerant` over a clone +of the token stream, `collect_defines`, `analyze`, `resolve_external`, +`LineIndex::new`), the diagnostics publish that lints the new revision, and +the menu's own stages. `crate::lint_trace` already splits the request into +flush / config / build / lint / fence / serialize under `--verbose`; the +flush's inner stages are not yet split. + +Target: ≥ 15 % off the first-after-edit cell (stretch < 95 ms) with the +AST, the diagnostics and the menu byte-identical; the unchanged-repeat cell +and every other `offeredit`/`offerkinds` row within noise; peak RSS not up. +Measure before building: split the flush in `lint_trace` (lex / parse / +defines / analyze / external / lines / publish-lint), take the numbers on +0.53.0, and go after the largest stage. Candidates, in the order the review +named them: the token-stream clone into `parse_tolerant` (borrow or hand +over, keeping `Document::tokens`), allocation in `tokenize`/`parse_tolerant` +for a 40 k-line generated file, `analyze`'s tables, `resolve_external` +against a 3 975-file index, a second lint of the same revision anywhere on +the path (the snapshot must serve both the publish and the menu — verify it +does). A change in `vlog_parser`'s public signatures is a Handshake in the +README and a topo row. No stopwatch assertions in tests. + +Feature README: `docs/features/perf-first-after-edit/README.md`. Files: +`crates/lucisv_server/src/{lint_trace.rs,state/mod.rs,server/,diagnostics.rs, +code_action.rs}`, `crates/vlog_parser/src/{lexer.rs,parser/,lib.rs}`, +`crates/vlog_semantic/src/{analyze*,bind/}` only for a measured stage, +`tools/perf/` for the flush split rows. Nothing else. + +- [ ] the flush split in `lint_trace` and a harness row per stage; the + 0.53.0 numbers in the README before any change +- [ ] the fix, one stage at a time, each with its before/after cell; + parser snapshot and idempotency suites green; corpus and opentitan + byte-identity gates +- [ ] `offeredit`, `offerkinds`, `flush`, `diagnostics` phases paired + against 0.53.0 with the order alternated; RSS cell +- [ ] QA: the trace's arithmetic re-derived, the parity attacked (a buffer + that fails to lex; a `` `define`` edit that changes the macro table; + an edit that moves a fence), the numbers re-taken + +### 63.3 Closing + +- [ ] `docs/perf/README.md` entry; topo rows for every contract amended; + release 0.54.0 with assets verified