chore(orchestrator): remove orphan SY-4 retry/concurrency scaffolding - #56
Merged
Conversation
清除 SY-4 (执行机器从未并进 main) 留下的孤儿钩子/死代码: 这些是等待
执行机器接入的空壳, 无任何活跃消费方. 用户已拍板废弃 SY-4 分支.
## 主要改动
- orchestrator.py:
- 模块 docstring 去掉 retry-queue.json 那处状态描述 (4+1 -> 4)
- 删 RunState.DEFERRED_CAPACITY / TIMEOUT_KILLED 枚举值 + _LAST_ACTION_TO_STATE 映射
- 删 Run.in_retry_queue / Run.retry_attempt 字段
- 删 _collect_retry_queue() (只读 retry-queue.json, 无写入方)
- snapshot() 去掉 retry_map 收集 + 补 QUEUED Run 的 retry 分支
- reconcile 删 I-3 retry_stale_after_done 分支 (后续 I-4/I-5 -> I-3/I-4)
- get_metrics 去掉 in_retry_queue 计数
- _build_run_from_seen 去掉 in_retry_queue/retry_attempt 参数
- I-1/I-2 suggested_fix 文案去掉 'push retry queue' (机制已删)
- workflow_loader.py:
- 删 WorkflowConfig 的 max_concurrent_runs / run_timeout_seconds /
retry_max / retry_backoff_base_seconds 四字段 + 它们的类型/非负/>0 校验
## 设计决策
- retry-queue.json 是运行时文件不是源码, 未动
- workflow_loader 的 clean filter 只保留已知字段 (前向兼容); 删字段后
WORKFLOW.md 里残留的这四个 key 被静默忽略, loader 不报错 (已验证真实
WORKFLOW.md 仍能 load)
- gitea_watcher 只消费 allowed_labels, 不读这四字段, 不受影响
## 测试
- 更新 test_orchestrator / test_workflow_loader / test_court_reconcile_cli
里引用被删符号的用例; 新增 test_removed_sy4_concurrency_keys_are_tolerated
锁住未知 key 容错
- 全量: 690 passed (0 fail)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
SY-4 的执行机器从未并进 main,只在
orchestrator.py/workflow_loader.py留下一堆等它的孤儿钩子/死代码。决定废弃 SY-4 分支(rebase 风险 high,main 已用 orchestrator 架构重做),清掉这些孤儿:RunState.DEFERRED_CAPACITY/TIMEOUT_KILLED死枚举、in_retry_queue/retry_attempt字段、_collect_retry_queue()、snapshot/reconcile/get_metrics 里的 retry-queue 逻辑max_concurrent_runs/run_timeout_seconds/retry_max/retry_backoff_base_seconds四个无消费方的配置字段 + 校验Verification (独立评审 agent 复跑)
import orchestrator, workflow_loaderOK不做的事
metrics.get('in_retry_queue',0)用了默认值安全,不在删除清单,未顺手改🤖 Generated with Claude Code