fix: 补齐证据哈希与 runner 安装脚本边界
This commit is contained in:
1 parent
1001c43af6
commit
040504774d
4 files changed
+10
-5
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"scope": "模板完成证据登记,保留命令、日志与产物哈希",
|
"scope": "模板完成证据登记,保留命令、日志与产物哈希",
|
||||||
"generatedAt": "2026-10-21T06:41:20.085Z",
|
"generatedAt": "2026-10-21T06:43:20.332Z",
|
||||||
"templates": {
|
"templates": {
|
||||||
"acheng-campus-food": {
|
"acheng-campus-food": {
|
||||||
"real-manifest-interaction": {
|
"real-manifest-interaction": {
|
||||||
@@ -256,5 +256,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceTreeHash": "1b979d8c64ea424e32b7b20a96a2d97c692cc37099f8a9e41d3b45178655a410"
|
"sourceTreeHash": "3cd6b07396aadee64357dfd4fa865d8e62e86ed513d20264b9fb9a9622fcdcf2"
|
||||||
}
|
}
|
||||||
@@ -28,8 +28,10 @@ RUNNER_CACHE_HOST=${RUNNER_CACHE_HOST:-172.17.0.1}
|
|||||||
CACHE_DIR=${CACHE_DIR:-$RUNNER_ROOT/cache-data}
|
CACHE_DIR=${CACHE_DIR:-$RUNNER_ROOT/cache-data}
|
||||||
DRY_RUN=${DRY_RUN:-0}
|
DRY_RUN=${DRY_RUN:-0}
|
||||||
|
|
||||||
command -v docker >/dev/null 2>&1 || { echo "缺少 docker,请先安装并启动 Docker" >&2; exit 1; }
|
if [ "$DRY_RUN" != "1" ]; then
|
||||||
command -v systemctl >/dev/null 2>&1 || { echo "缺少 systemd,当前脚本只支持 systemd 主机" >&2; exit 1; }
|
command -v docker >/dev/null 2>&1 || { echo "缺少 docker,请先安装并启动 Docker" >&2; exit 1; }
|
||||||
|
command -v systemctl >/dev/null 2>&1 || { echo "缺少 systemd,当前脚本只支持 systemd 主机" >&2; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
aarch64 | arm64) ARCH=arm64 ;;
|
aarch64 | arm64) ARCH=arm64 ;;
|
||||||
@@ -64,6 +66,8 @@ if [ ! -f "$RUNNER_ROOT/.runner" ]; then
|
|||||||
--token "$RUNNER_TOKEN" \
|
--token "$RUNNER_TOKEN" \
|
||||||
--name "$RUNNER_NAME" \
|
--name "$RUNNER_NAME" \
|
||||||
--labels "$RUNNER_LABELS"
|
--labels "$RUNNER_LABELS"
|
||||||
|
fi
|
||||||
|
if [ -f "$RUNNER_ROOT/.runner" ]; then
|
||||||
run chmod 600 "$RUNNER_ROOT/.runner"
|
run chmod 600 "$RUNNER_ROOT/.runner"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ staticStatus 只代表支持范围内的静态检查。completionStatus 保持 u
|
|||||||
|
|
||||||
已逐条完成源码审阅的 review 可登记在 `.codex-tasks/template-audit-execution/raw/manual-review.json`。登记必须使用和诊断报告一致的 `file/page/target/binding/line/message`,并保留结论与证据;doctor 只把精确匹配的 review 标记为 `source-reviewed`,不改变 `completionStatus`。未匹配的新 review 和全部 blocker 仍会让命令失败。
|
已逐条完成源码审阅的 review 可登记在 `.codex-tasks/template-audit-execution/raw/manual-review.json`。登记必须使用和诊断报告一致的 `file/page/target/binding/line/message`,并保留结论与证据;doctor 只把精确匹配的 review 标记为 `source-reviewed`,不改变 `completionStatus`。未匹配的新 review 和全部 blocker 仍会让命令失败。
|
||||||
|
|
||||||
完成证据登记在 `.codex-tasks/template-audit-execution/raw/completion-evidence.json`。每套模板必须提供 `real-manifest-interaction`、`save-reload-publish-isolation`、`visual-reference`、`empty-error-branches` 四类 `passed` 证据;每类证据必须包含实际命令、`exitCode=0`、日志或截图产物及其 SHA-256。registry 还必须记录 source tree hash;doctor 会计算当前仓库源码树的 hash,并在不匹配时拒绝完成态。哈希范围只包含会影响模板交付的源码:排除 `.codex-tasks/`、`.gitea/`、`deploy/` 以及除 `docs/template-completion-rules.md` 之外的全部 markdown。改文档、改 CI 或改部署脚本不再让已完成证据失效,改模板、renderer、诊断器或本文件仍然会。doctor 会校验证据覆盖全部模板、产物存在且哈希一致。全部通过时 `completionStatus=complete`;证据文件缺失时保持 `unverified`;登记不完整或哈希不匹配时对应模板为 `incomplete` 并让命令失败。
|
完成证据登记在 `.codex-tasks/template-audit-execution/raw/completion-evidence.json`。每套模板必须提供 `real-manifest-interaction`、`save-reload-publish-isolation`、`visual-reference`、`empty-error-branches` 四类 `passed` 证据;每类证据必须包含实际命令、`exitCode=0`、日志或截图产物及其 SHA-256。registry 还必须记录 source tree hash;doctor 会计算当前仓库源码树的 hash,并在不匹配时拒绝完成态。哈希范围只包含会影响模板交付的源码:排除 `.codex-tasks/`、`.gitea/`、`deploy/`、`scripts/deploy/` 以及除 `docs/template-completion-rules.md` 之外的全部 markdown。改文档、改 CI 或改部署脚本不再让已完成证据失效,改模板、renderer、诊断器或本文件仍然会。doctor 会校验证据覆盖全部模板、产物存在且哈希一致。全部通过时 `completionStatus=complete`;证据文件缺失时保持 `unverified`;登记不完整或哈希不匹配时对应模板为 `incomplete` 并让命令失败。
|
||||||
|
|
||||||
AST 解析可追踪 workspace.brand、presentation、object 和局部别名。动态路径、跨组件和间接映射等未知情况标为 review,不能猜测为通过。诊断器包含正反故障注入测试。
|
AST 解析可追踪 workspace.brand、presentation、object 和局部别名。动态路径、跨组件和间接映射等未知情况标为 review,不能猜测为通过。诊断器包含正反故障注入测试。
|
||||||
|
|
||||||
|
|||||||
@@ -461,6 +461,7 @@ export function sourceTreeHash(root, options = {}) {
|
|||||||
.split("\0")
|
.split("\0")
|
||||||
.filter((file) => file && isEvidenceSourcePath(file))
|
.filter((file) => file && isEvidenceSourcePath(file))
|
||||||
.map((file) => path.join(rootPath, file));
|
.map((file) => path.join(rootPath, file));
|
||||||
|
if (!staged) files = files.filter((file) => fs.existsSync(file) && fs.statSync(file).isFile());
|
||||||
readContent = staged
|
readContent = staged
|
||||||
? (file) =>
|
? (file) =>
|
||||||
execFileSync("git", ["show", ":" + path.relative(rootPath, file)], {
|
execFileSync("git", ["show", ":" + path.relative(rootPath, file)], {
|
||||||
|
|||||||
Reference in new issue
Block a user