Version: 0.7.2.dev.260322

feat(schedule-plan):  重构智能排程链路并修复粗排双节对齐问题

-  新增“对话级排程状态持久化”能力:引入 `agent_schedule_states` 模型/DAO,并接入启动迁移
-  智能排程图升级:补齐小幅微调(quick refine)分支,完善预算/并发/状态字段流转
-  预览链路增强:完善排程预览服务读写与桥接逻辑,新增本地预览页 `infra/schedule_preview_viewer.html`
- ♻️ 缓存治理统一:将相关缓存处理收口到 DAO + `cache_deleter` 联动清理,移除旧散落逻辑
- 🐛 修复粗排核心 bug:禁止单节降级,强制双节并按 `1-2/3-4/...` 对齐;修复结束日扫描边界问题
-  新增粗排回归测试:覆盖孤立单节、偶数起点双节、Filler 对齐等关键场景
This commit is contained in:
Losita
2026-03-22 13:50:10 +08:00
parent f3f9902e93
commit e5b27df80d
20 changed files with 1961 additions and 166 deletions

View File

@@ -18,6 +18,8 @@ const (
schedulePlanGraphNodeExit = "schedule_plan_exit"
// 图节点:按天拆分并注入上下文标签
schedulePlanGraphNodeDailySplit = "schedule_plan_daily_split"
// 图节点:小改动快速微调(用于 small scope
schedulePlanGraphNodeQuickRefine = "schedule_plan_quick_refine"
// 图节点:并发日内优化
schedulePlanGraphNodeDailyRefine = "schedule_plan_daily_refine"
// 图节点:合并日内优化结果
@@ -120,6 +122,9 @@ func RunSchedulePlanGraph(ctx context.Context, input SchedulePlanGraphRunInput)
if err := graph.AddLambdaNode(schedulePlanGraphNodeDailySplit, compose.InvokableLambda(runner.dailySplitNode)); err != nil {
return nil, err
}
if err := graph.AddLambdaNode(schedulePlanGraphNodeQuickRefine, compose.InvokableLambda(runner.quickRefineNode)); err != nil {
return nil, err
}
if err := graph.AddLambdaNode(schedulePlanGraphNodeDailyRefine, compose.InvokableLambda(runner.dailyRefineNode)); err != nil {
return nil, err
}
@@ -157,6 +162,7 @@ func RunSchedulePlanGraph(ctx context.Context, input SchedulePlanGraphRunInput)
runner.nextAfterRoughBuild,
map[string]bool{
schedulePlanGraphNodeDailySplit: true,
schedulePlanGraphNodeQuickRefine: true,
schedulePlanGraphNodeWeeklyRefine: true,
schedulePlanGraphNodeExit: true,
},
@@ -164,7 +170,10 @@ func RunSchedulePlanGraph(ctx context.Context, input SchedulePlanGraphRunInput)
return nil, err
}
// 7. 固定边dailySplit -> dailyRefine -> merge -> weeklyRefine -> finalCheck -> returnPreview -> END
// 7. 固定边:quickRefine -> weeklyRefinedailySplit -> dailyRefine -> merge -> weeklyRefine -> finalCheck -> returnPreview -> END
if err := graph.AddEdge(schedulePlanGraphNodeQuickRefine, schedulePlanGraphNodeWeeklyRefine); err != nil {
return nil, err
}
if err := graph.AddEdge(schedulePlanGraphNodeDailySplit, schedulePlanGraphNodeDailyRefine); err != nil {
return nil, err
}