Afficher l’explication du plan et la trace exacte du calcul #46

Closed
opened 2026-08-30 20:04:46 +02:00 by nessar · 15 comments
nessar commented 2026-08-30 20:04:46 +02:00 (Migrated from 172.24.0.1:8928)

Problem Statement

The person planning leave receives a deterministic leave plan but cannot see why each leave placement ended on its final date or how competing dates compared. The annual calendar currently exposes only a few aggregate metrics and a final highlight, even though a placement may protect an at-risk balance, satisfy several planning rules, complete a public-holiday week, capture non-working days, or improve work sequences.

The planner also does not produce one intrinsic numeric score per date. It resolves joint obligations, protects at-risk leave, satisfies ordered preferences, and transforms complete plans through lexicographic quality phases. Placements may be shared, moved, supported, or removed later. Pretending that every calendar date received one scalar score, or reconstructing an apparent history after the calculation, would therefore misrepresent the actual algorithm.

The person needs two deliberately separate explanations: a stable plan explanation for the displayed result and the complete calculation trace from the exact run that produced it. They also need an explicitly hypothetical counterfactual date analysis for dates the heuristic did not necessarily examine, without changing the planning outcome, hiding ineligible dates, or confusing hypothetical results with trace history.

Solution

Add an explanation area to the annual calendar with the plan explanation shown by default and an advanced control for the calculation trace.

The plan explanation navigates final leave placements chronologically while keeping the complete final plan visible. For the selected placement it shows placement provenance, every contribution to the plan, the first planning objective that made the placement decisive, and the full lexicographic comparison rather than a synthetic scalar score. Selecting a placement starts an on-demand counterfactual date analysis across the planning horizon. This analysis changes only that placement's date, preserves its leave balance, leave type, and provenance, and clearly identifies itself as hypothetical.

The calculation trace is captured during the original planning run, never reconstructed by replay. It is complete, ordered, and untruncated, organized as calculation phase, atomic planning decision, then actual candidate evaluations. It includes placements later moved or removed, multi-date joint decisions, before/after state, rejected candidates, comparator values, and the decisive objective or tie-break. Every date is visibly classified as chosen, evaluated and rejected, not examined, or ineligible with a reason.

Tracing and explanation remain observational. They cannot alter candidate order, completed phases, deadline behavior, or the planning outcome. The planner's existing deadline applies to planning work; trace instrumentation and delivery are excluded from it. The outcome may therefore be displayed before the latest run's complete in-memory trace finishes loading.

User Stories

  1. As a person planning leave, I want an explanation of the displayed plan, so that I can understand why its placements are useful.
  2. As a person planning leave, I want the plan explanation displayed before technical details, so that ordinary use remains approachable.
  3. As a person planning leave, I want a separate advanced calculation trace, so that I can inspect the exact algorithm without confusing it with the final explanation.
  4. As a person planning leave, I want the explanation to use the exact inputs submitted for that calculation, so that later edits do not rewrite history.
  5. As a person planning leave, I want the planning outcome to remain identical whether or not I open its explanation, so that observability never changes my plan.
  6. As a person planning leave, I want all dates in the actual planning horizon represented, so that a horizon crossing two calendar years is explained completely.
  7. As a person planning leave, I want adjacent non-working dates outside the horizon shown as muted context when they contribute to a time-off period, so that boundary gains remain understandable.
  8. As a person planning leave, I want dates outside the horizon excluded from candidate analysis, so that contextual dates are not mistaken for placeable dates.
  9. As a person planning leave, I want one explanation step per final leave placement, so that I can examine the result day by day.
  10. As a person planning leave, I want final placements ordered chronologically, so that navigation follows the calendar rather than private search order.
  11. As a person planning leave, I want the complete final plan to remain visible while one placement is selected, so that its contribution is explained in context.
  12. As a person planning leave, I want the selected placement highlighted clearly, so that I can locate it in the annual calendar.
  13. As a person planning leave, I want each placement to identify its consumed leave entitlement, so that I know which balance funded it.
  14. As a person planning leave, I want each placement to identify every planning rule it satisfies, so that shared rule satisfaction is visible.
  15. As a person planning leave, I want supporting placements identified, so that optional use of deferred leave is explicit.
  16. As a person planning leave, I want every contribution of a placement listed, so that a placement with several purposes is not reduced to one arbitrary reason.
  17. As a person planning leave, I want the first decisive planning objective highlighted, so that I know which difference actually selected the date.
  18. As a person planning leave, I want the ordered preference results included in comparisons, so that preference priority is visible.
  19. As a person planning leave, I want public-holiday week value included in comparisons, so that completed holiday weeks are explained before broader calendar gain.
  20. As a person planning leave, I want non-working-day gain included in comparisons, so that bridges to weekends and public holidays are visible.
  21. As a person planning leave, I want longest and short work-sequence effects included in comparisons, so that spacing improvements are visible.
  22. As a person planning leave, I want supporting-placement, balance-expiry, and earliest-date tie-breaks included, so that equal higher-priority plans are explainable.
  23. As a person planning leave, I want the real lexicographic vector instead of one numeric total, so that a lower objective never appears to compensate for a higher one.
  24. As a person planning leave, I want before, after, and delta values for a comparison, so that the effect of a candidate is concrete.
  25. As a person planning leave, I want domain-readable labels by default, so that implementation vocabulary does not obstruct understanding.
  26. As a person investigating the planner, I want exact technical comparator details available on expansion, so that no decision is hidden behind prose.
  27. As a person planning leave, I want each horizon date marked as chosen, evaluated and rejected, not examined, or ineligible, so that its historical relationship to the decision is truthful.
  28. As a person planning leave, I want every ineligible date accompanied by its reason, so that weekends, public holidays, occupied dates, availability, expiry, type, and rule constraints are distinguishable.
  29. As a person planning leave, I want a non-examined date described as non-examined rather than rejected, so that heuristic sampling is not rewritten as exhaustive search.
  30. As a person planning leave, I want an actual candidate evaluation visibly distinguished from a counterfactual date analysis, so that history and hypothesis cannot be confused.
  31. As a person planning leave, I want counterfactual results calculated for all horizon dates when I select a placement, so that I can compare its alternatives across the year.
  32. As a person planning leave, I want the final-plan counterfactual analysis based on the final plan without the selected placement, so that it answers why the placement remains on that date.
  33. As a person inspecting a trace decision, I want counterfactual analysis based on the exact state before that decision, so that it answers why the candidate was selected at that moment.
  34. As a person planning leave, I want counterfactual analysis to change only the selected placement's date, so that the comparison does not silently re-optimize unrelated placements.
  35. As a person planning leave, I want counterfactual analysis to preserve the selected balance, leave type, and provenance, so that every date compares the same placement.
  36. As a person planning leave, I want a counterfactual date that breaks an obligation or cannot host the placement marked ineligible rather than assigned a fake worst score, so that validity remains absolute.
  37. As a person planning leave, I want counterfactual analysis never to mutate the displayed plan, so that exploration is safe.
  38. As a person planning leave, I want stale counterfactual work discarded when I select another placement or start another calculation, so that results never cross calculation contexts.
  39. As a person investigating the planner, I want the trace captured from the original calculation, so that it is evidence of what actually happened rather than a later simulation.
  40. As a person investigating the planner, I want the trace complete and untruncated, so that a hidden cap cannot remove the decisive candidate.
  41. As a person investigating the planner, I want the trace grouped by calculation phase, so that obligations, at-risk placement, preferences, and quality passes remain navigable.
  42. As a person investigating the planner, I want each phase to contain atomic planning decisions, so that the trace reflects actual choices rather than arbitrary calendar-day slices.
  43. As a person investigating joint obligations, I want one atomic decision to support several related dates, so that a multi-date branch is not misrepresented as independent choices.
  44. As a person investigating earned leave, I want entitlement activation and its dependent decisions visible in their real order, so that entitlement chains are explainable.
  45. As a person investigating the planner, I want every actual candidate evaluation nested under its decision, so that accepted and rejected alternatives have the correct context.
  46. As a person investigating the planner, I want pruned or skipped candidates recorded with their reason but without an invented evaluation vector, so that the trace remains exact.
  47. As a person investigating the planner, I want placements later moved or removed retained in the trace, so that the final calendar does not erase earlier decisions.
  48. As a person investigating the planner, I want the applied tie-breaker identified when quality vectors are equal, so that deterministic choices are explainable.
  49. As a person investigating the planner, I want one calendar with an accessible before/after control and highlighted changes, so that I can inspect a mutation without comparing two full annual calendars.
  50. As a person investigating the planner, I want all rejected evaluations collapsed by default but available on demand, so that the complete trace remains navigable.
  51. As a person planning leave, I want first, previous, next, and last controls, so that I can move efficiently through explanation steps.
  52. As a keyboard user, I want the stepper, before/after control, dates, and technical details keyboard-operable, so that the explanation is accessible without a pointer.
  53. As a person who cannot rely on color alone, I want date statuses expressed through text or icons as well as color, so that every status remains distinguishable.
  54. As a screen-reader user, I want selected steps, current dates, status changes, and loading states announced meaningfully, so that the visual explanation has an equivalent interface.
  55. As a person planning leave, I want no automatic playback, so that dense comparisons remain under my control.
  56. As a person planning leave, I want the planning outcome displayed as soon as planning work completes, so that a large trace does not block the useful result.
  57. As a person investigating the planner, I want a separate trace-loading state, so that I know when the complete history is ready.
  58. As a person planning leave, I want only the latest calculation trace retained, so that transient explanation data does not become hidden history.
  59. As a person planning leave, I want the previous trace discarded when a new calculation starts, so that I cannot inspect a trace against the wrong plan.
  60. As a privacy-conscious user, I want traces and counterfactual analyses to remain on my device, so that detailed leave data is never sent to a backend.
  61. As a person planning leave, I want a completed plan explanation even if I never open its trace, so that technical inspection remains optional.
  62. As a person receiving an incomplete calculation, I want the incumbent plan explained, so that completed planning work remains understandable.
  63. As a person receiving an incomplete calculation, I want its trace to end at the actual interruption point and identify uncompleted phases, so that interruption is not mistaken for a completed search.
  64. As a person receiving a planning conflict, I want a concise conflict explanation naming the incompatible obligations and bottleneck, so that I know what must change.
  65. As a person investigating a planning conflict, I want the branches actually explored available in the trace, so that the infeasibility conclusion is inspectable.
  66. As a person with invalid planning input, I want the existing actionable validation reasons rather than an empty calculation trace, so that I can correct the input directly.
  67. As a person planning leave, I want trace capture to preserve the same completed phases and final placements as an unobserved calculation, so that instrumentation is behaviorally inert.
  68. As a person planning leave, I want the planner's deadline reserved for planning work, so that trace overhead cannot cause an earlier incomplete outcome.
  69. As a person investigating a large plan, I accept that the complete trace can finish loading after the planning deadline, so that fidelity is preserved without truncation.
  70. As a person planning leave, I want a trace-loading or counterfactual failure isolated from the planning outcome, so that explanation failure never discards a valid plan.

