docs: point stale planner references at ADR 0011
Mark ADR 0011 as implemented, cite it where docs/statistics.md still named the client-side planner as a constraint, and say that development runs calculate locally because they have no build identifier. Refs #319 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a12e27bfdc
commit
1df34e4acb
3 files changed
+3
-3
No files matched your search
@@ -57,7 +57,7 @@ flowchart LR
|
||||
Host -. serves .-> UI
|
||||
```
|
||||
|
||||
Leave calculation runs on the server by default, for every device, so the wait does not depend on the device. The production Bun process serves the generated client-only Angular application and accepts one planning WebSocket per worker job (a plan, an incomplete-checkpoint explanation or a counterfactual analysis) at `/api/planning`; each socket runs the planner worker in a Bun Worker. If the socket cannot open, does not open within about 5 seconds, or closes before sending any message, the browser starts its own Web Worker without notice and replays the messages posted so far, including an early Cancel. Under `ng serve`, which has no backend, calculations therefore run locally. The resumable core is emitted as a separate worker/lazy chunk and retains a synchronous adapter for direct core callers. The original decision trace and historical analysis were removed in issue #76; immutable checkpoints and final state remain available for cancellation recovery and displayed-placement alternatives.
|
||||
Leave calculation runs on the server by default, for every device, so the wait does not depend on the device. The production Bun process serves the generated client-only Angular application and accepts one planning WebSocket per worker job (a plan, an incomplete-checkpoint explanation or a counterfactual analysis) at `/api/planning`; each socket runs the planner worker in a Bun Worker. If the socket cannot open, does not open within about 5 seconds, or closes before sending any message, the browser starts its own Web Worker without notice and replays the messages posted so far, including an early Cancel. Development and test runs have no build identifier, so they skip the socket and calculate locally (see [Local development](#local-development)). The resumable core is emitted as a separate worker/lazy chunk and retains a synchronous adapter for direct core callers. The original decision trace and historical analysis were removed in issue #76; immutable checkpoints and final state remain available for cancellation recovery and displayed-placement alternatives.
|
||||
|
||||
### Main execution path
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Server-Side Planning for Every Device
|
||||
|
||||
Accepted on 2026-10-28 for [issue #319](https://gitea.nessar.fr/nessar/vac-optimizer/issues/319); implementation pending. This supersedes [ADR 0002](0002-personal-client-side-planner-for-now.md) and the requirement of [ADR 0006](0006-user-selected-horizons-and-cancellable-calculations.md) that calculations remain in the browser; ADR 0006's absence of an automatic cutoff, its Cancel action and its retained valid plan are unchanged.
|
||||
Accepted on 2026-10-28 for [issue #319](https://gitea.nessar.fr/nessar/vac-optimizer/issues/319); implemented by #320, #323, #324 and #325. This supersedes [ADR 0002](0002-personal-client-side-planner-for-now.md) and the requirement of [ADR 0006](0006-user-selected-horizons-and-cancellable-calculations.md) that calculations remain in the browser; ADR 0006's absence of an automatic cutoff, its Cancel action and its retained valid plan are unchanged.
|
||||
|
||||
Older phones are too slow for heavy configurations, and some crash near the end of a calculation. A Pixel 11 runs the benchmark's loaded year in about 4.6 seconds in its browser worker. The Bun server therefore runs the planner for every device, and the privacy of leave data is not a constraint. The browser engine remains a fallback. The server is not faster than a recent phone: on the development machine (Ryzen 7 7800X3D), the loaded year takes 5.3 seconds on Bun and 3.8 seconds on Node 24. It makes the wait independent of the device.
|
||||
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ Use behavior-level tests that assert returned planning facts and user-visible fi
|
||||
## Further Notes
|
||||
|
||||
- Scope references: #3 and #29 describe the shared popup; #7 supplies the average work-sequence requirement; #8 supplies earned leave; #9 supplies public holidays connected to weekends; #28's longest work-sequence metric already exists. The discussion adds average and longest time-off period lengths and dated one-workday-week warnings. Existing planner and calculation-performance work in the milestone remains the baseline.
|
||||
- Domain definitions are maintained in [CONTEXT.md](../CONTEXT.md). Relevant architectural constraints are the [personal client-side planner](adr/0002-personal-client-side-planner-for-now.md), [separate calculation outcome and trace](adr/0004-stable-explanation-original-trace-counterfactual.md), [selected horizons and cancellation](adr/0006-user-selected-horizons-and-cancellable-calculations.md), and [declared days and reported balances](adr/0007-declared-days-and-reported-balances.md).
|
||||
- Domain definitions are maintained in [CONTEXT.md](../CONTEXT.md). Relevant architectural constraints are [server-side planning for every device](adr/0011-server-side-planning-for-every-device.md), which superseded the [personal client-side planner](adr/0002-personal-client-side-planner-for-now.md), [separate calculation outcome and trace](adr/0004-stable-explanation-original-trace-counterfactual.md), [selected horizons and cancellation](adr/0006-user-selected-horizons-and-cancellable-calculations.md), and [declared days and reported balances](adr/0007-declared-days-and-reported-balances.md).
|
||||
- **Current integration gaps:** The inspected outcome exposes placements, periods, remaining balances, and several quality metrics, but no dedicated gross earned-leave summary or fixed calculation date. Remaining balances omit fully consumed entitlements. Declared-day support is in progress in the working tree: declarations are carried with outcomes, while the inspected period and work-sequence calculations still use placements alone. Coordinate with #13's finalized semantics before relying on those values; avoid a second conflicting calendar model in the popup.
|
||||
- **Proposed empty-value convention, not explicitly confirmed:** Counts show 0 when there are no qualifying items. An average with no samples, or longest time-off period length when no periods exist, shows "—". The existing longest work-sequence length remains 0 when there are no work sequences. Empty samples should remain distinguishable from a measured zero in the underlying data.
|
||||
- **Remaining presentation choices:** Exact decimal precision for averages, metric layout, and whether eligible rules with zero earnings receive breakdown rows were not decided. These do not change the agreed counting or date rules. Use existing presentation conventions and keep any selected defaults explicit during implementation.
|
||||
Reference in new issue
Block a user