Skip to content

Commit 3d4db25

Browse files
committed
docs(verify): name the four stood-in outbound types and the plugin-type boundary; the time-relative start sets no acting organization
Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi Co-authored-by: Claude <noreply@anthropic.com>
1 parent 17561e0 commit 3d4db25

3 files changed

Lines changed: 22 additions & 13 deletions

File tree

‎.changeset/34779-verify-flow-run.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Metadata-protocol: none
1010

1111
`os verify --flow <name>` runs one flow once on a fresh in-memory boot of the app and reports what the engine did: each node's status as the run's log records it, the first failure with its code and the node named, and every write the run made.
1212

13-
- The run starts the way production starts it. A record-change flow is fired by its own trigger: the run writes the record `--flow-record '{"field":"value"}'` names as the dev admin (inserted for a create or write leg; seeded and saved unchanged for an update leg; seeded and deleted for a delete leg). A flow its own trigger starts is started with no caller, with the context that trigger builds: an API-triggered flow gets `--flow-input '{...}'` as its record and its params (the request body); a time-relative flow gets the `--flow-record` row, seeded first, as its record; a schedule or another `runAs: 'system'` flow gets `--flow-input` as its params. Any other flow goes through the trigger route as the dev admin, with `--flow-input` as its params.
13+
- The run starts the way production starts it. A record-change flow is fired by its own trigger: the run writes the record `--flow-record '{"field":"value"}'` names as the dev admin (inserted for a create or write leg; seeded and saved unchanged for an update leg; seeded and deleted for a delete leg). A flow its own trigger starts is started with no caller, with the context that trigger builds: an API-triggered flow gets `--flow-input '{...}'` as its record and its params (the request body); a time-relative flow gets the `--flow-record` row, seeded first, as its record (the acting organization a sweep can set is not reproduced); a schedule or another `runAs: 'system'` flow gets `--flow-input` as its params. Any other flow goes through the trigger route as the dev admin, with `--flow-input` as its params.
1414
- A node whose type no installed plugin runs is named, whether the run reached it or not. A flow whose trigger never binds is reported with the trigger and the engine's reason, and is not run. A schedule or time-relative trigger left unarmed by the deployment's scheduled-work switch (the default) is not a defect: it is reported as not armed and the flow is still run.
15-
- The run writes to the in-memory database the boot creates and nowhere else: a write to an object bound to any other datasource is refused before that datasource's driver is called, and the node that made it fails naming the object and the datasource. Nothing calls out of the machine: an outbound node (`http`, `connector_action`, `notify`, `script`) is not executed. The run stops at the first one and the report names it (`outbound_not_run`); every node before it ran for real.
15+
- The run writes to the in-memory database the boot creates and nowhere else: a write to an object bound to any other datasource is refused before that datasource's driver is called, and the node that made it fails naming the object and the datasource. Four outbound node types are not executed: `http`, `connector_action` (with every connector a plugin contributes behind it), `notify` and `script`; a plugin's own node type that calls out under another name is not stood in and runs for real. A run that ends at one of them stops there and the report names it (`outbound_not_run`), in a child flow too; every node before it ran for real. A stop a `try_catch` catches is listed in `outboundStops`, and a later node that fails is still the first failure.
1616
- A failed run, a missing executor, an unbound trigger, a record-change or time-relative flow given no record, and a write refused outside the ephemeral stack each fail `os verify`. A run its start condition skipped, one that paused at a screen, wait or approval, and one stopped at an outbound node are reported and do not.
1717
- `--json` carries the report as `flowRun`.
1818

‎content/docs/deployment/cli.mdx‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3106,7 +3106,8 @@ os verify --flow notify_on_new_case --flow-record '{"subject":"Printer jam"}'
31063106
API-triggered flow is handed `--flow-input` (a JSON object) as its record
31073107
and its params, as the inbound hook hands it the request body; a
31083108
time-relative flow is handed the `--flow-record` row as its record, seeded
3109-
first so it is in the table, as a swept row is; a schedule, or another
3109+
first so it is in the table, as a swept row is (the acting organization a
3110+
sweep can set, `tenantId`, is not reproduced); a schedule, or another
31103111
flow declared `runAs: 'system'`, is handed `--flow-input` as its params
31113112
(a real tick's own `jobId`, `flowName` and `schedule` params and a
31123113
binding's acting organization are not reproduced). Any other flow goes
@@ -3125,11 +3126,17 @@ os verify --flow notify_on_new_case --flow-record '{"subject":"Printer jam"}'
31253126
database this boot creates and nowhere else: a write to an object bound to
31263127
any other datasource is refused before that datasource's driver is called,
31273128
and the node that made it fails naming the object and the datasource.
3128-
Nothing calls out of the machine either: an outbound node (`http`,
3129-
`connector_action`, `notify`, `script`) is not executed. The run stops at
3130-
the first one it reaches, and the report names it (`outbound_not_run`);
3131-
every node before it ran for real. Inside a `try_catch` region the catch
3132-
region handles the stop as it would a failed call.
3129+
Four outbound node types are not executed: `http`, `connector_action`
3130+
(which also runs every connector a plugin contributes), `notify` and
3131+
`script`. A plugin's own node type that calls out under another name is
3132+
not stood in, and runs for real. A run that ends at one of the four stops
3133+
there, and the report names it (`outbound_not_run`); every node before it
3134+
ran for real. A stop inside a child flow is named at the child's node, and
3135+
a `fault` edge on the calling `subflow` or `map` node is still followed.
3136+
Inside a `try_catch` region the catch region handles the stop as it would
3137+
a failed call, and the run goes on: the stop is listed
3138+
(`outboundStops`), and a later node that fails is still the first failure
3139+
and still fails `os verify`.
31333140
`--multi-tenant` boots org-scoped so tenant-isolation RLS policies
31343141
apply; a walled tenancy posture (`OS_TENANCY_POSTURE` set to `isolated` or
31353142
`group`) asks for the same boot.
@@ -3168,7 +3175,8 @@ document carries depends on where the run ended:
31683175
`--dashboard-windows`; its `presets` name what each preset handed the door
31693176
and how it resolved), `flowRun` (with `--flow`: the `verdict`, how the run
31703177
started, the `trigger` and whether it is bound, the `steps`, the
3171-
`missingExecutors`, the `firstFailure`, the `writes` and the `confinement`)
3178+
`missingExecutors`, the `firstFailure`, the `outboundStops`, the `writes`
3179+
and the `confinement`)
31723180
and `hardFailures`, the count the exit status is read from.
31733181
- **Could not run:** `{ "error": "<sentence>" }`, plus `code` and `httpStatus`
31743182
when the failure carries them.

‎packages/cli/src/commands/verify.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ export interface VerifyCapabilityAdvisory {
146146
* production starts it (a record-change flow by a real write of the
147147
* record --flow-record names), reported node by node with the first
148148
* failure and what it wrote; every write outside the ephemeral
149-
* stack is refused before its datasource is called, and an
150-
* outbound node (http, connector_action, notify, script) is not
151-
* executed: the run stops there
149+
* stack is refused before its datasource is called, and the four
150+
* outbound node types (http, connector_action, notify, script)
151+
* are not executed: the run stops there (a plugin's own outbound
152+
* node type is not stood in)
152153
*
153154
* Exits non-zero on either stage's failures so it drops straight into CI.
154155
*/
@@ -200,7 +201,7 @@ export default class Verify extends Command {
200201
}),
201202
flow: Flags.string({
202203
description:
203-
"Also run this flow once on a fresh boot and report each node's status, the first failure with its code and the node named, and what the run wrote. It starts the way production starts it: a record-change flow by a real write of the record --flow-record names, a flow its own trigger starts with no caller (an API-triggered flow with --flow-input as its record and params, a time-relative flow with --flow-record seeded and handed in as its record, a schedule or runAs: 'system' flow with --flow-input as its params), any other flow through the trigger route as the dev admin. A schedule the deployment's scheduled-work switch keeps unarmed is reported as not armed and still run. Every write outside the in-memory database this run boots is refused before its datasource is called. Outbound nodes (http, connector_action, notify, script) are not executed: the run stops at the first one and names it, so nothing calls out of this machine",
204+
"Also run this flow once on a fresh boot and report each node's status, the first failure with its code and the node named, and what the run wrote. It starts the way production starts it: a record-change flow by a real write of the record --flow-record names, a flow its own trigger starts with no caller (an API-triggered flow with --flow-input as its record and params, a time-relative flow with --flow-record seeded and handed in as its record (no acting organization), a schedule or runAs: 'system' flow with --flow-input as its params), any other flow through the trigger route as the dev admin. A schedule the deployment's scheduled-work switch keeps unarmed is reported as not armed and still run. Every write outside the in-memory database this run boots is refused before its datasource is called. Four outbound node types (http, connector_action, notify, script) are not executed: a run that reaches one stops there and names it. A plugin's own node type that calls out under another name is not stood in, and runs for real",
204205
}),
205206
'flow-record': Flags.string({
206207
description:

0 commit comments

Comments
 (0)