Implementation Decisions

  • Preserve the current constraint-first, deterministic, lexicographic planner. This feature observes and explains its behavior; it does not replace the heuristic, make candidate search exhaustive, or change a planning outcome.
  • Keep the public planning module as the sole planning seam. Evolve its interface to expose one calculation context containing the immutable submitted snapshot, the planning outcome as soon as it is available, the eventual calculation trace, and on-demand counterfactual analysis. Callers must not know core search state or worker message details.
  • Keep plan explanation, calculation trace, conflict explanation, candidate evaluation, candidate date status, planning decision, and counterfactual date analysis as distinct domain concepts using the root glossary definitions.
  • Freeze all submitted horizon, balance, rule, identity, and human-readable label data with the calculation. Explanations and traces resolve provenance against this snapshot, never against subsequently edited signals or persisted input.
  • Derive the stable plan explanation from the displayed plan, its frozen input, provenance, periods, preferences, remaining balances, and objective comparisons. Do not derive its primary reasons from incidental loop order in the calculation trace.
  • The plan explanation is the default view. It navigates final placements chronologically, keeps the complete final plan rendered, highlights the current placement, lists every contribution, and emphasizes the first decisive planning objective.
  • Use the real planning objective order: obligation validity; unplaced at-risk leave; each preference in user order; public-holiday week value; non-working-day gain; longest work sequence; short work-sequence deficit; supporting placements; balance expiry; then placement date. Never combine these values into a weighted total.
  • Capture the calculation trace inside the original planning run at the shared decision, comparison, pruning, and mutation paths used by every planning phase. Do not add ad hoc tracing independently to each caller or reconstruct a trace from the final plan.
  • Organize trace data as calculation phases containing ordered atomic planning decisions, each containing actual candidate evaluations. Decisions can accept, share, add, move, remove, or reject related placements and can record earned-entitlement activation. A joint-obligation branch can concern multiple dates atomically.
  • Record one immutable initial calculation state plus ordered state deltas and exact comparison facts instead of cloning every full plan for every candidate. The trace must still reconstruct the calendar before and after each accepted mutation and retain every actual evaluation without truncation.
  • Every candidate evaluation records its historical date status, applicable placement or branch identity, feasibility or ineligibility reason, comparator values before and after, deltas, accepted/rejected result, first decisive objective, and exact tie-breaker when one is used.
  • A branch or date excluded without a full comparison is recorded as pruned, not examined, or ineligible with its reason. It does not receive a fabricated historical vector.
  • Capture all actual candidate evaluations, including candidates considered by exhaustive small-plan passes and sampled large-plan passes. Do not change existing sampling merely to make the explanation appear exhaustive.
  • Keep trace data transient and local. Retain only the latest calculation in memory, discard it when a new calculation begins or the page reloads, and do not persist or export it.
  • Separate planning completion from trace readiness. Publish the planning outcome once planning work completes, keep the isolated worker lifecycle long enough to deliver the full trace, and expose a distinct trace-loading or trace-failure state without invalidating the outcome.
  • Exclude trace creation, materialization, and delivery overhead from the planning deadline accounting. This narrows the existing ten-second hard limit to planning work; end-to-end trace delivery may take longer. Slow trace consumption must not alter candidate order, interruption point, incumbent, or final outcome.
  • Keep the worker as the execution adapter for planning, trace capture, and counterfactual analysis so the annual calendar remains responsive. Do not introduce a backend, remote adapter, solver, or new optimization dependency.
  • Counterfactual date analysis is a separate operation on the same planning module seam. Starting it for a selected final placement removes that placement from the final plan and evaluates the same placement on every date of the planning horizon. Starting it from a trace decision uses that decision's exact pre-decision state.
  • Counterfactual analysis changes only the selected placement date. It preserves balance identity, leave type, and placement provenance, recomputes feasibility and the full objective vector, and never writes its result back into the plan or trace.
  • Ineligible counterfactual dates expose reasons and no quality vector. Reasons cover non-working dates, dates outside placement availability or after expiry, occupied or otherwise incompatible dates, type incompatibility, and obligation or rule-pattern invalidity.
  • For atomic multi-placement decisions, show the actual branch evaluations as the faithful calculation explanation. A single-placement counterfactual remains explicitly hypothetical and must not be presented as a substitute for joint branch evaluation.
  • Calculate all horizon counterfactuals lazily when a placement is selected rather than precomputing the placement-by-date matrix for the whole plan. Cancel or ignore stale analysis when selection or calculation version changes.
  • Extend the annual calendar presentation rather than creating a second optimizer screen. Show plan explanation first and expose the calculation trace through an advanced disclosure.
  • In the plan explanation, keep the final calendar stable while changing the selected placement. In the trace, use one calendar with a before/after control and explicit change highlights rather than two annual calendars.
  • Mark every horizon date as chosen, evaluated and rejected, not examined, or ineligible. Counterfactual values are shown separately and never overwrite this historical status. Adjacent non-working dates outside the horizon may appear only as muted period context.
  • A date is focusable through the existing calendar interaction surface. Selecting it reveals its full vector, decisive objective, status, reasons, and technical details. Status cannot rely on color alone.
  • Provide manual first, previous, next, and last navigation with keyboard support. Do not add automatic playback.
  • Reuse the existing translation and visual systems. Default copy uses domain-readable language; exact raw comparator and tie-break information appears only in expandable technical detail.
  • Support Plan, PlanningIncomplete, and PlanningConflict. An incomplete outcome explains its incumbent and exposes the trace only through the interruption point. A conflict shows a concise conflict explanation and the actually explored obligation branches. InvalidInput continues to show validation reasons without a plan explanation or trace.
  • If trace transfer or counterfactual analysis fails, retain the planning outcome and expose a local explanation error. Never convert a valid plan into an incomplete calculation because its explanation failed.
  • ADR 0002 remains in force: all data stays client-side and single-person. ADR 0003 remains in force for the algorithm and planning-work deadline. ADR 0004 owns the separation of explanations and the trace-delivery timing decision.

