Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions packages/lint/scripts/check-doc-formula-expressions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -490,22 +490,9 @@ const EXPRESSION_SLOT_TYPES =
* reflow while dying with the example it excuses.
*/
const EXEMPT_EXAMPLES = [
{
file: 'packages/spec/src/data/hook.zod.ts',
slot: 'HookSchema.condition',
source: "status = 'active' AND amount > 1000",
// NOT a partial snippet — a real defect, of exactly the #6641 class, found by
// this gate's own stock pass (#6763). It is SQL where the slot is CEL, and it
// contradicts the `.describe()` on the very next line, which spells the same
// idea as P`record.status == "closed" && record.amount > 1000`. Bare `status`
// and `amount` would resolve to nothing even after the operators were fixed.
// Exempted rather than corrected only because `packages/spec/src/**` belongs
// to the spec-surface seat and #6763 landed in spec-tooling; filed for
// transfer as #7175. Delete this entry with that fix — leaving it behind is
// itself an error (the "unnecessary" direction above), so the cleanup cannot
// be forgotten silently.
reason: 'REAL DEFECT pending cross-seat fix (#7175) — SQL `=`/`AND` and bare refs in a record-scoped CEL slot',
},
// Empty: the HookSchema.condition entry (#7175) was deleted once the example
// was corrected to canonical CEL — leaving it would itself be an error (an
// exemption over a now-clean example is the "unnecessary" direction above).
];

/** `packages/spec/src/**` sources, sorted. */
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/data/hook.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export const HookSchema = lazySchema(() => strictObject(
* If provided and evaluates to FALSE, the hook is skipped entirely.
* Useful for filtering by record data without writing handler code.
*
* @example "status = 'active' AND amount > 1000"
* @example "record.status == 'closed' && record.amount > 1000"
*/
condition: ExpressionInputSchema.optional().describe('Predicate (CEL); hook runs only when TRUE. e.g. P`record.status == "closed" && record.amount > 1000`'),

Expand Down
Loading