The calculation entry point had three paths: the worker path, one for a
window without a Worker, and an in-process one for no window with its own
cancellation, replacement and explanation flags. Date analysis had a
main-thread fallback too. Only the worker path remains, on the job the
caller passes or the default selection, so every rule of an incomplete
calculation is decided once.
- The lifecycle module no longer checks the window or imports the planner
core at runtime; browsers load the core only in the worker bundle.
- One registry holds the live supersession callbacks, the latest
calculation identity and the latest date analysis.
- A browser with a window but no Worker now reports worker-unavailable
even for an invalid request, where it reported invalid input first.
- The build forces Angular's chunk optimization: with the lazy core chunk
gone the build fell under Angular's three-lazy-chunk threshold and the
initial bundle was split and grew.
Refs #339
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
French (and German/Spanish) users saw English wherever the UI rendered
planning-engine reason messages or raw identifiers.
- Look up planner reasons by code in planning.reasons and
planning.validationReasons instead of rendering reason.message; the
engine keeps its English messages.
- Show calculation stages with their translated labels.
- Translate the Material datepicker labels and the comparison date
placeholder; add the declared-day comparison reason.
- Keep <html lang> in sync with the loaded translation.
- Generate the registry with English first and `satisfies
AppTranslations`, and test that every language has en.json's keys.
- Fix fr "Weekend" -> "Week-end".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`bun run build` now builds the browser and server bundles in one script
that defines a fresh PLANNING_BUILD identifier for both. The client sends
it when it opens a planning socket, and the server closes a socket from
another build, or without one, with code 4409 before any message, so a
tab opened before a deployment calculates with its own engine.
Development and test runs have no identifier: the client skips the
socket and calculates locally, and a server run from source accepts no
planning sockets.
Closes#325
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generated HTML and Cobertura reports no longer show unmeasured
branch and function coverage as 100%. Poll and waitFor deadlines use
performance.now so frozen dates cannot make them loop forever, the
malformed-configuration test covers undefined again next to the empty
array, compose health checks honor PORT, and the migration spec lists
only what is still open.
Refs #291, #292, #293
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin Bun 1.4.3 with packageManager, and force every bun run script onto
the Bun runtime through bunfig so ng, ESLint and Prettier never fall
back to an installed Node. Type checking uses bun check for the
application and test projects, next to the Angular build.
CI jobs install the pinned release from a checksum-verified download
instead of npm and run project steps in a shell without Node on PATH,
which stays available only for the checkout and upload actions. The
image test's fake docker runs on Bun.
Refs #290, #293
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace Vitest with bun test across the whole suite. A preload compiles
components through Angular's JIT transform with inlined templates, sets
up jsdom, TestBed and zoneless change detection, and a small shim covers
the Vitest APIs bun:test lacks. Files run isolated, real-worker specs
spawn the running Bun, and line coverage from lcov is converted to the
existing HTML and Cobertura reports. The CI benchmark replaces its heap
cap with a container memory limit. Vitest, Jest, Nx and their Vite
configuration are removed.
Refs #291
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>