Skip to content

Refresh agent-compose examples and real-daemon coverage#295

Draft
eetoc wants to merge 5 commits into
mainfrom
feat/refresh-agent-compose-examples
Draft

Refresh agent-compose examples and real-daemon coverage#295
eetoc wants to merge 5 commits into
mainfrom
feat/refresh-agent-compose-examples

Conversation

@eetoc

@eetoc eetoc commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preserve the existing detailed tutorials and recorded outputs, correcting only stale image, CLI, and daemon-facade guidance
  • add step-by-step Docker tutorials for workspace lifecycle, multiple agents, environment and secrets, volume persistence, image builds, and scheduler script runtime
  • add configuration-only BoxLite and Microsandbox tutorials with real normalized config output and explicit KVM limitations
  • preserve the script-URL cron + agent example and add a fast timeout callback for real-daemon verification
  • add focused E2E coverage under test/e2e; this PR does not change Taskfile.yml or TESTING.md

Real validation

All 12 compose files were parsed individually by a CLI built from the current source.

  • real daemon + real CLI HTTP calls + real Docker guests: TestE2EExamplesDocker passed in 42.71s
  • real daemon + Docker guest + guest Codex CLI + controlled provider: TestE2EExamplesDockerProvider passed in 44.52s
  • real daemon + Docker guest + guest Codex CLI + daemon facade + provider from local .env: TestE2EExamplesDockerLiveProvider passed in 19.89s
  • git diff --check

Tutorials include output captured from those runs. Generated IDs and durations are explicitly identified as environment-specific. BoxLite and Microsandbox contain real config output only because this host cannot validate their KVM runtimes.

@monkeyscan

monkeyscan Bot commented Jul 15, 2026

Copy link
Copy Markdown

PR Title: Refresh agent-compose examples and real-daemon cov...

Commit: 749bc70

本次 PR 对 agent-compose 示例进行了全面刷新:新增 7 个示例(涵盖 Docker secrets、workspace、volume、multi-agent、build、boxlite、microsandbox),为所有 scheduler 示例统一补充 sandbox_policy: new,并将默认 guest image 统一更新为 ghcr.io/chaitin/agent-compose-guest:latest。同时引入了多层次的验证机制:

  1. Contract 测试 (cmd/agent-compose/examples_contract_test.go):解析所有 compose 文件,校验 driver、agent 数量、scheduler 配置、secret 脱敏,并验证内联 QJS 脚本语法。
  2. Docker 生命周期 E2E (test/e2e/examples_docker_test.go):在隔离 daemon 中验证命令执行、workspace 隔离、stop/resume、多 agent、环境变量与 secret、持久化卷与只读挂载、image build 及 scheduler shell 脚本。
  3. Provider E2E (test/e2e/examples_docker_provider_test.go):使用本地 mock OpenAI provider 测试 cron 与 timeout scheduler 的端到端触发。
  4. Live Provider E2E (test/e2e/examples_docker_live_provider_test.go):基于真实 .env provider 配置,验证 daemon → Docker guest → runtime facade → Codex CLI 的完整链路。

测试基础设施方面,host_daemon_helpers_test.go 新增了 startE2EDaemonWithOverridesremoveE2EDockerContainersUnderRoot 辅助函数,支持环境变量覆盖与基于 mount 路径的容器清理。Taskfile 新增了 test:examplestest:e2e:examples-dockertest:e2e:examples-docker-providertest:e2e:examples-docker-live-provider 四个任务。

整体改动结构清晰,contract 测试与 E2E 测试互补,覆盖了示例的主要使用场景。README 同步精简,去除了过时的 CLI 输出片段,提升了可维护性。没有发现影响正确性或安全性的严重缺陷。

@monkeyscan

monkeyscan Bot commented Jul 15, 2026

Copy link
Copy Markdown

PR Title: Refresh agent-compose examples and real-daemon cov...

Commit: ca7257b

本次 PR 是对 agent-compose 示例项目文档的大规模增强,共涉及 25 个文件、+1013/-85 行。核心改动包括:为所有示例 README(中英文)补充了前置条件、配置说明、运行教程和验证要点章节;docker-scheduler-script-url/scheduler.js 新增了一个 daily-review cron 触发器以演示 scheduler.cron() API;docker-multi-agent 的示例命令增加了 test -f project.txt 存在性检查以提高健壮性。文档内容与技术描述一致,命令示例和 API 使用无明显错误。整体为高质量的文档完善工作,未发现引入回归或安全隐患的改动。

@monkeyscan

monkeyscan Bot commented Jul 15, 2026

Copy link
Copy Markdown

PR Title: Refresh agent-compose examples and real-daemon cov...

Commit: 15db02b

本次 PR 主要是一次示例文档与测试结构的刷新:

  1. 移除了集中式示例契约测试 (cmd/agent-compose/examples_contract_test.go) 及 Taskfile 中对应的 4 个任务 (test:examplestest:e2e:examples-docker 等)。
  2. 重构了示例 README:为几乎所有 examples/agent-compose/ 下的示例补充了 2026-07-15 的真实运行输出截图,统一了前置条件措辞,并重新排列了示例索引表格。
  3. 增强了现有 E2E 日志:在 test/e2e/examples_docker_*.go 中新增 t.Logf 调用,提高测试失败时的可观测性。
  4. 更新了 TESTING.md:删除了与已移除任务对应的文档段落。

整体属于文档+测试清理,无生产代码逻辑变更。

@monkeyscan

monkeyscan Bot commented Jul 15, 2026

Copy link
Copy Markdown

PR Title: Refresh agent-compose examples and real-daemon cov...

Commit: 8fd659a

本次 PR 为纯文档刷新,涉及 examples/agent-compose/ 下 24 个示例 README(含中英文)。核心改动包括:

  1. 去除所有硬编码日期(2026-07-15)和 "E2E" 引用,使示例输出描述从"某次真实测试采集"变为"成功运行的典型输出";
  2. 统一标题措辞,如将 "Real verification output" 改为 "Example successful output";
  3. 补充少量说明性文字,提醒并发自动化应使用唯一 tag、动态 ID 会不同等。

无任何代码逻辑变更,不影响功能、安全或稳定性。文档措辞更通用、可维护性更好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant