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
Every flow with a start-node / edge condition silently skipped — record-change
triggers fired but the flow body never ran, and `previous.*` / `budget > N`
gates all evaluated false. Two independent bugs:
service-automation — CEL engine unreachable in ESM
The condition evaluator loaded the formula engine via a CommonJS
`require('@objectstack/formula')`. In the package's ESM build
("type":"module") that compiles to tsup's throwing `__require` stub, so every
CEL evaluation threw and the swallowing catch returned false. Replaced with a
static top-level import — binds correctly in both ESM and CJS builds.
objectql — prior record not exposed to update hooks
HookContext documents a `previous` snapshot for update/delete, but
engine.update never populated it (the row fetched for validation stayed a
local var). Record-change conditions like
`status == "done" && previous.status != "done"` had no `previous` to read.
The engine now attaches the pre-update record to hookContext.previous for
single-id updates when a validation rule needs it or an afterUpdate hook is
registered.
Verified end-to-end in the showcase: reassign → notify→inbox, mark-done →
REST/Slack connector_action + email, budget>100k → approval (paused at
manager_review). New unit tests cover both paths.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments