Skip to content

FlowFunctionEffectSchema TSDoc still states the broken-sweep predicate unqualified — the third packages/spec surface, outside #12722's fence #12900

Description

@os-trump

Filed unassigned by the dev on #12722. Dedupe search run: one targeted search against the broken-sweep / spec-TSDoc family, control hits returned (#12722 and #12685 both came back), no existing card for this surface.

#12685 established — with a measured A/B, pinned in run-summary.test.ts — that selected > 0 AND acted = 0 AND unmeasured = 0 cannot separate a healthy idempotent sweep from a dead gate: both match, on every run, so "over N consecutive runs" does not rescue it either. #12721 corrected sys_automation_run's field descriptions and content/docs/automation/flows.mdx. #12722 corrected the two packages/spec surfaces its dispatch named — automation/execution.zod.ts and integration/connector.zod.ts.

A third surface in the same package carries the same unqualified claim. It sat outside #12722's declared file surface, so it was left standing deliberately rather than fixed in passing.

packages/spec/src/automation/flow-function.zod.tsFlowFunctionEffectSchema's doc block:

'writes' — it performs writes, or dispatches effects, that the platform cannot see or count. The step reports ExecutionStepMetrics.unmeasuredEffect, so the run's unmeasured tally keeps the broken-sweep query (selected > 0 AND acted = 0 AND unmeasured = 0) off it — and only off the flows that actually call such a function.

"the broken-sweep query", definite article, naming the three-clause predicate as the detector — the same false predicate #12685 disproved. This block ships in .d.ts exactly like the two #12722 fixed.

Three weaker mentions in the same file, worth triaging with it but not plainly wrong on their own:

Suggested shape, mirroring what #12721 landed and #12722 applied so all surfaces agree: state the predicate as the FIRST FILTER, not a verdict, and point at the per-node fold (nodes[] / gates[]) as the discriminator. The clause's own point stays correct and should survive: a declared-writes function makes acted INCOMPLETE, not zero.

One material difference from #12722, worth knowing before dispatch.#12722 needed no artifact regeneration — its two doc blocks feed nothing generated (verified: check:generated reported all 14 artifacts up to date after the reword). This file is not like that: its @module doc comment IS emitted as the page intro of content/docs/references/automation/flow-function.mdx, where the prose appears verbatim. So a reword here moves a generated artifact and must run gen:schema && gen:docs in the same PR; the history string at line 155 is authored schema text on the same path.

Why it is worth a card rather than a shrug: the same severity argument #12722 was graded on. The failure mode is an operator wiring an alert to the documented predicate, watching it fire during normal operation, and muting it — leaving a dead sweep unmonitored while looking monitored. Correcting two of the three packages/spec surfaces and leaving the third reproduces exactly the disagreement the parent card exists to end.

Related: #12722, #12685, PR #12721, #4354 (shipped the measurement), #4347 (the original silent no-op), #4396 (declared script effects).

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions