Fix runtime drift guards and write-path audit bridging - #1
Open
lisihao wants to merge 1 commit into
Open
Conversation
Owner
Author
|
Merge note:
|
lisihao
added a commit
that referenced
this pull request
Jun 10, 2026
来源: 2026-06-10 卡点系统盘点 (~/.solar/reports/2026-06-10-solar-harness-卡点系统盘点.md) 根因 (P0 卡点#1): TERMINAL_STATUSES 含 failed → ready_nodes() 永久跳过失败 节点 → 无重派路径 → evaluator 判一次 FAIL = 节点永久死 = 整条 epic DAG 永不 放行下游。55 个 sprint / 65 个 failed 节点全因此卡死, coordinator 每天空扫 (近2h 4098 次 graph_nodes_dispatched / 1458 次 dependency_blocked)。 新增 lib/graph_redispatch.py: - 扫 failed 节点; redispatch_count<max(默认2) → 清上轮 eval + 重置 pending (带 retry 上限) + 喂回 evaluator 拒绝理由让 builder 针对性重做 - 超上限 → 保持 failed + 写 dag-human-review-queue.jsonl + 桌面通知 (响亮喊人, 不假装解决) - --limit 总闸防一次性打爆 operator 池; 默认 dry-run, --apply 才改 graph - coordinator %30 分支接入: 每~5min 低速自动重派至多 SOLAR_DAG_REDISPATCH_LIMIT(3) 个 依赖 graph_scheduler.py set_node_status 新增 allow_reopen_failed 参数 (受控放行 failed→pending, 默认 False 不改原语义); 该文件混分支前序改动, 留待统一 commit, 运行时已同步生效。 验证: set_node_status 单测 4/4 (默认挡住+受控放行+不影响passed+重开后ready); 重派器单测 6/6 (dry-run/上限重派/转人工/human-queue/limit总闸/events); 真实 dry-run 扫 55 sprint/65 节点; 灰度 apply 3 个真实 failed→pending, 端到端验真 ready_nodes 重新选中 + DAG failed_nodes 清空。
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.
摘要
tools/graph_scheduler.py收口为 canonical wrapper,避免 tools/lib 双实现分叉runtime_doctor增加state_surface_drift检查,并清理runtime_write_path_audit的剩余 warn/errorevolution_engine增加 sprint-scoped legacy event -> session-log v2 桥接变更边界
in-scope
runtime_statusterminal sticky guardgraph_schedulercloseout / projection runtime bridgesolar-autopilot-monitorterminal child downgrade guardruntime_doctor.state_surface_driftruntime_write_path_audit分类规则与回归evolution_enginesprint-scoped event bridgetools/graph_scheduler.py-> canonical wrapperout-of-scope
关键改动文件
harness/lib/runtime_status.pyharness/lib/graph_scheduler.pyharness/tools/solar-autopilot-monitor.pyharness/lib/runtime_doctor.pyharness/lib/runtime_write_path_audit.pyharness/tools/runtime_write_path_audit.pyharness/lib/evolution_engine.pyharness/tools/evolution_engine.pyharness/tools/graph_scheduler.py验证矩阵
python3 harness/lib/runtime_write_path_audit.py --root harness --jsonwarn=0,error=0python3 /Users/lisihao/.solar/harness/lib/runtime_write_path_audit.py --root /Users/lisihao/.solar/harness --jsonwarn=0,error=0bash harness/tests/runtime/test-runtime-write-path-audit.shPASS runtime write-path audit classifies ok/warn/errorpython3 -m pytest -q harness/tests/test_runtime_doctor_state_surface_drift.py harness/tests/graph/test_graph_scheduler_tool_wrapper.py harness/tests/graph/test_runtime_status.py harness/tests/graph/test_graph_status_sync.py harness/tests/control_plane/test-autopilot-pane-gate-reconcile.py35 passedpython3 -m py_compile ...Reviewer Guide
runtime_status.py,确认 terminal -> non-terminal 默认不可降级。graph_scheduler.py,确认 graph closeout/projection 全部桥到中心 writer。solar-autopilot-monitor.py,确认 terminal child 不会再被dependency_blocked打回 queued。runtime_write_path_audit.py与测试,确认 source/live 审计都已经warn=0 error=0。风险
tools/graph_scheduler.py由独立实现收口成 wrapper,虽然回归已覆盖 CLI 可用性,但如果外部有人依赖旧内部实现细节,需在合并后再观察一轮。