Repository navigation
docs(adr): ADR 245 adopts typed nextActions (S4 follow-up) - #29958
Conversation
ADR 245 governs how ADR 239 envelopes are built and carried, so its
examples and prose spell the envelope fields out. Five of those spellings
still said `fix`, which ADR 239 has replaced with a typed
`nextActions: readonly NextAction[]`.
Updated: the raise-site grounding example, the serialized `toEnvelope()`
field list, rule 1 ("its own dotted code, why, and nextActions"), the
`MigrationToolsError` subclass example, and the "Why" paragraph on putting
remediation where the knowledge is. That last one gets sharper under the
rename, not just renamed: a next action names an executable command with
real arguments in it, and the raise site is the only place holding those
arguments. The Related line now points at ADR 239 for the field itself.
Docs only, and no rule changes — this is ADR 245 saying the same things in
the vocabulary ADR 239 settled.
Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughADR 245 documentation now references ADR 239’s typed ChangesADR 245 typed remediation actions
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/architecture` docs/adrs/ADR 245 - Errors are structured at origin;
results carry one ok discriminator.md:
- Line 5: The ADR 245 reference and ADR index must match ADR 239’s contract,
which defines fix?: string rather than typed nextActions. Update
docs/architecture docs/adrs/ADR 245 - Errors are structured at origin; results
carry one ok discriminator.md:5-5 and docs/architecture
docs/ADR-INDEX.md:100-100 to remove or correct the typed nextActions claim, or
update ADR 239 consistently if that contract is intended to change.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: da90efd4-b627-4ad2-9b8f-b9d9665d98a3
📒 Files selected for processing (2)
docs/architecture docs/ADR-INDEX.mddocs/architecture docs/adrs/ADR 245 - Errors are structured at origin; results carry one ok discriminator.md
Drop the amendment-process aside in the Related line, name the Composer repository explicitly, and explain the category discriminant in the subclass predicate example. Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…or (prisma#29976) ## Linked issue n/a — small docs change. Prompted by the engine-side telemetry work now underway; see the note at the end about what this PR deliberately does *not* pre-document. ## At a glance `docs/Telemetry.md`, "Flipping your choice", before: > To turn telemetry off (or back on), run `prisma-next telemetry disable` / `prisma-next telemetry enable`, or edit the file in any text editor and change the `enableTelemetry` value. After: > To turn telemetry off (or back on), run `prisma-next telemetry disable` / `prisma-next telemetry enable`. The command writes the `enableTelemetry` value for you and the change takes effect on the next CLI invocation. `prisma-next telemetry status` reports what is in effect and why. ## Decision `prisma-next telemetry enable | disable | status` have been in the CLI the whole time. They exist so nobody has to open a JSON file to change their telemetry preference. The telemetry page was still teaching the JSON file as an equal route in three places — one of them told readers they could pre-create the file before ever running the CLI. Hand-editing is now documented as what the file *is*, not as something you should do. The distinction the page holds throughout: **describing the file is useful reference material; recommending that users write to it is not.** `telemetry status` prints the file's path, so a reader who lands on it needs to know what the fields mean. Nothing about where the file lives, what it contains, or how the fields resolve is removed. ## How it fits together 1. **"The user-level config file"** opens with one new sentence saying who writes it: the commands set the preference, `status` prints the resolved path, and the section that follows describes the contents so you can *read* them. The path bullets, the JSON samples, and the `enableTelemetry` / `installationId` field definitions are all untouched. 2. **Two field descriptions** dropped their "…or a hand edit" parenthetical. They now say the CLI writes `enableTelemetry` when you make an explicit choice with `enable` / `disable`. 3. **"Flipping your choice"** stops offering the text editor (shown above). 4. **"Fully resetting"** no longer offers `keep "enableTelemetry": false in it` as an alternative to running `disable`. 5. **"The `prisma-next telemetry` command"** now says plainly why it exists, and notes that `enable` / `disable` write the preference atomically and preserve every other field in the file — which is the concrete reason to prefer them over an editor. 6. **"2. The stored preference"** keeps the JSON sample as *what `disable` writes*, and the paragraph telling readers to drop a pre-made `config.json` on disk is replaced. Provisioning a machine where the CLI has never run is a real need, and the environment variables already serve it — they work before any config file exists and suppress the first-run notice too. The `skills/prisma-8` quickstart carried the same hand-edit clause in its telemetry callout; it goes the same way, keeping the per-user vs. `prisma-next.config.ts` distinction it was making. ## Reviewer notes - **Nothing shipped-behaviour-facing moved.** No filesystem path, no environment-variable name, no wording inside the verbatim first-run notice, and no `prisma-next` command prefix changed. Token counts for each of those are identical before and after; the only increase is `prisma-next telemetry`, which gains two mentions because the commands are now the route. - **The first-run notice still mentions setting `"enableTelemetry": false` yourself.** That block is quoted verbatim from the shipped binary and is left exactly as-is, so the page keeps matching what users actually see on stderr. The notice's wording is one of the things changing on the engine side. - **Coming, and deliberately not written here:** when this CLI ports onto the shared Prisma CLI engine, the config directory becomes `prisma` rather than `prisma-next`, the opt-out variable becomes `PRISMA_DISABLE_TELEMETRY`, and the first-run notice drops its hand-edit clause. None of that has shipped in the `prisma-next` CLI this page describes, so documenting it now would make the page wrong for the binary people are running. It lands with the port. - **Anchors.** One new intra-page link, pointing at `#how-to-opt-out-or-back-in`. It first pointed at the commands section's own slug, and `lint:legacy-name` was right to reject that: the rule allows a bare `prisma-next` only when the character after it is neither a word character nor a hyphen, and `#the-prisma-next-telemetry-command` is followed by `-telemetry-command`. That is also why the two command spellings in the same sentence pass. Every existing heading and anchor is unchanged, so `prisma#2-the-stored-preference` and `prisma#1-environment-variables-runtime-only` still resolve from their inbound links. - **Second file.** `skills/prisma-8/references/quickstart.md` is one sentence, included so the ruling isn't applied in only half the places a reader meets it. Easy to drop if you'd rather keep this to `docs/Telemetry.md`. ## Testing performed - Docs-only change; no suites apply. - `pnpm lint:legacy-name` (`node scripts/lint-legacy-name.mjs`) — passes, on the exact tree pushed. - `pnpm lint:docs` (`scripts/validate-package-readmes.mjs`) — passes; its warnings are pre-existing and concern mongo package READMEs untouched here. - Verified every intra-page anchor in `docs/Telemetry.md` resolves to a heading that exists. - Diffed the frozen surfaces (config paths, `PRISMA_NEXT_DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `%APPDATA%`, `$XDG_CONFIG_HOME`, `prisma-next.config.ts`, the notice block) against `main`: byte-identical. - The repo has no markdown linter or link checker in CI to run against `docs/`. ## Skill update `skills/prisma-8/references/quickstart.md` — the telemetry callout's opt-out routes now match the page. No CLI surface, flag, config field, or error code changed, so no other skill content is affected. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read CONTRIBUTING.md and the change is scoped to one logical concern. - [x] Tests are updated — n/a, doc-only with no behavioural delta. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form — no Linear ticket; follows the `docs(<scope>):` form used by recent docs PRs (prisma#29958, prisma#29957, prisma#29925). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified that telemetry preferences are managed through CLI commands rather than manual configuration edits. * Documented telemetry status behavior, preservation of unrelated settings, and default-on behavior. * Added guidance for resetting telemetry and installation identity by deleting the configuration. * Updated opt-out instructions to use the telemetry disable command or environment-variable settings for provisioning. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Trails #29957, which amended ADR 239 to replace the freeform
fix?: stringprose field with a typednextActions: readonly NextAction[]. ADR 245 governs how ADR 239's envelopes are built and carried, so it spells the envelope fields out in its examples and prose — and five of those spellings still saidfix. This brings it into line. Merge after #29957.The grounding example, before and after
ADR 245 opens with a raise site: the only place that knows enough to fill in an envelope.
Before
After
The
fixstring was two alternatives fused into one sentence, with a backtick-quoted command and a placeholder inside it. A consumer wanting to offer "create the ref" as a one-click action had to parse English to find the command. Now it readsnextActions[0].command.The decision
No new rules. ADR 245 says the same things in the vocabulary ADR 239 settled. Five sites:
toEnvelope()field list —code/summary/why/nextActions/where/meta, withoutcause.why, and its ownnextActions".MigrationToolsErrorsubclass example — its constructor requireswhyand a non-emptynextActions. (The shipped class currently requireswhy/fix; like every other call site, it converts under the ratchet ADR 239 describes. No code is changed here.)The
Related:line now points at ADR 239 for the field definition itself, so a reader who lands on 245 first knows where the shape is specified.ADR-INDEX.md's description of ADR 245 is updated to match.What is not here
fix:call sites —MigrationToolsErrorincluded — convert under the ratchet, per ADR 239.docs/Error Handling.mduntouched. It says user-facing surfaces should "emphasizewhy/fix/docs", which is loose prose about what to foreground, not a field list. Nothing there is now wrong. Say the word if you want it tightened anyway.Verification
node scripts/list-error-codes.mjs --verify docs/reference/error-reference.md→ error-reference lists all 275 known codes. No codes change. Docs-only, so no test suites.Note for whoever merges
Both this PR and #29957 touch
ADR-INDEX.md, and their edits land on adjacent lines — #29957 inserts a new ADR 239 row immediately above the ADR 245 row that this PR edits. Expect a possible textual conflict on the second merge; the resolution is to keep both changes.Slice S4 of prisma-cli-v8, follow-up.
🤖 Generated with Claude Code
Summary by CodeRabbit
nextActionsalongside structured error codes and explanations.