Testing Decisions

  • Use two high seams and no lower public test seams: the public planning module interface for planning, trace, and counterfactual behavior; and the rendered annual calendar interface for user interaction and accessibility.
  • Planner tests provide complete immutable requests and assert observable calculation context, outcome, trace, and counterfactual results. They do not call or spy on candidate generators, scoring helpers, phase implementations, mutable search state, or raw worker messages.
  • Annual-calendar tests provide a planning-module adapter and assert rendered behavior. Algorithm correctness stays at the planner seam rather than being duplicated in presentation tests.
  • Existing planLeave scenario tests are prior art for the planner seam, including joint obligations, at-risk placement, ordered preferences, public-holiday weeks, supporting placements, earned entitlements, deterministic tie-breaks, incomplete outcomes, and worker deadlines.
  • Existing annual-calendar planning-outcome tests are prior art for presentation integration, stale-result cleanup, incomplete/error handling, and summary rendering.
  • The existing representative and loaded planner benchmarks are prior art for deterministic annual scenarios and planning-work performance.
  • Add a representative successful-plan test that asserts the plan explanation contains the frozen input labels, provenance, all placement contributions, full ordered vector, and first decisive objective.
  • Add a shared-placement test where one date satisfies several rules and contributes to a time-off period, proving that the explanation reports every contribution rather than selecting one arbitrary reason.
  • Add paired lexicographic scenarios where a lower objective improves while a higher objective worsens. Assert that the explanation identifies the higher objective as decisive and never emits a scalar total.
  • Add a trace reconstruction test that applies the initial state and every accepted delta and obtains the exact returned plan, including placements later moved or removed and earned-entitlement activation.
  • Add trace tests for every phase category: joint obligations, at-risk balances, each ordered preference, public-holiday week value, non-working-day gain, longest work sequence, short work-sequence deficit, supporting placements, expiry, and final dates.
  • Add a multi-date obligation test proving that one atomic decision contains its branch dates and actual branch evaluations rather than artificial independent day steps.
  • Add candidate-status tests covering chosen, evaluated and rejected, not examined by large-plan sampling, and ineligible with each supported reason category; separately assert that a pruned branch is recorded as not examined with its pruning reason.
  • Add a comparator test proving that equal metric vectors expose the exact expiry or date tie-breaker.
  • Add an untruncated-trace test with more candidate evaluations than a tempting implementation cap and assert that every actual evaluation remains present.
  • Add an instrumentation-invariance test that compares outcomes and interruption points with trace collection enabled and with a deliberately slow trace consumer. Planning output, completed phases, and incumbent must remain identical.
  • Add a delivery-order test proving that the planning outcome becomes available before a delayed trace finishes and that a later trace failure does not alter the outcome.
  • Add input-snapshot tests that mutate rules, labels, balances, and selection state after calculation starts and assert that the explanation remains bound to the submitted snapshot.
  • Add counterfactual tests proving that analysis removes only the selected placement, preserves balance/type/provenance, covers every horizon date, leaves the plan unchanged, and computes from the final-plan baseline.
  • Add trace-context counterfactual tests proving that the same operation uses the selected decision's pre-decision state rather than the final plan.
  • Add invalid-counterfactual tests for weekends, public holidays, availability, expiry, occupied dates, type constraints, and obligation breakage. Assert a reason and the absence of a fabricated vector.
  • Add an actual-versus-hypothetical test proving that a previously non-examined date retains that historical status after receiving a counterfactual result.
  • Add stale-work tests proving that a new placement selection cancels or ignores the prior counterfactual result and that a new calculation discards the previous trace.
  • Add PlanningIncomplete tests asserting that the incumbent receives a plan explanation, the trace ends at the interruption point, and later phases are explicitly uncompleted.
  • Add PlanningConflict tests asserting a concise conflict explanation plus the complete set of actually explored branch events. Do not assert a fake plan or counterfactual date matrix.
  • Keep InvalidInput tests at the planner seam and assert that no plan explanation or calculation trace is offered.
  • Add annual-calendar tests for default plan explanation, advanced trace disclosure, chronological placement navigation, final-plan highlighting, before/after trace state, collapsed candidate details, and trace-loading/error states.
  • Add keyboard tests for first/previous/next/last controls, date focus and activation, before/after switching, and expandable technical details.
  • Add accessibility assertions for current-step semantics, accessible names, focus retention, live loading/error announcements, and text or icon equivalents for every color-coded status. Reuse existing test tooling; do not add a dependency solely for these assertions.
  • Add boundary presentation tests for a horizon crossing two years and muted adjacent non-working dates outside each horizon edge.
  • Extend the loaded annual benchmark to record planning-work time separately from trace materialization and transfer. The planning outcome and planning-work deadline remain the release gate; trace completion is measured but has no truncation or ten-second requirement.
  • Run the existing lint, type-check, unit-test, benchmark, and production-build checks. No new test framework, solver, persistence adapter, or backend fixture is required.

