Skip to content

Commit 132742f

Browse files
docs(spec): the dialect table's cron row names what fires a schedule — cron-parser is not in the product (#15877)
* docs(spec): dialect table's cron row names what fires a schedule, not cron-parser The `## Dialects` table in the Expression Protocol docblock named `cron-parser` as the cron engine. That package is not a dependency of any package in the repo; the library that fires a schedule is `croner`, reached only from `CronSchedule.expression` via `toBoundaryJobSchedule` and `CronJobAdapter`. No cron syntax is judged at parse time, the other cron-typed slots reach no engine, and formula's registered cron engine has no caller outside its package. The row and one sentence under the table now say so; the generated reference page follows in the regeneration commit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M59rPZZFzqhfMUPFqqZTkf * docs(spec): regenerate the Expression reference page from the corrected dialect table Produced by `pnpm --filter @objectstack/spec gen:docs`; the only file the generator changed. The page's cron row and the sentence under the table now match the docblock. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M59rPZZFzqhfMUPFqqZTkf --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6acb37e commit 132742f

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
The Expression Protocol dialect table no longer names `cron-parser` as the `cron` engine. That package is not a dependency of any ObjectStack package; the row shipped to authors through the generated reference page (`content/docs/references/shared/expression.mdx`) and pointed them at the wrong library for field counts, alias vocabulary and second-field semantics.
6+
7+
The row now says what the code does: no cron syntax is judged at parse time; `croner` evaluates a cron expression only when `CronSchedule.expression` is scheduled (`toBoundaryJobSchedule``CronJobAdapter`, where an invalid pattern is refused); every other cron-typed slot is parsed and reaches no engine; and `@objectstack/formula`'s registered `cron` engine has no caller outside that package. Documentation only — no schema, accept set or behaviour changes.

content/docs/references/shared/expression.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ envelope.
2121
| dialect | engine | use |
2222
|:---|:---|:---|
2323
| `cel` | `@objectstack/formula` (cel-js + ObjectStack stdlib) | formulas, predicates, seed dynamic values |
24-
| `cron` | `cron-parser` | job schedules |
24+
| `cron` | none at parse time — `croner` fires it at schedule time, on the one wired slot | job schedules |
2525
| `template` | `{{var}}` interpolation at evaluate time (same variable scope as CEL) | notification subjects/bodies, `titleFormat`, prompt templates |
2626

27+
No cron syntax is judged at parse time: `croner` evaluates a cron slot only
28+
when `CronSchedule.expression` is scheduled (`toBoundaryJobSchedule`
29+
`CronJobAdapter`, where an invalid pattern is refused); every other
30+
cron-typed slot is parsed and reaches no engine, and `@objectstack/formula`'s
31+
registered `cron` engine has no caller outside that package.
32+
2733
Those three are the whole list — it is exactly the `ExpressionDialect` enum
2834
below. Procedural JavaScript is **not** a dialect: it is the L2 authoring
2935
surface, the sandboxed, capability-gated `ScriptBody { language: 'js' }` in

packages/spec/src/shared/expression.zod.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@ import { z } from 'zod';
1919
* | dialect | engine | use |
2020
* |:---|:---|:---|
2121
* | `cel` | `@objectstack/formula` (cel-js + ObjectStack stdlib) | formulas, predicates, seed dynamic values |
22-
* | `cron` | `cron-parser` | job schedules |
22+
* | `cron` | none at parse time — `croner` fires it at schedule time, on the one wired slot | job schedules |
2323
* | `template` | `{{var}}` interpolation at evaluate time (same variable scope as CEL) | notification subjects/bodies, `titleFormat`, prompt templates |
2424
*
25+
* No cron syntax is judged at parse time: `croner` evaluates a cron slot only
26+
* when `CronSchedule.expression` is scheduled (`toBoundaryJobSchedule` →
27+
* `CronJobAdapter`, where an invalid pattern is refused); every other
28+
* cron-typed slot is parsed and reaches no engine, and `@objectstack/formula`'s
29+
* registered `cron` engine has no caller outside that package.
30+
*
2531
* Those three are the whole list — it is exactly the `ExpressionDialect` enum
2632
* below. Procedural JavaScript is **not** a dialect: it is the L2 authoring
2733
* surface, the sandboxed, capability-gated `ScriptBody { language: 'js' }` in

0 commit comments

Comments
 (0)