Skip to content

Commit 001a973

Browse files
docs: record lazy lookup disposition
1 parent f7e6812 commit 001a973

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

docs/superpowers/plans/2026-07-13-fix-audit-findings.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
- [ ] Add a web-module export smoke test without instantiating browser-only globals.
182182
- [ ] Run the symbolicate WASM package tests after building both targets.
183183

184-
### Task 10: Remove fast-lazy prefix rescans and lookup clones
184+
### Task 10: Validate fast-lazy prefix rescans and remove lookup clones
185185

186186
**Files:**
187187
- Modify: `crates/sourcemap/src/lib.rs`
@@ -191,14 +191,14 @@
191191
**Interfaces:**
192192
- Preserve public `LazySourceMap::decode_line() -> Result<Vec<Mapping>, DecodeError>`.
193193
- Internal original-position lookup must use cached slices without cloning.
194-
- Fast mode stores cumulative VLQ state checkpoints keyed by the next undecoded line.
194+
- Do not add checkpoints unless a reachable public cache-miss path is proven.
195195

196-
- [ ] Add behavioral tests for descending and randomized lookup order and a test-only decode-work counter or equivalent observable proof that backward queries resume from a checkpoint.
197-
- [ ] Confirm the descending case performs prefix rescans before implementation.
198-
- [ ] Add a checkpoint map initialized with line zero state; select the nearest checkpoint at or before the target and store each decoded line's end state.
196+
- [ ] Add behavioral tests for descending and randomized lookup order.
197+
- [ ] Confirm that public backward queries cannot miss previously traversed cached lines, classifying the prefix-rescan finding as invalid.
198+
- [ ] Remove the experimental checkpoint implementation and its unreachable private-cache regression test.
199199
- [ ] Split cache population from access so internal lookup borrows the cached vector while public `decode_line` clones only for its owned return contract.
200200
- [ ] Add deterministic ascending, descending, repeated, and randomized fast-lazy lookup benchmarks.
201-
- [ ] Measure baseline and candidate using Criterion2 or CodSpeed simulation. Keep the change only if target workloads improve and eager parse or lookup workloads do not materially regress.
201+
- [ ] Measure baseline and candidate using Criterion2. Keep only the clone-removal change after isolated warm-cache workloads improve without a meaningful eager regression.
202202
- [ ] Run all sourcemap Rust and WASM tests.
203203

204204
### Task 11: Make contributor onboarding executable

docs/superpowers/specs/2026-07-13-audit-findings-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Existing correctness checks must affect process exit status. Parallel encoder te
3636

3737
### Lazy lookup performance
3838

39-
Fast lazy decoding will retain cumulative VLQ checkpoints so backward lookups resume from the nearest known state instead of line zero. Internal lookup paths will borrow cached mapping slices without cloning them. The public `decode_line` owned return type stays compatible.
39+
Investigation confirmed that public lazy lookups cache every traversed line and never create the backward cache miss assumed by the prefix-rescan finding. That finding is therefore invalid, and no VLQ checkpoints are retained. Internal lookup paths borrow cached mapping slices without cloning them. The public `decode_line` owned return type stays compatible.
4040

4141
Performance changes must be measured against deterministic ascending, descending, repeated, and randomized real-world lookup workloads. Revert any optimization that does not improve its target without a meaningful regression elsewhere.
4242

0 commit comments

Comments
 (0)