Out of Scope

  • Changing the planner's constraint-first lexicographic objective order, candidate ordering, large-plan sampling, or final placements.
  • Producing a weighted or normalized scalar score for a date.
  • A scalar score heatmap or any visual ranking that implies lower objectives can compensate for higher ones.
  • Claiming mathematical global optimality or adding a generic solver.
  • Reoptimizing the entire plan for every counterfactual date.
  • Changing a selected placement's balance, leave type, or provenance during counterfactual analysis.
  • Treating non-examined dates as historically evaluated.
  • Evaluating dates outside the planning horizon; adjacent dates are context only.
  • Persisting traces across page reloads, retaining several calculations, comparing historical traces, or exporting/importing traces.
  • A backend, account synchronization, employer integration, or multi-person collaboration.
  • Automatic playback or animation of the stepper.
  • Manual editing, locking, or accepting individual generated placements from the explanation view.
  • Replacing existing validation feedback with calculation traces for malformed input.
  • Redesigning planning rules, balances, horizon selection, or the optimizer outside the interfaces needed for explanation.
  • A fixed end-to-end completion deadline for trace delivery or counterfactual analysis; both remain local, cancellable background work.

Further Notes

  • This spec explains the planner delivered by #11 and uses the current versioned objective order, including public-holiday week value before non-working-day gain.
  • ADR 0002 keeps calculation and explanation private and client-side. ADR 0003 defines the deterministic constraint-first planner and its planning-work budget. ADR 0004 records the stable-explanation/original-trace/counterfactual separation and explicitly allows trace delivery to outlive the planning deadline.
  • “Exact trace” means every decision, actual candidate evaluation, mutation, and explicit pruning event from the original run. It does not mean assigning an after-the-fact historical score to dates the heuristic never examined.
  • “Every date” means every date in the actual planning horizon. Ineligible dates receive reasons, actual candidates retain historical statuses, and otherwise unexamined eligible dates can receive clearly labeled counterfactual results.
  • The accepted cost of an exact untruncated trace is additional transient memory and wall-clock time. Keeping only the latest trace and recording state deltas rather than full clones bounds avoidable overhead without weakening fidelity.
  • The confirmed testing seams are the public planning module interface and the rendered annual calendar interface. No new seam exists solely to expose private algorithm functions to tests.
