Skip to content

fix(lint)!: ten publish-time checks for flows that save and do not run - #36691

Merged
os-zhuang merged 8 commits into
mainfrom
claude/project-thread-jju3py
Nov 23, 2026
Merged

os-zhuang merged 8 commits into
mainfrom
claude/project-thread-jju3py

Conversation

@os-warren

@os-warren os-warren commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

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:

Rule What it catches Why it fails at run time
flow-trigger-object-missing a record-triggered start node with no or a blank objectName absent: the hook registers with no object, so it fires on writes to every object; blank: the engine refuses the hook, so the flow never starts
flow-condition-option-label a start condition comparing a select field with one of its option labels (F == 'L', 'L' == F, !=, F in [...]) the row stores the option value, so it is never true
flow-time-relative-shadowed timeRelative under a record triggerType the record trigger wins; the sweep never runs
flow-time-relative-key-misplaced filter / maxRecords beside timeRelative the sweep reads them only inside the block
flow-time-relative-date-field-invalid dateField missing or not date / datetime the range query matches no record
flow-node-write-unknown-option a create/update node writing a select literal no option carries the record validator refuses invalid_option on every run
flow-node-write-date-helper-text a create/update node writing 'today()'-style text to a date field the validator refuses invalid_date; the hint gives the CEL value envelope

Three warnings: flow-schedule-timezone-missing (cron with no timezone runs in UTC), flow-subflow-unknown (new CLI-only rule validateFlowSubflowTargets: a subflow/map node 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 minus id/label/description/position).

  • One reading of a select field's options, packages/lint/src/flow-select-options.ts, shared by the two option rules: a field is judged only when its options are inline (no shared picklist) and no two object extensions tie on it.
  • Ten os explain entries in rule-explanations.ts.
  • Upgrade-guide entry publish-refuses-flows-that-save-and-do-not-run (ADR-0087, notice only; no D2 conversion).
  • Docs and spec docblocks: the cron examples in content/docs/automation/flows.mdx, time-relative-trigger.zod.ts and schedule-organization.zod.ts state timezone: 'UTC'; the two reference pages are regenerated.
  • Examples: four cron schedules in app-todo and app-showcase gain timezone: 'UTC'; four CLI transcripts in content/docs/ print 77 author-time rules.

Tests

Acceptance notes

  • F6 (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.
  • F3 (self-retriggering flow) is not built: refuted on main (re-entry guard and driver-sql boolean read-back), evidence in the premise table.
  • F4c and F7b are already covered (flow-trigger-unknown-object; date-text-call from 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).
  • The label check covers start conditions only; decision-node conditions are not judged here.
  • The flow-CRUD unknown-object line (S2) goes with a later family, as the premise table says.
  • No *.user-text.ts catalog 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.
  • Contract review rework (head 72fe0c076): Metadata-protocol: narrowed with @objectstack/lint at minor; flow-condition-option-label now reports a label only as its own field's comparand (F == 'L', 'L' == F, !=, F in [...]), so record.stage == 'open' && record.name == 'Closed Lost' is silent; a blank objectName gets its own message (the engine refuses an empty hook target, so the flow is never bound); the cron examples in flows.mdx and in the spec docblocks behind two reference pages state timezone: 'UTC'.
  • Not covered by this PR, open on the card: decision-node and edge conditions for the label check (start conditions only), and a gate-side subflow check (F6 is CLI-only).

Verification

Two-minute check: cd examples/app-todo && pnpm exec objectstack validate exits 0 with no finding from the ten new rules; os explain flow-condition-option-label prints 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 is 0292183af plus a second merge of origin/main, which added an author-time rule, so the four CLI transcripts now print 78. On 0292183af: 4466c0cc8 plus the changeset's Skills-docs: follow-up #36718 and a clean merge of origin/main. After the merge, under the verify lock: @objectstack/lint 229 files / 9509 tests, metadata-protocol 23354, service-automation 4264, verify 500, mcp 1481, all passed. One mcp run 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-bytes and overlap-check: all OK.

Earlier, on 4466c0cc8: Same tree as 7bc8e8a6e plus one module-top import '@objectstack/lint'; in protocol.package-closure-gate.test.ts, which the test-source alias gate asked for. CI on 7bc8e8a6e: every Test Core and Test UI shard, every Type Check lane and the dogfood gate passed. The only red was that alias step, and node scripts/check-test-source-alias.mjs now reports OK locally.

  • @objectstack/lint, the full suite under the verify lock: 228 files, 9503 tests passed.
  • Lint dependents under the lock: @objectstack/metadata-protocol 365 files / 23352 tests, @objectstack/service-automation 293 / 4258, @objectstack/verify 55 / 500, @objectstack/mcp 83 / 1467. All passed, exit 0.
  • The first CI run found one stale fixture in metadata-protocol: a sweep over the text field title, which the new date-field rule refuses. It now sweeps created_at, and the file passes 11/11.
  • M2 red/green: with the previous flow-select-options.ts restored, 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/spec src/migrations: 200 tests passed. After pnpm --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.
  • Examples: example-todo 267/267 and example-showcase 554/554. objectstack validate on app-crm, app-todo and app-showcase exits 0 with no finding from the ten rules.
  • Full dogfood battery, run on the first head (the rule code was unchanged in later heads apart from the label matcher): 487 files passed, 3 skipped; 4121 tests passed, 68 skipped; exit 0.
  • dispatch-gates --ran: 122 derived families accounted for, 121 exit 0. check-plugin-teardown-shape --self-test exits 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 against origin/main and feat: an object's action layout per scope, pinned and more, set from the design mode (#36366) #36629: clean.

Generated by Claude Code

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
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/lint, @objectstack/spec, touching 52 documentable anchor(s). ⚠️ 3 changed file(s) yielded no anchor (packages/lint/src/index.ts, packages/spec/src/automation/schedule-organization.zod.ts, packages/spec/src/automation/time-relative-trigger.zod.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/automation/flows.mdx (via time_relative (literal, a string literal in validateFlowTriggerReadiness))
  • content/docs/deployment/validating-metadata.mdx (via AUTHORING_RULES (symbol, a top-level const object))
  • content/docs/permissions/capabilities.mdx (via time_relative (literal, a string literal in validateFlowTriggerReadiness))
  • content/docs/ui/reports.mdx (via maxRecords (literal, a string literal in validateFlowTriggerReadiness))
  • content/docs/ui/views.mdx (via maxRecords (literal, a string literal in validateFlowTriggerReadiness))

⛔ 2 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via maxRecords (literal, a string literal in validateFlowTriggerReadiness), time_relative (literal, a string literal in validateFlowTriggerReadiness))
  • content/docs/releases/v17/17-5.mdx (via time_relative (literal, a string literal in validateFlowTriggerReadiness))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 3 changed file(s) yielded no anchor (packages/lint/src/index.ts, packages/spec/src/automation/schedule-organization.zod.ts, packages/spec/src/automation/time-relative-trigger.zod.ts) — pages documenting those are invisible to this run
  • 12 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 68 of 251 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 175 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json e343ab7c209c858ee5a7a1fa117baacf96a77229 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 9e9b0b486dd726c9171ab942d2e8c3be2487f444 — the merge of head 05bdad81607e398374b0b5c55a84a0b71d3ac62b into base e343ab7c209c858ee5a7a1fa117baacf96a77229, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs e343ab7c209c858ee5a7a1fa117baacf96a77229 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ee53786b52ae178bf9ea949a16c838f220a7550f
Local-runs: none
Scope: the full diff of PR #36691 against merge base 9348f02b9052c89011893c5a10be86d5888fc0c4 (17 files: .changeset/35143-flow-publish-checks-second-batch.md, packages/lint/src/{authoring-rules,flow-select-options,index,lint-flow-patterns,rule-explanations,validate-flow-node-writes,validate-flow-trigger-readiness}.ts, the two lint test files, packages/spec/src/migrations/entries/semantic/18.publish-refuses-flows-that-save-and-do-not-run.ts, two example flows, four docs pages); card #35143 body and comments (premise table 7098105309, report 7100228457); PR #35244 body and its changeset (the #34776 precedent) + cited at the PR head: packages/services/service-automation/src/plugin-extension-api.ts, packages/services/service-automation/src/builtin/{crud-nodes,value-slot-map,subflow-node,map-node}.ts, packages/services/service-automation/src/engine.ts, packages/objectql/src/engine-top-level.ts, packages/objectql/src/engine-hooks-and-functions.ts, packages/objectql/src/validation/record-validator.ts, packages/triggers/trigger-record-change/src/record-change-trigger.ts, packages/triggers/trigger-schedule/src/{schedule-trigger,time-relative-trigger}.ts, packages/spec/src/automation/{flow-trigger-kind,record-change-trigger-events,time-relative-trigger.zod,schedule-organization.zod}.ts, packages/formula/src/stdlib.ts, packages/metadata-protocol/src/protocol-authoring-gate.ts, packages/spec/src/migrations/entries/README.md, scripts/pm/clause2-line.mjs, scripts/check-changeset-no-major.mjs, scripts/check-adr-0087-registration.mjs, .github/workflows/pr-automation.yml, .claude/skills/pm-dispatch/references/execution-duties.md, the pending .changeset/*.md set
Security-touching: no
Rule-change-verified: none

① Derived judgments

Each check was read against the code that runs flows. Nine of the ten hold as written. One refuses valid metadata.

  • flow-trigger-object-missing (error): TRUE for an absent objectName. The binding passes object: undefined (plugin-extension-api.ts:254). The trigger hands it to registerHook (record-change-trigger.ts:372-373). hookMatchesObject reads an absent target as global (engine-top-level.ts:3733-3746). The flow starts on every object's write. The card's "binds to nothing" was corrected, and the correction is right.
  • flow-condition-option-label (error): the premise is TRUE (the row holds the option value). The detection is not. See must-fix M2.
  • flow-time-relative-shadowed (error): TRUE. resolveFlowTriggerKind answers record_change before time_relative (flow-trigger-kind.ts:76-81). The lint uses the same startsWith('record-') test.
  • flow-time-relative-key-misplaced (error): TRUE. The sweep reads desc.filter and desc.maxRecords from the descriptor only (time-relative-trigger.ts:237, :488). The binding lifts only schedule, organization and condition (plugin-extension-api.ts:271-293).
  • flow-time-relative-date-field-invalid (error): TRUE against the published contract. The sweep is a $gte/$lte range on desc.dateField (time-relative-trigger.ts:238). The schema describes the key as a "Date or datetime field" (time-relative-trigger.zod.ts:146-149). An unknown type is not judged. created_at / updated_at are read from the injected columns.
  • flow-schedule-timezone-missing (warning): TRUE. new Cron(expression, { timezone: schedule.timezone ?? 'UTC' }) (schedule-trigger.ts:251). cronWithoutZone mirrors normalizeSchedule (schedule-trigger.ts:608-631) shape for shape.
  • flow-subflow-unknown (warning, CLI only): TRUE. A missing child fails the step (subflow-node.ts:175, map-node.ts:262-284). The CLI-only placement is forced: a flow write is handed no flows collection (protocol-authoring-gate.ts:566-574, ruling A runtime-authored flow that writes a readonly field as the user publishes clean; the button runs, reports success and changes nothing (flow-update-readonly-field is not run at the save/publish gate) #32666).
  • flow-node-write-unknown-option (error): TRUE. A bare string in fields is a literal (value-slot-map.ts:44-56; the single-brace template dialect is refused elsewhere). The validator refuses an off-list value with invalid_option, single and multi (record-validator.ts:1892-1905, :1939-1950). The lint skips what the validator skips: a picklist field, a readonly field (:1891), an empty options list. String(value) matches the validator's own reading (:598-603).
  • flow-node-write-date-helper-text (error): TRUE. The string is written as text and refused invalid_date (record-validator.ts:1807-1810). The hinted helpers exist (formula/src/stdlib.ts, content/docs/automation/flows.mdx:288-290).
  • flow-create-update-pair (warning): TRUE as an advisory. record-after-write binds both events (record-change-trigger-events.ts:39). It runs inside lintFlowPatterns, so the runtime gate (one flow per write) never raises it.

Example edits: not a loosened rule. The three cron schedules in app-todo and app-showcase raised only the new timezone warning. timezone: 'UTC' states what the runtime already did. No run-time behaviour changes. The showcase connectorConfig false positive was fixed in the rule (the signature now covers the whole node), not by editing the example.

Clause-② line: Clause-②: yes (narrowing) is correct. Keep it. The repo's test is "does the card widen an accept set or enlarge the public surface" (execution-duties.md:76-77). The PR narrows the publish accept set (seven refusals). It also adds eleven exports to the built entry of @objectstack/lint (index.ts: validateFlowSubflowTargets and ten rule ids). New exports are a widening in this repo's practice (pending changesets 34779, 35113, 35892 declare yes (widening) for exports alone). clause2-line.mjs names yes (narrowing) as the spelling for "widens one surface and narrows another". no (narrowing) would be right only if the exports were not added. The #34776 changeset wrote no (narrowing: ...) while adding exports; that precedent under-declared the widening and should not be copied.

Metadata-protocol line: none is wrong. It must read Metadata-protocol: narrowed. See must-fix M1.

must-fix M1 — Metadata-protocol: none and the patch levels. The repo defines narrowed as "a key removed or tombstoned, a value refused, a requirement tightened" and grades it minor (pr-automation.yml:775-778; check-changeset-no-major.mjs:907-910). This PR refuses values an author could publish yesterday (a select literal, helper text, filter beside timeRelative) and tightens a requirement (objectName on a record trigger). The gate cannot see this class: "a refused value ... is invisible to them, so the declaration — not the diff — is still the carrier" (check-changeset-no-major.mjs:928-932). So none passes CI and is still wrong. Every pending narrowing that registers an ADR-0087 entry declares narrowed with @objectstack/lint: minor: 34776 (the first batch), 34987, 35040, 36167, 35252. This PR is the only outlier. Fix, in the PR body and the changeset both: Metadata-protocol: narrowed, and '@objectstack/lint': minor. @objectstack/spec may stay patch (one moved package at minor discharges the rule). The (narrowing) arm that narrowed requires is already there.

must-fix M2 — flow-condition-option-label refuses valid conditions, and its hint breaks them. optionLabelComparisons (flow-select-options.ts:113-125) does not check that the label literal is compared with the select field. It checks three unrelated facts: the field is read somewhere, the label is quoted somewhere, the value is quoted nowhere. Two valid conditions it refuses, with the PR's own test object deal:

  • record.stage == 'open' && record.name == 'Closed Lost'. stage is read. 'Closed Lost' is quoted, as the comparand of the text field name. 'closed_lost' is absent. The rule raises an error and tells the author to write 'closed_lost' in place of 'Closed Lost', which would break a working condition.
  • Two select fields where one's label is the other's value: priority with { value: 'high', label: 'High' } and severity with bare options ['High', 'Low']. record.severity == 'High' && record.priority != null is refused.
    The silent pin at test line 140-149 passes only because that fixture also quotes 'closed_lost'. Fix: report only when the label literal is the comparand of that field (F == 'L', F != 'L', 'L' == F, F in [...]), and pin both cases above as silent. Lowering the rule to a warning is the smaller alternative, but the wrong hint would remain.

should-fix S1 — the blank-name arm of flow-trigger-object-missing states the wrong consequence. For objectName: '' or ' ' the trigger passes the string through, and registerHook throws on an empty target (engine-hooks-and-functions.ts:236, engine-top-level.ts:3859-3875). That flow is not bound. It does not "watch every object". The refusal is right; the sentence is not. Give the blank case its own message (the test at line 94 pins "the same way").

Notes:

  • flow-time-relative-date-field-invalid treats every non-date type as "never falls in". A summary field that rolls up min/max of a date is outside the schema's stated contract, so the refusal stands; say so in the explanation if the lane wants.
  • flow-trigger-object-missing also fires for an unmappable record-* token, where the flow is not bound at all. Rule 1c already refuses that flow.
  • DATE_HELPER_CALL is case sensitive; 'TODAY()' text is missed. A miss, not a false positive.

② Semver level

  • The ! in the title is allowed. major is absent, so check-changeset-no-major passes. The level itself is wrong: see M1 (@objectstack/lint must be minor under Metadata-protocol: narrowed).
  • The changeset carries the **BREAKING** banner, a ## FROM → TO section with six worked pairs, and the marker adr-0087: registered publish-refuses-flows-that-save-and-do-not-run. That satisfies check-adr-0087-registration.mjs.
  • The ADR-0087 entry is well-formed: id, surface, replacement, reason, acceptanceCriteria, the SemanticMigration type. The file name is 18. (the protocol major, shared by 569 entries on main) plus the id, as entries/README.md requires. The id is unique. It mirrors the first batch's 18.publish-refuses-metadata-the-runtime-ignores.ts. "Notice only, no D2 conversion" is right: each fix is the author's choice.
  • The entry and the changeset spell no call of a live method in a way I could match to a textual ratchet; CI was still running at review time.

③ Boundary flags

  • A published app can fail its next publish. The changeset and the entry both say so, and say that stored flows are not rewritten or refused at boot. Called out correctly.
  • Shipped stacks: the PR reports objectstack validate clean on app-crm, app-todo and app-showcase. By reading, every record-triggered flow under examples/, packages/qa/dogfood/test/fixtures/ and the CLI scaffold (packages/cli/src/commands/generate.ts:652-655) names its objectName. packages/qa/dogfood/test/fixtures/schedule-organization-fixture.ts:74 keeps a cron with no timezone; that is a warning only.
  • should-fix S2 — the docs and the spec's own examples still teach the shape the new warning reports. content/docs/automation/flows.mdx:3097 (and the comment at :3032), the docblock examples at packages/spec/src/automation/time-relative-trigger.zod.ts:44 and schedule-organization.zod.ts:122 (the source of content/docs/references/automation/time-relative-trigger.mdx:45 and schedule-organization.mdx:125) write { type: 'cron', expression: '0 8 * * *' } with no timezone. A reader who copies them gets a warning, and os validate --strict exits 1. Add timezone there in this PR. skills/objectstack-automation/references/integration-recipes.md:47 has the same shape; add it to the Skills-docs: follow-up list, which does not name it.
  • No docs page names any of the seven new error ids. The first batch documented its rules in content/docs/. This can ride the S2 edit.
  • Rule explanations: accurate for nine ids. flow-condition-option-label describes the co-occurrence test honestly, which is the defect in M2; it changes with the fix. flow-trigger-object-missing needs the blank-name sentence from S1.
  • validate-flow-trigger-readiness.test.ts: not weakened. Four fixtures gained timezone: 'UTC' so their toEqual([]) assertions keep judging their own question. No assertion was removed or loosened. One fixture moved from the bare-string cron to the object form; the bare-string shape is pinned in the new test file ("in both spellings").
  • The pins fail without the fix: the new test file imports the ten new rule ids and asserts each id at the function and, for the seven errors, at runRuntimeAuthoringRules. flow-time-relative-shadowed, -key-misplaced and -date-field-invalid have function pins and no runtime-gate pin; they run inside the gate-registered validateFlowTriggerReadiness, so this is a note.
  • Skills-docs: follow-up owed still needs its card number (an L1 item).
  • CI check-runs were in progress on this head at review time.

④ Design judgment

Against card #35143, Flows family only.

  • The split is sound: seven errors where the start node or one literal settles the answer, three warnings where intent or another package may decide. Extending validateFlowTriggerReadiness, validateFlowNodeWrites and lintFlowPatterns follows the card's "extend it; do not add a second rule beside it". One shared options reader (flow-select-options.ts) for the two option rules is the right shape.
  • F3 not built: accepted. The re-entry guard is on main (service-automation/src/engine.ts:3208). F4c and F7b are covered by existing rules.
  • F6 departs from the card twice: the card marks it as a rule for the gate and the CLI, and not as advisory. The PR ships a CLI-only warning. The reason holds (the gate's flow snapshot holds only the written flow). The hosted copy of this check cannot be deleted on the strength of this PR. Record that on the card as an open line.
  • F1 is covered for start conditions and CRUD writes only. Decision-node and edge conditions are not judged. The PR says so; the card needs the line, since its "done when" asks for a rule or a covering rule per line.
  • The label rule's method (text co-occurrence) is the one design choice that does not hold at error tier. See M2.
  • The timezone warning also fires on sub-hourly crons (*/5 * * * *), where the zone changes nothing. A note for the lane; skipping crons with a wildcard hour would cut the noise.

Open: must-fix M1, must-fix M2, should-fix S1, should-fix S2.

Implemented-by: claude/project-thread-jju3py
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

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
@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 72fe0c0764df3ae49d06ded9b5da20f286a64134
Local-runs: none
Scope: delta ee53786b52ae178bf9ea949a16c838f220a7550f..72fe0c0764df3ae49d06ded9b5da20f286a64134 (one commit, 10 files: .changeset/35143-flow-publish-checks-second-batch.md, content/docs/automation/flows.mdx, content/docs/references/automation/{schedule-organization,time-relative-trigger}.mdx, packages/lint/src/{flow-select-options,rule-explanations,validate-flow-trigger-readiness}.ts, packages/lint/src/flow-publish-checks-second-batch.test.ts, packages/spec/src/automation/{schedule-organization,time-relative-trigger}.zod.ts); the PR body at the new head; rework record 7100465508 as relayed by the seat + cited: packages/objectql/src/engine-hooks-and-functions.ts, packages/objectql/src/engine-top-level.ts, packages/spec/src/migrations/entries/semantic/18.publish-refuses-flows-that-save-and-do-not-run.ts, scripts/check-changeset-no-major.mjs, .github/workflows/pr-automation.yml. The first review of head ee53786b52ae178bf9ea949a16c838f220a7550f stands for everything the delta does not touch.
Security-touching: no
Rule-change-verified: none

① Derived judgments

  • M1 closed. The PR body and the changeset both read Clause-②: yes (narrowing) and Metadata-protocol: narrowed. The pair is consistent: narrowed needs the (narrowing) arm, and it is there.
  • M2 closed. optionLabelComparisons (flow-select-options.ts:97-154) now reports a label only when it is the comparand of that field. Read case by case:
    • Reported, correctly: record.stage == 'L', stage != "L", 'L' == record.stage, previous.stage in ['open', 'L'], with any whitespace or line break around the operator, inside parentheses, and inside && / || chains.
    • !(record.stage == 'L') is reported. That is right: the inner comparison is false on every row, so the negation is true on every row.
    • Silent, correctly: record.stage == 'open' && record.name == 'L'; the two-select case (record.severity == 'High' && record.priority != null); a path through another object (record.account.stage == 'L', vars.stage == 'L'); a longer field name (other_stage, stage_label); a member read (record.stage.label); label(record.stage) == 'L'.
    • Both first-review cases are pinned silent, and the mixed-case pair is pinned in both directions (test lines 164-189). The literal-first and in-list spellings have positive pins (lines 154-162).
    • No new false positive found. The literal-first pattern has no left boundary, so a span between two other literals can be read as a literal, but it would have to spell a label exactly and be followed by == F. Not a real case.
  • S1 closed. A blank objectName now says "never bound and the flow never starts". That matches the engine: registerHook throws on an empty target (engine-hooks-and-functions.ts:236, engine-top-level.ts:3859-3875). An absent name keeps the "every object" sentence. The test pins both sentences apart. The explanation and the changeset carry the same split.

Notes:

  • The old hedge "the option's value is quoted too" is gone. record.stage == 'closed_lost' || record.stage == 'Closed Lost' is now refused. The second arm is dead, so the refusal is defensible, but that flow did run as meant. The lane may want a line on it in the explanation.
  • Misses, by design: record["stage"], 'L' in [record.stage], a parenthesised literal, .contains(...), a label that holds a quote. None refuses valid metadata.
  • Not pinned: parentheses, negation, a double-quoted list member. The pattern covers them by reading.

② Semver level

  • '@objectstack/lint': minor, '@objectstack/spec': patch. One moved package at minor discharges narrowed (check-changeset-no-major.mjs:907-910, :1886-1887). No major. Correct.
  • The BREAKING banner, the FROM → TO section and the adr-0087: registered marker are unchanged and still present.
  • The ADR-0087 entry is unchanged in the delta. It agrees with narrowed: it states seven publish refusals of metadata that was accepted before, as a notice with no conversion. Nothing in it says the protocol is unchanged. It does not mention the blank-name arm; that arm is the same rule id and the same remedy, so no edit is owed.

③ Boundary flags

  • S2 closed. content/docs/automation/flows.mdx:3032 and :3097 carry timezone: 'UTC'. Both spec docblocks carry it (time-relative-trigger.zod.ts:44, schedule-organization.zod.ts:122). The two reference pages carry the same line, character for character, as their source docblock. No other reference page changed, and no other docblock was touched, so no page is stale.
  • integration-recipes.md is now on the Skills-docs: line in the PR body and the changeset. The line still reads follow-up owed; the seat numbers it (an L1 item).
  • No test got weaker. The blank-name pin is stricter than before (it asserts the sentence, and asserts the other sentence is absent).
  • Notes, same shape left elsewhere, none blocking: the comments at examples/app-showcase/src/automation/flows/index.ts:445 and :2047; packages/triggers/trigger-schedule/README.md:130; and the refusal text at packages/spec/src/automation/flow-start-config-refusals.ts:129, which offers a cron with no timezone as an accepted shape. An author who follows that refusal gets the new warning. Worth a line in the Skills-docs follow-up card.
  • CI on this head: 11 success, 11 skipped, 19 still running at review time. None failed.

④ Design judgment

Open: none at must-fix or should-fix.

Implemented-by: claude/project-thread-jju3py
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

VERDICT: PASS

…ge-closure gate test

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbYLajSVuBY258yrEFn
@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 05bdad81607e398374b0b5c55a84a0b71d3ac62b
Local-runs: none
Scope: delta 72fe0c0764df3ae49d06ded9b5da20f286a64134..05bdad81607e398374b0b5c55a84a0b71d3ac62b (the PR's own delta is 6 files: .changeset/35143-flow-publish-checks-second-batch.md, content/docs/deployment/{cli,validating-metadata}.mdx, content/docs/getting-started/build-with-claude-code.mdx, content/docs/ui/react-pages.mdx, packages/metadata-protocol/src/protocol.package-closure-gate.test.ts); the PR body at the new head; issue #36718; scripts/docs-audit/check-docs-transcript-drift.mjs, packages/cli/src/commands/{validate,compile}.ts, packages/lint/src/authoring-rules.ts and main's validate-object-action-layout.ts at the head. Review r2 (7100699767) of head 72fe0c07 stands for everything the delta does not touch. Read-only tools only: git diff, git patch-id, git merge-tree --write-tree and gh api reads; the drift gate was read, not run.
Security-touching: no
Rule-change-verified: none

① What the delta is

  • Six first-parent commits: two test-only (7bc8e8a6e7, 4466c0cc8b), one changeset line (b28dc726fb), two merges of origin/main (0292183af9, eb5bf1a38e), one transcript-count commit (05bdad8160).
  • No rule code changed. For each of the PR's 23 own files I compared the patch against its merge base at 72fe0c07 (base 9348f02b90) with the patch at the new head (base e343ab7c20). The patch ids are equal for every file except the six in Scope. packages/lint/src/authoring-rules.ts and index.ts differ between the two heads only by main's 18 + 6 lines (validateObjectActionLayout, 设计模式(四)页头按钮:选哪些动作固定在页头、哪些收进「更多」,可以拖动排序 #36366); the PR's own hunks in them are unchanged.
  • Both merges are clean. Re-merging each merge's two parents gives the same tree as the committed merge (fef10f2457…, 1420fcbcce…). No hand resolution.
  • The transcript commit is counts only: four files, one line each, (77) → (78).
  • The test file: the sweep fixture's dateField goes from title (a text field) to created_at, and the file imports @objectstack/lint at collection. The fixture change follows the PR's own date-field check; no assertion was removed or loosened.

② Semver and Clause lines

③ Boundary flags

  • The count 78 is right. The CLI prints authoringRulesFor(<command>).length, and the gate compares each transcript with that number. The registry at the head has 78 entries (77 at 72fe0c07, 77 on main: each side adds one). 76 are scoped ALL and 2 ['validate', 'build'], so os validate and os build both print 78. No rule name appears twice.
  • No interaction with main's new rule. It is validateObjectActionLayout, ids object-action-layout-unknown / object-action-layout-not-placed, CLI only, about object action layouts. It shares no id, no input and no file with the PR's flow checks, and sits in a different place in the table.
  • The head still merges cleanly into the current main tip (0e83fe031a), where the registry still has 77 entries, so 78 holds after merge.
  • CI on this head at review time: 61 success, 12 skipped, 1 running, 0 failed.

No must-fix, no should-fix.

Implemented-by: claude/project-thread-jju3py
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

维护者速读

流程发布时多加十项检查:存了但永远不会运行的流程(比如定时没写时区、条件引用了不存在的字段、子流程名字写错),发布时会提示或拒绝,作者当场就知道,不会等到它该运行却没运行才发现。这是「收紧」:以前能发布的这类流程现在会被拦下,所以要 os-zhuang 在 GitHub 上批准后才能合并。教作者写流程的技能文档还在教旧写法,已经单开 #36718 跟进。
合同级复核三轮通过,无必改项,CI 全绿。
要你做的:无(等 os-zhuang 批准)。

席位核对 — ACCEPT (L1) · repo:objectstack#1 · head 05bdad81 · 2026-11-23T15:32Z

  • Shape: Part of #35143 (F6 and F1 stay on the card). Clause-②: yes (narrowing). Metadata-protocol: narrowed. @objectstack/lint minor, @objectstack/spec patch. The title is BREAKING. The adr-0087 conversion is registered.
  • Reviews: CONTRACT_REVIEW_TIER r1 at ee53786b reworked. r2 PASSED at 72fe0c07. r3 PASSED at the head 05bdad81 (7105703012), with no must-fix and no should-fix.
    • The delta since r2 is two test-only commits, the Skills-docs: follow-up #36718 line, two clean merges of main (re-merged trees are identical), and transcript counts 77 → 78.
    • The PR's own rule code is unchanged.
  • Gates: 12 skipped, 62 success on 05bdad81. 7 behind main (< 15).
  • Landing: narrowing, so it lands like Tier H. The hand-off to os-zhuang follows.
    No must-fix, no should-fix.

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

维护者速读

流程发布检查第二批(十项)已复核通过、CI 全绿。这是收紧改动,按规则请 os-zhuang 在 GitHub 上点批准,批准后自动合并。
要你做的:无(等 os-zhuang 批准)。

Narrowing hand-off · 2026-11-23T15:32Z: this pull declares Clause-②: yes (narrowing) and Metadata-protocol: narrowed, so it lands like Tier H (ruling 2026-11-19 on #35321).

  • Record half: the same-head CONTRACT_REVIEW_TIER PASS 7105703012 at 05bdad81, with no must-fix and no should-fix.
  • Seat ACCEPT: 7105725569.
  • Human half: os-zhuang's GitHub Approve is requested.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 23, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 23, 2026 16:10
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 9062756 Nov 23, 2026
80 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-jju3py branch November 23, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants