You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bdc95ac
Browse filesBrowse the repository at this point in the historyBrowse files
fix(spec): narrow the start-node sweep guard, name typed schedule aliases, restate the ADR-0087 reason
The filter refusal now fires only when `config.timeRelative` is a non-null
object, the test the trigger-kind resolver routes a sweep by. A typed
`{ type: 'cron', cron }` or `{ type: 'interval', every }` schedule is refused
with the declared spelling named (`expression`, `intervalMs`). The changeset's
ADR-0087 reason says what is true of each arm, and the release note no longer
carries a FROM/TO rewrite: the parse refusal names where the key belongs.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oEQNYg7j3ueo5t6pV
Skills-docs: none — `skills/**` and `content/docs/**` teach `timeRelative.filter` inside the descriptor and typed `{ type: 'cron', expression }` schedules, which this accepts. The generated `skills/objectstack-automation/references/_index.md` gains the source files the flow closure now reaches (`system/job.zod.ts` and its imports).
10
10
11
-
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed or renamed: FlowNodeSchema.config stays an open record, and the parse now refuses two shapes no reader honoured. A start-node filter beside timeRelative was read by nothing, and a schedule the reader reads nothing from (or one the published ScheduleSchema refuses) never bound as written, so there is no rewrite that keeps what the author meant in every case; each refusal names the fix. -->
11
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed or renamed: FlowNodeSchema.config stays an open record, and the parse now refuses two shapes on it. The filter arm refuses an undeclared key on that open-record config: the published time-relative descriptor declares filter inside timeRelative and nowhere else, so filter beside timeRelative was never a declared shape and no protocol step migrates from it (the #4277 class). The schedule arm refuses values the published ScheduleSchema refuses, or that the schedule reader reads nothing from. Each refusal message names the cure at the refused key. -->
12
12
13
13
**BREAKING** accept-set narrowing of `FlowSchema` (every door that parses a flow: `defineStack`, `os validate` / `os build`, the metadata save door including drafts, publish, and the automation engine's registration).
14
14
15
-
-**`config.filter` beside `config.timeRelative`.** Before, it parsed and nothing read it: the time-relative sweep reads its row filter from `timeRelative.filter`, so the flow launched for every record in the date window. Now it is refused at `nodes[i].config.filter`. **FROM**`config: { timeRelative: { … }, filter: { status: 'active' } }`**TO**`config: { timeRelative: { …, filter: { status: 'active' } } }`.
15
+
-**`config.filter` beside `config.timeRelative`.** Before, it parsed and nothing read it: the time-relative sweep reads its row filter from `timeRelative.filter`, so the flow launched for every record in the date window. Now it is refused at `nodes[i].config.filter`, when`config.timeRelative` is an object (the start node the engine routes as a sweep); a `timeRelative: null` start node is not judged.
16
16
-**A `config.schedule` the readers cannot use.** Both readers (the schedule trigger, and the time-relative sweep's cadence) pass it through `normalizeSchedule`. When that reads nothing, a schedule flow stays unbound (one warn in the server log) and a sweep falls back to daily 08:00 UTC. Now, at `nodes[i].config.schedule`:
17
-
- an object carrying `type` is judged against the published `ScheduleSchema` (the discriminant, a cron `timezone` that is an IANA zone, a positive integer `intervalMs`, an ISO `at`), and then for being readable at all (a cron `expression` written as an envelope is not);
17
+
- an object carrying `type` is judged against the published `ScheduleSchema` (the discriminant, a cron `timezone` that is an IANA zone, a positive integer `intervalMs`, an ISO `at`), and then for being readable at all (a cron `expression` written as an envelope is not). The schema does not declare the aliases `cron` and `every` on a typed object, so the two typed aliases the reader happens to bind today, `{ type: 'cron', cron }` and `{ type: 'interval', every }`, are refused too, and the refusal names the declared spelling (`expression`, `intervalMs`). Neither occurs in objectstack or hotcrm;
18
18
- any other value is refused only when the reader reads nothing from it (an empty string, `{}`, `{ cadence: 'daily' }`, a number, an array, a non-positive interval);
19
19
- accepted as before: a bare cron string, and the untyped aliases the reader takes (`{ cron }`, `{ expression }`, `{ every }`, `{ intervalMs }`, `{ at }`).
20
20
-**One reading, pinned.**`flowStartScheduleReadsNothing` mirrors `normalizeSchedule` branch for branch, and `@objectstack/trigger-schedule` pins the two equal over every form either side distinguishes.
21
21
22
-
**What an author does.** Nothing for a sweep whose filter sits inside `timeRelative`, or a schedule that binds today. For a refused shape: move the filter into `timeRelative.filter`; write the schedule as a cron string or one of `{ type: 'cron', expression, timezone? }`, `{ type: 'interval', intervalMs }`, `{ type: 'once', at }`.
22
+
**What an author does.** Nothing for a sweep whose filter sits inside `timeRelative`, or a schedule that binds today in a form the published schema declares. For a refused shape, the parse refusal names where the key belongs, or the schedule spellings the readers take.
0 commit comments