Repository navigation
Commit 8c90c0b
committed
docs(ui): state the true reason a handler must not name a server-owned field (#15117)
The previous push removed `completed_date` from the handler snippet, which was
right, and then explained it with a mechanism that is false. Re-measured:
- A handler's `ctx.engine` runs ELEVATED — `buildActionExecutionContext` returns
`{ ...base, isSystem: true }` (`packages/runtime/src/action-execution.ts`) —
and the read-only strip is gated `if (!opCtx.context?.isSystem)`
(`packages/objectql/src/engine.ts`). Nothing is stripped on that path, so
"stripped from the payload before the record is validated" never happens.
- The refusal does not exist either, for any caller. The hook's stamp is
unconditional on the transition and its own docblock says that is precisely so
a caller-supplied value is overwritten and survives the strip; a live test
asserts it — "a caller that still sends `completed_date` is not punished for
it — the hook value wins". The REJECTED row whose mechanism the page described
is labelled "Measured before the fix".
The true reason is close to the inverse, and is now what the page says: the
write is not stripped, it LANDS, and on a write that is not a completion
transition the hook does not stamp, so the handler's "now" silently replaces the
real completion timestamp.
I read the #7036 history at the three sites I cited and wrote it in the present
tense, without reading the four sites the conclusion depended on. A citation
that exists is not a citation that entails.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH1 parent cc5b792 commit 8c90c0b
1 file changed
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
162 | 172 | | |
163 | 173 | | |
164 | 174 | | |
| |||
0 commit comments