Uh oh!
There was an error while loading. Please reload this page.
docs(spec): state the broken-sweep predicate as the first filter, not the detector - #12903
Conversation
… the detector (#12722) The three-clause query `selected > 0 AND acted = 0 AND unmeasured = 0` was stated as *the* broken-sweep signal / query / alert across three doc blocks in two files. #12685 measured that it 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. Reword to mirror what #12721 landed on `sys_automation_run`'s field descriptions and content/docs/automation/flows.mdx: the query is the FIRST FILTER, and the per-node fold (`nodes[]` / `gates[]`) is what discriminates. These blocks ship in .d.ts, so the schema doc a platform author reads now agrees with the object description. TSDoc text only -- no behaviour, no schema, no accept-set change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LpRNHxWZgSUgVnFT9mQQo4
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 126 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 695cd2373ac0f0a08e44fb5396d2f516636a1684 && git checkout 695cd2373ac0f0a08e44fb5396d2f516636a1684
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 20821802855ea03d637a6a828be8e9ea12a652b5 0c746010a9e183934a349be89d820ce2f411925c && git checkout -B drift-repro 20821802855ea03d637a6a828be8e9ea12a652b5 && git merge --no-ff 0c746010a9e183934a349be89d820ce2f411925c
node scripts/docs-audit/affected-docs.mjs --json 20821802855ea03d637a6a828be8e9ea12a652b5 |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#12722
TSDoc text only — no behaviour, no schema, no accept-set change. The diff filtered to non-comment changed lines is empty.
What was wrong
#12685 established, with a measured A/B pinned in
run-summary.test.ts, thatselected > 0 AND acted = 0 AND unmeasured = 0cannot 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 correctedsys_automation_run's field descriptions andcontent/docs/automation/flows.mdx; its dispatch fencedpackages/specout, which left the identical unqualified claim standing in shipped TSDoc.Three doc blocks in two files stated the three-clause query as the detector:
automation/execution.zod.tsFlowRunSummarySchemaautomation/execution.zod.tsunmeasuredfieldintegration/connector.zod.tsThese ship in
.d.ts, so a consumer reading the type got the sentence #12685 measurably disproved — and the schema doc is what a platform author actually reads.What changed
Each block now states the predicate as the FIRST FILTER, not a verdict, and points at the per-node fold (
nodes[]/gates[]) as the discriminator: a healthy skip is accounted for by a read the run performed (runs > 0andselected > 0innodes[]), while a dead gate skips just as often with nothing behind it (runs: 0, orselected: 0).The wording mirrors what #12721 landed, read from the tree (
sys-automation-run.object.tsfield descriptions andflows.mdx) rather than from the card's paraphrase — the whole point being that the two surfaces agree.The
unmeasuredclause's own point survives, and is now explicit where it used to be implied: a run with uncountable effects has an INCOMPLETEactedcount, not a zero one.Pin check
The card asked whether these doc blocks are treated as pinned text before writing. Evidence, not a verdict:
check:api-surfacerecords names and kinds, not doc text ("FlowRunSummarySchema (const)"), so a doc-block edit cannot move it. Confirmed green regardless.evidenceentries point into consumer source (engine.ts:1292and similar), so no anchor drifted and none was repointed.check:livenessgreen.check:generatedreports all 14 up to date after the reword. These are mid-file, schema-attached blocks; only a file's@moduleblock becomes a reference-page intro, and neither edit touched one. No.describe()string carried the claim, sogen:docshad nothing to regenerate.Verification
Run on
0c746010— this branch's head after mergingorigin/main. The union was re-run on that commit, not on an earlier tree.pnpm --filter @objectstack/spec check:generated— "All 14 generated artifacts are up to date" (coverscheck:docs,check:api-surface,check:authorable-surface,check:liveness,check:strictness-ledger,check:skill-refs).pnpm --filter @objectstack/spec typecheck—tsc --noEmitpluscheck:scripts-typecheckandcheck:test-typecheck, clean.vitest run src/automation/execution.test.ts src/integration/connector*.test.ts— 5 files, 125 tests passed.scripts/pm/dispatch-gates.mjs(the dispatch's list was short by several):check:empty-state,check:variant-docs,check:doc-authoring,check:spec-parsed-alias,check:nul-bytes,check:comment-mask-adoption,check:doc-formula-expressions,check:cross-package-test-inputs,check:ci-filter-parity,check:merge-driver,check:published-files,check:type-source-resolution,check:test-source-alias,check:page-declaration-shape,check:slot-lookup,check:plugin-teardown-shape, plus the changeset family (check:empty-changeset,check:changeset-no-major,check:adr-0087-registration,check:objectui-changeset,check:changeset-gate-self-tests,check:pm-half-states,release-rehearsal-clone --self-test) — all green.Declared narrowing: the test run was scoped to the five files covering the two edited sources rather than the full spec suite. The diff is comment-only and no test quotes the edited text, so no other suite can read it; CI runs the farm regardless.
Out of scope
packages/spec/src/automation/flow-function.zod.tscarries the same unqualified predicate onFlowFunctionEffectSchema("the broken-sweep query"). It sits outside this card's declared file surface, so it is filed as #12900 and left standing here rather than corrected in passing — that surface additionally feeds a generated reference page and so needsgen:schema && gen:docs, which this PR deliberately does not run. #12900 remains open.Generated by Claude Code