feat(kitchen): compile the task graph and lay out a single default schedule #78

Merged
abiwab merged 2 commits from feat/kitchen-task-graph into main 2026-10-04 12:01:59 +02:00
Owner

PR 2 of the 1.4.0 scheduler plan (`.notes/plan-scheduler-1-4.md`, section 11).

The compiled recipe now carries `tasks` (a graph of what there is to do and what each task waits for) and a single `schedule` laid out from it, instead of three precomputed `schedules` (never published). Every other combination comes from `layout(recipe.tasks, { miseEnPlace, rests })`, with no new compile.

  • Scheduler: `layout()`, the task graph types, `MiseEnPlaceMode` / `RestChoice` (the former `ScheduleMode` family, renamed everywhere), diagnostics as structured data (`TIME_PARADOX`, `TRACK_CONTENTION`, `SESSION_OVERFLOW`). The days of the sessions come from the graph.
  • Kitchen: builds the graph (stable ids `s0.prep`, `s1.prep.dough`, `s0.3`, `s0.3.t0`), words the diagnostics as warnings, adds `SESSION_OVERFLOW`. The legacy pass is untouched and still feeds `timings`, `backgroundTasks` and `metrics` with the average of a range.
  • Sense of durations (decisions 1 to 6): exact timers, a passive range planned on its shortest figure by default, an active range on its longest, and only an anchor in days opens a working day.
  • Deprecations: remplacements updated, `metrics.activeTime` newly deprecated.

Checks:

  • `conformance/legacy-1.3.0.test.ts` compares digests of the 1.3.0 goldens: everything published in 1.3.0 is unchanged on the 83 existing cases.
  • Layouts of the three modes are identical to the former `schedules` on 256 of 258 combinations; only case 033 differs, on purpose (its anchors in hours became `~{-1d}`).
  • 600 generated recipes: `schedule` equals `layout(tasks)`, rests change nothing without a range, scaling leaves `tasks` and `schedule` alone.
  • Four new conformance cases (ranges, session overflow, anchors in hours, a section between two anchors).

Not in this PR: the docs still mention `schedules` in several pages (rewritten in the docs PR), and the `conformance/schedule/` suite comes with `project()`. The playground files in the docs commit are only the rename.

PR 2 of the 1.4.0 scheduler plan (\`.notes/plan-scheduler-1-4.md\`, section 11). The compiled recipe now carries \`tasks\` (a graph of what there is to do and what each task waits for) and a single \`schedule\` laid out from it, instead of three precomputed \`schedules\` (never published). Every other combination comes from \`layout(recipe.tasks, { miseEnPlace, rests })\`, with no new compile. - **Scheduler**: \`layout()\`, the task graph types, \`MiseEnPlaceMode\` / \`RestChoice\` (the former \`ScheduleMode\` family, renamed everywhere), diagnostics as structured data (\`TIME_PARADOX\`, \`TRACK_CONTENTION\`, \`SESSION_OVERFLOW\`). The days of the sessions come from the graph. - **Kitchen**: builds the graph (stable ids \`s0.prep\`, \`s1.prep.dough\`, \`s0.3\`, \`s0.3.t0\`), words the diagnostics as warnings, adds \`SESSION_OVERFLOW\`. The legacy pass is untouched and still feeds \`timings\`, \`backgroundTasks\` and \`metrics\` with the average of a range. - **Sense of durations** (decisions 1 to 6): exact timers, a passive range planned on its shortest figure by default, an active range on its longest, and only an anchor in days opens a working day. - **Deprecations**: remplacements updated, \`metrics.activeTime\` newly deprecated. Checks: - \`conformance/legacy-1.3.0.test.ts\` compares digests of the 1.3.0 goldens: everything published in 1.3.0 is unchanged on the 83 existing cases. - Layouts of the three modes are identical to the former \`schedules\` on 256 of 258 combinations; only case 033 differs, on purpose (its anchors in hours became \`~{-1d}\`). - 600 generated recipes: \`schedule\` equals \`layout(tasks)\`, rests change nothing without a range, scaling leaves \`tasks\` and \`schedule\` alone. - Four new conformance cases (ranges, session overflow, anchors in hours, a section between two anchors). Not in this PR: the docs still mention \`schedules\` in several pages (rewritten in the docs PR), and the \`conformance/schedule/\` suite comes with \`project()\`. The playground files in the docs commit are only the rename.
abiwab merged commit bca7b5d437 into main 2026-10-04 12:01:59 +02:00
abiwab deleted branch feat/kitchen-task-graph 2026-10-04 12:02:00 +02:00
Sign in to join this conversation.
No description provided.