 gongzhiyongandClaude Opus 4.8
|
2672a3d4b6
|
feat(orchestrator): SC-7 蜂后落 main — git push 最优产物(#16)
CI / guardrails (pull_request) Successful in 11s
CI / tests (pull_request) Failing after 11m52s
CI / tests (push) Failing after 11m53s
CI / guardrails (push) Failing after 11m53s
让蜂后选最优后把产物合并到产物仓 main,run 交付一份连贯产物而非 N 个碎片分支:
- create 存 git grant 引用(repo_url + secret_ref,均非明文)到 run.metadata;凭据不存
- queen.promote_to_main:从 secret_ref 现取凭据 → clone base_branch → 写最优产物 → commit → push;
_auth_url 嵌入并 URL-encode 凭据(不入日志);best-effort 不破坏终态
- main.py 终态:winner → promote_to_main → deliverable.promoted_to_main{branch,commit_sha}
- Dockerfile.orchestrator 加 git CLI
- test-queen 扩展(auth_url 编码 + no_git_grant 分支),14 检查全过;全套契约通过
注:真实 git push e2e 需重建 orchestrator 镜像 + 部署 + gitea 产物仓验证(后续);
当前纯代码 + 单元测完成。凭据经 secret_ref 现取、不存 run、不入日志(组织规则#8)。
影响:仅 orchestrator 终态聚合;不涉及 Manager 契约/计费/发布链路。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-19 21:38:43 +08:00 |
|
 gongzhiyongandClaude Opus 4.8
|
0c3af0425d
|
docs: 蜂后收敛闭环(SC-3/4) — convergence-protocol §7 + rework-plan P-后续
CI / tests (push) Successful in 39s
CI / guardrails (push) Failing after 10m54s
CI / tests (pull_request) Failing after 14m26s
CI / guardrails (pull_request) Failing after 14m26s
记录已实现的蜂后闭环(M2-M4+P0)现状与诚实差距,标注剩余(SC-7 落main/SC-8 authoritative/M5 北极星)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-19 19:40:41 +08:00 |
|
 gongzhiyongandClaude Opus 4.8
|
7314662f97
|
feat(orchestrator): M4 失败隔离 + P-guard 确认(SC-11/12)
SC-12 失败隔离:单 task 失败不再拖垮整个 run。
- refresh_swarm_run_status:next_status 仅在"有失败且无任何完成产物"时 failed;
有完成工作则走 completed,交蜂后/convergence 判定(失败仍由 termination_reason 反映)。
- 解决那次 LLM 网关 404 致单 task 失败 → 整 run FAILED 的单点问题。
SC-11 P-guard:guard.diagnose 已由 assess_swarm_health 在派发循环接入(探索确认,零改动);
检测无 Agent/无模型/依赖死锁/预算耗尽/种子不可分解。
全套测试通过:runtime-contract / merge-smoke / workflow-e2e / contract-freeze
+ task-competition / queen / run-isolation。
影响:仅 orchestrator 终态判定;Manager status 映射不变(failed/completed)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-19 19:25:43 +08:00 |
|
 gongzhiyongandClaude Opus 4.8
|
50bc8b019f
|
feat(orchestrator): M3 蜂后质量门打回 — 质量驱动迭代(SC-9)
把收敛从"任务完成即停"升级为"质量驱动":
- queen.should_bounce(纯函数):最优候选已评分且 < 阈值且未触顶 → 打回;无阈值/未评分/达标/触顶 → 接受(诚实,不在算不出的分上打回,组织规则#9)
- queen_quality_gate(接入 refresh_swarm_run_status,在 cross_review 之后/状态提交之前):
评分不达标 → reopen_task 回灌 impl 任务 + review_cycles++ → run 保持 RUNNING 迭代;
达标/触顶 → 继续终态,winner 标到 deliverable
- _queen_threshold:QUEEN_ACCEPTANCE_THRESHOLD(env / run.metadata),默认 None=禁用,
保持现有完成语义不变(可由 operator 启用)
- 717 复用门已聚合的 run.metadata[queen],不重复聚合
测试 scripts/test-queen.py 扩展 should_bounce(5 检查),共 11 检查全过。
注:SC-8 convergence 全 authoritative(BLOCKED→override run.status)动 Manager 终态语义,
需契约评审,列为后续;质量驱动收敛的核心已由 queen_quality_gate 实现。
SC-10 P_rework 计入评审重开属度量层(E),后续。
影响:仅 orchestrator 终态/重开路径;门默认禁用,不改 Manager 契约/完成语义。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-19 19:16:42 +08:00 |
|
 gongzhiyongandClaude Opus 4.8
|
c2413b5edd
|
feat(orchestrator): M2 蜂后结果聚合 — best-of-N 选最优(SC-5/6/7)
新增 orchestrator/queen.py(蜂后:不执行/不分配,只仲裁最终结果):
- collect_candidates:各 completed task 的 impl 产物为候选(复用 quality.collect_generated_files)
- score_candidates:用 swarm 共享 test 跑各候选 impl 评分(复用 sandbox.run_tests;
fail-closed:未确认隔离则不评分,unscored!=0,组织规则#9)
- select_best:纯函数,测试通过率最高者胜(best-of-N — 单模型没有的涌现杠杆)
- aggregate_run:终态收集→评分→选最优,best-effort 不破坏终态路径
接入 main.py completed 分支:winner 标到 deliverable.selected,verdict 存 run.metadata[queen]。
测试 scripts/test-queen.py(6 检查全过)。
注:SC-7 的 git push 最优到产物仓 main 待端到端阶段(需 orchestrator git CLI + 凭据持久化);
当前先标记 winner(SWE-bench 语境产物是 patch,选最优即够)。
影响:仅 orchestrator 终态聚合;不涉及 Manager 契约/计费/发布链路。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-19 19:00:15 +08:00 |
|
 gongzhiyongandClaude Opus 4.8
|
c257e7e562
|
feat(orchestrator): P0 run 边界隔离 — 蜂后防跨 run 抢夺(agent_swarm#8)
run-boundary isolation:agent 只能竞争/认领属于自己 run 的 task,杜绝跨 run 抢夺
(A run 的 agent 抢 B run 的 task → 计费错账/结果污染)。
- 新增 extract_swarm_from_agent / _agent_belongs_to_run(复用 -agent- 前缀)
- swarm_dispatch:候选过滤为本 run 的 task
- handle_task_bid/yield/takeover:拒绝跨 run 请求(cross_run_denied)
- 测试 scripts/test-run-isolation.py(7 检查全过)
影响:仅 orchestrator 派发/竞争路径;不涉及 Manager 契约/计费字段/发布链路。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-19 18:42:39 +08:00 |
|