Commit f991643
fix(describe): only trust a fresh catalog when auto-detecting type
resolveViaCatalog read the cached catalog unconditionally, so after an edit
(the .mpr mod-time changed) auto-detect could resolve a renamed/deleted name to
a stale type. Gate the catalog lookup on catalogMatchesProject (same MPR path +
unchanged mod-time, mirroring isCacheValid); on a mismatch, fall back to the
authoritative live scan. Verified: fresh catalog stays fast (~4s); a touched
.mpr falls back to the live scan (~8.5s) and still resolves correctly.
Note: mod-time can't detect a project's unsaved in-memory changes (MCP/PED
backend) — that broader catalog-staleness gap is tracked separately.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4c0ccc6 commit f991643
1 file changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
383 | 390 | | |
384 | 391 | | |
385 | 392 | | |
| |||
397 | 404 | | |
398 | 405 | | |
399 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
400 | 435 | | |
401 | 436 | | |
402 | 437 | | |
| |||
0 commit comments