跳转至

Runtime Refresh:运行态投影刷新命令

定位

Runtime Refresh 是 PR/Docs Health Loop 的手动刷新入口。它把一次性的 GitHub Actions live sampler 编排成可重复执行的刷新链路:

text gh run list live sample -> 安全 GitHub Actions ledger projection -> live sample 安全检查 -> 实验索引刷新 -> 项目进度刷新 -> LoopSpec 报告刷新 -> 发布 LoopSpec docs 页面 -> 项目进度最终刷新 -> freshness checks

这个命令服务 Runtime Projection 层:把真实外部运行状态变成项目看板可以消费的安全事件,同时不把 run id、完整 URL、完整 commit SHA 或原始日志写入发布层。

命令

只检查计划,不联网:

bash python scripts/runtime_refresh.py --check-plan

查看计划:

bash python scripts/runtime_refresh.py

手动刷新团队仓库和 ALPC91 发布镜像的 GitHub Actions 状态:

bash python scripts/runtime_refresh.py --run-live-sample --repository VariAI/OrgReOrg --repository alpc91/harness --branch main --limit 3

边界

  • --check-plan 是 CI gate,只验证刷新链路结构、步骤顺序、唯一网络步骤和无 shell 拼接。
  • --run-live-sample 会调用 gh run list,只适合人工或定时任务运行,不进入默认 CI。
  • live sampler 原始响应只在内存里处理,提交的是 vault/50-outputs/github-actions-live-sample-results.json 的安全投影。
  • 生产形态应由 GitHub App webhook 替换 gh 采样入口,但后续检查和项目看板刷新链路保持一致。

当前验证

  • tests/test_runtime_refresh.py 覆盖 plan 顺序、唯一网络步骤、无 shell 控制 token、copy step 和 subprocess 调用边界。
  • CI 已加入 python scripts/runtime_refresh.py --check-plan
  • 本地全量检查脚本 scripts/check.ps1 已加入同一 dry-run gate。