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
{{ message }}
Repository navigation
[P2] Script validation field == null does not match a field omitted on insert #1871
A script validation whose condition checks record.<field> == null does not fire on insert when that optional field is omitted entirely from the payload (the key is absent from the validation record context). It works on update and when the field is explicitly null.
Repro
todo_task rule record.priority == "urgent" && record.due_date == null ...: creating {priority:'urgent'} with no due_date key → passes (should fail). PATCHing an existing task to urgent+null due → correctly blocked.
Pre-existing compliance_assessment.failed_requires_remediation has the identical gap.
expense_line receipt rule fires on insert only because receipt_attached has a defaultValue (always present).
Expected
On insert, normalize the validation record context so omitted optional fields read as null (so field == null matches).
Affected
@objectstack/objectql (validation context build).
Found while runtime-testing objectstack-ai/templates (all 9 templates via objectstack dev all) on @objectstack 9.5.1. Build + typecheck pass; these only surface at runtime.
Activity
fix(objectql): validation `field == null` fires on insert when field …
docs(skill): verified anti-pattern deltas for formula + data authorin…
fix(objectql): hook 条件对完整 record 求值 —— stored ⊕ payload,与 objectstack…