Repository navigation
fix(lint)!: os validate refuses an option label in a flow filter, edge condition or decision branch - #37491
Conversation
…ion branches Claude-Session: https://claude.ai/code/session_01Utp6CY2uhJ1AYNPw5TUSVS Co-authored-by: Claude <noreply@anthropic.com>
…ision branches Claude-Session: https://claude.ai/code/session_01Utp6CY2uhJ1AYNPw5TUSVS Co-authored-by: Claude <noreply@anthropic.com>
…itions and decision branches Claude-Session: https://claude.ai/code/session_01Utp6CY2uhJ1AYNPw5TUSVS Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 13 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 7 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 176 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 019095fdff731f7e957d2116ffe4df874509056e && git checkout 019095fdff731f7e957d2116ffe4df874509056e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0b1411d4a7aa6eb5880625a7cfa42276d8626824 7093e465ece700be57375a8a77bb37deec69cb5c && git checkout -B drift-repro 0b1411d4a7aa6eb5880625a7cfa42276d8626824 && git merge --no-ff 7093e465ece700be57375a8a77bb37deec69cb5c
node scripts/docs-audit/affected-docs.mjs --json 0b1411d4a7aa6eb5880625a7cfa42276d8626824
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 4e9c077 · 2026-11-26T09:26Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: PR #37491 (card #36964), declaration face. Read: the card body and its four comments (two triage notes, the claim 7186576390, the os-dev report 7187822605), follow-up card #37504, the PR body, the net diff against ① Derived judgments
Findings:
② Semver levelClause-②: the PR body and the changeset both read Two consequences for the seat:
③ Boundary flags
Implemented-by: VERDICT: FAIL |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
…r row; pin regions, operators and shadows Claude-Session: https://claude.ai/code/session_01Utp6CY2uhJ1AYNPw5TUSVS Co-authored-by: Claude <noreply@anthropic.com>
…ositions Claude-Session: https://claude.ai/code/session_01Utp6CY2uhJ1AYNPw5TUSVS Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: Delta round on PR #37491 (card #36964), after record 7188130381 (FAIL at No must-fix, no should-fix. Earlier findings:
① Derived judgments
② Semver levelClause-②:
③ Boundary flags
④ Design judgmentThe entry (
The narrowing itself. It makes a silent no-op loud; it takes no working capability away.
The rebound-root fix (
The other implementing files. Nits, none with an effect on correctness or the contract:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CY2uhJ1AYNPw5TUSVS Re-run reason (zone o5-P) · 2026-11-26T11:10Z · head |
|
repo:objectstack#5 · os-bill · session_01Utp6CY2uhJ1AYNPw5TUSVS Landing (zone o5-P) · 2026-11-26T11:12Z · ACCEPT 7190384001 at
Stale red, stated: |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 维护者速读
席位意见:ACCEPT。收窄是有意的、已声明的,迁移路径是一行。剩下的 N1、N4 两条 nit 不影响正确性;skills 文案由 #37504 跟进。 |
… edge conditions (objectstack-ai#37843) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuUCMp9Er3CdRqotD8tK5b8f)_ Fixes objectstack-ai#37504 (item 2; item 1 landed in objectstack-ai#37551). ## What changes `os explain flow-condition-option-label` said the rule reads a record-change **start condition** only (`covers: 'why a start condition compares option values'`). Since objectstack-ai#37491 the same rule id also fires on edge conditions, `decision` branch expressions, and the `filter` of `get_record` / `update_record` / `delete_record` and of a time-relative sweep. An author whose filter was refused read an explanation of a narrower rule than the one that fired. `packages/lint/src/rule-explanations.ts` `FLOW_CONDITION_OPTION_LABEL_EXPLANATION` now: - `covers`: `why flow conditions and filters use option values` (49 chars, the test's ≤60 bar). - names every position the rule reads, and what the label costs there (the read finds nothing, the update / delete changes nothing, the branch is never taken, the run still reports success); - conditions: the comparand shapes, the trigger record's `record.F` / `previous.F` / bare `F`, and a single-row `get_record` `outputVariable` row (`deal.F`); a variable bound elsewhere too is not judged; - filters: implicit equality, `$eq` / `$ne`, `$in` / `$nin` members, under `$and` / `$or` / `$not`; not judged: related-object fields, ordering / text operators, braced strings (templates, `{current_user_id}`); - the escape hatch for a deliberate label filter: a CEL value envelope `{ dialect: 'cel', source }`, which is not judged; - the shared exclusions kept (label also a value, picklist-backed fields). Every sentence is read off `validate-flow-trigger-readiness.ts` (`FLOW_CONDITION_OPTION_LABEL` doc, `optionLabelsBeyondStart`) and `flow-select-options.ts` (`optionLabelOperands`) on main 1028438. No rule behaviour changes. ## Gates run - `vitest run src/rule-explanations.test.ts src/flow-publish-checks-second-batch.test.ts` (packages/lint): 2 files, 58 tests passed. - `tsc --noEmit -p packages/lint`: clean. - Changeset: `@objectstack/lint` patch (explanation text only). Clause-②: no Metadata-protocol: none ## Small calls this thread made - Kept one rule id's explanation in one entry (five paragraphs) rather than splitting per position: `os explain` takes the rule id, and one id has one entry. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgT5oFVDnxy3bMa3NBi <!-- signed: repo:objectstack#2 · os-sales · session_01L6bhgT5oFVDnxy3bMa3NBi --> Co-authored-by: Claude <noreply@anthropic.com>
… a flow the deployment does not hold (objectstack-ai#38594) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Jianguo** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbJg9RAhiuDxvothojbXXC9Z)_ Fixes objectstack-ai#35143 Supersedes objectstack-ai#38241 (closed, 7256687325) Clause-②: yes (narrowing) Metadata-protocol: narrowed Skills-docs: follow-up objectstack-ai#38259 — skills/objectstack-automation/SKILL.md (the `subflow` row says `os validate` warns `flow-subflow-unknown`; it does not say the publish refuses a call to a flow nothing in the deployment holds), skills/objectstack-automation/evals/flows-triggers-approvals.json (the eval that names `flow-subflow-unknown`) ## 维护者速读 - 用户能看到什么变化:搭建者(包括 AI)发布一个流程时,如果其中“调用子流程”或“逐项调用流程”的步骤写了一个整个环境里都不存在的流程名,发布现在会直接被拒并说明原因;以前能发布成功,但每次运行到这一步都会失败。命令行校验仍然只给警告。 - 为什么做:属于“开源框架先拦住云端构建检查才拦得住的问题”这一族收尾(流程族最后两条),替写流程的搭建者挡住“发布成功、运行必失败”。 - 出错会怎样:这是一次收紧——以前能发布的这类流程下次发布会被拒;被调用的流程只要以草稿形式存在、或在同一批次发布、或在同一个软件包安装里(顺序不限)、或由已安装的软件包提供,都不会被拒;用另一个命名空间安装的软件包副本若有流程调用同包流程,安装会被整体拒绝并回滚(改名没有改到调用处,以前装得上但这一步必失败);撤回本改动即恢复原样。 - 要你做什么:无 ## What changes The card's last two open lines, re-verified on `main` (1208460) first. **F1, option label in decision-node and edge conditions: already covered on `main`, no change here.** `flow-condition-option-label` reads every edge condition and every `decision` node's `conditions[].expression` (and query filter operands) since objectstack-ai#37491 (`optionLabelsBeyondStart` in `validate-flow-trigger-readiness.ts`, at `error`, same id, runtime gate and CLI). Its positive and negative pins are in `flow-publish-checks-second-batch.test.ts`, describe "past the start condition". The card gets a line saying so. **F6, a `subflow` / `map` step calling a flow that does not exist: now refused at the publish gate.** It was a CLI-only warning because the gate's per-write snapshot holds just the written flow. The gate now judges the call against the names of every flow the deployment holds, which the host states on a flow publish: - every installed package's flows (the registry, read with `includeDisabledPackages`, so a disabled package's are included); - the stored flow rows of **every state**, drafts included, so two new flows that call each other can still be published one at a time; - the flows the same publish batch carries (`pending.flows`), so a package that ships a flow with its caller publishes; - the flows the same unmanaged package install writes (`copyPlanFlowNames`, new in this head), so a package whose flow calls a sibling it declares later installs; - every flow the automation engine holds (`listFlows`), so a flow registered straight into the engine with no metadata row resolves. A call that names none of them, and is not the written flow itself, is an `error` (`flow-subflow-unknown`): `execute` answers `Flow 'X' not found` on every run. Severity per door: - **CLI** (`os validate` / `lint` / `compile` / `build`): `warning`, unchanged. The stack is one app, and another installed package may ship the called flow. - **Runtime publish gate, names stated and non-empty**: `error`. The set is the whole deployment, so "held nowhere" is decided, the objectstack-ai#24668 reading of a whole collection. - **Runtime publish gate, no names or an empty set**: no verdict. That covers no automation service, a failed store read or a failed `listFlows` (each logged once at `warn`) and an empty set. A missing `sys_metadata` table is no stored flow: the other sources still decide. An empty set with no closure is no universe (objectstack-ai#24668). - **Package closure**: the set is never narrowed to the written package's closure. So a call the engine's package-scoped resolution would refuse (ADR-0150 D3, `outside-closure`) is not judged here. This rule never refuses a call the engine would accept. Wiring: - `@objectstack/lint`: `validateFlowSubflowTargets(stack, { deploymentFlowNames })`, the `AuthoringRuleContext.deploymentFlowNames` input, and `runRuntimeAuthoringRules({ deploymentFlowNames })`. The rule's registry entry moves to `tier: 'gating'`, `surfaces: CLI_AND_RUNTIME`, `runtimeTypes: ['flow']`. Its runtime pass judges nothing without stated names. The rule's explanation text is updated. - `@objectstack/metadata-protocol`: `evaluateRuntimeAuthoringGate({ deploymentFlowNames })` adds the batch's flow drafts. `judgeRuntimeAuthoringRules` reads the names only on a flow write whose body calls another flow (`flowCallsAnotherFlow` in `runtime-authoring-gate.ts`; `deploymentFlowNamesOf`, `automationFlowNames`, `registeredFlowsWithDisabled` in `protocol-authoring-gate.ts`), through the host's existing `servicesRegistry`; the registry is listed with its disabled packages, since the served listing drops their items. The stored names are one `sys_metadata` read, `type` `$in` both spellings, projected to `fields: ['name']`. `saveMetaItem` takes a server-only `copyPlanFlowNames` (`protocol-door-requests.ts`), which `importUnmanagedPackage` states on each flow write and the save door hands the gate as `pending.flows`. `protocol.ts` moves no line: one docblock (the `pending` field) is reworded in place. - `@objectstack/spec`: the ADR-0087 entry `publish-refuses-flows-that-save-and-do-not-run` now counts eight errors at the publish gate, seven of them also on the CLI: its `surface` names the `subflow` / `map` refusal, the warnings sentence says which door each warning is silent at, the acceptance line is no longer seven, and the reason says what holds for a package install. No rule is added, so no "author-time rules (N)" count moves. ## Rework on contract review 7238045522 (FAIL at `bc21970eab`) This PR continues objectstack-ai#38241 (seat 6's branch `claude/issue-35143-flows-leftovers`, whose dev ran out of budget). It starts at that head, merges `main`, and closes every open item of the review: - **M1** (an unmanaged install refused a package whose flow calls a sibling declared after it): `importUnmanagedPackage` states its plan's flow names on each flow write (`copyPlanFlowNames`), which reach the gate as `pending.flows`, the batch's channel. Pinned in `package-unmanaged-install.test.ts`, describe "a flow calling a sibling flow of the same package": a package declaring `crm_parent` (calls `crm_child`) before `crm_child`, on a protocol whose automation service holds another flow, installs both; the control (a call to a flow nothing holds) is still refused 422 and leaves no row and no base. `duplicatePackage` is unchanged: it copies stored rows, which the gate's stored read already holds (the review's own reading). - **S1** (every flow body read for names, on every flow publish): one read, both type spellings, `fields: ['name']`; none at all for a flow that calls no other flow, or only itself. Pinned on the shared harness. - **S2** (the entry still counted seven): `surface`, `reason` and `acceptanceCriteria` rewritten as above. - **S3** (three no-verdict exits unpinned): one pin each through `saveMetaItem` on the shared harness: a store read that throws (accepted, one `warn`), a `listFlows` that throws (accepted, one `warn`), and a missing `sys_metadata` table (no `warn`; a call to an engine or registry flow is accepted and a call to nothing is still refused). - **N1**: the `sealedFlowNodeTypeVocabulary` docblock is back above its function. N2–N5 are left as the review graded them (no effect on correctness); see the acceptance notes. ## Patch round on contract review 7257069704 (PASS, S4 open at `a7c00fdd85`) - **S4** (the texts said a disabled package's flows count; the gate read the served registry listing, which drops them): the first closing condition. The names read lists the registry with `includeDisabledPackages: true` (`registeredFlowsWithDisabled`), so a call to a disabled package's flow is let through, as a draft is: the flow is held, and runs once its package is enabled. The docblock, the changeset and this body now say what the code does. Pinned through `saveMetaItem`; removing the option fails the pin. - **N6, N7, N8** in the same commit: the entry's `reason` gives the right cause (the install states its flow names) and says the rename covers prefixed names only; the `pending` docblocks, the lint docblocks and the `os explain` text name a package install's flows and a disabled package's; the changeset's Exports bullet names `saveMetaItem`'s `copyPlanFlowNames` and no longer names `evaluateRuntimeAuthoringGate`. N9 and N10 stand as accepted. ## Why objectstack-ai#35143 "Done when": each line is a rule with its pins, or a line on the card saying which rule covers it. F1 is the second case and F6 is now the first. The hosted copy of the subflow check can be deleted. ## Tests <details><summary>Lint: new pins in flow-publish-checks-second-batch.test.ts (describe flow-subflow-unknown)</summary> - CLI: still exactly one `warning`. - Runtime gate refuses a call to a name the stated set lacks: `error`, path `flows[0].nodes[1].config.flowName`, message opening, `rulesRun` names the rule. - A `map` call inside a loop body: `error` at `flows[0].nodes[1].config.body.nodes[0].config.flowName`. - Silent: a name the stated set holds, the written flow calling itself. - No verdict: no stated names, an empty set. </details> <details><summary>Metadata-protocol: the describe in protocol.runtime-authoring-gate.test.ts (the shared harness), end to end through saveMetaItem</summary> - 422 `INVALID_METADATA`, issue `flow-subflow-unknown` at the path, nothing stored. - Accepted: a flow only the automation engine holds, an installed package's flow (registry), a stored draft, a stored active flow. - No automation service: accepted (no verdict). - New (S4): a flow only a DISABLED package ships (listed by the registry only with `includeDisabledPackages`) resolves; a call to nothing in the same case is still a 422. - New (S1): the stored names are read once, `{ where: { type: { $in: ['flow', 'flows'] } }, fields: ['name'] }`; a flow calling only itself, and a flow with no call, read nothing. - New (S3): a store read that throws, accepted with one `warn` naming the cause; a `listFlows` that throws, the same; a missing `sys_metadata` table, no `warn`, engine and registry flows still resolve and a call to nothing is still a 422. - `evaluateRuntimeAuthoringGate`: a flow in `pending.flows` resolves; without it the call is refused. </details> <details><summary>Metadata-protocol: new describe in package-unmanaged-install.test.ts (M1)</summary> - A package declaring `crm_parent` (a `subflow` step calling `crm_child`) before `crm_child`, with an automation service holding `other_flow`: installs, both flows stored active. - Control: `crm_parent` calling `crm_nowhere`: refused 422 with `flow-subflow-unknown`, no active row left, the base `com.example.crm-copy` removed. - Reading, not pinned: the same package installed with `targetNamespace: 'crm2'` is refused 422 (`flow 'crm2_parent' could not be written … flows[0].nodes[1].config.flowName [flow-subflow-unknown]`) and rolled back, because the rename does not rewrite `config.flowName`; see the acceptance notes. </details> <details><summary>Ablations (each fix removed on disk from the committed head, then restored with git checkout HEAD)</summary> - `importUnmanagedPackage` states no `copyPlanFlowNames`: "installs a package that declares the calling flow before the flow it calls" fails (1 failed / 1 passed). - The names read for every flow write (the `flowCallsAnotherFlow` guard dropped): "reads the stored names once …" fails (1 failed / 7 passed). - At 93f3643, the registry read without `includeDisabledPackages`: "lets a call through to a disabled package's flow …" fails (1 failed). </details> <details><summary>Suites (head 93f3643, main merged at 3014176; under os-verify-lock)</summary> - `@objectstack/lint` test: 246 files / 9962 tests passed. typecheck exit 0. - `@objectstack/metadata-protocol` test: 372 passed / 9 skipped files, 23660 passed / 45 skipped tests. typecheck exit 0. `protocol.runtime-authoring-gate.test.ts` + `package-unmanaged-install.test.ts`: 383/383. - `@objectstack/spec` `src/migrations`: 5 files / 209 tests. - Dogfood battery: head 93f3643, `pnpm --filter @objectstack/dogfood test` under the lock after a clean closure build (exit 0): VERDICT command-exit 0, Test Files 495 passed / 3 skipped (498), Tests 4187 passed / 68 skipped (4255), no failure. </details> ## Acceptance notes - Not judged: whether the engine's package-scoped name resolution lets the calling flow reach the called one (ADR-0150 D3). The set is the whole deployment, so an `outside-closure` call still fails at run time. Judging that would need the resolver's verdict at the door. - A call to a stored draft, or an archived or deprecated row, is let through. The step fails until that flow is active. This keeps two new flows that call each other publishable one at a time. - The stored read for names is not filtered for legacy organization rows. An extra name can only let a call through. - A package install under another namespace (`targetNamespace`) renames its flows but not the `config.flowName` that calls them, so a package whose flow calls a sibling is now refused and rolled back unless the deployment holds the old name. On `main` it installed with a step that fails on every run. Making the rename follow flow names is outside this card; reported to the seat as a finding. - A plan flow name counts even if that flow's own write then fails: the install then rolls back whole, so no caller is left pointing at it. - Not addressed, as graded (nits): N2 `listFlows` is read with no seal; N3 the empty-set exit depends on the door; N4 the "did you mean" suggestion draws on the unfiltered stored read; N5 `rulesRun` names the rule on a write where it judged nothing. ## Verification - Read first: `packages/metadata-protocol/src/protocol-package-commits.ts` `importUnmanagedPackage` (`copyPlanFlowNames`) with `protocol-save.ts` (where it becomes `pending.flows`); `packages/metadata-protocol/src/protocol-authoring-gate.ts` `deploymentFlowNamesOf` (the union, the projected read, the no-verdict exits), `packages/lint/src/authoring-rules.ts` the `validateFlowSubflowTargets` entry (runtime pass with no names = nothing), `packages/lint/src/validate-flow-trigger-readiness.ts` `validateFlowSubflowTargets`. - Two minutes: `pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.runtime-authoring-gate.test.ts src/package-unmanaged-install.test.ts -t '35143|sibling flow'`. Expect 11 passed, among them a 422 naming `flow-subflow-unknown` and a package install of a caller before its callee. <details><summary>Gates (head 93f3643)</summary> - `dispatch-gates --ran` at 93f3643, run after the closure build: 103 derived, 102 run (all exit 0), 1 NOT MEASURED, 0 unrun (`✓ dispatch-gates --ran: 103 derived famil(ies) accounted for`). - `check:dual-build-cjs-loads` exit 3: needs a full workspace build. Left to CI. - `overlap-check` (`--exclude-pr=38241`) at a7c00fd: clean against origin/main 3014176 and the two open PRs sharing a file (objectstack-ai#38550, objectstack-ai#38497). The 93f3643 commit touches only files of this PR. - `protocol.ts` moves no line, so `check:facade-delegation-only`'s ceiling is untouched (exit 0 in the sweep). </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes (CI-owned run). - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: only a migration entry's text, no generated artifact moves. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QsR2jSjBfkaFUVwRa3pdUK <!-- signed: repo:objectstack#1 · zhuangjianguo · session_01QsR2jSjBfkaFUVwRa3pdUK --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Fixes #36964
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37504
维护者速读
What changes
flow-condition-option-labelused to read one position: a record-change start condition. The same mistake, a select field compared with an option's label while the row stores the option's value, also sits in three other places, and nothing reported it there. A flow filter is handed to the data engine as written (ADR-0061 D4 resolves labels on the query surfaces, never inside an authored flow), so the label matches no row and the run still reports success.The rule now also reads, at
error(its existing severity):config.filterthe spec's expression ledger marksfilterOperands(get_record,update_record,delete_record), at any region depth, plus a time-relative start'stimeRelative.filter. An operand counts when it is a field's implicit equality, its$eq/$necomparand or a member of its$in/$ninlist, at the top level or under$and/$or/$not. The walk is the spec's ownflowFilterOperands. The finding sits at the operand's path (flows[0].nodes[1].config.filter.$or[0].stage.$in[1]) and says "matches no record", or "excludes no record" for an excluding operand.decisionbranches (conditions[].expression), in every graph of the flow, against the rows the condition can name: the trigger record on a record-change or time-relative flow (record.F,previous.F, and a bareFonly when no flow variable, node id or screen field of that name shadows it), and the row a single-rowget_recordstep (limitabsent or 1, literalobjectName) bound to itsoutputVariable(deal.F). A variable that anything else in the flow also binds is not judged.Not judged: a CEL value envelope, a variable or
{{ }}comparand, a string carrying a brace (a template or a query placeholder), a picklist field, a nested-relation condition, ordering and text operators.BREAKING: accept-set narrowing, shipped as
minor. A flow that validated and published onmainwith one of these shapes is refused now, byos validate/lint/compile/buildand at its next active publish. The schema is unchanged and stored flows are not rewritten or refused at boot. FROM → TO:filter: { stage: 'Closed Lost' }→filter: { stage: 'closed_lost' };deal.stage == 'Closed Lost'→deal.stage == 'closed_lost'. A filter operand that really means the label writes a CEL value envelope (filters only; an edge or decision condition has no escape). ADR-0087:not-required (already-registered publish-refuses-flows-that-save-and-do-not-run), and that entry'ssurfacenow names the edge condition, the decision branch and the filter operand beside the start condition.A rebound trigger root is not the trigger row. When the flow itself binds
recordorprevious(a step'soutputVariable, a loop'siteratorVariable, an assignment target, a declared variable), that root is dropped from the trigger reader:record.Fafter the binding is another row's field.Rule id. One existing id, no new one. The filter operand goes to
flow-condition-option-labeland not toflow-node-write-unknown-option, because the write rule's verdict is "the record validator refuses the write (invalid_option) and the step fails". That is false for a filter: nothing refuses a filter operand, the step succeeds on nothing.validate-flow-node-writes.tsgains a comment that says so and no code.authoring-rules.ts,rule-explanations.tsandindex.tsare untouched, so no registry or wiring change is needed.Severity.
errorat every new position, the start condition's severity, decided by the #5762 question in the trigger-readiness header: is this stack enough to know? It is. The label, the field's inline options and the object are all in the stack, and nothing installed changes what the row stores. A filter that really means to find rows still holding a label (a clean-up after the options changed) writes the operand as a CEL value envelope, which is not judged. The changeset says this.flow-select-options.ts:optionLabelComparisonstakes an optionalFieldReads(the roots a read is spelled under, whether a bare read counts, and which names shadow it). Its default builds the same regular expression as before, so the start condition reads exactly what it read. A newoptionLabelOperands(filter, options)reads filters.Tests
New describe in flow-publish-checks-second-batch.test.ts (the shared harness for these ids), 14 cases, head 7093e46
get_recordfilter (path, severity, exact hint);update_record$eq;delete_record$orwith an$inmember and a multiselect;$nesays "excludes no record"; a filter inside aloopbody; a time-relativetimeRelative.filter.deal.stage == 'Closed Lost'over aget_recordoutputVariable: 'deal'(a string, and a CEL envelope within [...]); an edge on a record-change flow readingrecord.stage; adecisionnode'sconditions[0].expression; a barestageon a record-change flow.'{{wanted_stage}}'operand; an envelope$inmember; a picklist field; a nested relation;$gt; a variable comparand; a{{ }}comparand; aget_recordwithlimit: 5; a templatedobjectName; an output variable also declared invariables; a bare read on a manual flow; a bare read shadowed by a variable.$notover$ne(matches no record),$nin(excludes no record),$and.loopbody (flows[0].nodes[5].config.body.edges[0].condition) and adecisionbranch inside aparallelbranch (...config.branches[0].nodes[0].config.conditions[0].expression).record.stage, andprevious.stageon a record-change flow.recordrebound by aget_recordoutputVariable, a loopiteratorVariableand an assignment, where'Closed Lost'is a label on the trigger object'sstageand a value on the other object'sstage(control with an unrelated binder: reported); a variable twoget_recordsteps bind to different objects; a variable shadowed by a node id and by a screen field; a bare read shadowed by a node id and by a screen field.os validate(runAuthoringRules('validate')) reports it, and the runtime publish gate refuses both an edge flow and a filter flow write.Ablations: one per new read site, through scripts/ablation-replace.mjs (anchor hit, blob moved, restored blob equals HEAD)
FILTER_NODE_TYPESguard turned into an unconditionalcontinuetimeRelative.filterbranch made unreachableholder.edgesloop made unreachabledecisionguard made always-skipreaders.pushfor a bound row removedrootsno longer filtered by the bound namesrecordcaseThe first attempt at the CRUD-filter ablation replaced the guard with a bare
continue;, which already appeared in the file 17 times. The tool refused it because the replacement count did not rise by one, and nothing ran. It was redone with a distinct replacement, and that run is the row above.Acceptance notes
os explain flow-condition-option-labelstill says "why a start condition compares option values" and describes the start condition only.rule-explanations.tsis held by an open PR and fenced off this card. Follow-up reported to the seat.skills/objectstack-automation/SKILL.md§4 says "A label in afilteror an edgeconditionis never checked: it silently matches nothing". This PR makes that sentence false.skills/**is governed and fenced off this card. Follow-up reported to the seat.config.condition, a node-levelconfig.conditionon non-start nodes,NODE_ID.record.Freads, a loop iterator over a listget_record, and a field of a related object (nested relation). Each needs its own row-typing decision.readonlyselect is judged here, as the start-condition half already judges it (the changeset says so too). The write rule skipsreadonlybecause the validator judges such a value by shape only. A row of a readonly select could hold a non-option code, but an option label is not something the platform writes.Read first
packages/lint/src/validate-flow-trigger-readiness.ts,optionLabelsBeyondStart: the row-variable typing (single-rowget_record, ambiguity drop, bare-read shadowing). This is where a false positive would come from.packages/lint/src/flow-select-options.ts,optionLabelOperands: the operand path parsing (combinators, operator set, list members).packages/lint/src/flow-select-options.ts,readOf: the default must stay byte-identical to the old start-condition expression.Verification
Two minutes:
pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/flow-publish-checks-second-batch.test.ts. ExpectTests 49 passed (49), with the 14 cases under "flow-condition-option-label past the start condition (#36964)" green.Generated by Claude Code