Commit 9bc403e
docs(plugin-approvals): correct what the approval snapshot column is FOR (#11837)
`sys_approval_request`'s module docstring justified `payload_json` with "used
by notifications so they can render before the record is locked or changed".
That consumer does not exist. Measured against every `this.notify(...)` call
site in `approval-service.ts` -- all 12 -- each passes `{ title, message,
actionUrl }` (two also `actions`), built from `object_name` / `record_id` and
the caller's comment. None reads `payload_json` or the parsed `payload`.
The sentence was the only documented justification for the column holding a
FULL row, and it was cited as such during the #10749 consumer inventory before
anyone checked it. The docstring now states the real reason: the snapshot is
retained as audit evidence of what was actually submitted (so the column stays
whole at rest) and is served redacted per reader by the subject object's
field-level read controls via `getReadableFields`, on the approvals-inbox door
and the generic data door alike (#11039).
The field's own `description` is deliberately unchanged -- it is accurate, and
it, not the JSDoc, is the string extracted into the four generated i18n
bundles. Proven rather than assumed: regenerating with the documented command
left all four bundles byte-identical, and a positive control (mutating the
extracted `description`) moved the `en` leaf, so the zero is a real zero.
Also carries the residual documentation #10749's closure assigned to the next
docs touch in this lane: `payload-redaction.ts` recorded hidden-vs-serialization
as an OPEN `packages/spec` question, and it has since been ruled (maintainer,
2026-08-24). That paragraph now states the ruling -- `hidden: true` stays
UI-only; `internal: true` is the serialization primitive -- and points an
author who needs a field kept out of read results at `internal` (#7728,
ADR-0049) rather than at `hidden`, which never governed serialization.
Documentation only: no runtime behaviour, schema field, or type signature
changes. The corrected JSDoc does ship to consumers in `dist/index.d.ts`,
which is why this carries a patch changeset rather than none.
Part of #11041
Claude-Session: https://claude.ai/code/session_01APWX2AwT3a4xDcjPCe8bk4
Co-authored-by: Claude <noreply@anthropic.com>1 parent 78f65ef commit 9bc403e
3 files changed
Lines changed: 82 additions & 5 deletions
File tree
- .changeset
- packages/plugins/plugin-approvals/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
49 | 63 | | |
50 | 64 | | |
51 | 65 | | |
| |||
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| |||
214 | 221 | | |
215 | 222 | | |
216 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
217 | 240 | | |
218 | 241 | | |
219 | 242 | | |
| |||
0 commit comments