## Problem Statement The person planning leave receives a deterministic leave plan but cannot see why each leave placement ended on its final date or how competing dates compared. The annual calendar currently exposes only a few aggregate metrics and a final highlight, even though a placement may protect an at-risk balance, satisfy several planning rules, complete a public-holiday week, capture non-working days, or improve work sequences. The planner also does not produce one intrinsic numeric score per date. It resolves joint obligations, protects at-risk leave, satisfies ordered preferences, and transforms complete plans through lexicographic quality phases. Placements may be shared, moved, supported, or removed later. Pretending that every calendar date received one scalar score, or reconstructing an apparent history after the calculation, would therefore misrepresent the actual algorithm. The person needs two deliberately separate explanations: a stable plan explanation for the displayed result and the complete calculation trace from the exact run that produced it. They also need an explicitly hypothetical counterfactual date analysis for dates the heuristic did not necessarily examine, without changing the planning outcome, hiding ineligible dates, or confusing hypothetical results with trace history. ## Solution Add an explanation area to the annual calendar with the plan explanation shown by default and an advanced control for the calculation trace. The plan explanation navigates final leave placements chronologically while keeping the complete final plan visible. For the selected placement it shows placement provenance, every contribution to the plan, the first planning objective that made the placement decisive, and the full lexicographic comparison rather than a synthetic scalar score. Selecting a placement starts an on-demand counterfactual date analysis across the planning horizon. This analysis changes only that placement's date, preserves its leave balance, leave type, and provenance, and clearly identifies itself as hypothetical. The calculation trace is captured during the original planning run, never reconstructed by replay. It is complete, ordered, and untruncated, organized as calculation phase, atomic planning decision, then actual candidate evaluations. It includes placements later moved or removed, multi-date joint decisions, before/after state, rejected candidates, comparator values, and the decisive objective or tie-break. Every date is visibly classified as chosen, evaluated and rejected, not examined, or ineligible with a reason. Tracing and explanation remain observational. They cannot alter candidate order, completed phases, deadline behavior, or the planning outcome. The planner's existing deadline applies to planning work; trace instrumentation and delivery are excluded from it. The outcome may therefore be displayed before the latest run's complete in-memory trace finishes loading. ## User Stories 1. As a person planning leave, I want an explanation of the displayed plan, so that I can understand why its placements are useful. 2. As a person planning leave, I want the plan explanation displayed before technical details, so that ordinary use remains approachable. 3. As a person planning leave, I want a separate advanced calculation trace, so that I can inspect the exact algorithm without confusing it with the final explanation. 4. As a person planning leave, I want the explanation to use the exact inputs submitted for that calculation, so that later edits do not rewrite history. 5. As a person planning leave, I want the planning outcome to remain identical whether or not I open its explanation, so that observability never changes my plan. 6. As a person planning leave, I want all dates in the actual planning horizon represented, so that a horizon crossing two calendar years is explained completely. 7. As a person planning leave, I want adjacent non-working dates outside the horizon shown as muted context when they contribute to a time-off period, so that boundary gains remain understandable. 8. As a person planning leave, I want dates outside the horizon excluded from candidate analysis, so that contextual dates are not mistaken for placeable dates. 9. As a person planning leave, I want one explanation step per final leave placement, so that I can examine the result day by day. 10. As a person planning leave, I want final placements ordered chronologically, so that navigation follows the calendar rather than private search order. 11. As a person planning leave, I want the complete final plan to remain visible while one placement is selected, so that its contribution is explained in context. 12. As a person planning leave, I want the selected placement highlighted clearly, so that I can locate it in the annual calendar. 13. As a person planning leave, I want each placement to identify its consumed leave entitlement, so that I know which balance funded it. 14. As a person planning leave, I want each placement to identify every planning rule it satisfies, so that shared rule satisfaction is visible. 15. As a person planning leave, I want supporting placements identified, so that optional use of deferred leave is explicit. 16. As a person planning leave, I want every contribution of a placement listed, so that a placement with several purposes is not reduced to one arbitrary reason. 17. As a person planning leave, I want the first decisive planning objective highlighted, so that I know which difference actually selected the date. 18. As a person planning leave, I want the ordered preference results included in comparisons, so that preference priority is visible. 19. As a person planning leave, I want public-holiday week value included in comparisons, so that completed holiday weeks are explained before broader calendar gain. 20. As a person planning leave, I want non-working-day gain included in comparisons, so that bridges to weekends and public holidays are visible. 21. As a person planning leave, I want longest and short work-sequence effects included in comparisons, so that spacing improvements are visible. 22. As a person planning leave, I want supporting-placement, balance-expiry, and earliest-date tie-breaks included, so that equal higher-priority plans are explainable. 23. As a person planning leave, I want the real lexicographic vector instead of one numeric total, so that a lower objective never appears to compensate for a higher one. 24. As a person planning leave, I want before, after, and delta values for a comparison, so that the effect of a candidate is concrete. 25. As a person planning leave, I want domain-readable labels by default, so that implementation vocabulary does not obstruct understanding. 26. As a person investigating the planner, I want exact technical comparator details available on expansion, so that no decision is hidden behind prose. 27. As a person planning leave, I want each horizon date marked as chosen, evaluated and rejected, not examined, or ineligible, so that its historical relationship to the decision is truthful. 28. As a person planning leave, I want every ineligible date accompanied by its reason, so that weekends, public holidays, occupied dates, availability, expiry, type, and rule constraints are distinguishable. 29. As a person planning leave, I want a non-examined date described as non-examined rather than rejected, so that heuristic sampling is not rewritten as exhaustive search. 30. As a person planning leave, I want an actual candidate evaluation visibly distinguished from a counterfactual date analysis, so that history and hypothesis cannot be confused. 31. As a person planning leave, I want counterfactual results calculated for all horizon dates when I select a placement, so that I can compare its alternatives across the year. 32. As a person planning leave, I want the final-plan counterfactual analysis based on the final plan without the selected placement, so that it answers why the placement remains on that date. 33. As a person inspecting a trace decision, I want counterfactual analysis based on the exact state before that decision, so that it answers why the candidate was selected at that moment. 34. As a person planning leave, I want counterfactual analysis to change only the selected placement's date, so that the comparison does not silently re-optimize unrelated placements. 35. As a person planning leave, I want counterfactual analysis to preserve the selected balance, leave type, and provenance, so that every date compares the same placement. 36. As a person planning leave, I want a counterfactual date that breaks an obligation or cannot host the placement marked ineligible rather than assigned a fake worst score, so that validity remains absolute. 37. As a person planning leave, I want counterfactual analysis never to mutate the displayed plan, so that exploration is safe. 38. As a person planning leave, I want stale counterfactual work discarded when I select another placement or start another calculation, so that results never cross calculation contexts. 39. As a person investigating the planner, I want the trace captured from the original calculation, so that it is evidence of what actually happened rather than a later simulation. 40. As a person investigating the planner, I want the trace complete and untruncated, so that a hidden cap cannot remove the decisive candidate. 41. As a person investigating the planner, I want the trace grouped by calculation phase, so that obligations, at-risk placement, preferences, and quality passes remain navigable. 42. As a person investigating the planner, I want each phase to contain atomic planning decisions, so that the trace reflects actual choices rather than arbitrary calendar-day slices. 43. As a person investigating joint obligations, I want one atomic decision to support several related dates, so that a multi-date branch is not misrepresented as independent choices. 44. As a person investigating earned leave, I want entitlement activation and its dependent decisions visible in their real order, so that entitlement chains are explainable. 45. As a person investigating the planner, I want every actual candidate evaluation nested under its decision, so that accepted and rejected alternatives have the correct context. 46. As a person investigating the planner, I want pruned or skipped candidates recorded with their reason but without an invented evaluation vector, so that the trace remains exact. 47. As a person investigating the planner, I want placements later moved or removed retained in the trace, so that the final calendar does not erase earlier decisions. 48. As a person investigating the planner, I want the applied tie-breaker identified when quality vectors are equal, so that deterministic choices are explainable. 49. As a person investigating the planner, I want one calendar with an accessible before/after control and highlighted changes, so that I can inspect a mutation without comparing two full annual calendars. 50. As a person investigating the planner, I want all rejected evaluations collapsed by default but available on demand, so that the complete trace remains navigable. 51. As a person planning leave, I want first, previous, next, and last controls, so that I can move efficiently through explanation steps. 52. As a keyboard user, I want the stepper, before/after control, dates, and technical details keyboard-operable, so that the explanation is accessible without a pointer. 53. As a person who cannot rely on color alone, I want date statuses expressed through text or icons as well as color, so that every status remains distinguishable. 54. As a screen-reader user, I want selected steps, current dates, status changes, and loading states announced meaningfully, so that the visual explanation has an equivalent interface. 55. As a person planning leave, I want no automatic playback, so that dense comparisons remain under my control. 56. As a person planning leave, I want the planning outcome displayed as soon as planning work completes, so that a large trace does not block the useful result. 57. As a person investigating the planner, I want a separate trace-loading state, so that I know when the complete history is ready. 58. As a person planning leave, I want only the latest calculation trace retained, so that transient explanation data does not become hidden history. 59. As a person planning leave, I want the previous trace discarded when a new calculation starts, so that I cannot inspect a trace against the wrong plan. 60. As a privacy-conscious user, I want traces and counterfactual analyses to remain on my device, so that detailed leave data is never sent to a backend. 61. As a person planning leave, I want a completed plan explanation even if I never open its trace, so that technical inspection remains optional. 62. As a person receiving an incomplete calculation, I want the incumbent plan explained, so that completed planning work remains understandable. 63. As a person receiving an incomplete calculation, I want its trace to end at the actual interruption point and identify uncompleted phases, so that interruption is not mistaken for a completed search. 64. As a person receiving a planning conflict, I want a concise conflict explanation naming the incompatible obligations and bottleneck, so that I know what must change. 65. As a person investigating a planning conflict, I want the branches actually explored available in the trace, so that the infeasibility conclusion is inspectable. 66. As a person with invalid planning input, I want the existing actionable validation reasons rather than an empty calculation trace, so that I can correct the input directly. 67. As a person planning leave, I want trace capture to preserve the same completed phases and final placements as an unobserved calculation, so that instrumentation is behaviorally inert. 68. As a person planning leave, I want the planner's deadline reserved for planning work, so that trace overhead cannot cause an earlier incomplete outcome. 69. As a person investigating a large plan, I accept that the complete trace can finish loading after the planning deadline, so that fidelity is preserved without truncation. 70. As a person planning leave, I want a trace-loading or counterfactual failure isolated from the planning outcome, so that explanation failure never discards a valid plan. ## Implementation Decisions - Preserve the current constraint-first, deterministic, lexicographic planner. This feature observes and explains its behavior; it does not replace the heuristic, make candidate search exhaustive, or change a planning outcome. - Keep the public planning module as the sole planning seam. Evolve its interface to expose one calculation context containing the immutable submitted snapshot, the planning outcome as soon as it is available, the eventual calculation trace, and on-demand counterfactual analysis. Callers must not know core search state or worker message details. - Keep plan explanation, calculation trace, conflict explanation, candidate evaluation, candidate date status, planning decision, and counterfactual date analysis as distinct domain concepts using the root glossary definitions. - Freeze all submitted horizon, balance, rule, identity, and human-readable label data with the calculation. Explanations and traces resolve provenance against this snapshot, never against subsequently edited signals or persisted input. - Derive the stable plan explanation from the displayed plan, its frozen input, provenance, periods, preferences, remaining balances, and objective comparisons. Do not derive its primary reasons from incidental loop order in the calculation trace. - The plan explanation is the default view. It navigates final placements chronologically, keeps the complete final plan rendered, highlights the current placement, lists every contribution, and emphasizes the first decisive planning objective. - Use the real planning objective order: obligation validity; unplaced at-risk leave; each preference in user order; public-holiday week value; non-working-day gain; longest work sequence; short work-sequence deficit; supporting placements; balance expiry; then placement date. Never combine these values into a weighted total. - Capture the calculation trace inside the original planning run at the shared decision, comparison, pruning, and mutation paths used by every planning phase. Do not add ad hoc tracing independently to each caller or reconstruct a trace from the final plan. - Organize trace data as calculation phases containing ordered atomic planning decisions, each containing actual candidate evaluations. Decisions can accept, share, add, move, remove, or reject related placements and can record earned-entitlement activation. A joint-obligation branch can concern multiple dates atomically. - Record one immutable initial calculation state plus ordered state deltas and exact comparison facts instead of cloning every full plan for every candidate. The trace must still reconstruct the calendar before and after each accepted mutation and retain every actual evaluation without truncation. - Every candidate evaluation records its historical date status, applicable placement or branch identity, feasibility or ineligibility reason, comparator values before and after, deltas, accepted/rejected result, first decisive objective, and exact tie-breaker when one is used. - A branch or date excluded without a full comparison is recorded as pruned, not examined, or ineligible with its reason. It does not receive a fabricated historical vector. - Capture all actual candidate evaluations, including candidates considered by exhaustive small-plan passes and sampled large-plan passes. Do not change existing sampling merely to make the explanation appear exhaustive. - Keep trace data transient and local. Retain only the latest calculation in memory, discard it when a new calculation begins or the page reloads, and do not persist or export it. - Separate planning completion from trace readiness. Publish the planning outcome once planning work completes, keep the isolated worker lifecycle long enough to deliver the full trace, and expose a distinct trace-loading or trace-failure state without invalidating the outcome. - Exclude trace creation, materialization, and delivery overhead from the planning deadline accounting. This narrows the existing ten-second hard limit to planning work; end-to-end trace delivery may take longer. Slow trace consumption must not alter candidate order, interruption point, incumbent, or final outcome. - Keep the worker as the execution adapter for planning, trace capture, and counterfactual analysis so the annual calendar remains responsive. Do not introduce a backend, remote adapter, solver, or new optimization dependency. - Counterfactual date analysis is a separate operation on the same planning module seam. Starting it for a selected final placement removes that placement from the final plan and evaluates the same placement on every date of the planning horizon. Starting it from a trace decision uses that decision's exact pre-decision state. - Counterfactual analysis changes only the selected placement date. It preserves balance identity, leave type, and placement provenance, recomputes feasibility and the full objective vector, and never writes its result back into the plan or trace. - Ineligible counterfactual dates expose reasons and no quality vector. Reasons cover non-working dates, dates outside placement availability or after expiry, occupied or otherwise incompatible dates, type incompatibility, and obligation or rule-pattern invalidity. - For atomic multi-placement decisions, show the actual branch evaluations as the faithful calculation explanation. A single-placement counterfactual remains explicitly hypothetical and must not be presented as a substitute for joint branch evaluation. - Calculate all horizon counterfactuals lazily when a placement is selected rather than precomputing the placement-by-date matrix for the whole plan. Cancel or ignore stale analysis when selection or calculation version changes. - Extend the annual calendar presentation rather than creating a second optimizer screen. Show plan explanation first and expose the calculation trace through an advanced disclosure. - In the plan explanation, keep the final calendar stable while changing the selected placement. In the trace, use one calendar with a before/after control and explicit change highlights rather than two annual calendars. - Mark every horizon date as chosen, evaluated and rejected, not examined, or ineligible. Counterfactual values are shown separately and never overwrite this historical status. Adjacent non-working dates outside the horizon may appear only as muted period context. - A date is focusable through the existing calendar interaction surface. Selecting it reveals its full vector, decisive objective, status, reasons, and technical details. Status cannot rely on color alone. - Provide manual first, previous, next, and last navigation with keyboard support. Do not add automatic playback. - Reuse the existing translation and visual systems. Default copy uses domain-readable language; exact raw comparator and tie-break information appears only in expandable technical detail. - Support `Plan`, `PlanningIncomplete`, and `PlanningConflict`. An incomplete outcome explains its incumbent and exposes the trace only through the interruption point. A conflict shows a concise conflict explanation and the actually explored obligation branches. `InvalidInput` continues to show validation reasons without a plan explanation or trace. - If trace transfer or counterfactual analysis fails, retain the planning outcome and expose a local explanation error. Never convert a valid plan into an incomplete calculation because its explanation failed. - ADR 0002 remains in force: all data stays client-side and single-person. ADR 0003 remains in force for the algorithm and planning-work deadline. ADR 0004 owns the separation of explanations and the trace-delivery timing decision. ## Testing Decisions - Use two high seams and no lower public test seams: the public planning module interface for planning, trace, and counterfactual behavior; and the rendered annual calendar interface for user interaction and accessibility. - Planner tests provide complete immutable requests and assert observable calculation context, outcome, trace, and counterfactual results. They do not call or spy on candidate generators, scoring helpers, phase implementations, mutable search state, or raw worker messages. - Annual-calendar tests provide a planning-module adapter and assert rendered behavior. Algorithm correctness stays at the planner seam rather than being duplicated in presentation tests. - Existing `planLeave` scenario tests are prior art for the planner seam, including joint obligations, at-risk placement, ordered preferences, public-holiday weeks, supporting placements, earned entitlements, deterministic tie-breaks, incomplete outcomes, and worker deadlines. - Existing annual-calendar planning-outcome tests are prior art for presentation integration, stale-result cleanup, incomplete/error handling, and summary rendering. - The existing representative and loaded planner benchmarks are prior art for deterministic annual scenarios and planning-work performance. - Add a representative successful-plan test that asserts the plan explanation contains the frozen input labels, provenance, all placement contributions, full ordered vector, and first decisive objective. - Add a shared-placement test where one date satisfies several rules and contributes to a time-off period, proving that the explanation reports every contribution rather than selecting one arbitrary reason. - Add paired lexicographic scenarios where a lower objective improves while a higher objective worsens. Assert that the explanation identifies the higher objective as decisive and never emits a scalar total. - Add a trace reconstruction test that applies the initial state and every accepted delta and obtains the exact returned plan, including placements later moved or removed and earned-entitlement activation. - Add trace tests for every phase category: joint obligations, at-risk balances, each ordered preference, public-holiday week value, non-working-day gain, longest work sequence, short work-sequence deficit, supporting placements, expiry, and final dates. - Add a multi-date obligation test proving that one atomic decision contains its branch dates and actual branch evaluations rather than artificial independent day steps. - Add candidate-status tests covering chosen, evaluated and rejected, not examined by large-plan sampling, and ineligible with each supported reason category; separately assert that a pruned branch is recorded as not examined with its pruning reason. - Add a comparator test proving that equal metric vectors expose the exact expiry or date tie-breaker. - Add an untruncated-trace test with more candidate evaluations than a tempting implementation cap and assert that every actual evaluation remains present. - Add an instrumentation-invariance test that compares outcomes and interruption points with trace collection enabled and with a deliberately slow trace consumer. Planning output, completed phases, and incumbent must remain identical. - Add a delivery-order test proving that the planning outcome becomes available before a delayed trace finishes and that a later trace failure does not alter the outcome. - Add input-snapshot tests that mutate rules, labels, balances, and selection state after calculation starts and assert that the explanation remains bound to the submitted snapshot. - Add counterfactual tests proving that analysis removes only the selected placement, preserves balance/type/provenance, covers every horizon date, leaves the plan unchanged, and computes from the final-plan baseline. - Add trace-context counterfactual tests proving that the same operation uses the selected decision's pre-decision state rather than the final plan. - Add invalid-counterfactual tests for weekends, public holidays, availability, expiry, occupied dates, type constraints, and obligation breakage. Assert a reason and the absence of a fabricated vector. - Add an actual-versus-hypothetical test proving that a previously non-examined date retains that historical status after receiving a counterfactual result. - Add stale-work tests proving that a new placement selection cancels or ignores the prior counterfactual result and that a new calculation discards the previous trace. - Add `PlanningIncomplete` tests asserting that the incumbent receives a plan explanation, the trace ends at the interruption point, and later phases are explicitly uncompleted. - Add `PlanningConflict` tests asserting a concise conflict explanation plus the complete set of actually explored branch events. Do not assert a fake plan or counterfactual date matrix. - Keep `InvalidInput` tests at the planner seam and assert that no plan explanation or calculation trace is offered. - Add annual-calendar tests for default plan explanation, advanced trace disclosure, chronological placement navigation, final-plan highlighting, before/after trace state, collapsed candidate details, and trace-loading/error states. - Add keyboard tests for first/previous/next/last controls, date focus and activation, before/after switching, and expandable technical details. - Add accessibility assertions for current-step semantics, accessible names, focus retention, live loading/error announcements, and text or icon equivalents for every color-coded status. Reuse existing test tooling; do not add a dependency solely for these assertions. - Add boundary presentation tests for a horizon crossing two years and muted adjacent non-working dates outside each horizon edge. - Extend the loaded annual benchmark to record planning-work time separately from trace materialization and transfer. The planning outcome and planning-work deadline remain the release gate; trace completion is measured but has no truncation or ten-second requirement. - Run the existing lint, type-check, unit-test, benchmark, and production-build checks. No new test framework, solver, persistence adapter, or backend fixture is required. ## Out of Scope - Changing the planner's constraint-first lexicographic objective order, candidate ordering, large-plan sampling, or final placements. - Producing a weighted or normalized scalar score for a date. - A scalar score heatmap or any visual ranking that implies lower objectives can compensate for higher ones. - Claiming mathematical global optimality or adding a generic solver. - Reoptimizing the entire plan for every counterfactual date. - Changing a selected placement's balance, leave type, or provenance during counterfactual analysis. - Treating non-examined dates as historically evaluated. - Evaluating dates outside the planning horizon; adjacent dates are context only. - Persisting traces across page reloads, retaining several calculations, comparing historical traces, or exporting/importing traces. - A backend, account synchronization, employer integration, or multi-person collaboration. - Automatic playback or animation of the stepper. - Manual editing, locking, or accepting individual generated placements from the explanation view. - Replacing existing validation feedback with calculation traces for malformed input. - Redesigning planning rules, balances, horizon selection, or the optimizer outside the interfaces needed for explanation. - A fixed end-to-end completion deadline for trace delivery or counterfactual analysis; both remain local, cancellable background work. ## Further Notes - This spec explains the planner delivered by #11 and uses the current versioned objective order, including public-holiday week value before non-working-day gain. - ADR 0002 keeps calculation and explanation private and client-side. ADR 0003 defines the deterministic constraint-first planner and its planning-work budget. ADR 0004 records the stable-explanation/original-trace/counterfactual separation and explicitly allows trace delivery to outlive the planning deadline. - “Exact trace” means every decision, actual candidate evaluation, mutation, and explicit pruning event from the original run. It does not mean assigning an after-the-fact historical score to dates the heuristic never examined. - “Every date” means every date in the actual planning horizon. Ineligible dates receive reasons, actual candidates retain historical statuses, and otherwise unexamined eligible dates can receive clearly labeled counterfactual results. - The accepted cost of an exact untruncated trace is additional transient memory and wall-clock time. Keeping only the latest trace and recording state deltas rather than full clones bounds avoidable overhead without weakening fidelity. - The confirmed testing seams are the public planning module interface and the rendered annual calendar interface. No new seam exists solely to expose private algorithm functions to tests.
nessar commented 2026-08-30 20:05:19 +02:00 (Migrated from 172.24.0.1:8928)

changed the description

changed the description
nessar commented 2026-08-30 20:20:15 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #47

mentioned in issue #47
nessar commented 2026-08-30 20:20:15 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #48

mentioned in issue #48
nessar commented 2026-08-30 20:20:16 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #49

mentioned in issue #49
nessar commented 2026-08-30 20:20:16 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #50

mentioned in issue #50
nessar commented 2026-08-30 20:20:17 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #51

mentioned in issue #51
nessar commented 2026-08-30 20:20:17 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #52

mentioned in issue #52
nessar commented 2026-08-30 20:20:18 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #53

mentioned in issue #53
nessar commented 2026-08-30 20:20:18 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #54

mentioned in issue #54
nessar commented 2026-08-30 20:20:19 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #55

mentioned in issue #55
nessar commented 2026-10-02 14:54:32 +02:00 (Migrated from 172.24.0.1:8928)

Completion audit — 2026-10-02

The calculation context, stable explanation, original trace and counterfactual operations are substantially implemented, but this parent is not complete: see remaining gaps on #47–55, especially the published loaded trace-delivery UI pause. Local commit 51978f7 adds explanation/trace repairs and is not present on published main; further UI edits are uncommitted. Do not treat those changes as shipped or extend the earlier #43/#45 release exceptions to this issue.

