feat(all): seed_step_stab 稳定化种子链与同族种子轮换、ladder/自适应 Teff/丰度轴延拓三级回退与梯级种子入库复用、热启动首末比豁免、workflow 完成翻转回退链阻塞修复、大气收敛权威统计与 M14 回填
收敛攻坚(81/400 失败点根因与实测,见 docs/failed81_cno_seed_popzer_dpsilg_2026_08_18.md): - runner: 新增 seed_step_stab 策略链——同物理族(同 Teff/logg/logHe)CNO 邻居种子 + DPSILG=3.0 λ 算子欠松弛 + POPZER=1E-10 微布居置零(联动 POPZR2/RADZER 同值 + NITZER=1),针对 20kK He 富大气 He I/II 电离前沿布居极限环 - runner: 三级链内延拓回退(主链与 nl_direct 全败后自动触发): · 固定 ladder 步进——plan_ladder_steps 按归一化间隔选轴,Δlogg≤0.25/ΔTeff≤2.5kK,≤4 步 · 自适应 Teff 延拓——步长 1250K 起、成功 ×1.5 恢复、失败二分至 25K 折叠墙,≤48 步 · C/N 丰度轴延拓——高温域(Teff>30kK)专用,严格同族种子沿 C(优先)/N 轴 0.2 dex 起步 延拓阶段 NITER 下限提至 300(慢收敛 waypoint 迭代饥饿误判修复) - runner: 稳定化多档回退(DPSILG/POPZER 三档互补,联合回收 41/65); 域门控 Teff≤30kK——高温高金属域实测旋钮致散(17 拍爆至 4e16),域外跳过 - 梯级种子持久化: 收敛中间模型登记 ladder_seeds 随上报落 server seeds 表 (任务失败也上传,合成名 _ladder 与真实网格点零冲突),簇内相邻失败点自动复用 调度与执行: - scheduler: 策略解析新增 seed_step_stab 臂——find_exact_family_seed_from_db 严格 同物理族判定(不做 global 退化,防 ladder 中间种子 ΔTeff≤5000K 误命中), 排除本点历史已用种子实现重试轮换;链在 stab 耗尽时轮换未试过同族邻居重派 - executor: seed_step_stab 补种子下载(漏列曾致 78 任务假失败,seed_nc 无 fort.8 崩溃); Teff>30kK 域外自动降级普通种子链 收敛判据: - conv_check: 热启动豁免——首拍 max_relc<1(种子已近解)时首末比 1e3 判据数学上 不可达,豁免后交五重物理硬门槛裁决(修复 nl_ladder 0.038→6e-4 物理全过被误杀); 冷启动仍受判据门控 workflow 生命周期: - workflows/tasks: 完成 flip 增加「未消费回退链」阻塞子句——failed 点策略链未耗尽 或链尾 seed_step_stab 尚有未试过同族种子时不得置 completed(修复最后活跃点 cold 失败上报抢先 flip、still_running 守卫拦截后续策略永不派发);按 failed_stage 归因 (synspec 失败行只看 synspec 链,防 stale 审计副本永久卡死)+ json_valid 脏行防护 统计与前端: - 统计新增权威口径 tlusty_converged(不按策略拆)与 seed_step_stab_converged 分项, 前端详情页色带/概览卡消费权威总数并新增稳定化青色段(修复 stab 收敛点漏计, 生产 9137/9216 差额);M14 迁移回填历史 completed 点的 tlusty_status 文档: - 新增 failed81 POPZER/DPSILG 制胜配方根因分析、Windows 节点经跳板 RDP 运维手册; failed400 增补 ladder 生产化实现与第二轮 121 残点实测矩阵
This commit is contained in:
@@ -176,6 +176,32 @@ pub const MIGRATIONS: &[Migration] = &[
|
||||
detect: |c| Ok(!has_column(c, "grid_points", "success_method")?),
|
||||
up: &["ALTER TABLE grid_points DROP COLUMN success_method"],
|
||||
},
|
||||
// M14(2026-08-25,大气收敛统计补漏):Phase 5b 阶段列(tlusty_status)上线前完成的历史
|
||||
// 点该列为 NULL——但 tlusty_success_method 仅在整管线成功(tlusty_enabled=1 且收敛)时
|
||||
// 写入(record_task_report 成功分支),故 completed + method 非空 ⟹ 大气必已收敛。
|
||||
// 回填 'converged',否则 stats 的 CASE WHEN tlusty_status='converged' 漏计
|
||||
// (生产实证:sdB_cno 9216 点中 9 个此形态,前端 9137/9216 差额的一部分)。
|
||||
Migration {
|
||||
version: 14,
|
||||
name: "backfill-tlusty-status-for-completed",
|
||||
detect: |c| {
|
||||
let n: i64 = c.query_row(
|
||||
"SELECT COUNT(*) FROM grid_points
|
||||
WHERE status = 'completed'
|
||||
AND COALESCE(tlusty_success_method, '') != ''
|
||||
AND COALESCE(tlusty_status, '') = ''",
|
||||
[],
|
||||
|r| r.get(0),
|
||||
)?;
|
||||
Ok(n == 0)
|
||||
},
|
||||
up: &[
|
||||
"UPDATE grid_points SET tlusty_status = 'converged' \
|
||||
WHERE status = 'completed' \
|
||||
AND COALESCE(tlusty_success_method, '') != '' \
|
||||
AND COALESCE(tlusty_status, '') = ''",
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
/// 当前 schema 版本(`PRAGMA user_version`)。
|
||||
@@ -562,4 +588,54 @@ mod tests {
|
||||
);
|
||||
assert_eq!(current_version(&conn).unwrap(), 13);
|
||||
}
|
||||
|
||||
/// M14(2026-08-25):completed + tlusty_success_method 非空 + tlusty_status 空
|
||||
/// 的历史点回填 'converged'(method 仅在整管线成功时写入);其它形态不动。
|
||||
#[test]
|
||||
fn m14_backfills_tlusty_status_for_legacy_completed() {
|
||||
let mut conn = mem_conn();
|
||||
conn.execute_batch(
|
||||
"CREATE TABLE grid_points (
|
||||
name TEXT NOT NULL,
|
||||
workflow_name TEXT NOT NULL,
|
||||
status TEXT NOT NULL DEFAULT 'pending',
|
||||
tlusty_success_method TEXT,
|
||||
synspec_success_method TEXT,
|
||||
tlusty_status TEXT,
|
||||
synspec_status TEXT,
|
||||
pending_strategies TEXT
|
||||
);
|
||||
INSERT INTO grid_points (name, workflow_name, status, tlusty_success_method, tlusty_status) VALUES
|
||||
('legacy_ok', 'wf', 'completed', 'cold_run', NULL),
|
||||
('legacy_seed', 'wf', 'completed', 'seed_step', ''),
|
||||
('already_failed', 'wf', 'failed', 'cold_run', 'failed'),
|
||||
('already_conv', 'wf', 'completed', 'cold_run', 'converged'),
|
||||
('no_method', 'wf', 'completed', NULL, NULL);",
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
// 仅跑 M14(全量 MIGRATIONS 含 M1 的 tasks 迁移,本夹具只建 grid_points)。
|
||||
let m14 = MIGRATIONS.iter().find(|m| m.version == 14).unwrap();
|
||||
apply_migrations_with(&mut conn, &[*m14]).unwrap();
|
||||
|
||||
let read = |c: &Connection, name: &str| -> Option<String> {
|
||||
c.query_row(
|
||||
"SELECT tlusty_status FROM grid_points WHERE name = ?1",
|
||||
rusqlite::params![name],
|
||||
|r| r.get(0),
|
||||
)
|
||||
.unwrap()
|
||||
};
|
||||
assert_eq!(read(&conn, "legacy_ok").as_deref(), Some("converged"));
|
||||
assert_eq!(read(&conn, "legacy_seed").as_deref(), Some("converged"));
|
||||
// failed 点 / 已有状态 / 无 method 的点不受影响。
|
||||
assert_eq!(read(&conn, "already_failed").as_deref(), Some("failed"));
|
||||
assert_eq!(read(&conn, "already_conv").as_deref(), Some("converged"));
|
||||
assert_eq!(read(&conn, "no_method"), None);
|
||||
assert_eq!(current_version(&conn).unwrap(), 14);
|
||||
|
||||
// 幂等:再跑一遍 detect 命中(无待回填行)→ 仅推进版本,不改数据。
|
||||
apply_migrations_with(&mut conn, &[*m14]).unwrap();
|
||||
assert_eq!(read(&conn, "no_method"), None);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user