Skip to content

v8.0.0-rc.15-dev.2

@StevenMcClankerton StevenMcClankerton tagged this 07 Oct 09:07
Closes the lsp-find-references project. Find references shipped in
#30621. This PR records the retro lessons in the calibration docs and
deletes `projects/lsp-find-references/`. No code changes.

**Linear:** none (the project ran without a Linear Project, by operator
choice).

**Scope:** `drive/calibration/dod.md`, `drive/retro/README.md`, and the
deletion of `projects/lsp-find-references/`. Nothing under `packages/`,
`apps/` or `docs/`.

**Verification:** the diff is two one-line documentation additions and
one folder deletion; a search for `projects/lsp-find-references` outside
the deleted folder returns nothing.

## Definition of Done

| Condition | Result |
|---|---|
| Binder records a `namespace` resolution on every namespace block name
| Met — #30621, `psl-parser/test/binder.test.ts` |
| `referencesProvider` declared; every row of the behaviour table tested
from declaration and from reference | Met — #30621,
`language-server/test/references.test.ts`, `test/server.test.ts` |
| `includeDeclaration` on and off; namespace block names in both | Met —
`references.test.ts` |
| Discarded candidates (longer identifier, comment, string, same-named
field) | Met — `references.test.ts`, one case per rule |
| Other symbol kinds; empty result for symbols with no declaration | Met
— `references.test.ts` |
| Go-to-definition on a declaration name returns the declaration | Met —
`language-server/test/definition.test.ts` |
| Language-server README lists find references | Met — #30621 |
| Manual check in VS Code | Cancelled by the operator. The scripted QA
run over stdio passed; the editor steps were not run. |
| Final retro | Done — see below |

## Classification

Everything under `projects/lsp-find-references/` is transient: project
spec and plan, slice spec and plan, dispatch brief, QA script, QA run
report and its stdio driver, trace. Nothing is migrated. The project
made no architectural decision that needs an ADR; where each spec
decision is recorded:

- Usages are decided by symbol identity through the binder; results are
single identifier tokens; namespace block names are always returned;
go-to-definition on a declaration name returns the declaration — the "Go
to definition" and "Find references" sections of the language-server
README, and the tests above.
- The binder gets no reverse index, and there is no separate token
filter on text matches — the code (`language-server/src/references.ts`).

## Retro

- **DoD plan-side item** — a JavaScript or TypeScript file added outside
a package, `projects/` included, is still checked by `pnpm lint:throws`
and `pnpm lint:casts`. A QA driver under `projects/` failed CI's Lint
job in #30621.
- **What worked** — one implementation dispatch and one in-loop review
for a small slice, then separate system-design and code-review passes on
the open PR.

## Notes for the rename project

Review of #30621 found four behaviours that are correct for find
references and will need a decision when rename is built on it:

- A duplicate declaration (a second `model User`) is not in the symbol
table, so it has no references and no definition.
- A namespace name used as a field type (`owner auth`) resolves to the
namespace, with an error diagnostic, and is listed as a usage of it.
- A dotted field path (`@@index([address.city])`) is not bound, so
usages of composite-type fields in a path are not found.
- A handler that throws returns an empty result and logs nothing, as
every handler in `project.ts` does. For rename an empty or partial list
would become a partial edit.

Also not done: enum member references (`@default(ACTIVE)`), which the
binder does not record.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Clarified that dispatch plans adding JavaScript or TypeScript files
outside a package, including under `projects/`, should include the `pnpm
lint:throws` and `pnpm lint:casts` checks.
* Added this guidance to the recurring-pattern catalogue, along with a
record of the related review workflow.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Co-authored-by: Steven McClankerton <tatarintsev@prisma.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Assets 2
Loading