Skip to content

09 · sync-clean

本场景验证什么

archon sync(以及其无 URL 的 agent 等价命令 hi archon, are you healthy?)是只读操作。针对未经修改的安装,它必须:

  1. 拉取规范化的 manifest。
  2. 遍历每个已安装文件,计算 sha256,与 manifest 进行比对。
  3. 打印绿色报告:每个必需模块的文件都匹配。
  4. 不写入任何内容 —— 既不写源文件,也不写运行时 ledger。

这是框架最基本的保证:那道证明"你可以随时运行 sync 而无后果"的关卡。

测试环境

Fixture场景 01 的产物(干净的安装后状态)
IDECursor
被测 manifest 版本v0.1.0
操作系统与场景 01 相同

前置条件

  1. 场景 01 ✅。
  2. 本场景开始前 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 OKnot installed(绝不能是 0/N OK
sync 之后的 git status与之前一致(干净)
不创建 .bak 文件
.archon/drift.md 未发生变化
总耗时暖缓存下 < 30 秒

演示录像

Will be replaced by docs/public/videos/sync-clean.mp4 once recorded. See videos/README for upload conventions.
Will be replaced by docs/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)ManifestRunnerResultDurationNotesRecord
2026-05-06 10:24:35 UTCv0.1.0cli✅ passing372 msJSON
2026-05-06 06:10:25 UTCv0.1.0cli✅ passing414 msJSON
2026-05-06 00:55:44 UTCv0.1.0cli✅ passing369 msJSON
2026-05-06 00:40:10 UTCv0.1.0cli✅ passing385 msJSON
2026-05-05 15:00:35 UTCv0.1.0cli✅ passing331 msJSON
2026-05-05 14:55:19 UTCv0.1.0cli✅ passing454 msJSON
2026-05-05 14:22:53 UTCv0.1.0cli✅ passing411 msJSON
2026-05-05 14:04:53 UTCv0.1.0cli✅ passing388 msJSON
2026-05-05 14:00:01 UTCv0.1.0cli✅ passing399 msJSON
2026-05-05 13:55:05 UTCv0.1.0cli✅ passing388 msJSON

已知局限

  • 未测试针对从陈旧 CDN 缓存拉取的 manifest 执行 sync 的情况。 那是 sync-stale-manifest —— 另一个独立场景。
  • 未演练离线路径(CLI 的 --offline 标志); 请参见 protocol 页面了解该模式的预期输出。

交叉引用

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"
    }
  ]
}

依据 Apache-2.0 许可证发布。