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
test(dogfood): migrate the flow-runAs write leg to the ruled 400 FLOW_FAILED
The `runAs:'user'` WRITE leg triggers a flow whose `update_record` node is
refused at the record layer, so the run fails — and since the trigger route
answers real HTTP status codes it answers 400 FLOW_FAILED instead of 200
wrapping an inner {success:false}. `memberTrigger`'s blanket `< 300` was
written against the old contract and is the only dogfood consumer this
change touches.
The semantic the file pins is unchanged and still primary: the run executes
AS the member, so the admin's note stays 'new'. What moves is the transport
expectation, and it is asserted precisely rather than as a widened band —
status 400, error.code FLOW_FAILED, the node-first access-refusal text, and
the `touch` node's failure entry in error.details.summary. A 403 or 500 here
would mean de-elevation broke differently and must not pass.
The READ leg is deliberately NOT migrated: an RLS-scoped read is FILTERED,
not refused, so that run still succeeds with an empty `found` and keeps its
`< 300` expectation. Measured locally, not assumed. That leg also gains
discrimination for free: until now a failed run and an empty read were
indistinguishable there, because both left `found` falsy under HTTP 200.
Verified locally on a built workspace closure:
vitest run test/flow-runas.dogfood.test.ts → 5 passed (was 1 failed)
flow-node · flow-function-effect · flow-durable-suspend ·
showcase-declarative-mcp → 17 passed
showcase-anonymous-deny-surfaces · authz-conformance → 46 passed
pnpm --filter @objectstack/dogfood typecheck → green
Every other dogfood trigger caller expects the run to SUCCEED (or asserts an
anonymous 401), so none is touched by this contract. No changeset change:
@objectstack/dogfood is private internal QA and the wire change is already
documented in .changeset/automation-trigger-status-unification.md.
0 commit comments