让蜂后选最优后把产物合并到产物仓 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>
32 lines
1.3 KiB
Docker
32 lines
1.3 KiB
Docker
FROM python:3.11-slim
|
|
|
|
# kubectl — the kubernetes launch backend (agent_swarm#16/#56) shells out to `kubectl apply/delete`
|
|
# to create/teardown agent Pods + per-swarm key Secrets. Without it the k8s backend fails (0 agents).
|
|
# Pinned to the cluster minor (AKS 1.34) per kubectl skew policy. (linux/amd64 — AKS default node arch.)
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends curl ca-certificates git \
|
|
&& KUBECTL_VERSION="$(curl -fsSL https://dl.k8s.io/release/stable-1.34.txt)" \
|
|
&& curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
|
|
&& chmod +x /usr/local/bin/kubectl \
|
|
&& kubectl version --client=true 2>/dev/null \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY orchestrator/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy orchestrator code
|
|
COPY orchestrator/ ./orchestrator/
|
|
|
|
# orchestrator/quality.py imports benchmark.fixtures / benchmark.metrics at startup,
|
|
# so the package must be present in the image (agent_swarm#44). stdlib-only — no extra pip.
|
|
COPY benchmark/ ./benchmark/
|
|
|
|
# Expose port
|
|
EXPOSE 8000
|
|
|
|
# Run orchestrator
|
|
CMD ["python", "-m", "uvicorn", "orchestrator.main:app", "--host", "0.0.0.0", "--port", "8000"]
|