Observation (comment-only; no behavior involved)
Two comments justify #9625's escalation of set_null on a required FK to restrict partly by the then-true premise that the record validator does not judge array emptiness:
PR #9780 (the enforcement half of the #9447 ruling — required on a multi-value field means non-empty array) makes that clause false: after it lands, [] is rejected by the validator. The escalation itself stays correct ruled behavior — the same comments note the #9447 ruling accepts refusal even when member removal would leave the set non-empty — so the fix here is rewording the justification (e.g. "the refusal fires before any write, and since #9476 the validator also rejects an emptied required set"), not changing any behavior.
Not folded into PR #9780 deliberately: both files are outside that card's declared file surface, and engine.ts (the delete() region) is concurrently claimed by #9719 this round. #9476 is not addressed by this issue; #9438 remains untouched.
Found while implementing #9476; filed unassigned per finding discipline.
Generated by Claude Code
Observation (comment-only; no behavior involved)
Two comments justify #9625's escalation of
set_nullon a required FK torestrictpartly by the then-true premise that the record validator does not judge array emptiness:packages/objectql/src/engine.ts(cascade delete region, ~:10305-10311onmain@e9534a4ac): "…today[]still satisfiesrequiredin the record validator (record-validator:[]satisfiesrequiredon amultiple: truelookup — diverges from the #9447 ruling (required means non-empty array) #9476), so this blanket refusal is what keeps an emptied required set from landing silently."packages/objectql/src/engine-cascade-delete.test.ts(~:284-289): same sentence inside the[#9625] refuses a required MULTI-VALUE lookup…pin.PR #9780 (the enforcement half of the #9447 ruling —
requiredon a multi-value field means non-empty array) makes that clause false: after it lands,[]is rejected by the validator. The escalation itself stays correct ruled behavior — the same comments note the #9447 ruling accepts refusal even when member removal would leave the set non-empty — so the fix here is rewording the justification (e.g. "the refusal fires before any write, and since #9476 the validator also rejects an emptied required set"), not changing any behavior.Not folded into PR #9780 deliberately: both files are outside that card's declared file surface, and
engine.ts(thedelete()region) is concurrently claimed by #9719 this round. #9476 is not addressed by this issue; #9438 remains untouched.Found while implementing #9476; filed unassigned per finding discipline.
Generated by Claude Code