Fix Solar Harness closeout dispatch gates - #32
Draft
lisihao wants to merge 645 commits into
Draft
Conversation
监护人反馈: 从昨天起 macOS 通知中心被 'Solar DAG 卡点需人工' 等 桌面通知刷屏轰炸 (近1h 每分钟 18~97 条 warn/error, 每条弹一次)。 根因 (是我装哨兵时的毛病): osascript-notify.sh 零节流, 调一次弹一次; 而 graph_redispatch/scope_arbiter 等哨兵每轮扫描对同一批 FAIL 节点 重复 emit 告警 → 同一件事反复弹, 一分钟弹几十个。典型'出事要告警' 却没想'同一件事别重复告警'。 止血 (一个文件一刀切, 所有调用方均经此脚本, 无直接 osascript 旁路): 1. 默认静默 — 必须显式 SOLAR_NOTIFY=1 才弹桌面 (默认只写 logs/notify.log) 2. 节流 — 同一 title 在 SOLAR_NOTIFY_THROTTLE_SEC(默认1800s) 内只弹一次 3. 留痕 — 一律写 notify.log, 告警信息不丢失, 只是不再轰炸桌面 验证: 默认调用 exit=0 无弹窗仅记日志; 显式开启时第一次弹第二次被节流; 活跃 launchd 服务无绕过本脚本直接 osascript 的旁路 (已逐个核查)。 附带: 卸载误装的 com.solar.login-resume LaunchAgent (登录补偿会 emit warn, 属添乱, 撤回; 分层自启待重新评估是否真需要)。 留痕日志: tail logs/notify.log 可查所有历史告警。
- vendor GenesisPod under harness/plugins/genesis-verifier/vendor for Solar tracking - show cover/outbound CTA when YouTube forbids embedding while preserving transcript and AI panels - verification: npm run type-check; npm run lint; npm run build; Playwright smoke for blocked embed, transcript, key moments
监护人'怎么没加速'根因排查的核心真 bug。 病灶: PANE_PROMPT_RESIDUE_RE 负向断言写成 Try\\s (字面反斜杠+s), 而非 Try\s (空白符)。导致 '❯ Try "..."' 这个空闲提示符匹配失败, 空闲 builder pane 被误判为'提示符残留=忙' → pane_is_busy 返 True → autopilot 169次 dispatch 全 pane_busy 弹回 → builder 零派发 → result=0。 对照: lib/graph_node_dispatcher.py:136 同一正则是正确的 Try\s, 仅 tools/solar-autopilot-monitor.py:107 这个副本多打一个反斜杠。 验证: 修复后 4 个 builder pane 的 pane_is_busy 从 True→False; pane_busy 弹回从 169次/2h → 0; autopilot 恢复 enqueue_ready (修复前完全不动)。monitor 已重启加载新码。 注: 此修复解开派发误判这一道闸, 但系统吞吐的实际瓶颈是 56 个 failed 节点卡住 120 个下游 pending — 那是需要逐个清的真实工作量, 非单 bug。
监护人拍板'执行2': 根治 builder 系统性假完成。human-review 队列积压
69 个待人工节点, 评审 summary 大量是 'Code never persisted to disk'/
'Code on disk is X not Y'/'0/7 ACs met' — builder 报完成但磁盘没真改。
机制: 在 verify_operator_result (builder→evaluator 必过的确定性闸门)
新增规则 solar.post_result.write_scope_touched:
- write_scope 声明要改的文件, 磁盘 mtime 必须 >= 任务 started_at
- 全缺失 → FAIL '声称改动但磁盘无文件 (造假)'
- 全陈旧未改 → FAIL '文件未被本次任务改动'
- 至少一个真改 → PASS
安全 (防误伤真活):
- write_scope 空 (planner/分析节点) → PASS 不误伤
- started_at 缺失无法做基准 → PASS 不误杀 (不确定宁漏不错)
- 5s mtime 容差防文件系统时钟偏差
- severity=warn 观察期: 检测+留痕到 verdict, 但不参与 block 判定,
确认不误伤后再升 blocker (渐进式, 不一刀切)
验证: 隔离单测 7/7 过 (空scope/无基准/真改/全缺失/全陈旧/混合);
端到端确认 warn 级造假不误 block 整体 (补齐 artifact 后仅造假 warn
→ status=passed)。接入 verify_operator_result, 被 node_completion/
completion_pipeline/pm_dispatch 三处调用, 全 builder 完成都过此门。
后续: 观察期跑一段, 统计造假命中率与误伤率, 确认后 warn→blocker
+ 造假留痕换模型。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
Notes