Add runtime validation tier: agent-compose E2E persistence and startup check#17
Merged
Conversation
…p check (#15) scripts/check-runtime.sh boots the agent-compose service with a fresh Host-Backed Agent Home (WSL_HOME=<temp dir>), lets bootstrap run its real path (npm installs not mocked), and asserts: 1. Persistence Manifest: every manifest dotdir is a $HOME symlink whose readlink resolves exactly into the Agent Home mount 2. Idempotency: after a restart re-runs bootstrap on a filesystem where links already exist, readlink targets are unchanged and un-nested (catches the ln -sf nesting class) 3. Startup Install: every CLI in the shared install list is on PATH (HAPI deliberately not asserted: devcontainer-only) Assertion sources are the two shared scripts, read as data via new --print-manifest/--print-agent-home/--print-clis modes executed against the same mounted files bootstrap ran; the check carries no list copies. Safety (ADR 0004 decision 6): volumes are fixed-name and shared with real use, so the check runs under its own compose project, never mounts the real dev-home, and teardown never uses down -v. dev-cache stays shared by design (Rebuildable Cache; never deleted). CI: template-runtime-check.yml path-filters to the runtime wiring plus manual dispatch and calls the umbrella, whose runtime tier now streams the check's output live. Closes #15
…eview) - bootstrap.sh defines its completion message once (READY_MESSAGE) and exposes it via --print-ready-marker; check-runtime.sh reads the bootstrap-done signal from there instead of carrying a string copy (same dedupe-over-check reasoning as the manifest/install-list interfaces, ADR 0004 decision 1) - template-runtime-check.yml also triggers on scripts/check-template.sh: the umbrella is what the workflow actually executes
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.
Closes #15
What
ADR 0004 决策 5-6 的运行时验证层:
scripts/check-runtime.sh:以 fresh Agent Home(WSL_HOME=<mktemp -d>,Host-Backed)在独立 compose project(-p template-runtime-check)里起 agent-compose 服务,等 bootstrap 走完真实路径(npm install -g不跳过、不 mock),然后三组断言:$HOME是符号链接,readlink精确解析进 Agent Home 挂载;compose restart让 bootstrap 在链接已存在的 FS 上重跑,再验readlink精确不变 且无嵌套链接(ln -sf嵌套只在这一步暴露;第二遍很便宜——CLI 幸存 restart,安装守卫直接跳过);--print-*查询接口(--print-manifest/--print-agent-home/--print-clis/--print-ready-marker),检查在容器内调 compose 挂载的同一份文件读取清单——新工具进清单即自动被覆盖,检查不含任何清单硬编码副本。template-runtime-check.ymlpath-filter 到运行时布线(共享脚本、agent-compose 定义、umbrella、workflow 自身)+ 手动 dispatch,薄调用check-template.sh runtime。安全(ADR 0004 决策 6)
dev-home从不挂载进检查容器(本机dev-homevolume 不存在,跑完依然不存在);down -v,只down --remove-orphans限于检查自己的 project;dev-cache仍共享挂载——这是对验收 "untouched" 的一处明示解读:它是 Rebuildable Cache,npm 写缓存是其设计用途且共享加速本地检查;「不可删除」由永不-v保证。如需完全隔离,需给 compose.yaml 的 cache 挂载加WSL_CACHE参数化,可另开 issue。突变验证(验收标准 2,本地实测)
对
scripts/link-agent-home.sh逐一重引入 #10 的三个 bug 类,检查各自失败;恢复后基线通过:continue跳过.hapi,清单仍点名它)/home/vscode/.hapi 不是符号链接(首次启动步)[ -d ]才链,去掉无条件mkdir -p)/home/vscode/.claude 不是符号链接(首次启动步)ln -sfn→ln -sf嵌套链接 /home/vscode/wsl-home/.claude/.claude 存在(restart 幂等步,精确命中)基线(现 main + 本分支)本地通过:三组断言全绿,teardown 后检查容器/网络/临时目录全清,
dev-home不存在、dev-cache未删。越界说明
check-template.sh的runtime_tier从「未实现即 SKIP」改为流式执行check-runtime.sh(不经run_check缓冲)——issue 把 umbrella 集成划为 out of scope,但占位分支在脚本落地后必须移除,且运行时检查耗时数分钟,CI 日志需要实时输出。Out of scope(按 issue)
devcontainer-CLI 驱动的 post-create E2E、HAPI Local Hub 健康检查。