@hunter-harness/workflow-harness 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/harness/bundles/general/claude-code/.harness-build.json +1 -1
- package/harness/bundles/general/claude-code/harness-archive/SKILL.md +5 -2
- package/harness/bundles/general/claude-code/harness-archive/reference.md +1 -1
- package/harness/bundles/general/claude-code/harness-archive/templates/render-summary.mjs +78 -155
- package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +5 -3
- package/harness/bundles/general/claude-code/harness-knowledge-ingest/scripts/harness_knowledge.py +83 -6
- package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/general/claude-code/harness-plan/SKILL.md +6 -3
- package/harness/bundles/general/claude-code/harness-review/SKILL.md +6 -3
- package/harness/bundles/general/claude-code/harness-run/SKILL.md +19 -4
- package/harness/bundles/general/claude-code/harness-run/checklist.md +7 -3
- package/harness/bundles/general/claude-code/harness-run/reference.md +4 -10
- package/harness/bundles/general/claude-code/harness-submit/SKILL.md +9 -4
- package/harness/bundles/general/claude-code/harness-submit/checklist.md +10 -1
- package/harness/bundles/general/claude-code/harness-sync/SKILL.md +5 -3
- package/harness/bundles/general/claude-code/harness-test/SKILL.md +18 -3
- package/harness/bundles/general/claude-code/harness-test/checklist.md +4 -0
- package/harness/bundles/general/claude-code/harness-test/reference.md +5 -5
- package/harness/bundles/general/claude-code/protocols/archive-report-protocol.md +2 -4
- package/harness/bundles/general/claude-code/protocols/ledger-protocol.md +8 -16
- package/harness/bundles/general/claude-code/protocols/report-pipeline-protocol.md +11 -4
- package/harness/bundles/general/claude-code/scripts/harness_archive.py +190 -32
- package/harness/bundles/general/claude-code/scripts/harness_events.py +134 -40
- package/harness/bundles/general/claude-code/scripts/harness_ledger.py +111 -5
- package/harness/bundles/general/claude-code/scripts/harness_preflight.py +46 -3
- package/harness/bundles/general/claude-code/scripts/harness_profile.py +31 -3
- package/harness/bundles/general/claude-code/scripts/harness_state.py +148 -0
- package/harness/bundles/general/claude-code/scripts/harness_test_guard.py +502 -0
- package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +5 -2
- package/harness/bundles/general/codebuddy/harness-archive/reference.md +1 -1
- package/harness/bundles/general/codebuddy/harness-archive/templates/render-summary.mjs +78 -155
- package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +5 -3
- package/harness/bundles/general/codebuddy/harness-knowledge-ingest/scripts/harness_knowledge.py +83 -6
- package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +6 -3
- package/harness/bundles/general/codebuddy/harness-review/SKILL.md +6 -3
- package/harness/bundles/general/codebuddy/harness-run/SKILL.md +19 -4
- package/harness/bundles/general/codebuddy/harness-run/checklist.md +7 -3
- package/harness/bundles/general/codebuddy/harness-run/reference.md +4 -10
- package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +9 -4
- package/harness/bundles/general/codebuddy/harness-submit/checklist.md +10 -1
- package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +5 -3
- package/harness/bundles/general/codebuddy/harness-test/SKILL.md +18 -3
- package/harness/bundles/general/codebuddy/harness-test/checklist.md +4 -0
- package/harness/bundles/general/codebuddy/harness-test/reference.md +5 -5
- package/harness/bundles/general/codebuddy/protocols/archive-report-protocol.md +2 -4
- package/harness/bundles/general/codebuddy/protocols/ledger-protocol.md +8 -16
- package/harness/bundles/general/codebuddy/protocols/report-pipeline-protocol.md +11 -4
- package/harness/bundles/general/codebuddy/scripts/harness_archive.py +190 -32
- package/harness/bundles/general/codebuddy/scripts/harness_events.py +134 -40
- package/harness/bundles/general/codebuddy/scripts/harness_ledger.py +111 -5
- package/harness/bundles/general/codebuddy/scripts/harness_preflight.py +46 -3
- package/harness/bundles/general/codebuddy/scripts/harness_profile.py +31 -3
- package/harness/bundles/general/codebuddy/scripts/harness_state.py +148 -0
- package/harness/bundles/general/codebuddy/scripts/harness_test_guard.py +502 -0
- package/harness/bundles/general/codex/.harness-build.json +1 -1
- package/harness/bundles/general/codex/harness-archive/SKILL.md +5 -2
- package/harness/bundles/general/codex/harness-archive/reference.md +1 -1
- package/harness/bundles/general/codex/harness-archive/templates/render-summary.mjs +78 -155
- package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +5 -3
- package/harness/bundles/general/codex/harness-knowledge-ingest/scripts/harness_knowledge.py +83 -6
- package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/general/codex/harness-plan/SKILL.md +6 -3
- package/harness/bundles/general/codex/harness-review/SKILL.md +5 -2
- package/harness/bundles/general/codex/harness-run/SKILL.md +19 -4
- package/harness/bundles/general/codex/harness-run/checklist.md +7 -3
- package/harness/bundles/general/codex/harness-run/reference.md +4 -10
- package/harness/bundles/general/codex/harness-submit/SKILL.md +9 -4
- package/harness/bundles/general/codex/harness-submit/checklist.md +10 -1
- package/harness/bundles/general/codex/harness-sync/SKILL.md +5 -3
- package/harness/bundles/general/codex/harness-test/SKILL.md +18 -3
- package/harness/bundles/general/codex/harness-test/checklist.md +4 -0
- package/harness/bundles/general/codex/harness-test/reference.md +5 -5
- package/harness/bundles/general/codex/protocols/archive-report-protocol.md +2 -4
- package/harness/bundles/general/codex/protocols/ledger-protocol.md +8 -16
- package/harness/bundles/general/codex/protocols/report-pipeline-protocol.md +11 -4
- package/harness/bundles/general/codex/scripts/harness_archive.py +190 -32
- package/harness/bundles/general/codex/scripts/harness_events.py +134 -40
- package/harness/bundles/general/codex/scripts/harness_ledger.py +111 -5
- package/harness/bundles/general/codex/scripts/harness_preflight.py +46 -3
- package/harness/bundles/general/codex/scripts/harness_profile.py +31 -3
- package/harness/bundles/general/codex/scripts/harness_state.py +148 -0
- package/harness/bundles/general/codex/scripts/harness_test_guard.py +502 -0
- package/harness/bundles/general/cursor/.harness-build.json +1 -1
- package/harness/bundles/general/cursor/harness-archive/SKILL.md +5 -2
- package/harness/bundles/general/cursor/harness-archive/reference.md +1 -1
- package/harness/bundles/general/cursor/harness-archive/templates/render-summary.mjs +78 -155
- package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +5 -3
- package/harness/bundles/general/cursor/harness-knowledge-ingest/scripts/harness_knowledge.py +83 -6
- package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/general/cursor/harness-plan/SKILL.md +6 -3
- package/harness/bundles/general/cursor/harness-review/SKILL.md +5 -2
- package/harness/bundles/general/cursor/harness-run/SKILL.md +19 -4
- package/harness/bundles/general/cursor/harness-run/checklist.md +7 -3
- package/harness/bundles/general/cursor/harness-run/reference.md +4 -10
- package/harness/bundles/general/cursor/harness-submit/SKILL.md +9 -4
- package/harness/bundles/general/cursor/harness-submit/checklist.md +10 -1
- package/harness/bundles/general/cursor/harness-sync/SKILL.md +5 -3
- package/harness/bundles/general/cursor/harness-test/SKILL.md +18 -3
- package/harness/bundles/general/cursor/harness-test/checklist.md +4 -0
- package/harness/bundles/general/cursor/harness-test/reference.md +5 -5
- package/harness/bundles/general/cursor/protocols/archive-report-protocol.md +2 -4
- package/harness/bundles/general/cursor/protocols/ledger-protocol.md +8 -16
- package/harness/bundles/general/cursor/protocols/report-pipeline-protocol.md +11 -4
- package/harness/bundles/general/cursor/scripts/harness_archive.py +190 -32
- package/harness/bundles/general/cursor/scripts/harness_events.py +134 -40
- package/harness/bundles/general/cursor/scripts/harness_ledger.py +111 -5
- package/harness/bundles/general/cursor/scripts/harness_preflight.py +46 -3
- package/harness/bundles/general/cursor/scripts/harness_profile.py +31 -3
- package/harness/bundles/general/cursor/scripts/harness_state.py +148 -0
- package/harness/bundles/general/cursor/scripts/harness_test_guard.py +502 -0
- package/harness/bundles/java/claude-code/.harness-build.json +1 -1
- package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +5 -2
- package/harness/bundles/java/claude-code/harness-archive/SKILL.md +5 -2
- package/harness/bundles/java/claude-code/harness-archive/reference.md +1 -1
- package/harness/bundles/java/claude-code/harness-archive/templates/render-summary.mjs +78 -155
- package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +5 -3
- package/harness/bundles/java/claude-code/harness-knowledge-ingest/scripts/harness_knowledge.py +83 -6
- package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/java/claude-code/harness-package/SKILL.md +5 -2
- package/harness/bundles/java/claude-code/harness-plan/SKILL.md +6 -3
- package/harness/bundles/java/claude-code/harness-review/SKILL.md +6 -3
- package/harness/bundles/java/claude-code/harness-run/SKILL.md +22 -5
- package/harness/bundles/java/claude-code/harness-run/reference.md +1 -1
- package/harness/bundles/java/claude-code/harness-submit/SKILL.md +9 -4
- package/harness/bundles/java/claude-code/harness-submit/checklist.md +10 -1
- package/harness/bundles/java/claude-code/harness-sync/SKILL.md +5 -3
- package/harness/bundles/java/claude-code/harness-test/SKILL.md +20 -3
- package/harness/bundles/java/claude-code/harness-test/reference.md +1 -1
- package/harness/bundles/java/claude-code/protocols/archive-report-protocol.md +2 -4
- package/harness/bundles/java/claude-code/protocols/ledger-protocol.md +8 -16
- package/harness/bundles/java/claude-code/protocols/report-pipeline-protocol.md +11 -4
- package/harness/bundles/java/claude-code/scripts/harness_archive.py +190 -32
- package/harness/bundles/java/claude-code/scripts/harness_events.py +134 -40
- package/harness/bundles/java/claude-code/scripts/harness_ledger.py +111 -5
- package/harness/bundles/java/claude-code/scripts/harness_preflight.py +46 -3
- package/harness/bundles/java/claude-code/scripts/harness_profile.py +31 -3
- package/harness/bundles/java/claude-code/scripts/harness_state.py +148 -0
- package/harness/bundles/java/claude-code/scripts/harness_test_guard.py +502 -0
- package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +5 -2
- package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +5 -2
- package/harness/bundles/java/codebuddy/harness-archive/reference.md +1 -1
- package/harness/bundles/java/codebuddy/harness-archive/templates/render-summary.mjs +78 -155
- package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +5 -3
- package/harness/bundles/java/codebuddy/harness-knowledge-ingest/scripts/harness_knowledge.py +83 -6
- package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/java/codebuddy/harness-package/SKILL.md +5 -2
- package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +6 -3
- package/harness/bundles/java/codebuddy/harness-review/SKILL.md +6 -3
- package/harness/bundles/java/codebuddy/harness-run/SKILL.md +22 -5
- package/harness/bundles/java/codebuddy/harness-run/reference.md +1 -1
- package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +9 -4
- package/harness/bundles/java/codebuddy/harness-submit/checklist.md +10 -1
- package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +5 -3
- package/harness/bundles/java/codebuddy/harness-test/SKILL.md +20 -3
- package/harness/bundles/java/codebuddy/harness-test/reference.md +1 -1
- package/harness/bundles/java/codebuddy/protocols/archive-report-protocol.md +2 -4
- package/harness/bundles/java/codebuddy/protocols/ledger-protocol.md +8 -16
- package/harness/bundles/java/codebuddy/protocols/report-pipeline-protocol.md +11 -4
- package/harness/bundles/java/codebuddy/scripts/harness_archive.py +190 -32
- package/harness/bundles/java/codebuddy/scripts/harness_events.py +134 -40
- package/harness/bundles/java/codebuddy/scripts/harness_ledger.py +111 -5
- package/harness/bundles/java/codebuddy/scripts/harness_preflight.py +46 -3
- package/harness/bundles/java/codebuddy/scripts/harness_profile.py +31 -3
- package/harness/bundles/java/codebuddy/scripts/harness_state.py +148 -0
- package/harness/bundles/java/codebuddy/scripts/harness_test_guard.py +502 -0
- package/harness/bundles/java/codex/.harness-build.json +1 -1
- package/harness/bundles/java/codex/harness-apidoc/SKILL.md +5 -2
- package/harness/bundles/java/codex/harness-archive/SKILL.md +5 -2
- package/harness/bundles/java/codex/harness-archive/reference.md +1 -1
- package/harness/bundles/java/codex/harness-archive/templates/render-summary.mjs +78 -155
- package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +5 -3
- package/harness/bundles/java/codex/harness-knowledge-ingest/scripts/harness_knowledge.py +83 -6
- package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/java/codex/harness-package/SKILL.md +5 -2
- package/harness/bundles/java/codex/harness-plan/SKILL.md +6 -3
- package/harness/bundles/java/codex/harness-review/SKILL.md +5 -2
- package/harness/bundles/java/codex/harness-run/SKILL.md +22 -5
- package/harness/bundles/java/codex/harness-run/reference.md +1 -1
- package/harness/bundles/java/codex/harness-submit/SKILL.md +9 -4
- package/harness/bundles/java/codex/harness-submit/checklist.md +10 -1
- package/harness/bundles/java/codex/harness-sync/SKILL.md +5 -3
- package/harness/bundles/java/codex/harness-test/SKILL.md +20 -3
- package/harness/bundles/java/codex/harness-test/reference.md +1 -1
- package/harness/bundles/java/codex/protocols/archive-report-protocol.md +2 -4
- package/harness/bundles/java/codex/protocols/ledger-protocol.md +8 -16
- package/harness/bundles/java/codex/protocols/report-pipeline-protocol.md +11 -4
- package/harness/bundles/java/codex/scripts/harness_archive.py +190 -32
- package/harness/bundles/java/codex/scripts/harness_events.py +134 -40
- package/harness/bundles/java/codex/scripts/harness_ledger.py +111 -5
- package/harness/bundles/java/codex/scripts/harness_preflight.py +46 -3
- package/harness/bundles/java/codex/scripts/harness_profile.py +31 -3
- package/harness/bundles/java/codex/scripts/harness_state.py +148 -0
- package/harness/bundles/java/codex/scripts/harness_test_guard.py +502 -0
- package/harness/bundles/java/cursor/.harness-build.json +1 -1
- package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +5 -2
- package/harness/bundles/java/cursor/harness-archive/SKILL.md +5 -2
- package/harness/bundles/java/cursor/harness-archive/reference.md +1 -1
- package/harness/bundles/java/cursor/harness-archive/templates/render-summary.mjs +78 -155
- package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +5 -3
- package/harness/bundles/java/cursor/harness-knowledge-ingest/scripts/harness_knowledge.py +83 -6
- package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/java/cursor/harness-package/SKILL.md +5 -2
- package/harness/bundles/java/cursor/harness-plan/SKILL.md +6 -3
- package/harness/bundles/java/cursor/harness-review/SKILL.md +5 -2
- package/harness/bundles/java/cursor/harness-run/SKILL.md +22 -5
- package/harness/bundles/java/cursor/harness-run/reference.md +1 -1
- package/harness/bundles/java/cursor/harness-submit/SKILL.md +9 -4
- package/harness/bundles/java/cursor/harness-submit/checklist.md +10 -1
- package/harness/bundles/java/cursor/harness-sync/SKILL.md +5 -3
- package/harness/bundles/java/cursor/harness-test/SKILL.md +20 -3
- package/harness/bundles/java/cursor/harness-test/reference.md +1 -1
- package/harness/bundles/java/cursor/protocols/archive-report-protocol.md +2 -4
- package/harness/bundles/java/cursor/protocols/ledger-protocol.md +8 -16
- package/harness/bundles/java/cursor/protocols/report-pipeline-protocol.md +11 -4
- package/harness/bundles/java/cursor/scripts/harness_archive.py +190 -32
- package/harness/bundles/java/cursor/scripts/harness_events.py +134 -40
- package/harness/bundles/java/cursor/scripts/harness_ledger.py +111 -5
- package/harness/bundles/java/cursor/scripts/harness_preflight.py +46 -3
- package/harness/bundles/java/cursor/scripts/harness_profile.py +31 -3
- package/harness/bundles/java/cursor/scripts/harness_state.py +148 -0
- package/harness/bundles/java/cursor/scripts/harness_test_guard.py +502 -0
- package/harness/manifests/general/claude-code.json +33 -29
- package/harness/manifests/general/codebuddy.json +33 -29
- package/harness/manifests/general/codex.json +33 -29
- package/harness/manifests/general/cursor.json +33 -29
- package/harness/manifests/java/claude-code.json +33 -29
- package/harness/manifests/java/codebuddy.json +33 -29
- package/harness/manifests/java/codex.json +33 -29
- package/harness/manifests/java/cursor.json +33 -29
- package/hunter-workflow-family.json +2 -2
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ name: harness-review
|
|
|
3
3
|
description: 6维度代码审查(架构/安全/规范/兼容/测试/性能),对照项目规则(见
|
|
4
4
|
.harness/context-index.json)和测试场景表,在隔离上下文运行。使用场景:代码审查、提交前检查、合并评审
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=5be110134c0a5e82; overlay=java; agent=codex; do not edit -->
|
|
7
7
|
# harness-review — 代码审查
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -39,6 +39,7 @@ description: 6维度代码审查(架构/安全/规范/兼容/测试/性能)
|
|
|
39
39
|
6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
|
|
40
40
|
7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
|
|
41
41
|
8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
|
|
42
|
+
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
42
43
|
|
|
43
44
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
44
45
|
|
|
@@ -130,7 +131,7 @@ review 读取 `state-snapshot.json`(`harness_state.py` / state-layout-protocol
|
|
|
130
131
|
|
|
131
132
|
## 执行日志
|
|
132
133
|
|
|
133
|
-
`events.ndjson` 为唯一事实源(schema_version
|
|
134
|
+
`events.ndjson` 为唯一事实源(schema_version 3,兼容读取 v1/v2;`note` 承载人类可读摘要);`logs/execution-log.md` 由 `harness_events.py` 渲染,**禁止用 Write/Edit 直接维护**。直接修改的内容会在 `phase.end` 或 finalize 时被完整重建覆盖,属于数据丢失;需要保留的详情必须进入事件 `note`。结构 → [[../protocols/report-pipeline-protocol.md|report-pipeline-protocol]]
|
|
134
135
|
|
|
135
136
|
```powershell
|
|
136
137
|
python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase <phase> --type phase.start --note "<触发指令>"
|
|
@@ -139,3 +140,5 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
139
140
|
> **脚本接线**:`harness_events.py append`;`harness_archive.py finalize`;`harness_preflight.py check`;`harness_ledger.py can-reuse`;`harness_service.py ensure/stop`(须 `--files`/`serviceStart.inputFiles`)。JSON 输出按 D13 护栏解读。
|
|
140
141
|
|
|
141
142
|
> **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
|
|
143
|
+
|
|
144
|
+
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-run
|
|
3
3
|
description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编译验证),逐变更簇实现计划中的任务。使用场景:开始编码、实现功能、写代码、TDD 编码
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=5be110134c0a5e82; overlay=java; agent=codex; do not edit -->
|
|
6
6
|
# harness-run — 需求编码
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -44,6 +44,7 @@ description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编
|
|
|
44
44
|
6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
|
|
45
45
|
7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
|
|
46
46
|
8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
|
|
47
|
+
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
47
48
|
|
|
48
49
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
49
50
|
|
|
@@ -56,7 +57,7 @@ description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编
|
|
|
56
57
|
0. 加载上下文(change-name、spec/plan/detail/scenarios/ledger/run-task-status/worktree;`--fixback` 读 fixback)→ append `phase.start`
|
|
57
58
|
0.5. **测试基础设施探测**(先写 `CHECKING`,四项证据齐备后再结论)→ `reference.md` Step 0.5
|
|
58
59
|
1. **变更簇 TDD** — `protocols.md` `run-tdd-protocol`;批量 RED/GREEN;按需 `change-cluster-review-protocol`(高风险 + reviewer 预检可用)
|
|
59
|
-
2. 构建验证 + 写 ledger
|
|
60
|
+
2. 构建验证 + 写 ledger(`harness_ledger.py diff-hash --change-dir` 纳入 ignored tests,`reference.md` Step 2c)
|
|
60
61
|
3. **场景覆盖检查**(场景表映射,禁止用用例数冒充场景数)
|
|
61
62
|
4. **关门检查**(10 项)+ 计划状态持久化
|
|
62
63
|
|
|
@@ -86,12 +87,24 @@ description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编
|
|
|
86
87
|
| **变更簇 TDD** | 一簇一次 RED/GREEN;低价值项豁免;新分支必须 RED |
|
|
87
88
|
| **RED/GREEN** | RED 须有效;静态验证 ≠ 测试通过;greenfield 大重写豁免见 reference |
|
|
88
89
|
| **Mapper/DB** | 纯 Mock 不得宣称 DB 验证通过;迁移脚本**永不自动执行** |
|
|
89
|
-
| **探测/ledger** | 基础设施先探测;每次构建/测试写 ledger
|
|
90
|
+
| **探测/ledger** | 基础设施先探测;每次构建/测试写 ledger;用 canonical `diff-hash --change-dir` |
|
|
90
91
|
| **预存变更** | 保留 → baseline 隔离;存在则最终 ≥ 🟡WARN |
|
|
91
92
|
| **关门/状态** | 10 项关门检查;持久化 run-task-status;P0 静态-only 不得建议 submit |
|
|
92
93
|
| **Worktree** | `requested=true` 时代码只写 worktree |
|
|
93
94
|
| **PowerShell** | 所有 git/构建经 `powershell.exe -NoProfile -Command` |
|
|
94
95
|
|
|
96
|
+
### 陈旧测试安全修复与精确跟踪
|
|
97
|
+
|
|
98
|
+
测试编译或 RED/GREEN 失败时,先区分当前实现缺陷、测试基础设施故障与陈旧测试。只有同时满足以下条件才允许自动修复陈旧测试:当前生产代码、已批准计划或可验证的历史变更能唯一确定新契约;修改范围仅限测试文件;修复后会立即重跑该测试及本变更目标测试。符合时以 `stale-test-repair` 记录:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
python <skills-root>/scripts/harness_test_guard.py record --project . --change-dir ".harness/changes/<change-name>" --files "<精确测试文件路径,逗号分隔>" --reason stale-test-repair --json
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
新建或正常更新测试分别使用 `tdd-created` / `test-updated`。若预期行为存在业务歧义,停止测试修复并记录 `BLOCKED_PREEXISTING`,不得猜测新断言。
|
|
105
|
+
|
|
106
|
+
**禁止临时排除测试**:不得将测试改名为 `.bak`、移出测试目录、删除、添加 `@Disabled`/`@Ignore`、修改 Surefire/Gradle exclude 或跳过测试来制造绿色结果;也不得仅为满足陈旧测试而修改生产代码。`.gitignore` 中的测试只能通过 manifest 的精确路径闭环处理,禁止全局放宽 ignore。
|
|
107
|
+
|
|
95
108
|
### Java TDD / 数据访问补充
|
|
96
109
|
|
|
97
110
|
| 项 | 规则 |
|
|
@@ -99,7 +112,9 @@ description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编
|
|
|
99
112
|
| **低价值豁免** | ErrorCode 常量、VO/DTO 字段、注释、import 清理、格式化、SQL 脚本、配置模板、文档 — 不单独建测试类;禁止为单个错误码单独跑 Maven |
|
|
100
113
|
| **Mapper / LambdaQueryWrapper / SQL** | 纯 Mock 返回值**不得**宣称 DB 验证通过 → 🟡 静态验证,交 harness-test 真实 DB |
|
|
101
114
|
| **行为性新分支** | 正则/条件/分支逻辑变更新增分支须 RED→GREEN;不属于低价值豁免 |
|
|
102
|
-
| **ledger** | compile 必写;执行了 test 写 unitTest,否则 `NOT_RUN_BY_RUN`;diffHash
|
|
115
|
+
| **ledger** | compile 必写;执行了 test 写 unitTest,否则 `NOT_RUN_BY_RUN`;diffHash 用 `harness_ledger.py diff-hash --change-dir`(见 reference) |
|
|
116
|
+
| **陈旧 Java 测试** | `cannot find symbol`/mapper 方法改名/DTO 字段迁移只有在当前接口和批准计划唯一确定替代契约时才允许只改测试;修复后定向 `mvn test -Dtest=<class>`,再跑目标测试并记录 `stale-test-repair` |
|
|
117
|
+
| **禁止规避** | 禁止把 `*Test.java` 改成 `.bak`、删除、`@Disabled`/`@Ignore`、Surefire exclude 或以 `-DskipTests` 充当 GREEN |
|
|
103
118
|
## Output Format
|
|
104
119
|
|
|
105
120
|
变更文件表 + 构建/测试证据 + 场景覆盖摘要 + 最终状态(✅OK / 🟡WARN / ❌FAIL)。→ `reference.md`
|
|
@@ -118,7 +133,7 @@ description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编
|
|
|
118
133
|
|
|
119
134
|
## 执行日志
|
|
120
135
|
|
|
121
|
-
`events.ndjson` 为唯一事实源(schema_version
|
|
136
|
+
`events.ndjson` 为唯一事实源(schema_version 3,兼容读取 v1/v2;`note` 承载人类可读摘要);`logs/execution-log.md` 由 `harness_events.py` 渲染,**禁止用 Write/Edit 直接维护**。直接修改的内容会在 `phase.end` 或 finalize 时被完整重建覆盖,属于数据丢失;需要保留的详情必须进入事件 `note`。结构 → [[../protocols/report-pipeline-protocol.md|report-pipeline-protocol]]
|
|
122
137
|
|
|
123
138
|
```powershell
|
|
124
139
|
python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase <phase> --type phase.start --note "<触发指令>"
|
|
@@ -127,3 +142,5 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
127
142
|
> **脚本接线**:`harness_events.py append`;`harness_archive.py finalize`;`harness_preflight.py check`;`harness_ledger.py can-reuse`;`harness_service.py ensure/stop`(须 `--files`/`serviceStart.inputFiles`)。JSON 输出按 D13 护栏解读。
|
|
128
143
|
|
|
129
144
|
> **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
|
|
145
|
+
|
|
146
|
+
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
@@ -792,7 +792,7 @@ powershell.exe -Command "git -C '<project-path>' diff --check"
|
|
|
792
792
|
|
|
793
793
|
## 执行日志记录
|
|
794
794
|
|
|
795
|
-
`/harness-run` 只向 `events.ndjson` 追加事件(schema_version
|
|
795
|
+
`/harness-run` 只向 `events.ndjson` 追加事件(schema_version 3,兼容读取 v1/v2);`logs/execution-log.md` 由 `harness_events.py append` 自动渲染。步骤 0 之前 append `phase.start`;各阶段写入 `command` / `verification` / `decision` / `issue`,人类可读摘要放 `note`。详见 [[../../protocols/report-pipeline-protocol.md|report-pipeline-protocol]] 与 core `harness-run/SKILL.md`。
|
|
796
796
|
|
|
797
797
|
## verification-ledger 可复用判定
|
|
798
798
|
|
|
@@ -3,7 +3,7 @@ name: harness-submit
|
|
|
3
3
|
description: 最终提交封装:验证→中文 commit→提交/推送;worktree 模式含 --no-ff
|
|
4
4
|
合并回主分支。使用场景:提交代码、commit、push、合并分支、merge to main、完成开发
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=5be110134c0a5e82; overlay=java; agent=codex; do not edit -->
|
|
7
7
|
# harness-submit — 最终提交(含 worktree 合并)
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -40,6 +40,7 @@ description: 最终提交封装:验证→中文 commit→提交/推送;workt
|
|
|
40
40
|
6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
|
|
41
41
|
7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
|
|
42
42
|
8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
|
|
43
|
+
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
43
44
|
|
|
44
45
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
45
46
|
|
|
@@ -53,10 +54,10 @@ description: 最终提交封装:验证→中文 commit→提交/推送;workt
|
|
|
53
54
|
|
|
54
55
|
### 提交流程(步骤 0–7)
|
|
55
56
|
|
|
56
|
-
0. **启动准备** — 确定变更名;读 ledger
|
|
57
|
+
0. **启动准备** — 确定变更名;读 ledger,以 `harness_ledger.py diff-hash --repo . --base <baseCommit> --change-dir ".harness/changes/<change-name>" --json` 计算 diffHash + post-test 7 类分类;append `phase.start`
|
|
57
58
|
1. **合并最新代码** — 主目录:`stash` → `pull --rebase` → `stash pop`;**worktree:N/A**(远端同步在合并段主分支完成)
|
|
58
59
|
2. **最终验证** — ledger 复用优先;**提交前最终门禁只调 `can-reuse`**(删除与 coverage 冲突的二次全量门禁):`harness_ledger.py can-reuse --verification unitTestFull --scope module --project . --profile-input unitTestFull --command <resolved commands.unitTestFull.command>`。`--command` **按 profile key resolve**:读 `build-profile.json` 的 `commands.unitTestFull.command`(v2),或 `harness_profile.py resolve --project . --key unitTestFull --json` 取 resolved command,**不复制示例模块名**(文档示例只展示 key)。`--profile-input unitTestFull` 从 `verificationInputs.unitTestFull`(v2 由 `commands.unitTestFull.inputs` 派生)展开依赖闭包,**禁止用仅含 staged 文件的 `--files` 快捷方式**冒充全量闭包。`reuse=true` → 不再执行二次全量测试;仅 `reuse=false` 时执行**同一 resolved verification**(profile `unitTestFull` 命令),成功后用同一文件集、command、`scope=module` 写回 ledger `unitTestFull` 项。增量 `unitTest` 永远不能冒充 `unitTestFull` 门禁。
|
|
59
|
-
3. **.gitignore +
|
|
60
|
+
3. **.gitignore + 精确暂存** ⚠️ — 检查 `.harness/` 在 `.gitignore`;**禁止 `git add -A`**。若存在 `evidence/test-tracking.json`,先执行 `python <skills-root>/scripts/harness_test_guard.py stage --project . --change-dir ".harness/changes/<change-name>" --json`;失败即硬停止。无 manifest 时不使用 `-f`。manifest 之外的文件按精确业务路径正常暂存,**禁止全局 force-add**。
|
|
60
61
|
4. **提交方式** — 主目录:AskUserQuestion 三选项(commit+push / 仅本地 / 取消);**worktree:固定仅本地 commit**
|
|
61
62
|
5. **commit-message.txt** ⚠️ — 展示 staged、diff stat、完整中文 message;用户确认
|
|
62
63
|
6. **commit / push** — `git commit -F`;主目录按选项 push(push 前 fetch 检查远端);**worktree:只 commit,记录 local hash**
|
|
@@ -105,6 +106,8 @@ commit+push / 仅本地 commit / 取消;**不调用 Superpowers 呈现 PR/丢
|
|
|
105
106
|
|
|
106
107
|
见 `checklist.md` 与 `../protocols/ledger-protocol.md`、`../protocols/submit-protocol.md`。
|
|
107
108
|
|
|
109
|
+
test-tracking manifest 是 ignored test 的唯一强制暂存授权:只允许 `harness_test_guard.py stage` 暂存 manifest 中已校验路径,禁止 `git add -f .`、目录级 `git add -f` 或全局修改 `.gitignore`。worktree commit 前须确认 manifest 路径全部进入 cached diff;合并回主分支后、删除 worktree 前须确认这些路径已由目标 commit 跟踪,否则停止清理。
|
|
110
|
+
|
|
108
111
|
### 四、worktree 合并硬规则
|
|
109
112
|
|
|
110
113
|
- **push 只在主分支**;worktree 分支不 push
|
|
@@ -138,7 +141,7 @@ git 经 PowerShell;commit/报告不得含明文密钥。遵循 `../protocols/s
|
|
|
138
141
|
|
|
139
142
|
## 执行日志
|
|
140
143
|
|
|
141
|
-
`events.ndjson` 为唯一事实源(schema_version
|
|
144
|
+
`events.ndjson` 为唯一事实源(schema_version 3,兼容读取 v1/v2;`note` 承载人类可读摘要);`logs/execution-log.md` 由 `harness_events.py` 渲染,**禁止用 Write/Edit 直接维护**。直接修改的内容会在 `phase.end` 或 finalize 时被完整重建覆盖,属于数据丢失;需要保留的详情必须进入事件 `note`。结构 → [[../protocols/report-pipeline-protocol.md|report-pipeline-protocol]]
|
|
142
145
|
|
|
143
146
|
```powershell
|
|
144
147
|
python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase <phase> --type phase.start --note "<触发指令>"
|
|
@@ -147,3 +150,5 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
147
150
|
> **脚本接线**:`harness_events.py append`;`harness_archive.py finalize`;`harness_preflight.py check`;`harness_ledger.py can-reuse`;`harness_service.py ensure/stop`(须 `--files`/`serviceStart.inputFiles`)。JSON 输出按 D13 护栏解读。
|
|
148
151
|
|
|
149
152
|
> **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
|
|
153
|
+
|
|
154
|
+
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
@@ -25,7 +25,7 @@ description: harness-submit 的8 步工作流详细步骤和执行日志记录
|
|
|
25
25
|
**读取 verification-ledger + post-test 变更分类**:
|
|
26
26
|
|
|
27
27
|
1. 读取 `.harness/changes/<change-name>/evidence/verification-ledger.json`,记录 `diffHash` / `currentHead` / `unitTest` / `apiTest` 状态
|
|
28
|
-
2.
|
|
28
|
+
2. 执行 `harness_ledger.py diff-hash --repo . --base <baseCommit> --change-dir ".harness/changes/<change-name>" --json` 计算当前 diffHash;manifest 校验失败即停止,不得绕过后与 ledger 比对
|
|
29
29
|
3. 若 test 之后有代码变更(当前 diffHash ≠ test 完成时的 diffHash),按 7 类对 post-test diff 分类(见 `../protocols/ledger-protocol.md` 第六章),写入 ledger 的 `postTestClassification`
|
|
30
30
|
4. 行为性变更(BEHAVIORAL_SERVICE_CHANGE / API_CONTRACT_CHANGE / SQL_OR_MAPPER_CHANGE / SECURITY_OR_PERMISSION_CHANGE)→ **停止 submit**,提示先重跑 `/harness-test` 相关场景
|
|
31
31
|
5. 非行为性变更(NON_BEHAVIORAL_CLEANUP / COMMENT_ONLY / TEST_ONLY)→ 可继续 submit,但后续验证按复用规则处理
|
|
@@ -116,6 +116,13 @@ python <skills-root>/scripts/harness_ledger.py can-reuse `
|
|
|
116
116
|
|
|
117
117
|
## 步骤 3:.gitignore 检查 + 暂存业务文件 ⚠️ 强制阻断
|
|
118
118
|
|
|
119
|
+
### Ignored test 精确暂存
|
|
120
|
+
|
|
121
|
+
- [ ] 检查 `.harness/changes/<change-name>/evidence/test-tracking.json` 是否存在
|
|
122
|
+
- [ ] 存在时先执行 `python <skills-root>/scripts/harness_test_guard.py stage --project . --change-dir ".harness/changes/<change-name>" --json`;任一 manifest/path/hash/index 校验失败立即停止
|
|
123
|
+
- [ ] 用 `git diff --cached --name-only` 验证 manifest 中每个精确路径均已暂存,且没有 guard 引入的额外路径
|
|
124
|
+
- [ ] 无 manifest 时禁止使用 `git add -f`;有 manifest 时也只允许 guard 内部的 exact force-add,**禁止全局 force-add**、目录级 force-add 和全局修改 `.gitignore`
|
|
125
|
+
|
|
119
126
|
提交前**强制检查 `.gitignore`** 是否包含 `.harness/`:
|
|
120
127
|
|
|
121
128
|
```powershell
|
|
@@ -406,6 +413,8 @@ powershell.exe -Command "git -C '<项目路径>' push"
|
|
|
406
413
|
|
|
407
414
|
### 步骤 M7:清理 worktree
|
|
408
415
|
|
|
416
|
+
若存在 test-tracking manifest,删除 worktree 前必须逐一确认 manifest 路径已包含在 worktree commit 中,且合并后的主分支可用 `git ls-files --error-unmatch -- <exact-path>` 找到;任一路径缺失即停止清理并报告,防止 ignored test 随 worktree 被永久删除。
|
|
417
|
+
|
|
409
418
|
```powershell
|
|
410
419
|
powershell.exe -Command "git -C '<项目路径>' worktree remove '<worktree-path>' --force"
|
|
411
420
|
powershell.exe -Command "git -C '<项目路径>' branch -D worktree/<change-name>"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-sync
|
|
3
3
|
description: 检查并更新项目AI元数据(CodeGraph索引、harness-codebase-map分析、CLAUDE.md、AGENTS.md、.harness/完整性),确保Claude对代码库的理解与最新代码一致。当用户说'同步/更新索引/刷新元数据/检查一致性'时使用
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=5be110134c0a5e82; overlay=java; agent=codex; do not edit -->
|
|
6
6
|
# harness-sync — 元数据同步
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -22,7 +22,7 @@ description: 检查并更新项目AI元数据(CodeGraph索引、harness-codeba
|
|
|
22
22
|
| 2 | CodeGraph 索引是否需重建 |
|
|
23
23
|
| 3 | `.harness/codebase/map/` 是否过期 → 报告建议 `/harness-codebase-map` |
|
|
24
24
|
| 3.5 | `harness_knowledge.py sync`;可 `sync --update`;失败不得假装可用。**知识闭环主入口**是 `/harness-knowledge-ingest auto`(含 Agent judge),sync 不重复列人工知识待办 |
|
|
25
|
-
| 3.6 |
|
|
25
|
+
| 3.6 | 单次运行 `harness_knowledge.py maintain --project . --drain --json`,有界推进全部 `.harness/knowledge/maintenance-outbox/{pending,failed}`;不得为每个条目重复启动 Python/重建索引(§8.2:archive close 只 enqueue,sync 异步推进 outbox 到 completed/pending-judge) |
|
|
26
26
|
| 4 | CLAUDE.md 完整性/行数 → 超限 AskUserQuestion 瘦身 |
|
|
27
27
|
| 5 | AGENTS.md 与 CLAUDE.md 一致 |
|
|
28
28
|
| 6 | `.harness/` 结构(init 规程 → `reference.md` 第 6 步);可选 `harness_deploy.py diff` 检查已装 skill 是否过期 |
|
|
@@ -54,7 +54,7 @@ description: 检查并更新项目AI元数据(CodeGraph索引、harness-codeba
|
|
|
54
54
|
|
|
55
55
|
## 执行日志
|
|
56
56
|
|
|
57
|
-
`events.ndjson` 为唯一事实源(schema_version
|
|
57
|
+
`events.ndjson` 为唯一事实源(schema_version 3,兼容读取 v1/v2;`note` 承载人类可读摘要);`logs/execution-log.md` 由 `harness_events.py` 渲染,**禁止用 Write/Edit 直接维护**。直接修改的内容会在 `phase.end` 或 finalize 时被完整重建覆盖,属于数据丢失;需要保留的详情必须进入事件 `note`。结构 → [[../protocols/report-pipeline-protocol.md|report-pipeline-protocol]]
|
|
58
58
|
|
|
59
59
|
```powershell
|
|
60
60
|
python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase <phase> --type phase.start --note "<触发指令>"
|
|
@@ -63,3 +63,5 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
63
63
|
> **脚本接线**:`harness_events.py append`;`harness_archive.py finalize`;`harness_preflight.py check`;`harness_ledger.py can-reuse`;`harness_service.py ensure/stop`(须 `--files`/`serviceStart.inputFiles`)。JSON 输出按 D13 护栏解读。
|
|
64
64
|
|
|
65
65
|
> **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
|
|
66
|
+
|
|
67
|
+
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-test
|
|
3
3
|
description: 测试执行:读取场景表,执行单元测试+API接口测试+数据兼容验证,输出测试报告。当用户说'跑测试/验证/跑用例/接口测试/单元测试'时使用
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=5be110134c0a5e82; overlay=java; agent=codex; do not edit -->
|
|
6
6
|
# harness-test — 测试执行
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -36,6 +36,7 @@ description: 测试执行:读取场景表,执行单元测试+API接口测试
|
|
|
36
36
|
6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
|
|
37
37
|
7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
|
|
38
38
|
8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
|
|
39
|
+
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
39
40
|
|
|
40
41
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
41
42
|
|
|
@@ -81,7 +82,9 @@ description: 测试执行:读取场景表,执行单元测试+API接口测试
|
|
|
81
82
|
- **编译门禁**:测试前按 `build-profile.json` 的 `commands.compile`(v2,profile key resolve);输出须含 `BUILD SUCCESS` 或 exit 0 证据
|
|
82
83
|
- **条件 install**:worktree 首建或上游模块变更时按 profile 执行 `commands.install`(非每次强制 `-am`)
|
|
83
84
|
- **单元测试**:可复用 ledger unitTest 则跳过;否则 `commands.unitTest`(典型 `mvn test -pl <module>`);执行模块全量 `commands.unitTestFull` 成功 → 记 `unitTestFull`(scope=module,供 submit 复用)
|
|
85
|
+
- **陈旧测试安全修复**:测试编译明确命中已移除/改名 API 且当前代码与批准计划唯一确定新契约时,只修测试并定向重跑,记录 `stale-test-repair`;有歧义则 `BLOCKED_PREEXISTING`,禁止 `.bak`/删除/禁用/exclude
|
|
84
86
|
- **服务启动**:`build-profile.json` 的 `serviceStartTemplate`(典型 `spring-boot:run` + profile);**禁止 hardcode 端口/模块路径**
|
|
87
|
+
- **Maven 生命周期去重**:单元测试已独立通过后,服务启动命令可配置 `-Dmaven.test.skip=true` 避免重复测试编译;它仅优化启动,不是测试通过证据
|
|
85
88
|
- **服务指纹输入**(Task 3 §5.1):`serviceStart.inputFiles` 必须列出 module 源 glob(如 `["<module>/pom.xml", "<module>/src/main/**/*.java", "<module>/src/main/resources/**"]`);`harness_service.py ensure` 取 CLI `--files` ∪ `inputFiles` 计算 `moduleInputsHash`。**空输入被拒绝**,不得生成可复用空指纹。源码/command/profile/overlayPath 任一变化即 restart
|
|
86
89
|
- **runtime overlay**:`-Dspring.config.additional-location=file:<ascii-abs-path>/application-harness-test.yml`;禁止默认 Edit tracked `application*.yml`
|
|
87
90
|
- **known-good-test-profile**:profile 名、baseURL、healthUrl 写在 build-profile,非 skill 硬编码
|
|
@@ -111,12 +114,24 @@ description: 测试执行:读取场景表,执行单元测试+API接口测试
|
|
|
111
114
|
|
|
112
115
|
### 四、单元测试复用 + 写入 ledger
|
|
113
116
|
|
|
114
|
-
Phase 1 前先读 `.harness/changes/<change-name>/evidence/verification-ledger.json
|
|
117
|
+
Phase 1 前先读 `.harness/changes/<change-name>/evidence/verification-ledger.json`,并用 `harness_ledger.py diff-hash --repo . --base <baseCommit> --change-dir ".harness/changes/<change-name>" --json` 重算真实指纹:run 的 unitTest 满足(diffHash 一致 + module/profile 一致 + scope 一致或更严格 + run 后无行为性修改 + run 跑了全量测试)则复用,否则按 **profile key resolve** 执行测试命令(`python <skills-root>/scripts/harness_profile.py resolve --project . --key unitTest|unitTestFull --json`,**不复制示例 `-pl` 命令**)。Phase 1/2 完成后必须写回 ledger:执行增量测试类 → 记 `unitTest`(scope=incremental);执行 profile 模块全量命令 → 记 `unitTestFull`(scope=module,可供 submit 复用);接口测试 → 记 `apiTest`。详见 `checklist.md`「单元测试复用」、`../protocols/ledger-protocol.md`。
|
|
115
118
|
|
|
116
119
|
### 五、命令与请求超时治理
|
|
117
120
|
|
|
118
121
|
所有命令必须有「预期时长 + 超时上限」,超过预期必须输出一次状态行,**不得静默等待**。`durationMs > 10000` → 🟡 SLOW,`> 30000` → ❌ TIMEOUT_RISK。详见 `reference.md`「命令与请求超时治理」。
|
|
119
122
|
|
|
123
|
+
### 五-A、陈旧测试安全修复
|
|
124
|
+
|
|
125
|
+
若测试编译或执行明确指向已移除/改名 API 的陈旧测试,且当前生产代码、已批准计划或可验证历史能唯一确定新契约,可仅修改测试并立即重跑该测试与目标测试,然后记录:
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
python <skills-root>/scripts/harness_test_guard.py record --project . --change-dir ".harness/changes/<change-name>" --files "<精确测试文件路径,逗号分隔>" --reason stale-test-repair --json
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
普通新增/更新测试使用 `tdd-created` / `test-updated`。存在业务歧义或修复会触及生产代码时,记录 `BLOCKED_PREEXISTING` 并停止复用该验证,不得猜测或绕过。
|
|
132
|
+
|
|
133
|
+
**禁止临时排除测试**:禁止 `.bak`/改名、移出测试目录、删除、禁用注解、构建 exclude、`skipTests`/`maven.test.skip` 充当测试通过证据;服务启动可在单元测试已独立通过后使用 `-Dmaven.test.skip=true` 避免重复编译测试,但不得据此声明测试通过。所有本轮新增、更新或安全修复且被忽略的测试必须写入 test-tracking manifest;仅执行、未修改的只读 ignored test 不获得 force-track 授权。
|
|
134
|
+
|
|
120
135
|
### 六、服务启动 + 生命周期管理
|
|
121
136
|
|
|
122
137
|
启动等待状态机:0–30s 每 2s 探测、30–120s 每 5s 探测、>120s 读日志判定;遇启动失败特征立即停。**Service Gate**:`harness_service.py ensure` 返回 `action=needs-user-decision`(用户自启服务占端口)时 **才** AskUserQuestion;AI 托管服务或端口空闲则自动继续,不询问。服务指纹(`moduleInputsHash`,来自 CLI `--files` ∪ `serviceStart.inputFiles`)+ `startCommandHash` + `profile` + `overlayPath` + 进程身份任一变化即 restart;**空输入被拒绝**,不生成可复用空指纹。测试结束默认清理 AI 启动的服务。详见 `reference.md`「服务决策门」。
|
|
@@ -161,7 +176,7 @@ Phase 1 前先读 `.harness/changes/<change-name>/evidence/verification-ledger.j
|
|
|
161
176
|
|
|
162
177
|
## 执行日志
|
|
163
178
|
|
|
164
|
-
`events.ndjson` 为唯一事实源(schema_version
|
|
179
|
+
`events.ndjson` 为唯一事实源(schema_version 3,兼容读取 v1/v2;`note` 承载人类可读摘要);`logs/execution-log.md` 由 `harness_events.py` 渲染,**禁止用 Write/Edit 直接维护**。直接修改的内容会在 `phase.end` 或 finalize 时被完整重建覆盖,属于数据丢失;需要保留的详情必须进入事件 `note`。结构 → [[../protocols/report-pipeline-protocol.md|report-pipeline-protocol]]
|
|
165
180
|
|
|
166
181
|
```powershell
|
|
167
182
|
python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase <phase> --type phase.start --note "<触发指令>"
|
|
@@ -170,3 +185,5 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
170
185
|
> **脚本接线**:`harness_events.py append`;`harness_archive.py finalize`;`harness_preflight.py check`;`harness_ledger.py can-reuse`;`harness_service.py ensure/stop`(须 `--files`/`serviceStart.inputFiles`)。JSON 输出按 D13 护栏解读。
|
|
171
186
|
|
|
172
187
|
> **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
|
|
188
|
+
|
|
189
|
+
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
@@ -787,4 +787,4 @@ powershell.exe -NoProfile -Command "$base = '<baseCommit>'; $patch = '.harness/c
|
|
|
787
787
|
|
|
788
788
|
## 执行日志记录
|
|
789
789
|
|
|
790
|
-
`/harness-test` 只向 `events.ndjson` 追加事件(schema_version
|
|
790
|
+
`/harness-test` 只向 `events.ndjson` 追加事件(schema_version 3,兼容读取 v1/v2);`logs/execution-log.md` 由 `harness_events.py append` 自动渲染。Phase 0 之前 append `phase.start`;写入 `command` / `verification` / `decision` / `issue` / `artifact`,摘要放 `note`。详见 [[../../protocols/report-pipeline-protocol.md|report-pipeline-protocol]] 与 core `harness-test/SKILL.md`。
|
|
@@ -168,8 +168,6 @@ CONDITIONAL_OK
|
|
|
168
168
|
|
|
169
169
|
## 未提交测试证据
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
run/test 本轮新增、更新或安全修复且被 `.gitignore` 忽略的测试,必须先由 `test-tracking.json` + `harness_test_guard.py stage` 精确提交;这类测试不得继续作为“未提交证据”收尾,也不得计入可复用 P0 验证后随 worktree 删除。
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
2. 在 `summary-data.json.uncommittedTestEvidence[]` 中记录文件名、验证了什么、是否随 commit 提交;
|
|
175
|
-
3. final-summary 明确展示(`uncommittedTestEvidence` 非空时渲染"🧪 未提交测试证据"卡片),避免维护者误以为仓库包含该回归测试;无此类证据时不渲染该卡。
|
|
173
|
+
`uncommittedTestEvidence` 只兼容历史归档或明确只读的外部证据:归档到 `backups/uncommitted-tests/`,记录文件名、验证范围与未提交原因,并在 final-summary 展示风险。若它是本轮可修改的回归测试,则 archive 必须阻断并要求先走精确跟踪流程。
|
|
@@ -86,7 +86,7 @@ verification-ledger 把每次验证(compile / unit test / api test / package
|
|
|
86
86
|
},
|
|
87
87
|
"package": {
|
|
88
88
|
"status": "OK",
|
|
89
|
-
"command": "<打包命令(按技术栈:Java=mvn package -pl <module> -am -DskipTests;前端=npm run build;Python=python -m build)>",
|
|
89
|
+
"command": "<打包命令(按技术栈:Java=mvn clean package -pl <module> -am -DskipTests;前端=npm run build;Python=python -m build)>",
|
|
90
90
|
"baseCommit": "<final pushed hash>",
|
|
91
91
|
"deployArtifact": "<构建产物路径(Java=<module>/target/<artifact>.jar;前端=<module>/dist/;Python=<module>/dist/)>",
|
|
92
92
|
"sha256": "<artifact sha256>",
|
|
@@ -199,33 +199,25 @@ profile key 缺失 / glob 无匹配 / 结果为空 → `insufficient-evidence`
|
|
|
199
199
|
|
|
200
200
|
## 五、真实 diffHash
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
必须基于真实内容变更集计算 SHA-256,且**必须是 commit-invariant 的**——覆盖本变更集相对 `baseCommit` 的 tracked 变化、标准 untracked 文件,以及 `test-tracking.json` 明确记录的 ignored tests,使 checkpoint commit 前后指纹一致,保证 run→test→submit 复用链不断。
|
|
203
203
|
|
|
204
204
|
`<baseCommit>` 从 ledger 读取(harness-plan 阶段写入);缺失时用 `git merge-base HEAD <默认分支>` 兜底。
|
|
205
205
|
|
|
206
206
|
**canonical 命令(cluster 2 起脚本化,推荐)**:
|
|
207
207
|
|
|
208
208
|
```text
|
|
209
|
-
harness_ledger.py diff-hash --repo <projectRoot> --base <baseCommit> --json
|
|
209
|
+
harness_ledger.py diff-hash --repo <projectRoot> --base <baseCommit> --change-dir ".harness/changes/<change-name>" --json
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
-
`diff-hash` 用 subprocess 直接捕获 Git bytes
|
|
212
|
+
`diff-hash` 用 subprocess 直接捕获 Git bytes,按 repo-relative path 排序并进行长度 framing(`path-len | path | exists | content-len | content`),独立于 shell/控制台编码/BOM/系统换行。算法版本 `content-changeset-2`,输出 `diffHash`/`algorithmVersion`/`fileCount`/`base`/`head`/`trackedTestFileCount`/`testTrackingManifest`。
|
|
213
213
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
powershell.exe -NoProfile -Command "$base = '<baseCommit>'; $patch = '.harness/changes/<change>/runtime/current-diff.patch'; & { git diff $base HEAD --binary; git diff --binary; git ls-files --others --exclude-standard | ForEach-Object { Get-Content -Raw -LiteralPath $_ } } | Out-File -Encoding utf8 $patch; (Get-FileHash $patch -Algorithm SHA256).Hash"
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
- 命令为模板:`<baseCommit>`/`<change>` 需替换;经 `powershell.exe -Command "..."` 从 PowerShell/Bash 调用时外层会展开 `$` 变量,建议直接用 PowerShell 工具执行去外壳脚本,或外层用单引号/`--%` 防展开
|
|
221
|
-
- 三部分合并:`git diff $base HEAD`(已提交变更)+ `git diff`(未提交 tracked)+ 未跟踪新文件内容(`git ls-files --others --exclude-standard`);`& { }` 必须带 `&` 才执行 scriptblock(bare `{ } | Out-File` 只写脚本块字符串,不执行)
|
|
222
|
-
- commit 前:`$base..HEAD` 为空 + 未提交 24 文件 + 未跟踪 9 文件 = 全量;commit 后:`$base..HEAD` 24 文件 + 未提交空 + 未跟踪空 = 同内容 → 指纹一致 ✅
|
|
214
|
+
- `--change-dir` 可选以兼容普通调用;run/test/submit 对正式 change 必须传入。manifest 不存在时贡献 0 个额外路径。
|
|
215
|
+
- manifest 存在时必须严格验证 schema/mode/projectRoot、精确相对路径、文件存在性与 SHA-256;结构非法、路径越界或 hash 漂移均非零退出,旧 ledger 不得复用。
|
|
216
|
+
- ignored test 在 checkpoint 前由 manifest 加入内容集;经 guard force-stage/commit 后由 Git diff 加入同一路径,集合去重,因此 hash 保持不变。
|
|
223
217
|
- diffHash 只用于"内容是否变化"判断,不等于 commit hash
|
|
224
218
|
- 账本中 `currentHead`(验证时 HEAD)与 `diffHash` 分开记录;reuse 规则 #2 允许 HEAD 前移(如 harness-run Step 5 checkpoint commit),因 diffHash 已 commit-invariant,HEAD 前移不改变指纹
|
|
225
219
|
- **禁止**使用类似 `3files-84plus-5minus` 的描述性字符串作为复用依据
|
|
226
|
-
-
|
|
227
|
-
- **禁止**任何单部分简化:含 `git diff <base> HEAD`(仅已提交部分)、`git diff`(仅未提交)、`node -e`/`crypto.createHash` 自算 SHA-256。无论 commit 前后、无论工作树是否 clean,必须用上述三部分合并命令。commit 后 clean 致单部分偶然等价不得作为省略依据——时序或工作树状态变化即复现复用链断裂
|
|
228
|
-
- **commit 前时序说明**:harness-run 步骤 2c 在 Step 5 checkpoint commit **之前**写 ledger,此时 `git diff baseCommit..HEAD` 部分为空(HEAD==baseCommit),只有"未提交 + 未跟踪"是全量。**即使第一部分为空也必须保留三部分合并命令**——commit 后第一部分被填充、未提交/未跟踪变空,两者内容相同 → diffHash 一致。省略第一部分只用未提交 diff,commit 后未提交变空 → diffHash 变化 → 复用链断裂(真实教训:run 产出非规范 `8a94c874`,test 重算 `b4c580fc` 不一致被迫重跑全量单元测试)。harness-run 步骤 2c 已 inline 完整三部分命令,执行者直接跑 verbatim,不得自行省略
|
|
220
|
+
- **禁止**删除/忽略 test-tracking manifest 后继续复用,也禁止用手写 Git/Node/PowerShell hash 替代 canonical 命令。
|
|
229
221
|
|
|
230
222
|
## 六、Post-test 变更分类
|
|
231
223
|
|
|
@@ -43,11 +43,11 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
43
43
|
|
|
44
44
|
`append` 写入契约(Task 4 §6.1):普通 append = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex`);仅 `--type phase.end` append 成功后渲染一次 `logs/execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。人类可读摘要(触发指令、降级原因、阶段结论)写入事件的 `note` 字段;阶段开始/结束、命令、验证、artifact、问题、决策各写对应 `type` 事件。旧 archive 缺少 events 可回放兼容;新变更不得以 execution-log 已存在为理由跳过 events。
|
|
45
45
|
|
|
46
|
-
基础事件结构(schema_version
|
|
46
|
+
基础事件结构(schema_version 3;兼容读取 v1/v2):
|
|
47
47
|
|
|
48
48
|
```json
|
|
49
49
|
{
|
|
50
|
-
"schema_version":
|
|
50
|
+
"schema_version": 3,
|
|
51
51
|
"id": "evt-...",
|
|
52
52
|
"timestamp": "2026-07-02T00:00:00.000Z",
|
|
53
53
|
"phase": "run",
|
|
@@ -55,6 +55,13 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
55
55
|
"command": "npm test",
|
|
56
56
|
"exit_code": 0,
|
|
57
57
|
"duration_ms": 42100,
|
|
58
|
+
"run_id": "run-...",
|
|
59
|
+
"attempt": 1,
|
|
60
|
+
"executor_tool": "codex",
|
|
61
|
+
"executor_agent": "main",
|
|
62
|
+
"executor_model": "gpt-5",
|
|
63
|
+
"handoff_from_tool": "claude-code",
|
|
64
|
+
"handoff_reason": "continue implementation",
|
|
58
65
|
"note": "可选:触发指令、降级原因、阶段摘要"
|
|
59
66
|
}
|
|
60
67
|
```
|
|
@@ -64,7 +71,7 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
64
71
|
| type | 必填/常用字段 | 用途 |
|
|
65
72
|
|---|---|---|
|
|
66
73
|
| `phase.start` | phase, timestamp | 阶段开始 |
|
|
67
|
-
| `phase.end` | phase, timestamp |
|
|
74
|
+
| `phase.end` | phase, timestamp, status | 阶段结束并记录 `OK/WARN/FAIL/BLOCKED`;计算当前 attempt 耗时 |
|
|
68
75
|
| `command` | command, exit_code, duration_ms | 命令事实 |
|
|
69
76
|
| `verification` | name, status, command | 验证事实 |
|
|
70
77
|
| `artifact` | path, kind | 报告、包、manifest 等产物 |
|
|
@@ -79,7 +86,7 @@ summary-data 必须保留原 archive final report 维度,并增加事件层摘
|
|
|
79
86
|
{
|
|
80
87
|
"schemaVersion": "2.2",
|
|
81
88
|
"reportPipeline": {
|
|
82
|
-
"schema_version":
|
|
89
|
+
"schema_version": 1,
|
|
83
90
|
"generated_at": "2026-07-02T00:00:00.000Z",
|
|
84
91
|
"event_count": 0,
|
|
85
92
|
"sources": ["events.ndjson", "evidence/verification-ledger.json"],
|