feat(planning): make optimization rules composable
Evaluate explicit, ordered optimization configurations through one shared planner model. Add six editable presets, durable one-time legacy migration, and consistent completed and cancelled plan provenance. Include functional regressions and the agreed trace-removal and benchmark follow-up specs. Performance acceptance remains in #78 under unchanged gates. Refs: #70, #71, #72, #73, #74, #75, #76, #77, #78
This commit is contained in:
1 parent
209bf05f36
commit
6811142299
45 files changed
+8795
-3075
No files matched your search
@@ -80,6 +80,7 @@ export type {
|
||||
TimeOffPeriod,
|
||||
TimeWindowContribution,
|
||||
TimeWindowPlanningRule,
|
||||
OptimizationPlanningRule,
|
||||
TraceCounterfactualSelection,
|
||||
TraceCandidateStatus,
|
||||
} from './leave-planner.core';
|
||||
@@ -117,6 +118,7 @@ interface UntrustedRecord {
|
||||
placement?: unknown;
|
||||
rewardDays?: unknown;
|
||||
rewardType?: unknown;
|
||||
configuration?: unknown;
|
||||
}
|
||||
|
||||
interface TransportSnapshot {
|
||||
@@ -238,6 +240,12 @@ function snapshotRequest(request: unknown): TransportSnapshot {
|
||||
enabled: value?.enabled,
|
||||
force: value?.force,
|
||||
};
|
||||
if (
|
||||
typeof value?.type === 'string' &&
|
||||
value.type.toLowerCase() === 'optimization'
|
||||
) {
|
||||
return { ...base, configuration: cloneUnknown(value.configuration) };
|
||||
}
|
||||
if (typeof value?.type === 'string' && value.type.toLowerCase() === 'time_window') {
|
||||
return {
|
||||
...base,
|
||||
|
||||
Reference in new issue
Block a user