Evidence: reviewed issue requirements/discussions and f1f0835 (published application source; live main 57a39c81 only adds Renovate configuration). Tested an isolated checkout of the published source: 20 test files, 157/157 tests passed, including the five benchmark scenarios. Local commit 51978f7 and uncommitted edits were inspected separately and are not evidence of published completion.

Completion audit — 2026-10-02 The calculation context, stable explanation, original trace and counterfactual operations are substantially implemented, but this parent is not complete: see remaining gaps on #47–55, especially the published loaded trace-delivery UI pause. Local commit 51978f7 adds explanation/trace repairs and is not present on published main; further UI edits are uncommitted. Do not treat those changes as shipped or extend the earlier #43/#45 release exceptions to this issue. Evidence: reviewed issue requirements/discussions and f1f0835 (published application source; live main 57a39c81 only adds Renovate configuration). Tested an isolated checkout of the published source: 20 test files, 157/157 tests passed, including the five benchmark scenarios. Local commit 51978f7 and uncommitted edits were inspected separately and are not evidence of published completion.
nessar commented 2026-10-02 15:05:32 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in commit c9dbe82b79

mentioned in commit c9dbe82b79ec7e030c2ef14b824aad1b7a04105f
nessar commented 2026-10-03 16:23:32 +02:00 (Migrated from 172.24.0.1:8928)

