Skip to content

Fix Solar Harness closeout dispatch gates - #32

Draft
lisihao wants to merge 645 commits into
mainfrom
codex/solar-harness-closeout-dispatch-fixes
Draft

Fix Solar Harness closeout dispatch gates#32
lisihao wants to merge 645 commits into
mainfrom
codex/solar-harness-closeout-dispatch-fixes

Conversation

@lisihao

@lisihao lisihao commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • prevent advisory/eval-sidecar-only operators from taking final closeout work that requires non-eval artifacts
  • release graph nodes after failed_contract_closeout so they can be reassigned
  • resolve relative covered_artifacts against the sprint directory during parent-ready checks
  • refresh stale pending closure projections before status sync marks a ready graph failed

Verification

  • python3 -m py_compile harness/lib/gate_controller.py harness/lib/graph_scheduler.py harness/tools/pm_dispatch.py
  • python3 -m pytest harness/tests/graph/test_graph_status_sync.py harness/tests/test_completion_gate.py harness/tests/test_pm_dispatch.py harness/tests/graph/test_graph_scheduler_model_matching.py harness/tests/graph/test_worker_assignment_reasons.py harness/tests/graph/test_s04_ready_node_dispatch_activation.py -q
  • Runtime sprint sprint-20260613-200227-intent-entrypoint_metadata-d231c04e: parent-ready=true, acceptance=PASS, closure=closed, status=passed

Notes

  • This PR intentionally contains only the 7 verified files from commit 39a31dd.
  • The local worktree has unrelated dirty files that are not part of this PR.

lisihao added 30 commits June 1, 2026 20:08
lisihao added 30 commits June 13, 2026 11:01
监护人反馈: 从昨天起 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
+ 造假留痕换模型。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant