Skip to content

The corrected broken-sweep claim is still stated unqualified in packages/spec TSDoc — same false predicate, a surface #12685 was fenced away from #12722

Description

@os-litant

Filed unassigned by the dev on #12685 (PR #12721). Dedupe search run: no existing card (targeted search, control hits returned).

#12685 established — with a measured A/B, now 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 corrects sys_automation_run's field descriptions and content/docs/automation/flows.mdx accordingly.

That card's dispatch fenced packages/spec out explicitly ("zero packages/spec"), which was the right call for a description-only fix — but it leaves the identical unqualified claim standing in shipped TSDoc:

  • packages/spec/src/automation/execution.zod.tsFlowRunSummarySchema's doc block: "selected > 0 && acted == 0 over consecutive runs is the broken-sweep signal", and the unmeasured field's doc block: "the broken-sweep query is selected > 0 AND acted = 0 AND unmeasured = 0".
  • packages/spec/src/integration/connector.zod.ts (around the effect-declaration rationale) — "the broken-sweep alert is selected > 0 AND acted = 0 AND unmeasured = 0".

These ship in .d.ts, so a consumer reading the type gets the sentence #12685 disproved. The unmeasured clause's own point (an uncountable effect makes acted incomplete, not zero) stays correct and should survive any rewording — what needs qualifying is only the claim that the three-clause query is the detector.

Suggested shape, mirroring what landed in #12721 so the two surfaces agree: state it as the first filter, and point at the per-node fold (nodes[] / gates[]) as the discriminator. No behaviour, no schema, no accept-set change — TSDoc text only. Worth checking whether the spec gate families (check:api-surface, the liveness/strictness ledgers) treat these doc blocks as pinned text before writing.

Why it is worth a card rather than a shrug: the failure mode #12685 names is that an operator wires an alert to the documented predicate, it fires during normal operation, and the alert gets muted — leaving a dead sweep silently unmonitored while looking monitored. A correct sentence in the object description and a wrong one in the schema doc is the state most likely to reproduce that, because the schema doc is what a platform author reads.

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

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions