You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two keys the engine produces, consumers read and the docs teach were missing
from HookContextSchema.session. Declared per the maintainer ruling (A) on
#5605 — the mirror of the #5050 `session.roles` retirement: that key was
declared-never-produced (removed), these two are produced-never-declared
(added).
Because the shape is deliberately non-strict, the omission was silent:
`HookContextSchema.parse(ctx)` — the call the generated reference documents —
stripped both keys, and a handler typed `(ctx: HookContext)` as the automation
docs teach hit TS2339 on `ctx.session?.positions`. The two runtime-services
pages that teach that exact read compile only because they annotate `ctx` as
`any`.
`positions` carries the ruling's boundary wording in its `.describe()`:
readable context for hooks, never an authorization input — privilege is judged
by the security service on the ExecutionContext (permissions / positions /
derived posture), never by testing this array in a hook. Same discipline as the
`roles` tombstone, which the new keys sit ABOVE so the generated reference's
four-key inline summary does not surface the tombstone as `roles?: any`.
`preserveAudit` documents its real consumer semantics: the #3493
historical-import flag read by the built-in audit hook to keep a
caller-supplied updated_at/updated_by instead of stamping the import instant.
Both optional and additive; contexts are built per operation and never stored,
so there is nothing to migrate.
Claude-Session: https://claude.ai/code/session_018fxLGQdatPbBUvCgiVxg6D
Co-authored-by: Claude <noreply@anthropic.com>
isSystem: z.boolean().optional().describe('True when the call was made with an elevated system context (engine self-writes)'),
406
406
skipTriggers: z.boolean().optional().describe('True when record-change automation (flow triggers) must be suppressed for this write — e.g. package seed replay. Lifecycle hooks still run.'),
407
407
skipAutomations: z.boolean().optional().describe('True when metadata-bound automation hooks must be suppressed for this write — e.g. data import with "run automations" unchecked, or import undo. Implies skipTriggers; code-registered system hooks (audit, security) still run.'),
408
+
/**
409
+
* Position names held by the caller (ADR-0090 D3 vocabulary — the schema
410
+
* comment on `ExecutionContext.positions` spells it "Formerly `roles`").
411
+
* Copied verbatim from `ExecutionContext.positions` by ObjectQL's
0 commit comments