09 · sync-clean
本场景验证什么
archon sync(以及其无 URL 的 agent 等价命令 hi archon, are you healthy?)是只读操作。针对未经修改的安装,它必须:
- 拉取规范化的 manifest。
- 遍历每个已安装文件,计算 sha256,与 manifest 进行比对。
- 打印绿色报告:每个必需模块的文件都匹配。
- 不写入任何内容 —— 既不写源文件,也不写运行时 ledger。
这是框架最基本的保证:那道证明"你可以随时运行 sync 而无后果"的关卡。
测试环境
| Fixture | 场景 01 的产物(干净的安装后状态) |
| IDE | Cursor |
| 被测 manifest 版本 | v0.1.0 |
| 操作系统 | 与场景 01 相同 |
前置条件
- 场景 01 ✅。
- 本场景开始前
git status立即处于干净状态。
步骤
text
1. In Cursor, paste exactly:
hi archon, are you healthy?
2. Or via CLI:
npx @archon/cli@latest sync
3. Inspect the printed report:
- core-soul: N/N OK
- core-contracts: N/N OK
- commands: N/N OK
- rules: N/N OK
- skills: N/N OK
- cli (optional): N/N OK (or "not installed" if removed in 08)
- extensions-demand-pool: …
4. Run `git status` immediately after — must still be clean.预期结果
| 检查项 | 预期 |
|---|---|
| sync 以成功状态退出 | 是 |
每个必需模块报告 N/N OK | 是 |
可选模块报告 N/N OK 或 not installed(绝不能是 0/N OK) | 是 |
sync 之后的 git status | 与之前一致(干净) |
不创建 .bak 文件 | 是 |
.archon/drift.md 未发生变化 | 是 |
| 总耗时 | 暖缓存下 < 30 秒 |
演示录像
Recording coming soon
sync-clean.mp4IDE chat-panel walkthroughdocs/public/videos/sync-clean.mp4 once recorded. See videos/README for upload conventions. $ archon doctor .
[L1 Structural] OK
[L2 Contract] OK
[L3 Hints] OK
✔ Recording coming soon — placeholderdocs/public/asciinema/sync-clean.cast embedded via the asciinema-player web component. See asciinema/README for the recording command. 运行记录
下方表格由 sandbox runner (scripts/sandbox-run.mjs) 写入 docs/testing/sandbox/runs/sync-clean/ 下的 JSON 实时渲染。要新增一行,运行:
bash
node scripts/sandbox-run.mjs --only=sync-clean| Started (UTC) | Manifest | Runner | Result | Duration | Notes | Record |
|---|---|---|---|---|---|---|
2026-05-06 10:24:35 UTC | v0.1.0 | cli | ✅ passing | 372 ms | — | JSON |
2026-05-06 06:10:25 UTC | v0.1.0 | cli | ✅ passing | 414 ms | — | JSON |
2026-05-06 00:55:44 UTC | v0.1.0 | cli | ✅ passing | 369 ms | — | JSON |
2026-05-06 00:40:10 UTC | v0.1.0 | cli | ✅ passing | 385 ms | — | JSON |
2026-05-05 15:00:35 UTC | v0.1.0 | cli | ✅ passing | 331 ms | — | JSON |
2026-05-05 14:55:19 UTC | v0.1.0 | cli | ✅ passing | 454 ms | — | JSON |
2026-05-05 14:22:53 UTC | v0.1.0 | cli | ✅ passing | 411 ms | — | JSON |
2026-05-05 14:04:53 UTC | v0.1.0 | cli | ✅ passing | 388 ms | — | JSON |
2026-05-05 14:00:01 UTC | v0.1.0 | cli | ✅ passing | 399 ms | — | JSON |
2026-05-05 13:55:05 UTC | v0.1.0 | cli | ✅ passing | 388 ms | — | JSON |
已知局限
- 未测试针对从陈旧 CDN 缓存拉取的 manifest 执行 sync 的情况。 那是
sync-stale-manifest—— 另一个独立场景。 - 未演练离线路径(CLI 的
--offline标志); 请参见 protocol 页面了解该模式的预期输出。
交叉引用
- Protocol 页面:
/zh/setup/sync - Agent 文件:
https://aaep.site/sync.md - 前置场景:01 install-cursor-node
- 兄弟场景:10 sync-modified —— 同一场景, 但注入了一处手工编辑,使报告转红。
json
{
"runnable": "cli",
"fixture": "fixtures/sandbox-node-ts",
"ide_platform": "cursor",
"prerequisites": [
{
"name": "archon install",
"cli": "install",
"flags": [
"--with=cli"
]
}
],
"steps": [
{
"name": "archon sync (json)",
"cli": "sync",
"flags": [
"--json"
]
}
],
"assertions": [
{
"file_exists": ".archon/VERSION"
}
]
}