Repository navigation
fix(lint)!: ten publish-time checks for flows that save and do not run - #36691
Conversation
Seven errors refuse the publish of a flow that the engine never starts, starts on the wrong rows, or fails on every write; three warnings name a missing cron timezone, an unknown subflow target and a create/update pair written as two flows. Registers the upgrade-guide entry publish-refuses-flows-that-save-and-do-not-run, and the CLI transcripts in the docs count 77 author-time rules. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbYLajSVuBY258yrEFn
📓 Docs Drift CheckThis PR changes 2 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 175 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 9e9b0b486dd726c9171ab942d2e8c3be2487f444 && git checkout 9e9b0b486dd726c9171ab942d2e8c3be2487f444
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e343ab7c209c858ee5a7a1fa117baacf96a77229 05bdad81607e398374b0b5c55a84a0b71d3ac62b && git checkout -B drift-repro e343ab7c209c858ee5a7a1fa117baacf96a77229 && git merge --no-ff 05bdad81607e398374b0b5c55a84a0b71d3ac62b
node scripts/docs-audit/affected-docs.mjs --json e343ab7c209c858ee5a7a1fa117baacf96a77229
|
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: ① Derived judgmentsEach check was read against the code that runs flows. Nine of the ten hold as written. One refuses valid metadata.
Example edits: not a loosened rule. The three cron schedules in Clause-② line: Metadata-protocol line: must-fix M1 — must-fix M2 —
should-fix S1 — the blank-name arm of Notes:
② Semver level
③ Boundary flags
④ Design judgmentAgainst card #35143, Flows family only.
Open: must-fix M1, must-fix M2, should-fix S1, should-fix S2. Implemented-by: VERDICT: FAIL |
…re the narrowing flow-condition-option-label reported a label quoted anywhere in a condition that read the field; it now reports only F == 'L', 'L' == F, != and F in [...]. A blank objectName gets its own message: the flow is never bound. Metadata-protocol narrowed, @objectstack/lint minor. The spec and docs cron examples state their timezone. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbYLajSVuBY258yrEFn
…atetime column The fixture swept the text field 'title', which the new flow-time-relative-date-field-invalid rule refuses at the publish gate; the test is about the package closure, so it now sweeps created_at. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbYLajSVuBY258yrEFn
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: ① Derived judgments
Notes:
② Semver level
③ Boundary flags
④ Design judgment
Open: none at must-fix or should-fix. Implemented-by: VERDICT: PASS |
…ge-closure gate test Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbYLajSVuBY258yrEFn
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbYLajSVuBY258yrEFn
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbYLajSVuBY258yrEFn
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: ① What the delta is
② Semver and Clause lines
③ Boundary flags
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读流程发布时多加十项检查:存了但永远不会运行的流程(比如定时没写时区、条件引用了不存在的字段、子流程名字写错),发布时会提示或拒绝,作者当场就知道,不会等到它该运行却没运行才发现。这是「收紧」:以前能发布的这类流程现在会被拦下,所以要 os-zhuang 在 GitHub 上批准后才能合并。教作者写流程的技能文档还在教旧写法,已经单开 #36718 跟进。 席位核对 — ACCEPT (L1) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读流程发布检查第二批(十项)已复核通过、CI 全绿。这是收紧改动,按规则请 os-zhuang 在 GitHub 上点批准,批准后自动合并。 Narrowing hand-off · 2026-11-23T15:32Z: this pull declares
|
Requested by Warren · project thread
Part of #35143 — this is the card's Flows family. The Data model, Views/dashboards/app shell, and Seeds/actions families stay open on the card for later PRs (premise table: #35143 (comment)).
Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #36718
维护者速读
What changes
Seven errors, judged by the runtime publish gate and by
os validate/lint/compile/build:flow-trigger-object-missingobjectNameflow-condition-option-labelF == 'L','L' == F,!=,F in [...])flow-time-relative-shadowedtimeRelativeunder a recordtriggerTypeflow-time-relative-key-misplacedfilter/maxRecordsbesidetimeRelativeflow-time-relative-date-field-invaliddateFieldmissing or notdate/datetimeflow-node-write-unknown-optioninvalid_optionon every runflow-node-write-date-helper-text'today()'-style text to a date fieldinvalid_date; the hint gives the CEL value envelopeThree warnings:
flow-schedule-timezone-missing(cron with notimezoneruns in UTC),flow-subflow-unknown(new CLI-only rulevalidateFlowSubflowTargets: asubflow/mapnode naming a flow the stack and its packages do not carry),flow-create-update-pair(an after-create and an after-update flow on one object with the same nodes; fingerprinted on the whole node minusid/label/description/position).packages/lint/src/flow-select-options.ts, shared by the two option rules: a field is judged only when its options are inline (no sharedpicklist) and no two object extensions tie on it.os explainentries inrule-explanations.ts.publish-refuses-flows-that-save-and-do-not-run(ADR-0087, notice only; no D2 conversion).content/docs/automation/flows.mdx,time-relative-trigger.zod.tsandschedule-organization.zod.tsstatetimezone: 'UTC'; the two reference pages are regenerated.app-todoandapp-showcasegaintimezone: 'UTC'; four CLI transcripts incontent/docs/print 77 author-time rules.Tests
packages/lint/src/flow-publish-checks-second-batch.test.ts(33 tests): a positive and a silent pin per rule, the runtime-gate refusal for each error, the subflow rule running on the CLI and not on the gate, aconnectorConfigregression case for the pair rule, andexplainRulefor all ten ids.validate-flow-trigger-readiness.test.ts: four fixtures gainedtimezone: 'UTC'so the 标量config.timeRelative(如timeRelative: 'daily')= 引擎解析不出任何 trigger,flow 永不触发且全层零输出 #5647 and [Decision] 平台自带的四个定时示例流一个都声明不了组织 —— 而新规则要求它们必须声明 #17396 tests keep judging only their own question (fixture triage; no assertion narrowed or removed).Acceptance notes
flow-subflow-unknown) is a CLI-only warning, not an error. The publish gate judges a flow write over a snapshot that holds only that flow, and another package may ship the called flow, so a gate-side or error-tier check would refuse valid flows.flow-trigger-unknown-object;date-text-callfrom flow value envelopes are validated without field types, so the date-text verdicts (timestamp over a date field) never reach update_record / create_record fields #34451).*.user-text.tscatalog entries, following the lint: six publish-time checks for metadata that passes the schema and does nothing at run time #34776 precedent for author-time findings.72fe0c076):Metadata-protocol: narrowedwith@objectstack/lintatminor;flow-condition-option-labelnow reports a label only as its own field's comparand (F == 'L','L' == F,!=,F in [...]), sorecord.stage == 'open' && record.name == 'Closed Lost'is silent; a blankobjectNamegets its own message (the engine refuses an empty hook target, so the flow is never bound); the cron examples inflows.mdxand in the spec docblocks behind two reference pages statetimezone: 'UTC'.Verification
Two-minute check:
cd examples/app-todo && pnpm exec objectstack validateexits 0 with no finding from the ten new rules;os explain flow-condition-option-labelprints the rule's paragraphs.Read first, by risk:
packages/lint/src/validate-flow-node-writes.ts(writtenValueFindings, the two new errors on every CRUD write),packages/lint/src/validate-flow-trigger-readiness.ts(the record and time-relative blocks),packages/lint/src/lint-flow-patterns.ts(flowActionSignature).Test and gate readings
Head
05bdad816: CI 60 success, 10 skipped, 0 failed. It is0292183afplus a second merge oforigin/main, which added an author-time rule, so the four CLI transcripts now print 78. On0292183af:4466c0cc8plus the changeset'sSkills-docs: follow-up #36718and a clean merge oforigin/main. After the merge, under the verify lock:@objectstack/lint229 files / 9509 tests,metadata-protocol23354,service-automation4264,verify500,mcp1481, all passed. Onemcprun first failed a PDF worker-pool timing assertion (mcp-file-tools.test.ts:1150); it passed 54/54 alone and 1481/1481 on the next run.check-test-source-alias,check-adr-0087-registration,check:docs-transcript-drift,check-nul-bytesand overlap-check: all OK.Earlier, on
4466c0cc8: Same tree as7bc8e8a6eplus one module-topimport '@objectstack/lint';inprotocol.package-closure-gate.test.ts, which the test-source alias gate asked for. CI on7bc8e8a6e: every Test Core and Test UI shard, every Type Check lane and the dogfood gate passed. The only red was that alias step, andnode scripts/check-test-source-alias.mjsnow reports OK locally.@objectstack/lint, the full suite under the verify lock: 228 files, 9503 tests passed.@objectstack/metadata-protocol365 files / 23352 tests,@objectstack/service-automation293 / 4258,@objectstack/verify55 / 500,@objectstack/mcp83 / 1467. All passed, exit 0.metadata-protocol: a sweep over the text fieldtitle, which the new date-field rule refuses. It now sweepscreated_at, and the file passes 11/11.flow-select-options.tsrestored, the new pin "is silent when the label is the comparand of another field" fails (1 failed, 34 passed). With the fix, 35/35 pass.@objectstack/specsrc/migrations: 200 tests passed. Afterpnpm --filter @objectstack/spec build, these all exit 0:check:generated,check:api-surface,check:browser-reachable-entries,check:dual-source-exports,check:entry-nameability,check:exported-any,check:skill-examples.example-todo267/267 andexample-showcase554/554.objectstack validateon app-crm, app-todo and app-showcase exits 0 with no finding from the ten rules.dispatch-gates --ran: 122 derived families accounted for, 121 exit 0.check-plugin-teardown-shape --self-testexits 3 here because it needs an unshallowed clone.check-adr-0087-registration: registered (BREAKING, bang, clause-② narrowing, metadata-protocol narrowed).check-nul-bytes: OK. Overlap-check againstorigin/mainand feat: an object's action layout per scope, pinned and more, set from the design mode (#36366) #36629: clean.Generated by Claude Code