Skip to content

Commit 739cb16

Browse files
committed
Update roadmap
1 parent cadd674 commit 739cb16

2 files changed

Lines changed: 43 additions & 5 deletions

File tree

docs/todo.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,8 @@ unlikely to move the needle for most users.
140140
| X4 | Full background indexing (`strategy = "full"`) | Medium | High |
141141
| X6 | Disk cache (evaluate later) | Medium | High |
142142
| | **[Bug Fixes](todo/bugs.md)** | | |
143-
| B2 | Orphan PHPStan processes on server shutdown | High | Low |
144-
| B5 | Implementation error diagnostic skips enums | Medium | Low |
145-
| B7 | Inlay hints: wrong parameter name with mixed named/positional args | Medium | Medium |
146-
| B10 | PHPStan cache written after file close causes stale diagnostics | Low-Medium | Low |
147-
| B1 | Native type hints not considered in virtual property specificity ranking | Low-Medium | Medium |
143+
| B11 | [Diagnostic deduplication drops distinct diagnostics on same range](todo/bugs.md#b11--diagnostic-deduplication-drops-distinct-diagnostics-on-the-same-range) | Medium | Low |
144+
| B12 | [PHPStan cache pruning uses length-only comparison](todo/bugs.md#b12--phpstan-cache-pruning-uses-length-only-comparison) | Low | Low |
148145
| | **[Inline Completion](todo/inline-completion.md)** | | |
149146
| N1 | Template engine (type-aware snippets) | Medium | High |
150147
| N2 | N-gram prediction from PHP corpus | Medium | Very High |

docs/todo/bugs.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,44 @@ within the same impact tier.
1414
| **Effort** | **Low** (≤ 1 day), **Medium** (2-5 days), **Medium-High** (1-2 weeks), **High** (2-4 weeks), **Very High** (> 1 month) |
1515

1616
---
17+
18+
## B11 — Diagnostic deduplication drops distinct diagnostics on the same range
19+
20+
| Impact | Effort |
21+
| ---------- | ------ |
22+
| Medium | Low |
23+
24+
`deduplicate_diagnostics` in `src/diagnostics/mod.rs` calls
25+
`dedup_by(|a, b| a.range == b.range)` after sorting by range. This
26+
removes **all** diagnostics that share the exact same span, regardless
27+
of their diagnostic code, message, or severity. If two genuinely
28+
different native diagnostics land on the same range (e.g. an
29+
`argument_count` error and an `unknown_member` warning on the same
30+
expression), the second one is silently dropped.
31+
32+
**Fix:** Change the dedup key from `a.range == b.range` to
33+
`a.range == b.range && a.code == b.code`. This preserves distinct
34+
diagnostic codes on the same span while still collapsing true
35+
duplicates produced by different analysis phases.
36+
37+
---
38+
39+
## B12 — PHPStan cache pruning uses length-only comparison
40+
41+
| Impact | Effort |
42+
| ---------- | ------ |
43+
| Low | Low |
44+
45+
In `publish_diagnostics_for_file` (`src/diagnostics/mod.rs`), the
46+
PHPStan cache pruning step only updates the cache when
47+
`pruned.len() != cached.len()`. If deduplication replaces one PHPStan
48+
diagnostic with a different one at the same count (same number of
49+
entries but different content), the cache is not updated. On the next
50+
Phase 1 merge the stale entry would reappear.
51+
52+
In practice this is unlikely because pruning only ever removes entries
53+
(never replaces them), but the check is technically incorrect.
54+
55+
**Fix:** Replace the length comparison with a content comparison, or
56+
unconditionally write the pruned set back into the cache (the extra
57+
write is negligible).

0 commit comments

Comments
 (0)