Repository navigation
feat(examples): 复杂示例加入 Postgres 容器,Examples 只跑冒烟 - #285
Merged
Merged
Conversation
复杂项目的数据服务通常在容器里。stack-workshop 增加 db 服务:docker compose 前台运行,-p app_${worktree} 让每个 checkout 有自己的项目、网络和卷,port: auto 以 PORT 映射进容器,健康检查在容器内用 pg_isready;api 同时等待 auth/catalog 的 HTTP 与 db 的 TCP,并在 /health 里报告本 worktree SQLite 的迁移数和记录数。
独立的 compose-stack 与 worktree-data 没有独立需求承接:前者成为 db,后者的 ${worktree} 能力已被整栈的 SQLite 与 Compose 项目覆盖,一并删除。
验证:python3 -m unittest scripts.stack_service_test 4 项通过;合并后的清单在隔离 HOME 下 status --json 解析通过。容器路径需要 Docker,本机未运行 daemon,留给 Linux 基准验证。
Co-Authored-By: Claude Code <noreply@anthropic.com>
复杂示例是手动基准的输入,任务要跑的就该是同一份整栈。large 组生成的清单加入 db 服务,判定认识容器健康与端口,native 模式也能从同一份 README 和清单启动它。 基准在 Linux 运行,preflight 现在同时检查 Docker daemon 和 compose 插件,并预拉 postgres:16-alpine;清理阶段按 Compose 标签回收本 run 下的项目,因为 oberth down --force 会 SIGKILL 前台 compose,容器不会自己停。 验证:python3 -m unittest scripts.agent_eval_test scripts.agent_eval_cold_test 132 项通过;--dry-run --suite core 在本机通过;--dry-run --suite large 在本机停在 Docker preflight(daemon 未运行),这是预期的环境要求。 Co-Authored-By: Claude Code <noreply@anthropic.com>
复杂示例归手动基准后,每 PR 的 Examples 不再跑整栈,也不再需要 Docker。verify-example.py 改名为 smoke.py,只启动 hello-worktree 的两个 worktree,验证自动端口、无端口 worker 和单边停止;workflow 的 job 名保持不变,required checks 不动。 验证:python3 scripts/smoke.py --binary bin/oberth 在 macOS 通过;python3 -m unittest discover -s scripts -p '*_test.py' 270 项通过(1 项跳过)。 Co-Authored-By: Claude Code <noreply@anthropic.com>
对外只用三个词:示例项目(sample)、冒烟(smoke)、基准(benchmark)。不再把 fixture / scenario / suite / tier / arm 混着用;基准代码里的 scenario/suite/arm 在 agent-eval.md 开头给出一次对应关系。
同步事实:Examples 每 PR 只跑 hello-worktree 冒烟,不需要 Docker;stack-workshop 是手动基准的输入,需要 Linux + Docker;cli.md 的 ${worktree} 指针仍指向它;validation 与 backlog 的平台范围和缺失项一起改。
验证:python3 scripts/check_docs.py 6 对双语文档一致。
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
core/cold 组没有 docker-compose.yml,清理时不需要探一次 Docker daemon;避免 daemon 未运行时给每次 run 留一条无意义的清理告警。 Co-Authored-By: Claude Code <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.
改了什么
examples/stack-workshop成为唯一的复杂示例,也是手动 agent 基准的输入:十个 Python 服务 + 一个真实的 Postgres 容器(docker compose、-p app_${worktree}、port: auto→PORT、容器内pg_isready),api 同时等待 HTTP 与 db 的 TCP 依赖。examples/compose-stack(并入db)和examples/worktree-data(${worktree}已由整栈的 SQLite/Compose 项目覆盖)。Examples只跑hello-worktree冒烟:verify-example.py→scripts/smoke.py,不再需要 Docker;job 名不变,required checks 不动。db的整栈:preflight 检查 Docker daemon 和 compose 插件、预拉镜像,清理阶段按 Compose 标签回收本 run 的容器(oberth down --force会 SIGKILL 前台 compose,容器不会自己停)。docs/agent/agent-eval.md开头给了一次对应关系。跑过的验证
python3 -m unittest discover -s scripts -p '*_test.py'→ 通过(1 项跳过)python3 scripts/smoke.py --binary bin/oberth(macOS)→ hello-worktree 两个 worktree、不同端口、无端口 worker、单边停止全部通过python3 scripts/check_docs.py→ 6 对双语文档一致python3 scripts/agent_eval.py --dry-run --suite core→ 通过examples/stack-workshop清单在隔离HOME下status --json解析通过没跑的
--dry-run --suite large停在 Docker preflight;容器路径要等 Linux 上的手动基准执行。🤖 Generated with Claude Code