Comparer un placement final sur tout l’horizon #48

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

Parent

#46

What to build

Let the person selecting a final leave placement compare that same placement across every date in the planning horizon. The counterfactual date analysis starts from the final plan without the selected placement, preserves its leave balance, leave type, and placement provenance, and shows feasibility plus the real lexicographic before/after/delta vector for each date without changing the plan.

Acceptance criteria

  • Selecting a final placement starts counterfactual analysis lazily for every date in the actual planning horizon.
  • The analysis removes only the selected placement from the final-plan baseline and preserves its balance identity, leave type, and provenance.
  • No unrelated placement is reoptimized or mutated.
  • Every eligible date exposes the ordered objective vector before, after, and as a delta, with the first decisive objective highlighted.
  • Obligation validity, at-risk leave, ordered preferences, public-holiday week value, non-working-day gain, work sequences, supporting placements, expiry, and date tie-breaks retain their real priority order.
  • Ineligible dates expose a reason and no fabricated quality vector.
  • Reasons distinguish non-working, occupied, unavailable, expired, type-incompatible, and rule-invalid dates.
  • Adjacent non-working dates outside the horizon may appear as muted time-off-period context but are never evaluated.
  • Counterfactual results are visibly hypothetical and do not overwrite the displayed plan or any historical date status.
  • Selecting another placement or starting another calculation cancels or ignores stale analysis.
  • Analysis runs away from the UI thread through the existing public planning module seam.
  • Public planner and annual-calendar tests cover valid, worse, tied, and ineligible alternatives without testing private comparison helpers.

Blocked by

  • #47 — Afficher l’explication stable d’un placement final
## Parent #46 ## What to build Let the person selecting a final leave placement compare that same placement across every date in the planning horizon. The counterfactual date analysis starts from the final plan without the selected placement, preserves its leave balance, leave type, and placement provenance, and shows feasibility plus the real lexicographic before/after/delta vector for each date without changing the plan. ## Acceptance criteria - [ ] Selecting a final placement starts counterfactual analysis lazily for every date in the actual planning horizon. - [ ] The analysis removes only the selected placement from the final-plan baseline and preserves its balance identity, leave type, and provenance. - [ ] No unrelated placement is reoptimized or mutated. - [ ] Every eligible date exposes the ordered objective vector before, after, and as a delta, with the first decisive objective highlighted. - [ ] Obligation validity, at-risk leave, ordered preferences, public-holiday week value, non-working-day gain, work sequences, supporting placements, expiry, and date tie-breaks retain their real priority order. - [ ] Ineligible dates expose a reason and no fabricated quality vector. - [ ] Reasons distinguish non-working, occupied, unavailable, expired, type-incompatible, and rule-invalid dates. - [ ] Adjacent non-working dates outside the horizon may appear as muted time-off-period context but are never evaluated. - [ ] Counterfactual results are visibly hypothetical and do not overwrite the displayed plan or any historical date status. - [ ] Selecting another placement or starting another calculation cancels or ignores stale analysis. - [ ] Analysis runs away from the UI thread through the existing public planning module seam. - [ ] Public planner and annual-calendar tests cover valid, worse, tied, and ineligible alternatives without testing private comparison helpers. ## Blocked by - #47 — Afficher l’explication stable d’un placement final
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-10-02 14:54:31 +02:00 (Migrated from 172.24.0.1:8928)

Completion audit — 2026-10-02

Full-horizon hypothetical comparison exists, but published counterfactualRuleValid does not preserve every mandatory IF_THEN occurrence when moving a placement. Local commit 51978f7 adds counterfactualObligationsValid and regression coverage for this case; that repair is not on published main. Verify all obligation and provenance invariants before closure.

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 Full-horizon hypothetical comparison exists, but published counterfactualRuleValid does not preserve every mandatory IF_THEN occurrence when moving a placement. Local commit 51978f7 adds counterfactualObligationsValid and regression coverage for this case; that repair is not on published main. Verify all obligation and provenance invariants before closure. 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-03 15:17:25 +02:00 (Migrated from 172.24.0.1:8928)

Implemented with $luna-verified-implement and independently verified.

On-demand worker counterfactuals cover the full half-open horizon, preserve balance/type/provenance, reject infeasible earned-entitlement alternatives, and keep results separate from the plan and original trace.

Validation: 198/198 tests across 23 files, app/spec TypeScript checks, ESLint, and production build pass. Chromium keyboard, focus-restoration, background comparison, and responsive checks at 375/768/1440 pixels pass with no page errors. Original benchmark outcomes match the pre-change baseline in all five scenarios, with and without tracing.

The implementation is in the local working tree based on 0ce33cc9d6fe7381965a9162571abe205d0b7350; no commit or push has been made.

Implemented with $luna-verified-implement and independently verified. On-demand worker counterfactuals cover the full half-open horizon, preserve balance/type/provenance, reject infeasible earned-entitlement alternatives, and keep results separate from the plan and original trace. Validation: 198/198 tests across 23 files, app/spec TypeScript checks, ESLint, and production build pass. Chromium keyboard, focus-restoration, background comparison, and responsive checks at 375/768/1440 pixels pass with no page errors. Original benchmark outcomes match the pre-change baseline in all five scenarios, with and without tracing. The implementation is in the local working tree based on 0ce33cc9d6fe7381965a9162571abe205d0b7350; no commit or push has been made.
nessar (Migrated from 172.24.0.1:8928) closed this issue 2026-10-03 15:17:26 +02:00
nessar commented 2026-10-03 16:23:32 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #46

mentioned in issue #46

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

gitlab-35-issue-48.md (SHA-256 31431d459fbc8448373069a816af74d8813eed3e97b0d1635f8f30663b3f6a12)

gitlab-35-issue-48.json (SHA-256 7d945d03402e989490bdaefd3b0847dcd94324d8ad40cb86e9a6ef9f504bfa9e)

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

<!-- gitlab-to-gitea-history:35:Issue:48 --> Preserved GitLab #48 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 0; visible source notes: 4. [gitlab-35-issue-48.md](https://gitea.nessar.fr/attachments/e8d8678c-0820-4c24-a58a-a674e0350a4a) (SHA-256 `31431d459fbc8448373069a816af74d8813eed3e97b0d1635f8f30663b3f6a12`) [gitlab-35-issue-48.json](https://gitea.nessar.fr/attachments/5e94b7c5-d093-4c69-b574-d8ed66641c12) (SHA-256 `7d945d03402e989490bdaefd3b0847dcd94324d8ad40cb86e9a6ef9f504bfa9e`) 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#48