@hunter-harness/workflow-harness 0.2.39 → 0.2.40
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 +1 -1
- package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/scripts/harness_deploy.py +10 -51
- package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/scripts/harness_deploy.py +10 -51
- package/harness/bundles/general/codex/.harness-build.json +1 -1
- package/harness/bundles/general/codex/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/codex/scripts/harness_deploy.py +10 -51
- package/harness/bundles/general/cursor/.harness-build.json +1 -1
- package/harness/bundles/general/cursor/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/cursor/scripts/harness_deploy.py +10 -51
- package/harness/bundles/java/claude-code/.harness-build.json +1 -1
- package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/scripts/harness_deploy.py +10 -51
- package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/scripts/harness_deploy.py +10 -51
- package/harness/bundles/java/codex/.harness-build.json +1 -1
- package/harness/bundles/java/codex/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/codex/scripts/harness_deploy.py +10 -51
- package/harness/bundles/java/cursor/.harness-build.json +1 -1
- package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/cursor/scripts/harness_deploy.py +10 -51
- package/harness/manifests/general/claude-code.json +12 -12
- package/harness/manifests/general/codebuddy.json +12 -12
- package/harness/manifests/general/codex.json +12 -12
- package/harness/manifests/general/cursor.json +12 -12
- package/harness/manifests/java/claude-code.json +14 -14
- package/harness/manifests/java/codebuddy.json +14 -14
- package/harness/manifests/java/codex.json +14 -14
- package/harness/manifests/java/cursor.json +14 -14
- package/hunter-workflow-family.json +1 -1
- 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=c76b14f90d7bdf18; overlay=java; agent=codex; do not edit -->
|
|
7
7
|
# harness-review — 代码审查
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -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=c76b14f90d7bdf18; overlay=java; agent=codex; do not edit -->
|
|
6
6
|
# harness-run — 需求编码
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -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=c76b14f90d7bdf18; overlay=java; agent=codex; do not edit -->
|
|
7
7
|
# harness-submit — 最终提交(含 worktree 合并)
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -4,7 +4,7 @@ description: Use when the user asks to synchronize, refresh, or validate Harness
|
|
|
4
4
|
metadata, adapters, knowledge, rules, instruction entrypoints, config origins,
|
|
5
5
|
or CodeGraph status.
|
|
6
6
|
---
|
|
7
|
-
<!-- generated by harness_deploy.py; core=
|
|
7
|
+
<!-- generated by harness_deploy.py; core=c76b14f90d7bdf18; overlay=java; agent=codex; do not edit -->
|
|
8
8
|
# harness-sync
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
@@ -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=c76b14f90d7bdf18; overlay=java; agent=codex; do not edit -->
|
|
6
6
|
# harness-test — 测试执行
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -316,48 +316,6 @@ def validate_build_paths(skills_root: Path, out_dir: Path) -> tuple[Path, Path]:
|
|
|
316
316
|
return skills_root, out_dir
|
|
317
317
|
|
|
318
318
|
|
|
319
|
-
def _git_repo_root(start: Path) -> Path | None:
|
|
320
|
-
"""Return the git toplevel containing ``start``, or None if not a git repo."""
|
|
321
|
-
try:
|
|
322
|
-
r = subprocess.run(
|
|
323
|
-
["git", "rev-parse", "--show-toplevel"],
|
|
324
|
-
cwd=str(start),
|
|
325
|
-
capture_output=True,
|
|
326
|
-
text=True,
|
|
327
|
-
timeout=5,
|
|
328
|
-
)
|
|
329
|
-
except (OSError, subprocess.SubprocessError):
|
|
330
|
-
return None
|
|
331
|
-
if r.returncode != 0 or not r.stdout.strip():
|
|
332
|
-
return None
|
|
333
|
-
return Path(r.stdout.strip())
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
def _git_blob_sha(path: Path, repo_root: Path) -> str | None:
|
|
337
|
-
"""Return the git blob sha for a tracked file (CRLF-normalized by .gitattributes),
|
|
338
|
-
or None if untracked / git unavailable. Caller falls back to working-copy sha256
|
|
339
|
-
for untracked build inputs (deterministic enough outside git's normalization)."""
|
|
340
|
-
try:
|
|
341
|
-
rel = path.resolve().relative_to(repo_root.resolve())
|
|
342
|
-
except ValueError:
|
|
343
|
-
return None
|
|
344
|
-
try:
|
|
345
|
-
r = subprocess.run(
|
|
346
|
-
["git", "ls-files", "-s", "--", rel.as_posix()],
|
|
347
|
-
cwd=str(repo_root),
|
|
348
|
-
capture_output=True,
|
|
349
|
-
text=True,
|
|
350
|
-
timeout=5,
|
|
351
|
-
)
|
|
352
|
-
except (OSError, subprocess.SubprocessError):
|
|
353
|
-
return None
|
|
354
|
-
if r.returncode != 0 or not r.stdout.strip():
|
|
355
|
-
return None
|
|
356
|
-
# format: "<mode> <sha> <stage>\t<path>"
|
|
357
|
-
parts = r.stdout.strip().splitlines()[0].split()
|
|
358
|
-
return parts[1] if len(parts) >= 2 else None
|
|
359
|
-
|
|
360
|
-
|
|
361
319
|
def core_content_hash(
|
|
362
320
|
skills_root: Path,
|
|
363
321
|
overlay_dir: Path | None,
|
|
@@ -387,17 +345,18 @@ def core_content_hash(
|
|
|
387
345
|
if agent_overlay_dir and agent_overlay_dir.is_dir():
|
|
388
346
|
files.extend(p for p in agent_overlay_dir.rglob("*") if p.is_file())
|
|
389
347
|
skills_root_resolved = skills_root.resolve()
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
348
|
+
files_by_relative_path = {
|
|
349
|
+
f.resolve().relative_to(skills_root_resolved).as_posix(): f
|
|
350
|
+
for f in files
|
|
351
|
+
}
|
|
352
|
+
for rel in sorted(files_by_relative_path):
|
|
353
|
+
f = files_by_relative_path[rel]
|
|
393
354
|
h.update(rel.encode("utf-8"))
|
|
394
355
|
h.update(b"\0")
|
|
395
|
-
#
|
|
396
|
-
#
|
|
397
|
-
#
|
|
398
|
-
|
|
399
|
-
blob = _git_blob_sha(f, repo_root) if repo_root else None
|
|
400
|
-
h.update((blob or sha256_file(f)).encode("ascii"))
|
|
356
|
+
# Hash the actual build input with one algorithm regardless of whether the
|
|
357
|
+
# source happens to live inside a Git checkout. Relative POSIX-path sorting
|
|
358
|
+
# keeps the order identical on case-insensitive Windows and Linux.
|
|
359
|
+
h.update(sha256_file(f).encode("ascii"))
|
|
401
360
|
h.update(b"\0")
|
|
402
361
|
return h.hexdigest()[:16]
|
|
403
362
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-apidoc
|
|
3
3
|
description: 从 Java 后端代码生成结构化前端 API 文档(Controller/VO/ErrorCode)。使用场景:接口文档、前端接口文档、API 文档生成
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
6
6
|
# harness-apidoc — 前端接口文档(Java overlay)
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-archive
|
|
|
3
3
|
description: 归档所有变更产出(计划/测试报告/审查/SQL/API文档)到
|
|
4
4
|
.harness/archive/,含归档元数据和可视化最终总结。使用场景:归档、完成归档、收尾、打包产出物
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
7
7
|
# harness-archive — 变更归档
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-codebase-map
|
|
|
3
3
|
description: 分析现有代码库并生成 .harness/codebase/map/
|
|
4
4
|
下的结构化代码库地图。用于陌生项目理解、重大改造前梳理、harness-sync 提示 map 过期后的人工刷新。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
7
7
|
# harness-codebase-map — 代码库地图
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-knowledge-ingest
|
|
|
3
3
|
description: 从 .harness/archive 归档整理、同步和维护项目知识索引。适用场景:ingest knowledge、sync
|
|
4
4
|
knowledge、rebuild knowledge index、promote knowledge、确认知识条目、检查知识库是否过期。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
7
7
|
# harness-knowledge-ingest
|
|
8
8
|
|
|
9
9
|
从 `.harness/archive/**/reports/final/summary-data.json` 抽取项目知识,生成并维护本地 `.harness/knowledge/` 索引。
|
|
@@ -3,7 +3,7 @@ name: harness-knowledge-query
|
|
|
3
3
|
description: 根据新需求、设计任务、代码修改请求或问题排查,在规划和编码前查询 .harness/knowledge
|
|
4
4
|
历史上下文。适用场景:query knowledge、查找历史需求、根据归档理解需求、继续之前类似开发、生成需求上下文包。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
7
7
|
# harness-knowledge-query
|
|
8
8
|
|
|
9
9
|
并行 change 中查询必须传 `--change <change-id>`;成功后以该 change 的 `meta/knowledge-context.json` 为稳定指针。全局 `context-packs/latest.json` 仅向后兼容,不得用于判断多个 active change 的上下文归属。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-package
|
|
3
3
|
description: 增量模块打包:拉取最新→编译验证→mvn package→汇总 jar/war。使用场景:打包、package、发版准备
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
6
6
|
# harness-package — 增量模块打包(Java overlay)
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-plan
|
|
3
3
|
description: 将需求转化为设计文档+实施计划+完整测试场景表,必须在编码前完成。使用场景:需求分析、feature plan、技术方案设计、实现方案规划
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
6
6
|
# harness-plan — 需求规划
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -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=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
7
7
|
# harness-review — 代码审查
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -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=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
6
6
|
# harness-run — 需求编码
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -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=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
7
7
|
# harness-submit — 最终提交(含 worktree 合并)
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -4,7 +4,7 @@ description: Use when the user asks to synchronize, refresh, or validate Harness
|
|
|
4
4
|
metadata, adapters, knowledge, rules, instruction entrypoints, config origins,
|
|
5
5
|
or CodeGraph status.
|
|
6
6
|
---
|
|
7
|
-
<!-- generated by harness_deploy.py; core=
|
|
7
|
+
<!-- generated by harness_deploy.py; core=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
8
8
|
# harness-sync
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
@@ -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=5fcfb51857169bbd; overlay=java; agent=cursor; do not edit -->
|
|
6
6
|
# harness-test — 测试执行
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -316,48 +316,6 @@ def validate_build_paths(skills_root: Path, out_dir: Path) -> tuple[Path, Path]:
|
|
|
316
316
|
return skills_root, out_dir
|
|
317
317
|
|
|
318
318
|
|
|
319
|
-
def _git_repo_root(start: Path) -> Path | None:
|
|
320
|
-
"""Return the git toplevel containing ``start``, or None if not a git repo."""
|
|
321
|
-
try:
|
|
322
|
-
r = subprocess.run(
|
|
323
|
-
["git", "rev-parse", "--show-toplevel"],
|
|
324
|
-
cwd=str(start),
|
|
325
|
-
capture_output=True,
|
|
326
|
-
text=True,
|
|
327
|
-
timeout=5,
|
|
328
|
-
)
|
|
329
|
-
except (OSError, subprocess.SubprocessError):
|
|
330
|
-
return None
|
|
331
|
-
if r.returncode != 0 or not r.stdout.strip():
|
|
332
|
-
return None
|
|
333
|
-
return Path(r.stdout.strip())
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
def _git_blob_sha(path: Path, repo_root: Path) -> str | None:
|
|
337
|
-
"""Return the git blob sha for a tracked file (CRLF-normalized by .gitattributes),
|
|
338
|
-
or None if untracked / git unavailable. Caller falls back to working-copy sha256
|
|
339
|
-
for untracked build inputs (deterministic enough outside git's normalization)."""
|
|
340
|
-
try:
|
|
341
|
-
rel = path.resolve().relative_to(repo_root.resolve())
|
|
342
|
-
except ValueError:
|
|
343
|
-
return None
|
|
344
|
-
try:
|
|
345
|
-
r = subprocess.run(
|
|
346
|
-
["git", "ls-files", "-s", "--", rel.as_posix()],
|
|
347
|
-
cwd=str(repo_root),
|
|
348
|
-
capture_output=True,
|
|
349
|
-
text=True,
|
|
350
|
-
timeout=5,
|
|
351
|
-
)
|
|
352
|
-
except (OSError, subprocess.SubprocessError):
|
|
353
|
-
return None
|
|
354
|
-
if r.returncode != 0 or not r.stdout.strip():
|
|
355
|
-
return None
|
|
356
|
-
# format: "<mode> <sha> <stage>\t<path>"
|
|
357
|
-
parts = r.stdout.strip().splitlines()[0].split()
|
|
358
|
-
return parts[1] if len(parts) >= 2 else None
|
|
359
|
-
|
|
360
|
-
|
|
361
319
|
def core_content_hash(
|
|
362
320
|
skills_root: Path,
|
|
363
321
|
overlay_dir: Path | None,
|
|
@@ -387,17 +345,18 @@ def core_content_hash(
|
|
|
387
345
|
if agent_overlay_dir and agent_overlay_dir.is_dir():
|
|
388
346
|
files.extend(p for p in agent_overlay_dir.rglob("*") if p.is_file())
|
|
389
347
|
skills_root_resolved = skills_root.resolve()
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
348
|
+
files_by_relative_path = {
|
|
349
|
+
f.resolve().relative_to(skills_root_resolved).as_posix(): f
|
|
350
|
+
for f in files
|
|
351
|
+
}
|
|
352
|
+
for rel in sorted(files_by_relative_path):
|
|
353
|
+
f = files_by_relative_path[rel]
|
|
393
354
|
h.update(rel.encode("utf-8"))
|
|
394
355
|
h.update(b"\0")
|
|
395
|
-
#
|
|
396
|
-
#
|
|
397
|
-
#
|
|
398
|
-
|
|
399
|
-
blob = _git_blob_sha(f, repo_root) if repo_root else None
|
|
400
|
-
h.update((blob or sha256_file(f)).encode("ascii"))
|
|
356
|
+
# Hash the actual build input with one algorithm regardless of whether the
|
|
357
|
+
# source happens to live inside a Git checkout. Relative POSIX-path sorting
|
|
358
|
+
# keeps the order identical on case-insensitive Windows and Linux.
|
|
359
|
+
h.update(sha256_file(f).encode("ascii"))
|
|
401
360
|
h.update(b"\0")
|
|
402
361
|
return h.hexdigest()[:16]
|
|
403
362
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
{
|
|
24
24
|
"path": ".harness-build.json",
|
|
25
|
-
"sha256": "
|
|
25
|
+
"sha256": "1c20c4038c1b683807bfaa3aea3fcefb336c5f5b53527426436929fc0e3bb102"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"path": "agents/harness-evaluator.md",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"path": "harness-archive/SKILL.md",
|
|
77
|
-
"sha256": "
|
|
77
|
+
"sha256": "02499e773d75375f3321e002f6c624a5c0bc462be4730306d3083a789f5b301b"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"path": "harness-archive/templates/render-summary.mjs",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
"path": "harness-codebase-map/SKILL.md",
|
|
97
|
-
"sha256": "
|
|
97
|
+
"sha256": "9097ce35521ded60ab193306be4ad7495ad33d0a09eff0cc46011dc82d8597ea"
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"path": "harness-codebase-map/templates/ARCHITECTURE.md",
|
|
@@ -158,11 +158,11 @@
|
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
"path": "harness-knowledge-ingest/SKILL.md",
|
|
161
|
-
"sha256": "
|
|
161
|
+
"sha256": "0cbb6caf5c59c2c41a5458a1f99dcdd196814baa8b78a6f2d5ea29c6f61c724f"
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
"path": "harness-knowledge-query/SKILL.md",
|
|
165
|
-
"sha256": "
|
|
165
|
+
"sha256": "9b581ff1c60cd97326d298c3dca7e097773c217b60307c5867402d314f90bc02"
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
"path": "harness-plan/checklist.md",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
"path": "harness-plan/SKILL.md",
|
|
181
|
-
"sha256": "
|
|
181
|
+
"sha256": "a85cd176d3c076cb797a1a7321acbedc25529b89ff706c9dbb4bceb54c4106c2"
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
184
|
"path": "harness-review/checklist.md",
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
"path": "harness-review/SKILL.md",
|
|
197
|
-
"sha256": "
|
|
197
|
+
"sha256": "a537781cb692a6c96f1c5b1062477a7d81092501d53978a3ca7558e9c08f2a34"
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
"path": "harness-run/checklist.md",
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
"path": "harness-run/SKILL.md",
|
|
213
|
-
"sha256": "
|
|
213
|
+
"sha256": "10ea4152e1085859799b1ebee36e48400e33733efee367917e4b8ffd6092c856"
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
"path": "harness-submit/checklist.md",
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
"path": "harness-submit/SKILL.md",
|
|
225
|
-
"sha256": "
|
|
225
|
+
"sha256": "c28a19c734242b03460fd0e977212aac40c91add18fb6213c8b182b181c52a50"
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
228
|
"path": "harness-sync/reference.md",
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
232
|
"path": "harness-sync/SKILL.md",
|
|
233
|
-
"sha256": "
|
|
233
|
+
"sha256": "9a75623d0ef60b9d17e2bc7752aeb5d50337ac6bb3c01942ce47d84cf6cdb7f2"
|
|
234
234
|
},
|
|
235
235
|
{
|
|
236
236
|
"path": "harness-test/checklist.md",
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
"path": "harness-test/SKILL.md",
|
|
257
|
-
"sha256": "
|
|
257
|
+
"sha256": "64ba3253305174716f8d109c5b3a4e9ddcf1cc0908b2c8e4fe5a7e85af8c9326"
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
"path": "protocols/archive-report-protocol.md",
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
},
|
|
339
339
|
{
|
|
340
340
|
"path": "scripts/harness_deploy.py",
|
|
341
|
-
"sha256": "
|
|
341
|
+
"sha256": "fb4290c2dd5c28a09c378da5ee7be491bdefe0410f277ec5dd2af1952cfddbca"
|
|
342
342
|
},
|
|
343
343
|
{
|
|
344
344
|
"path": "scripts/harness_environment.py",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
{
|
|
24
24
|
"path": ".harness-build.json",
|
|
25
|
-
"sha256": "
|
|
25
|
+
"sha256": "12a328c404e37e81e943627befd019445e0bc861cc56817b29ef26637bb051ea"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"path": "agents/harness-evaluator.md",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"path": "harness-archive/SKILL.md",
|
|
77
|
-
"sha256": "
|
|
77
|
+
"sha256": "9fc3f588a9447a03b0923b32ab79f29e2be1b12aa2e684ec08b335e61437dad3"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"path": "harness-archive/templates/render-summary.mjs",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
"path": "harness-codebase-map/SKILL.md",
|
|
97
|
-
"sha256": "
|
|
97
|
+
"sha256": "f2316c444860ccbffd349ec6aac2bb84b2920633f3ee4c52cb64f31d87b22bac"
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"path": "harness-codebase-map/templates/ARCHITECTURE.md",
|
|
@@ -158,11 +158,11 @@
|
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
"path": "harness-knowledge-ingest/SKILL.md",
|
|
161
|
-
"sha256": "
|
|
161
|
+
"sha256": "1f8d4981291de927e77446a96c30825078bb0299e6e3a8076e5c8b46d4848844"
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
"path": "harness-knowledge-query/SKILL.md",
|
|
165
|
-
"sha256": "
|
|
165
|
+
"sha256": "2aac0ad5400395cab085b0cb8c3342212be9bec96323cb2c9a297ce8fd70b9be"
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
"path": "harness-plan/checklist.md",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
"path": "harness-plan/SKILL.md",
|
|
181
|
-
"sha256": "
|
|
181
|
+
"sha256": "4f9175aa2451cb73e0009a694f65117d1981a5a02199299a2d776005aaa3d887"
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
184
|
"path": "harness-review/checklist.md",
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
"path": "harness-review/SKILL.md",
|
|
197
|
-
"sha256": "
|
|
197
|
+
"sha256": "3ad38ea6b4e8d6671fe5c69095e3e190fec7e4cb1db04f656de5eb57dc9235bb"
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
"path": "harness-run/checklist.md",
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
"path": "harness-run/SKILL.md",
|
|
213
|
-
"sha256": "
|
|
213
|
+
"sha256": "670861be8622cfa27c9f7c5952df292b6372231545b1919943b7e8a662f49eec"
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
"path": "harness-submit/checklist.md",
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
"path": "harness-submit/SKILL.md",
|
|
225
|
-
"sha256": "
|
|
225
|
+
"sha256": "3b6ca7fc06fbb306685322a09c760fe8b3ae36c8a039294361894d8c2701fd92"
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
228
|
"path": "harness-sync/reference.md",
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
232
|
"path": "harness-sync/SKILL.md",
|
|
233
|
-
"sha256": "
|
|
233
|
+
"sha256": "5ab58ab05ed68620b24f4e21eff715fbe23293ff89fb60122ed91464e3f61468"
|
|
234
234
|
},
|
|
235
235
|
{
|
|
236
236
|
"path": "harness-test/checklist.md",
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
"path": "harness-test/SKILL.md",
|
|
257
|
-
"sha256": "
|
|
257
|
+
"sha256": "310bceed2fb069e47f1074d618464fe09318c89c4d5d282750b5b4f228e49df5"
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
"path": "protocols/archive-report-protocol.md",
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
},
|
|
339
339
|
{
|
|
340
340
|
"path": "scripts/harness_deploy.py",
|
|
341
|
-
"sha256": "
|
|
341
|
+
"sha256": "fb4290c2dd5c28a09c378da5ee7be491bdefe0410f277ec5dd2af1952cfddbca"
|
|
342
342
|
},
|
|
343
343
|
{
|
|
344
344
|
"path": "scripts/harness_environment.py",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
{
|
|
24
24
|
"path": ".harness-build.json",
|
|
25
|
-
"sha256": "
|
|
25
|
+
"sha256": "979fbb4567f5e37ea52657de143074a6981f1ee4e1c36bdcc7b2fd03858f13c5"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"path": "CONTEXT.md",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"path": "harness-archive/SKILL.md",
|
|
65
|
-
"sha256": "
|
|
65
|
+
"sha256": "7da852b64c2c7237ae137286f8a6f513f2bc9567d4d372b43707457bbb280393"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"path": "harness-archive/templates/render-summary.mjs",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
"path": "harness-codebase-map/SKILL.md",
|
|
85
|
-
"sha256": "
|
|
85
|
+
"sha256": "628e201bfb6178e6ecaa1e1c9b7e344e1fc0ba9624485c842052b2985fb4f6a1"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"path": "harness-codebase-map/templates/ARCHITECTURE.md",
|
|
@@ -146,11 +146,11 @@
|
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
"path": "harness-knowledge-ingest/SKILL.md",
|
|
149
|
-
"sha256": "
|
|
149
|
+
"sha256": "07154966fdb797ab795251ac1bc4f608fc4c13932c475c37b0272c301f755970"
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
"path": "harness-knowledge-query/SKILL.md",
|
|
153
|
-
"sha256": "
|
|
153
|
+
"sha256": "582bfcd7138936ee7cb5c7059cbfef923a46912fecd0507bdf508154aa315aa1"
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
"path": "harness-plan/checklist.md",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
"path": "harness-plan/SKILL.md",
|
|
169
|
-
"sha256": "
|
|
169
|
+
"sha256": "f4ddbda17963003d36105407eaa8448190da7dada740dc3ba63305db86a39d4e"
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
"path": "harness-review/checklist.md",
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
184
|
"path": "harness-review/SKILL.md",
|
|
185
|
-
"sha256": "
|
|
185
|
+
"sha256": "cbfc050179ac23be8cfd54fc48c52322eb165f4bd14a6fd534f234f598a7a5ca"
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
"path": "harness-run/checklist.md",
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
"path": "harness-run/SKILL.md",
|
|
201
|
-
"sha256": "
|
|
201
|
+
"sha256": "8579e6d12297335731bb9b36521ada2dc590620a06c70d5469f52dec86d86e60"
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
"path": "harness-submit/checklist.md",
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
"path": "harness-submit/SKILL.md",
|
|
213
|
-
"sha256": "
|
|
213
|
+
"sha256": "32174912939e7cd6431f6f4214463bcf819d725911e4ec3d19c246b70868b8c3"
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
"path": "harness-sync/reference.md",
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
220
|
"path": "harness-sync/SKILL.md",
|
|
221
|
-
"sha256": "
|
|
221
|
+
"sha256": "cb4f9ca08d24d8f1fbdf163e3affd1ebdb75a80690db9b0538afecca7643fc65"
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
"path": "harness-test/checklist.md",
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
244
|
"path": "harness-test/SKILL.md",
|
|
245
|
-
"sha256": "
|
|
245
|
+
"sha256": "53920deda2c99750dfbcbde4eb9c3d988ad406adae9c2d525f36a91ce94c1689"
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
"path": "protocols/archive-report-protocol.md",
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
},
|
|
327
327
|
{
|
|
328
328
|
"path": "scripts/harness_deploy.py",
|
|
329
|
-
"sha256": "
|
|
329
|
+
"sha256": "fb4290c2dd5c28a09c378da5ee7be491bdefe0410f277ec5dd2af1952cfddbca"
|
|
330
330
|
},
|
|
331
331
|
{
|
|
332
332
|
"path": "scripts/harness_environment.py",
|