Completed the blocker work with $luna-verified-implement and independent verification. Child issues #47, #48, #49, #50, #51, #52, #53, #54, and #55 are now closed with implementation and validation notes.

The completed flow includes stable default plan explanations; worker counterfactual analysis; exact original obligation, risk, preference, and quality traces; before/after calendar replay; historical eligibility separate from hypothetical results; incomplete/checkpoint recovery; domain conflict explanations; keyboard/focus/accessibility support; and bounded acknowledged trace delivery under load.

Final validation: 201 tests across 23 files pass, along with application/specification type checks, ESLint, and production build. All five benchmark scenarios preserve their pre-change outcomes; all recorded repetitions are deterministic. Each loaded run retains every one of 868,919 trace candidate records and returns 144 placements, with planning work below ten seconds. Final browser runs complete without errors or crashes. Loaded rendered calendar, counterfactual comparison, keyboard/focus restoration, and supported responsive widths pass.

Independent Spec review found no outstanding confirmed violation. Standards review found no hard violation and three nonblocking duplication judgments (branch replay traversal, context preparation, and historical status aggregation). Benchmark numbers, residual pauses, memory cost, desktop-emulation limits, and build warnings are documented in docs/benchmark/README.md.

Implementation remains in the local working tree based on 0ce33cc9d6fe7381965a9162571abe205d0b7350; no commit or push was requested.

Completed the blocker work with $luna-verified-implement and independent verification. Child issues #47, #48, #49, #50, #51, #52, #53, #54, and #55 are now closed with implementation and validation notes. The completed flow includes stable default plan explanations; worker counterfactual analysis; exact original obligation, risk, preference, and quality traces; before/after calendar replay; historical eligibility separate from hypothetical results; incomplete/checkpoint recovery; domain conflict explanations; keyboard/focus/accessibility support; and bounded acknowledged trace delivery under load. Final validation: 201 tests across 23 files pass, along with application/specification type checks, ESLint, and production build. All five benchmark scenarios preserve their pre-change outcomes; all recorded repetitions are deterministic. Each loaded run retains every one of 868,919 trace candidate records and returns 144 placements, with planning work below ten seconds. Final browser runs complete without errors or crashes. Loaded rendered calendar, counterfactual comparison, keyboard/focus restoration, and supported responsive widths pass. Independent Spec review found no outstanding confirmed violation. Standards review found no hard violation and three nonblocking duplication judgments (branch replay traversal, context preparation, and historical status aggregation). Benchmark numbers, residual pauses, memory cost, desktop-emulation limits, and build warnings are documented in docs/benchmark/README.md. Implementation remains in the local working tree based on 0ce33cc9d6fe7381965a9162571abe205d0b7350; no commit or push was requested.
nessar (Migrated from 172.24.0.1:8928) closed this issue 2026-10-03 16:23:33 +02:00
nessar commented 2026-10-03 17:40:48 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in commit 01c87d1e44

mentioned in commit 01c87d1e44eb54a9a44cfa5ea575254bb925a767

Preserved GitLab #46 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 0; visible source notes: 14.

gitlab-35-issue-46.md (SHA-256 1962900a03f27380893bfdc7ce5b2d489f9f043a05486a532ee3200ed519a2ea)

gitlab-35-issue-46.json (SHA-256 3a520390f0279064732155c858d672e3924985cf1fd7eb976b064f4ad902d777)

Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.

<!-- gitlab-to-gitea-history:35:Issue:46 --> Preserved GitLab #46 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 0; visible source notes: 14. [gitlab-35-issue-46.md](https://gitea.nessar.fr/attachments/2852559e-eadf-4f6d-a0a8-37b39713eff1) (SHA-256 `1962900a03f27380893bfdc7ce5b2d489f9f043a05486a532ee3200ed519a2ea`) [gitlab-35-issue-46.json](https://gitea.nessar.fr/attachments/1bd751a5-b2c5-4240-870b-5602a6934e8b) (SHA-256 `3a520390f0279064732155c858d672e3924985cf1fd7eb976b064f4ad902d777`) Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.
gitea-emergency added this to the Development project 2026-10-11 22:14:32 +02:00
gitea-emergency moved this to Closed in Development on 2026-10-11 22:14:32 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nessar/vac-optimizer#46