hunter-harness 0.1.2 → 0.2.0
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/LICENSE +21 -21
- package/README.md +11 -0
- package/dist/bin.js +955 -318
- package/package.json +1 -1
- package/resources/harness/bundles/general/claude-code/.harness-build.json +6 -0
- package/resources/harness/{general → bundles/general/claude-code}/agents/harness-reviewer.md +2 -2
- package/resources/harness/{general → bundles/general/claude-code}/harness-archive/SKILL.md +1 -1
- package/resources/harness/{java → bundles/general/claude-code}/harness-codebase-map/SKILL.md +1 -1
- package/resources/harness/{java → bundles/general/claude-code}/harness-knowledge-ingest/SKILL.md +1 -1
- package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/reference.md +1 -1
- package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-query/SKILL.md +1 -1
- package/resources/harness/{general → bundles/general/claude-code}/harness-plan/SKILL.md +1 -1
- package/resources/harness/{java → bundles/general/claude-code}/harness-review/SKILL.md +8 -4
- package/resources/harness/{general → bundles/general/claude-code}/harness-review/checklist.md +3 -3
- package/resources/harness/{general → bundles/general/claude-code}/harness-run/SKILL.md +1 -1
- package/resources/harness/{general → bundles/general/claude-code}/harness-run/checklist.md +1 -1
- package/resources/harness/{general → bundles/general/claude-code}/harness-run/reference.md +2 -2
- package/resources/harness/{general → bundles/general/claude-code}/harness-submit/SKILL.md +1 -1
- package/resources/harness/{java → bundles/general/claude-code}/harness-sync/SKILL.md +2 -2
- package/resources/harness/{general → bundles/general/claude-code}/harness-sync/reference.md +7 -7
- package/resources/harness/{general → bundles/general/claude-code}/harness-test/SKILL.md +1 -1
- package/resources/harness/{general → bundles/general/claude-code}/harness-test/checklist.md +1 -1
- package/resources/harness/{java → bundles/general/claude-code}/scripts/harness_archive.py +2300 -2300
- package/resources/harness/{general → bundles/general/claude-code}/scripts/harness_deploy.py +74 -13
- package/resources/harness/{general → bundles/general/claude-code}/scripts/harness_events.py +680 -680
- package/resources/harness/{general → bundles/general/claude-code}/scripts/harness_ledger.py +660 -660
- package/resources/harness/{java → bundles/general/claude-code}/scripts/harness_preflight.py +765 -765
- package/resources/harness/{general → bundles/general/claude-code}/scripts/harness_service.py +1331 -1331
- package/resources/harness/bundles/general/codebuddy/.harness-build.json +6 -0
- package/resources/harness/bundles/general/codebuddy/agents/harness-evaluator.md +94 -0
- package/resources/harness/bundles/general/codebuddy/agents/harness-explorer.md +53 -0
- package/resources/harness/bundles/general/codebuddy/agents/harness-reviewer.md +52 -0
- package/resources/harness/bundles/general/codebuddy/harness-archive/SKILL.md +198 -0
- package/resources/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +95 -0
- package/resources/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +229 -0
- package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/reference.md +1 -1
- package/resources/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +147 -0
- package/resources/harness/bundles/general/codebuddy/harness-plan/SKILL.md +109 -0
- package/resources/harness/bundles/general/codebuddy/harness-review/SKILL.md +142 -0
- package/resources/harness/{java → bundles/general/codebuddy}/harness-review/checklist.md +3 -3
- package/resources/harness/bundles/general/codebuddy/harness-run/SKILL.md +113 -0
- package/resources/harness/bundles/general/codebuddy/harness-run/checklist.md +259 -0
- package/resources/harness/bundles/general/codebuddy/harness-run/reference.md +834 -0
- package/resources/harness/bundles/general/codebuddy/harness-submit/SKILL.md +142 -0
- package/resources/harness/bundles/general/codebuddy/harness-sync/SKILL.md +65 -0
- package/resources/harness/{java → bundles/general/codebuddy}/harness-sync/reference.md +7 -7
- package/resources/harness/bundles/general/codebuddy/harness-test/SKILL.md +160 -0
- package/resources/harness/bundles/general/codebuddy/harness-test/checklist.md +319 -0
- package/resources/harness/bundles/general/codebuddy/harness-test/reference.md +791 -0
- package/resources/harness/{general → bundles/general/codebuddy}/scripts/harness_archive.py +2300 -2300
- package/resources/harness/{java → bundles/general/codebuddy}/scripts/harness_deploy.py +74 -13
- package/resources/harness/{java → bundles/general/codebuddy}/scripts/harness_events.py +680 -680
- package/resources/harness/{java → bundles/general/codebuddy}/scripts/harness_ledger.py +660 -660
- package/resources/harness/{general → bundles/general/codebuddy}/scripts/harness_preflight.py +765 -765
- package/resources/harness/{java → bundles/general/codebuddy}/scripts/harness_service.py +1331 -1331
- package/resources/harness/bundles/general/codex/.harness-build.json +6 -0
- package/resources/harness/bundles/general/codex/CONTEXT.md +65 -0
- package/resources/harness/bundles/general/codex/README.md +478 -0
- package/resources/harness/bundles/general/codex/harness-archive/SKILL.md +198 -0
- package/resources/harness/bundles/general/codex/harness-archive/checklist.md +52 -0
- package/resources/harness/bundles/general/codex/harness-archive/reference.md +103 -0
- package/resources/harness/bundles/general/codex/harness-archive/scripts/gen-manifest.ps1 +31 -0
- package/resources/harness/bundles/general/codex/harness-archive/templates/render-summary.mjs +171 -0
- package/resources/harness/bundles/general/codex/harness-archive/templates/summary-data-template.json +128 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/SKILL.md +95 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/checklist.md +126 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/reference.md +364 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/templates/CONCERNS.md +49 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/templates/CONVENTIONS.md +57 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/templates/STACK.md +55 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/templates/STRUCTURE.md +69 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/templates/TESTING.md +64 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/templates/map-manifest.schema.json +73 -0
- package/resources/harness/bundles/general/codex/harness-codebase-map/templates/map-summary.md +64 -0
- package/resources/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +229 -0
- package/resources/harness/bundles/general/codex/harness-knowledge-ingest/design.md +842 -0
- package/resources/harness/bundles/general/codex/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
- package/resources/harness/bundles/general/codex/harness-knowledge-ingest/mcp-config.example.json +10 -0
- package/resources/harness/bundles/general/codex/harness-knowledge-ingest/reference.md +309 -0
- package/resources/harness/bundles/general/codex/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
- package/resources/harness/bundles/general/codex/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
- package/resources/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +147 -0
- package/resources/harness/bundles/general/codex/harness-plan/SKILL.md +109 -0
- package/resources/harness/bundles/general/codex/harness-plan/checklist.md +243 -0
- package/resources/harness/bundles/general/codex/harness-plan/protocols.md +124 -0
- package/resources/harness/bundles/general/codex/harness-plan/reference.md +376 -0
- package/resources/harness/bundles/general/codex/harness-review/SKILL.md +137 -0
- package/resources/harness/bundles/general/codex/harness-review/checklist.md +124 -0
- package/resources/harness/bundles/general/codex/harness-review/protocols.md +68 -0
- package/resources/harness/bundles/general/codex/harness-review/reference.md +86 -0
- package/resources/harness/bundles/general/codex/harness-run/SKILL.md +113 -0
- package/resources/harness/bundles/general/codex/harness-run/checklist.md +259 -0
- package/resources/harness/bundles/general/codex/harness-run/protocols.md +78 -0
- package/resources/harness/bundles/general/codex/harness-run/reference.md +834 -0
- package/resources/harness/bundles/general/codex/harness-submit/SKILL.md +142 -0
- package/resources/harness/bundles/general/codex/harness-submit/checklist.md +407 -0
- package/resources/harness/bundles/general/codex/harness-submit/reference.md +152 -0
- package/resources/harness/bundles/general/codex/harness-sync/SKILL.md +65 -0
- package/resources/harness/bundles/general/codex/harness-sync/reference.md +153 -0
- package/resources/harness/bundles/general/codex/harness-test/SKILL.md +160 -0
- package/resources/harness/bundles/general/codex/harness-test/checklist.md +319 -0
- package/resources/harness/bundles/general/codex/harness-test/pitfalls.md +260 -0
- package/resources/harness/bundles/general/codex/harness-test/reference.md +791 -0
- package/resources/harness/bundles/general/codex/protocols/archive-report-protocol.md +175 -0
- package/resources/harness/bundles/general/codex/protocols/evidence-based-reporting-protocol.md +134 -0
- package/resources/harness/bundles/general/codex/protocols/ledger-protocol.md +270 -0
- package/resources/harness/bundles/general/codex/protocols/powershell-protocol.md +181 -0
- package/resources/harness/bundles/general/codex/protocols/report-pipeline-protocol.md +150 -0
- package/resources/harness/bundles/general/codex/protocols/sensitive-info-protocol.md +92 -0
- package/resources/harness/bundles/general/codex/protocols/state-layout-protocol.md +131 -0
- package/resources/harness/bundles/general/codex/protocols/submit-protocol.md +78 -0
- package/resources/harness/bundles/general/codex/scripts/harness_archive.py +2319 -0
- package/resources/harness/bundles/general/codex/scripts/harness_deploy.py +674 -0
- package/resources/harness/bundles/general/codex/scripts/harness_events.py +680 -0
- package/resources/harness/bundles/general/codex/scripts/harness_ledger.py +671 -0
- package/resources/harness/bundles/general/codex/scripts/harness_preflight.py +780 -0
- package/resources/harness/bundles/general/codex/scripts/harness_service.py +1331 -0
- package/resources/harness/bundles/general/cursor/.harness-build.json +6 -0
- package/resources/harness/bundles/general/cursor/CONTEXT.md +65 -0
- package/resources/harness/bundles/general/cursor/README.md +478 -0
- package/resources/harness/bundles/general/cursor/harness-archive/SKILL.md +198 -0
- package/resources/harness/bundles/general/cursor/harness-archive/checklist.md +52 -0
- package/resources/harness/bundles/general/cursor/harness-archive/reference.md +103 -0
- package/resources/harness/bundles/general/cursor/harness-archive/scripts/gen-manifest.ps1 +31 -0
- package/resources/harness/bundles/general/cursor/harness-archive/templates/render-summary.mjs +171 -0
- package/resources/harness/bundles/general/cursor/harness-archive/templates/summary-data-template.json +128 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +95 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/checklist.md +126 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/reference.md +364 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/CONCERNS.md +49 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/CONVENTIONS.md +57 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/STACK.md +55 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/STRUCTURE.md +69 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/TESTING.md +64 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/map-manifest.schema.json +73 -0
- package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/map-summary.md +64 -0
- package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +229 -0
- package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/design.md +842 -0
- package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
- package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/mcp-config.example.json +10 -0
- package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/reference.md +309 -0
- package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
- package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
- package/resources/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +147 -0
- package/resources/harness/bundles/general/cursor/harness-plan/SKILL.md +109 -0
- package/resources/harness/bundles/general/cursor/harness-plan/checklist.md +243 -0
- package/resources/harness/bundles/general/cursor/harness-plan/protocols.md +124 -0
- package/resources/harness/bundles/general/cursor/harness-plan/reference.md +376 -0
- package/resources/harness/bundles/general/cursor/harness-review/SKILL.md +137 -0
- package/resources/harness/bundles/general/cursor/harness-review/checklist.md +124 -0
- package/resources/harness/bundles/general/cursor/harness-review/protocols.md +68 -0
- package/resources/harness/bundles/general/cursor/harness-review/reference.md +86 -0
- package/resources/harness/bundles/general/cursor/harness-run/SKILL.md +113 -0
- package/resources/harness/bundles/general/cursor/harness-run/checklist.md +259 -0
- package/resources/harness/bundles/general/cursor/harness-run/protocols.md +78 -0
- package/resources/harness/bundles/general/cursor/harness-run/reference.md +834 -0
- package/resources/harness/bundles/general/cursor/harness-submit/SKILL.md +142 -0
- package/resources/harness/bundles/general/cursor/harness-submit/checklist.md +407 -0
- package/resources/harness/bundles/general/cursor/harness-submit/reference.md +152 -0
- package/resources/harness/bundles/general/cursor/harness-sync/SKILL.md +65 -0
- package/resources/harness/bundles/general/cursor/harness-sync/reference.md +153 -0
- package/resources/harness/bundles/general/cursor/harness-test/SKILL.md +160 -0
- package/resources/harness/bundles/general/cursor/harness-test/checklist.md +319 -0
- package/resources/harness/bundles/general/cursor/harness-test/pitfalls.md +260 -0
- package/resources/harness/bundles/general/cursor/harness-test/reference.md +791 -0
- package/resources/harness/bundles/general/cursor/protocols/archive-report-protocol.md +175 -0
- package/resources/harness/bundles/general/cursor/protocols/evidence-based-reporting-protocol.md +134 -0
- package/resources/harness/bundles/general/cursor/protocols/ledger-protocol.md +270 -0
- package/resources/harness/bundles/general/cursor/protocols/powershell-protocol.md +181 -0
- package/resources/harness/bundles/general/cursor/protocols/report-pipeline-protocol.md +150 -0
- package/resources/harness/bundles/general/cursor/protocols/sensitive-info-protocol.md +92 -0
- package/resources/harness/bundles/general/cursor/protocols/state-layout-protocol.md +131 -0
- package/resources/harness/bundles/general/cursor/protocols/submit-protocol.md +78 -0
- package/resources/harness/bundles/general/cursor/scripts/harness_archive.py +2319 -0
- package/resources/harness/bundles/general/cursor/scripts/harness_deploy.py +674 -0
- package/resources/harness/bundles/general/cursor/scripts/harness_events.py +680 -0
- package/resources/harness/bundles/general/cursor/scripts/harness_ledger.py +671 -0
- package/resources/harness/bundles/general/cursor/scripts/harness_preflight.py +780 -0
- package/resources/harness/bundles/general/cursor/scripts/harness_service.py +1331 -0
- package/resources/harness/bundles/java/claude-code/.harness-build.json +6 -0
- package/resources/harness/bundles/java/claude-code/CONTEXT.md +65 -0
- package/resources/harness/bundles/java/claude-code/README.md +478 -0
- package/resources/harness/{java → bundles/java/claude-code}/agents/harness-reviewer.md +2 -2
- package/resources/harness/{java → bundles/java/claude-code}/harness-apidoc/SKILL.md +1 -1
- package/resources/harness/{java → bundles/java/claude-code}/harness-archive/SKILL.md +1 -1
- package/resources/harness/bundles/java/claude-code/harness-archive/checklist.md +52 -0
- package/resources/harness/bundles/java/claude-code/harness-archive/reference.md +103 -0
- package/resources/harness/bundles/java/claude-code/harness-archive/scripts/gen-manifest.ps1 +31 -0
- package/resources/harness/bundles/java/claude-code/harness-archive/templates/render-summary.mjs +171 -0
- package/resources/harness/bundles/java/claude-code/harness-archive/templates/summary-data-template.json +128 -0
- package/resources/harness/{general → bundles/java/claude-code}/harness-codebase-map/SKILL.md +1 -1
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/checklist.md +126 -0
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/reference.md +364 -0
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/CONCERNS.md +49 -0
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/CONVENTIONS.md +57 -0
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/STACK.md +55 -0
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/STRUCTURE.md +69 -0
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/TESTING.md +64 -0
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/map-manifest.schema.json +73 -0
- package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/map-summary.md +64 -0
- package/resources/harness/{general → bundles/java/claude-code}/harness-knowledge-ingest/SKILL.md +1 -1
- package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/design.md +842 -0
- package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
- package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/mcp-config.example.json +10 -0
- package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/reference.md +309 -0
- package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
- package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
- package/resources/harness/{java → bundles/java/claude-code}/harness-knowledge-query/SKILL.md +1 -1
- package/resources/harness/{java → bundles/java/claude-code}/harness-package/SKILL.md +1 -1
- package/resources/harness/{java → bundles/java/claude-code}/harness-package/reference.md +1 -1
- package/resources/harness/{java → bundles/java/claude-code}/harness-plan/SKILL.md +1 -1
- package/resources/harness/bundles/java/claude-code/harness-plan/checklist.md +243 -0
- package/resources/harness/bundles/java/claude-code/harness-plan/protocols.md +124 -0
- package/resources/harness/bundles/java/claude-code/harness-plan/reference.md +376 -0
- package/resources/harness/{general → bundles/java/claude-code}/harness-review/SKILL.md +8 -4
- package/resources/harness/bundles/java/claude-code/harness-review/checklist.md +124 -0
- package/resources/harness/bundles/java/claude-code/harness-review/protocols.md +68 -0
- package/resources/harness/bundles/java/claude-code/harness-review/reference.md +86 -0
- package/resources/harness/{java → bundles/java/claude-code}/harness-run/SKILL.md +1 -1
- package/resources/harness/{java → bundles/java/claude-code}/harness-run/checklist.md +1 -1
- package/resources/harness/bundles/java/claude-code/harness-run/protocols.md +78 -0
- package/resources/harness/{java → bundles/java/claude-code}/harness-run/reference.md +2 -2
- package/resources/harness/{java → bundles/java/claude-code}/harness-submit/SKILL.md +1 -1
- package/resources/harness/bundles/java/claude-code/harness-submit/checklist.md +407 -0
- package/resources/harness/bundles/java/claude-code/harness-submit/reference.md +152 -0
- package/resources/harness/{general → bundles/java/claude-code}/harness-sync/SKILL.md +2 -2
- package/resources/harness/bundles/java/claude-code/harness-sync/reference.md +153 -0
- package/resources/harness/{java → bundles/java/claude-code}/harness-test/SKILL.md +1 -1
- package/resources/harness/{java → bundles/java/claude-code}/harness-test/checklist.md +316 -316
- package/resources/harness/bundles/java/claude-code/harness-test/pitfalls.md +260 -0
- package/resources/harness/{java → bundles/java/claude-code}/harness-test/reference.md +788 -788
- package/resources/harness/bundles/java/claude-code/protocols/archive-report-protocol.md +175 -0
- package/resources/harness/bundles/java/claude-code/protocols/evidence-based-reporting-protocol.md +134 -0
- package/resources/harness/bundles/java/claude-code/protocols/ledger-protocol.md +270 -0
- package/resources/harness/bundles/java/claude-code/protocols/powershell-protocol.md +181 -0
- package/resources/harness/bundles/java/claude-code/protocols/report-pipeline-protocol.md +150 -0
- package/resources/harness/bundles/java/claude-code/protocols/sensitive-info-protocol.md +92 -0
- package/resources/harness/bundles/java/claude-code/protocols/state-layout-protocol.md +131 -0
- package/resources/harness/bundles/java/claude-code/protocols/submit-protocol.md +78 -0
- package/resources/harness/bundles/java/claude-code/scripts/harness_archive.py +2319 -0
- package/resources/harness/bundles/java/claude-code/scripts/harness_deploy.py +674 -0
- package/resources/harness/bundles/java/claude-code/scripts/harness_events.py +680 -0
- package/resources/harness/bundles/java/claude-code/scripts/harness_ledger.py +671 -0
- package/resources/harness/bundles/java/claude-code/scripts/harness_preflight.py +780 -0
- package/resources/harness/bundles/java/claude-code/scripts/harness_service.py +1331 -0
- package/resources/harness/bundles/java/codebuddy/.harness-build.json +6 -0
- package/resources/harness/bundles/java/codebuddy/CONTEXT.md +65 -0
- package/resources/harness/bundles/java/codebuddy/README.md +478 -0
- package/resources/harness/bundles/java/codebuddy/agents/harness-evaluator.md +94 -0
- package/resources/harness/bundles/java/codebuddy/agents/harness-explorer.md +53 -0
- package/resources/harness/bundles/java/codebuddy/agents/harness-reviewer.md +52 -0
- package/resources/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +68 -0
- package/resources/harness/bundles/java/codebuddy/harness-apidoc/checklist.md +142 -0
- package/resources/harness/bundles/java/codebuddy/harness-apidoc/reference.md +233 -0
- package/resources/harness/bundles/java/codebuddy/harness-archive/SKILL.md +198 -0
- package/resources/harness/bundles/java/codebuddy/harness-archive/checklist.md +52 -0
- package/resources/harness/bundles/java/codebuddy/harness-archive/reference.md +103 -0
- package/resources/harness/bundles/java/codebuddy/harness-archive/scripts/gen-manifest.ps1 +31 -0
- package/resources/harness/bundles/java/codebuddy/harness-archive/templates/render-summary.mjs +171 -0
- package/resources/harness/bundles/java/codebuddy/harness-archive/templates/summary-data-template.json +128 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +95 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/checklist.md +126 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/reference.md +364 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/CONCERNS.md +49 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/CONVENTIONS.md +57 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/STACK.md +55 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/STRUCTURE.md +69 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/TESTING.md +64 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/map-manifest.schema.json +73 -0
- package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/map-summary.md +64 -0
- package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +229 -0
- package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/design.md +842 -0
- package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
- package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/mcp-config.example.json +10 -0
- package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/reference.md +309 -0
- package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
- package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
- package/resources/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +147 -0
- package/resources/harness/bundles/java/codebuddy/harness-package/SKILL.md +69 -0
- package/resources/harness/bundles/java/codebuddy/harness-package/checklist.md +322 -0
- package/resources/harness/bundles/java/codebuddy/harness-package/reference.md +210 -0
- package/resources/harness/bundles/java/codebuddy/harness-plan/SKILL.md +109 -0
- package/resources/harness/bundles/java/codebuddy/harness-plan/checklist.md +243 -0
- package/resources/harness/bundles/java/codebuddy/harness-plan/protocols.md +124 -0
- package/resources/harness/bundles/java/codebuddy/harness-plan/reference.md +376 -0
- package/resources/harness/bundles/java/codebuddy/harness-review/SKILL.md +142 -0
- package/resources/harness/bundles/java/codebuddy/harness-review/checklist.md +124 -0
- package/resources/harness/bundles/java/codebuddy/harness-review/protocols.md +68 -0
- package/resources/harness/bundles/java/codebuddy/harness-review/reference.md +86 -0
- package/resources/harness/bundles/java/codebuddy/harness-run/SKILL.md +129 -0
- package/resources/harness/bundles/java/codebuddy/harness-run/checklist.md +250 -0
- package/resources/harness/bundles/java/codebuddy/harness-run/protocols.md +78 -0
- package/resources/harness/bundles/java/codebuddy/harness-run/reference.md +814 -0
- package/resources/harness/bundles/java/codebuddy/harness-submit/SKILL.md +149 -0
- package/resources/harness/bundles/java/codebuddy/harness-submit/checklist.md +407 -0
- package/resources/harness/bundles/java/codebuddy/harness-submit/reference.md +152 -0
- package/resources/harness/bundles/java/codebuddy/harness-sync/SKILL.md +65 -0
- package/resources/harness/bundles/java/codebuddy/harness-sync/reference.md +153 -0
- package/resources/harness/bundles/java/codebuddy/harness-test/SKILL.md +172 -0
- package/resources/harness/bundles/java/codebuddy/harness-test/checklist.md +317 -0
- package/resources/harness/bundles/java/codebuddy/harness-test/pitfalls-java.md +16 -0
- package/resources/harness/bundles/java/codebuddy/harness-test/pitfalls.md +260 -0
- package/resources/harness/bundles/java/codebuddy/harness-test/reference.md +788 -0
- package/resources/harness/bundles/java/codebuddy/protocols/archive-report-protocol.md +175 -0
- package/resources/harness/bundles/java/codebuddy/protocols/evidence-based-reporting-protocol.md +134 -0
- package/resources/harness/bundles/java/codebuddy/protocols/ledger-protocol.md +270 -0
- package/resources/harness/bundles/java/codebuddy/protocols/powershell-protocol.md +181 -0
- package/resources/harness/bundles/java/codebuddy/protocols/report-pipeline-protocol.md +150 -0
- package/resources/harness/bundles/java/codebuddy/protocols/sensitive-info-protocol.md +92 -0
- package/resources/harness/bundles/java/codebuddy/protocols/state-layout-protocol.md +131 -0
- package/resources/harness/bundles/java/codebuddy/protocols/submit-protocol.md +78 -0
- package/resources/harness/bundles/java/codebuddy/scripts/harness_archive.py +2319 -0
- package/resources/harness/bundles/java/codebuddy/scripts/harness_deploy.py +674 -0
- package/resources/harness/bundles/java/codebuddy/scripts/harness_events.py +680 -0
- package/resources/harness/bundles/java/codebuddy/scripts/harness_ledger.py +671 -0
- package/resources/harness/bundles/java/codebuddy/scripts/harness_preflight.py +780 -0
- package/resources/harness/bundles/java/codebuddy/scripts/harness_service.py +1331 -0
- package/resources/harness/bundles/java/codex/.harness-build.json +6 -0
- package/resources/harness/bundles/java/codex/CONTEXT.md +65 -0
- package/resources/harness/bundles/java/codex/README.md +478 -0
- package/resources/harness/bundles/java/codex/harness-apidoc/SKILL.md +68 -0
- package/resources/harness/bundles/java/codex/harness-apidoc/checklist.md +142 -0
- package/resources/harness/bundles/java/codex/harness-apidoc/reference.md +233 -0
- package/resources/harness/bundles/java/codex/harness-archive/SKILL.md +198 -0
- package/resources/harness/bundles/java/codex/harness-archive/checklist.md +52 -0
- package/resources/harness/bundles/java/codex/harness-archive/reference.md +103 -0
- package/resources/harness/bundles/java/codex/harness-archive/scripts/gen-manifest.ps1 +31 -0
- package/resources/harness/bundles/java/codex/harness-archive/templates/render-summary.mjs +171 -0
- package/resources/harness/bundles/java/codex/harness-archive/templates/summary-data-template.json +128 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/SKILL.md +95 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/checklist.md +126 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/reference.md +364 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/templates/CONCERNS.md +49 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/templates/CONVENTIONS.md +57 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/templates/STACK.md +55 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/templates/STRUCTURE.md +69 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/templates/TESTING.md +64 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/templates/map-manifest.schema.json +73 -0
- package/resources/harness/bundles/java/codex/harness-codebase-map/templates/map-summary.md +64 -0
- package/resources/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +229 -0
- package/resources/harness/bundles/java/codex/harness-knowledge-ingest/design.md +842 -0
- package/resources/harness/bundles/java/codex/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
- package/resources/harness/bundles/java/codex/harness-knowledge-ingest/mcp-config.example.json +10 -0
- package/resources/harness/bundles/java/codex/harness-knowledge-ingest/reference.md +309 -0
- package/resources/harness/bundles/java/codex/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
- package/resources/harness/bundles/java/codex/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
- package/resources/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +147 -0
- package/resources/harness/bundles/java/codex/harness-package/SKILL.md +69 -0
- package/resources/harness/bundles/java/codex/harness-package/checklist.md +322 -0
- package/resources/harness/bundles/java/codex/harness-package/reference.md +210 -0
- package/resources/harness/bundles/java/codex/harness-plan/SKILL.md +109 -0
- package/resources/harness/bundles/java/codex/harness-plan/checklist.md +243 -0
- package/resources/harness/bundles/java/codex/harness-plan/protocols.md +124 -0
- package/resources/harness/bundles/java/codex/harness-plan/reference.md +376 -0
- package/resources/harness/bundles/java/codex/harness-review/SKILL.md +137 -0
- package/resources/harness/bundles/java/codex/harness-review/checklist.md +124 -0
- package/resources/harness/bundles/java/codex/harness-review/protocols.md +68 -0
- package/resources/harness/bundles/java/codex/harness-review/reference.md +86 -0
- package/resources/harness/bundles/java/codex/harness-run/SKILL.md +129 -0
- package/resources/harness/bundles/java/codex/harness-run/checklist.md +250 -0
- package/resources/harness/bundles/java/codex/harness-run/protocols.md +78 -0
- package/resources/harness/bundles/java/codex/harness-run/reference.md +814 -0
- package/resources/harness/bundles/java/codex/harness-submit/SKILL.md +149 -0
- package/resources/harness/bundles/java/codex/harness-submit/checklist.md +407 -0
- package/resources/harness/bundles/java/codex/harness-submit/reference.md +152 -0
- package/resources/harness/bundles/java/codex/harness-sync/SKILL.md +65 -0
- package/resources/harness/bundles/java/codex/harness-sync/reference.md +153 -0
- package/resources/harness/bundles/java/codex/harness-test/SKILL.md +172 -0
- package/resources/harness/bundles/java/codex/harness-test/checklist.md +317 -0
- package/resources/harness/bundles/java/codex/harness-test/pitfalls-java.md +16 -0
- package/resources/harness/bundles/java/codex/harness-test/pitfalls.md +260 -0
- package/resources/harness/bundles/java/codex/harness-test/reference.md +788 -0
- package/resources/harness/bundles/java/codex/protocols/archive-report-protocol.md +175 -0
- package/resources/harness/bundles/java/codex/protocols/evidence-based-reporting-protocol.md +134 -0
- package/resources/harness/bundles/java/codex/protocols/ledger-protocol.md +270 -0
- package/resources/harness/bundles/java/codex/protocols/powershell-protocol.md +181 -0
- package/resources/harness/bundles/java/codex/protocols/report-pipeline-protocol.md +150 -0
- package/resources/harness/bundles/java/codex/protocols/sensitive-info-protocol.md +92 -0
- package/resources/harness/bundles/java/codex/protocols/state-layout-protocol.md +131 -0
- package/resources/harness/bundles/java/codex/protocols/submit-protocol.md +78 -0
- package/resources/harness/bundles/java/codex/scripts/harness_archive.py +2319 -0
- package/resources/harness/bundles/java/codex/scripts/harness_deploy.py +674 -0
- package/resources/harness/bundles/java/codex/scripts/harness_events.py +680 -0
- package/resources/harness/bundles/java/codex/scripts/harness_ledger.py +671 -0
- package/resources/harness/bundles/java/codex/scripts/harness_preflight.py +780 -0
- package/resources/harness/bundles/java/codex/scripts/harness_service.py +1331 -0
- package/resources/harness/bundles/java/cursor/.harness-build.json +6 -0
- package/resources/harness/bundles/java/cursor/CONTEXT.md +65 -0
- package/resources/harness/bundles/java/cursor/README.md +478 -0
- package/resources/harness/bundles/java/cursor/harness-apidoc/SKILL.md +68 -0
- package/resources/harness/bundles/java/cursor/harness-apidoc/checklist.md +142 -0
- package/resources/harness/bundles/java/cursor/harness-apidoc/reference.md +233 -0
- package/resources/harness/bundles/java/cursor/harness-archive/SKILL.md +198 -0
- package/resources/harness/bundles/java/cursor/harness-archive/checklist.md +52 -0
- package/resources/harness/bundles/java/cursor/harness-archive/reference.md +103 -0
- package/resources/harness/bundles/java/cursor/harness-archive/scripts/gen-manifest.ps1 +31 -0
- package/resources/harness/bundles/java/cursor/harness-archive/templates/render-summary.mjs +171 -0
- package/resources/harness/bundles/java/cursor/harness-archive/templates/summary-data-template.json +128 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +95 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/checklist.md +126 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/reference.md +364 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/CONCERNS.md +49 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/CONVENTIONS.md +57 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/STACK.md +55 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/STRUCTURE.md +69 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/TESTING.md +64 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/map-manifest.schema.json +73 -0
- package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/map-summary.md +64 -0
- package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +229 -0
- package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/design.md +842 -0
- package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
- package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/mcp-config.example.json +10 -0
- package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/reference.md +309 -0
- package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
- package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
- package/resources/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +147 -0
- package/resources/harness/bundles/java/cursor/harness-package/SKILL.md +69 -0
- package/resources/harness/bundles/java/cursor/harness-package/checklist.md +322 -0
- package/resources/harness/bundles/java/cursor/harness-package/reference.md +210 -0
- package/resources/harness/bundles/java/cursor/harness-plan/SKILL.md +109 -0
- package/resources/harness/bundles/java/cursor/harness-plan/checklist.md +243 -0
- package/resources/harness/bundles/java/cursor/harness-plan/protocols.md +124 -0
- package/resources/harness/bundles/java/cursor/harness-plan/reference.md +376 -0
- package/resources/harness/bundles/java/cursor/harness-review/SKILL.md +137 -0
- package/resources/harness/bundles/java/cursor/harness-review/checklist.md +124 -0
- package/resources/harness/bundles/java/cursor/harness-review/protocols.md +68 -0
- package/resources/harness/bundles/java/cursor/harness-review/reference.md +86 -0
- package/resources/harness/bundles/java/cursor/harness-run/SKILL.md +129 -0
- package/resources/harness/bundles/java/cursor/harness-run/checklist.md +250 -0
- package/resources/harness/bundles/java/cursor/harness-run/protocols.md +78 -0
- package/resources/harness/bundles/java/cursor/harness-run/reference.md +814 -0
- package/resources/harness/bundles/java/cursor/harness-submit/SKILL.md +149 -0
- package/resources/harness/bundles/java/cursor/harness-submit/checklist.md +407 -0
- package/resources/harness/bundles/java/cursor/harness-submit/reference.md +152 -0
- package/resources/harness/bundles/java/cursor/harness-sync/SKILL.md +65 -0
- package/resources/harness/bundles/java/cursor/harness-sync/reference.md +153 -0
- package/resources/harness/bundles/java/cursor/harness-test/SKILL.md +172 -0
- package/resources/harness/bundles/java/cursor/harness-test/checklist.md +317 -0
- package/resources/harness/bundles/java/cursor/harness-test/pitfalls-java.md +16 -0
- package/resources/harness/bundles/java/cursor/harness-test/pitfalls.md +260 -0
- package/resources/harness/bundles/java/cursor/harness-test/reference.md +788 -0
- package/resources/harness/bundles/java/cursor/protocols/archive-report-protocol.md +175 -0
- package/resources/harness/bundles/java/cursor/protocols/evidence-based-reporting-protocol.md +134 -0
- package/resources/harness/bundles/java/cursor/protocols/ledger-protocol.md +270 -0
- package/resources/harness/bundles/java/cursor/protocols/powershell-protocol.md +181 -0
- package/resources/harness/bundles/java/cursor/protocols/report-pipeline-protocol.md +150 -0
- package/resources/harness/bundles/java/cursor/protocols/sensitive-info-protocol.md +92 -0
- package/resources/harness/bundles/java/cursor/protocols/state-layout-protocol.md +131 -0
- package/resources/harness/bundles/java/cursor/protocols/submit-protocol.md +78 -0
- package/resources/harness/bundles/java/cursor/scripts/harness_archive.py +2319 -0
- package/resources/harness/bundles/java/cursor/scripts/harness_deploy.py +674 -0
- package/resources/harness/bundles/java/cursor/scripts/harness_events.py +680 -0
- package/resources/harness/bundles/java/cursor/scripts/harness_ledger.py +671 -0
- package/resources/harness/bundles/java/cursor/scripts/harness_preflight.py +780 -0
- package/resources/harness/bundles/java/cursor/scripts/harness_service.py +1331 -0
- package/resources/harness/manifests/{general.json → general/claude-code.json} +27 -26
- package/resources/harness/manifests/general/codebuddy.json +277 -0
- package/resources/harness/manifests/general/codex.json +265 -0
- package/resources/harness/manifests/general/cursor.json +265 -0
- package/resources/harness/manifests/{java.json → java/claude-code.json} +31 -30
- package/resources/harness/manifests/java/codebuddy.json +305 -0
- package/resources/harness/manifests/java/codex.json +293 -0
- package/resources/harness/manifests/java/cursor.json +293 -0
- package/resources/harness/general/.harness-build.json +0 -5
- package/resources/harness/java/.harness-build.json +0 -5
- /package/resources/harness/{general → bundles/general/claude-code}/CONTEXT.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/README.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/agents/harness-evaluator.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/agents/harness-explorer.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-archive/checklist.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-archive/reference.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-archive/scripts/gen-manifest.ps1 +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-archive/templates/render-summary.mjs +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-archive/templates/summary-data-template.json +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/checklist.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/reference.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/ARCHITECTURE.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/CONCERNS.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/CONVENTIONS.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/INTEGRATIONS.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/STACK.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/STRUCTURE.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/TESTING.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/map-manifest.schema.json +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/map-summary.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/design.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/mcp-config.example.json +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/scripts/harness_knowledge.py +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-plan/checklist.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-plan/protocols.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-plan/reference.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-review/protocols.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-review/reference.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-run/protocols.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-submit/checklist.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-submit/reference.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-test/pitfalls.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/harness-test/reference.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/protocols/archive-report-protocol.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/protocols/evidence-based-reporting-protocol.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/protocols/ledger-protocol.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/protocols/powershell-protocol.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/protocols/report-pipeline-protocol.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/protocols/sensitive-info-protocol.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/protocols/state-layout-protocol.md +0 -0
- /package/resources/harness/{general → bundles/general/claude-code}/protocols/submit-protocol.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/CONTEXT.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/README.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-archive/checklist.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-archive/reference.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-archive/scripts/gen-manifest.ps1 +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-archive/templates/render-summary.mjs +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-archive/templates/summary-data-template.json +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/checklist.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/reference.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/ARCHITECTURE.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/CONCERNS.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/CONVENTIONS.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/INTEGRATIONS.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/STACK.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/STRUCTURE.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/TESTING.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/map-manifest.schema.json +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/map-summary.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/design.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/mcp-config.example.json +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/scripts/harness_knowledge.py +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-plan/checklist.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-plan/protocols.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-plan/reference.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-review/protocols.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-review/reference.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-run/protocols.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-submit/checklist.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-submit/reference.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/harness-test/pitfalls.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/protocols/archive-report-protocol.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/protocols/evidence-based-reporting-protocol.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/protocols/ledger-protocol.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/protocols/powershell-protocol.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/protocols/report-pipeline-protocol.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/protocols/sensitive-info-protocol.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/protocols/state-layout-protocol.md +0 -0
- /package/resources/harness/{java → bundles/general/codebuddy}/protocols/submit-protocol.md +0 -0
- /package/resources/harness/{java → bundles/java/claude-code}/agents/harness-evaluator.md +0 -0
- /package/resources/harness/{java → bundles/java/claude-code}/agents/harness-explorer.md +0 -0
- /package/resources/harness/{java → bundles/java/claude-code}/harness-apidoc/checklist.md +0 -0
- /package/resources/harness/{java → bundles/java/claude-code}/harness-apidoc/reference.md +0 -0
- /package/resources/harness/{java → bundles/java/claude-code}/harness-package/checklist.md +0 -0
- /package/resources/harness/{java → bundles/java/claude-code}/harness-test/pitfalls-java.md +0 -0
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: harness-test 的 API 测试执行细节、批量 runner、token 缓存、测试数据治理、报告模板和关门检查。仅在执行接口测试需要参考详细操作时读取。
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# harness-test 参考 — API 测试详情
|
|
6
|
+
|
|
7
|
+
## 命令执行模式 preflight(0.0y)
|
|
8
|
+
|
|
9
|
+
`/harness-test` 高度依赖 PowerShell 与 Node。在编译/启动服务/生成 runner **之前**
|
|
10
|
+
必须执行 4 项执行模式检查:
|
|
11
|
+
|
|
12
|
+
| 检查项 | 命令 | 预期 |
|
|
13
|
+
|---|---|---|
|
|
14
|
+
| PowerShell 基础命令 | `powershell.exe -NoProfile -Command "$PSVersionTable.PSVersion"` | exitCode=0 |
|
|
15
|
+
| Node 绝对路径 | `powershell.exe -NoProfile -Command "& 'C:\nvm4w\nodejs\node.exe' --version"` | exitCode=0 |
|
|
16
|
+
| Maven 可用性 | `powershell.exe -NoProfile -Command "mvn -version"` | exitCode=0 |
|
|
17
|
+
| 安全分类器 | 任一 PowerShell 命令是否返回"安全分类器暂时不可用"/"Auto mode 拦截" | 不应出现 |
|
|
18
|
+
|
|
19
|
+
将通过的 `nodeAbsolutePath` 等元数据写入 `.harness/changes/<change-name>/runtime/preflight.json`,
|
|
20
|
+
供后续 Node runner 启动命令读取。
|
|
21
|
+
|
|
22
|
+
**触发硬停**(任一情况):
|
|
23
|
+
|
|
24
|
+
- "安全分类器暂时不可用"
|
|
25
|
+
- Auto mode 导致 PowerShell 命令不可执行
|
|
26
|
+
- PowerShell 被拒
|
|
27
|
+
- PowerShell 可用但 node / mvn 不可执行
|
|
28
|
+
|
|
29
|
+
**硬停输出**(不得意译,不得继续编译/启动服务/生成 runner,不得长时间等待,不得盲目降级到 Playwright MCP):
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
❌ 命令执行模式不可用:PowerShell/Node runner 无法稳定执行。
|
|
33
|
+
请切换 Claude Code 权限模式,例如 bypassPermissions / 非 Auto mode,
|
|
34
|
+
或用允许命令执行的方式启动 Claude Code。
|
|
35
|
+
不要继续进入接口测试,避免长时间等待和错误 fallback。
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
重复重试 ≤ 1 次。
|
|
39
|
+
|
|
40
|
+
## fallback 执行器探测
|
|
41
|
+
|
|
42
|
+
### 探测流程
|
|
43
|
+
|
|
44
|
+
Phase 0.0y 必须先确认 PowerShell / Node / Maven 可用。
|
|
45
|
+
|
|
46
|
+
如果 PowerShell Node API runner 可用,**不执行 fallback 探测**,直接使用 Node runner。
|
|
47
|
+
只有 Node runner 不可用时,才按顺序探测 PowerShell batch、Playwright MCP、curl fallback。
|
|
48
|
+
|
|
49
|
+
**fallback 探测项**:
|
|
50
|
+
|
|
51
|
+
1. PowerShell batch runner (`.ps1`) 是否可用
|
|
52
|
+
2. Claude Code 是否暴露 Playwright MCP 工具(检查工具列表中是否有 `mcp__plugin_playwright_playwright__*`)
|
|
53
|
+
3. 如果可以执行命令,检查 `claude mcp list` 中是否有 playwright
|
|
54
|
+
4. `@playwright/mcp` 是否可启动
|
|
55
|
+
5. 当前 skill 的 `allowed-tools` 是否允许 Playwright 相关工具
|
|
56
|
+
6. curl fallback 是否只能使用 UTF-8 JSON body file,禁止中文 JSON 内联
|
|
57
|
+
|
|
58
|
+
### 输出格式
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
### fallback 执行器可用性
|
|
62
|
+
| 项 | 结果 | 证据 |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| PowerShell Node API runner | ✅使用 / ❌不可用 | ... |
|
|
65
|
+
| PowerShell batch runner | 未使用 / ✅fallback / ❌不可用 | ... |
|
|
66
|
+
| Playwright MCP browser_evaluate | 未使用 / ✅fallback / ❌不可用 | ... |
|
|
67
|
+
| curl + UTF-8 JSON body file | 未使用 / ✅fallback / ❌不可用 | ... |
|
|
68
|
+
| 最终决策 | PowerShell Node API runner / PowerShell batch / Playwright MCP browser_evaluate / curl fallback | ... |
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
如果 fallback 不可用,必须写明原因,不得静默改用 curl。
|
|
72
|
+
|
|
73
|
+
## 接口测试工具优先级
|
|
74
|
+
|
|
75
|
+
**优先级**(从高到低):
|
|
76
|
+
|
|
77
|
+
| 优先级 | 工具 | 适用场景 | 说明 |
|
|
78
|
+
|:------:|------|---------|------|
|
|
79
|
+
| 1 | **PowerShell + Node API runner (`.mjs`)** | 默认且首选 | PowerShell + node 绝对路径执行,统一 baseURL/headers/token,结构化输出+耗时统计 |
|
|
80
|
+
| 2 | **PowerShell batch runner (`.ps1`)** | Node 不可用时降级 | UTF-8 编码正确,可脚本化批量执行 |
|
|
81
|
+
| 3 | **Playwright MCP `browser_evaluate` + `fetch`** | 1+2 不可用时 fallback | UTF-8 编码正确,但每场景单独调用 MCP,**不得替代 runner** |
|
|
82
|
+
| 4 | **curl + UTF-8 JSON body file** | 最后兜底 | 必须先将 JSON body 写入 UTF-8 文件,再通过 PowerShell(`curl.exe` 或 `Invoke-RestMethod`,经 `Bash(powershell.exe:*)` 通道)发送;`disallowed-tools` 已禁 `Bash(curl *)`,不得用 Bash 直接 curl |
|
|
83
|
+
| ❌ | curl 内联含中文 JSON | **禁止** | Windows 下 GBK 编码导致 UTF-8 解析失败 |
|
|
84
|
+
| ❌ | Bash 裸 `node ...` | **禁止** | Bash 在中文路径项目下被 hook 拒绝;且 Node 在 Bash 中常不在 PATH |
|
|
85
|
+
|
|
86
|
+
> **Windows 环境避免用 curl 发送含中文的请求体**(GBK 编码导致 UTF-8 解析失败)。
|
|
87
|
+
> **如果 Node 在 PowerShell 可用,禁止使用 Playwright MCP 逐条执行接口测试。**
|
|
88
|
+
|
|
89
|
+
## known-good-test-profile(本项目固化)
|
|
90
|
+
|
|
91
|
+
本项目默认使用 **local-dev profile + 本地 MySQL + 远程 Redis + 远程 SDK Gateway + 远程 SSO**。
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
known-good-test-profile:
|
|
95
|
+
name: local-dev-remote-sdk
|
|
96
|
+
module: <module-from-build-profile>
|
|
97
|
+
springProfile: local-dev
|
|
98
|
+
port: <from-build-profile.service.port>
|
|
99
|
+
contextPath: /contribution
|
|
100
|
+
healthUrl: <baseUrl-from-build-profile>/contribution/meta
|
|
101
|
+
|
|
102
|
+
database:
|
|
103
|
+
mysql: localhost:3306/udp_contribution
|
|
104
|
+
redis: 11.11.150.34:6390
|
|
105
|
+
|
|
106
|
+
remote:
|
|
107
|
+
gateway: http://11.11.150.33:9090
|
|
108
|
+
sdkUrl: http://11.11.150.33:9090/platform/
|
|
109
|
+
ssoLoginUrl: http://11.11.150.33:9091/uap/system/auth/login
|
|
110
|
+
|
|
111
|
+
overlay:
|
|
112
|
+
pathStrategy: ascii-temp
|
|
113
|
+
directory: C:/temp/harness-test-overlay
|
|
114
|
+
fileName: application-harness-test.yml
|
|
115
|
+
|
|
116
|
+
service:
|
|
117
|
+
askBeforeReusingExisting: true
|
|
118
|
+
askBeforeRestartingUserService: true
|
|
119
|
+
stopAfterTest: true
|
|
120
|
+
restoreOriginalService: false
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
默认不假设本地 9090 Gateway 存在。
|
|
124
|
+
|
|
125
|
+
## Runtime overlay(不动 tracked 配置)
|
|
126
|
+
|
|
127
|
+
不要直接 Edit `application-local-dev.yml`。默认生成 ASCII 绝对路径 overlay:
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
C:/temp/harness-test-overlay/<change-name>/application-harness-test.yml
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
内容按 `known-good-test-profile` 渲染:
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
udp:
|
|
137
|
+
sdk:
|
|
138
|
+
url: http://11.11.150.33:9090/platform/
|
|
139
|
+
spring:
|
|
140
|
+
cloud:
|
|
141
|
+
nacos:
|
|
142
|
+
discovery:
|
|
143
|
+
register-enabled: false
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
唯一默认启动命令:
|
|
147
|
+
|
|
148
|
+
```powershell
|
|
149
|
+
powershell.exe -NoProfile -Command "mvn spring-boot:run -pl <module-from-build-profile> -Dspring-boot.run.profiles=local-dev -Dspring-boot.run.jvmArguments='-Dspring.config.additional-location=file:C:/temp/harness-test-overlay/<change-name>/application-harness-test.yml'"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
不得默认使用 `.harness/changes/<change>/runtime/application-harness-test.yml` 相对路径作为 JVM `additional-location`。如必须修改 tracked yml,先 AskUserQuestion,最终报告至少 🟡 WARN。
|
|
153
|
+
|
|
154
|
+
## Service Decision Gate 与服务生命周期管理
|
|
155
|
+
|
|
156
|
+
运行时文件:
|
|
157
|
+
|
|
158
|
+
| 文件 | 内容 |
|
|
159
|
+
|---|---|
|
|
160
|
+
| `service.pid` | AI 启动/重启后的进程 PID |
|
|
161
|
+
| `service-start-command.txt` | 实际执行的 PowerShell 启动命令(脱敏) |
|
|
162
|
+
| `service-start.log` | mvn spring-boot:run stdout/stderr |
|
|
163
|
+
| `service-fingerprint.json` | pid、diffHash、profile、sdkUrl、overlayPath、startCommandHash、startedAt |
|
|
164
|
+
|
|
165
|
+
serviceState:`AI_STARTED` / `AI_RESTARTED_FROM_USER_SERVICE` / `USER_STARTED` / `REUSED_EXISTING` / `NOT_STARTED`。
|
|
166
|
+
|
|
167
|
+
发现已有 <service-module-from-build-profile> 时,先展示 Service Decision Gate,再问:
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
1. 直接复用当前服务
|
|
171
|
+
2. 重启服务,使用 known-good-test-profile
|
|
172
|
+
3. 跳过接口测试,只执行单元测试
|
|
173
|
+
4. 停止测试
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
只有 `service-fingerprint.json` 与当前真实 diffHash/profile/sdkUrl/startCommandHash 完全匹配,才允许自动复用。否则必须询问。
|
|
177
|
+
|
|
178
|
+
### 重入沿用
|
|
179
|
+
|
|
180
|
+
同一变更的 harness-test 重入时,若环境未变(PG/端口/执行器与上次一致)、上次已确认执行器/服务方案、且源码未改服务启动逻辑(未改 main 启动路径、未改端口/profile 配置、未改 spring-boot:run 启动相关代码),可沿用上次服务决策不重复询问,执行日志记 `重入沿用+环境未变`。不适用情形(service-fingerprint 不匹配、环境已变、USER_STARTED、源码改启动逻辑)仍须询问/重启。详见 checklist.md「0.5x 重入沿用」。
|
|
181
|
+
|
|
182
|
+
若用户选择重启已有服务,必须提示:测试结束后关闭新测试服务,不会恢复原服务。
|
|
183
|
+
|
|
184
|
+
最终报告必须包含 originalServicePid、originalServiceStopped、testServicePid、testServiceStopped、restoredOriginalService、finalPortState。
|
|
185
|
+
|
|
186
|
+
## 启动等待状态机
|
|
187
|
+
|
|
188
|
+
| 阶段 | 探测频率 | 行为 |
|
|
189
|
+
|---|---|---|
|
|
190
|
+
| 0–30s | 每 2s 一次(端口 + healthUrl) | 命中即继续 |
|
|
191
|
+
| 30–120s | 每 5s 一次 | 命中即继续 |
|
|
192
|
+
| 超过 120s | 读取最近 200 行 `service-start.log` | 异常即停 |
|
|
193
|
+
|
|
194
|
+
立即失败的异常关键字:`BindException` / `Could not resolve placeholder` /
|
|
195
|
+
`Connection refused during bean init` / `BeanCreationException` /
|
|
196
|
+
`Failed to start bean` / `BUILD FAILURE`。
|
|
197
|
+
|
|
198
|
+
每等待 >10s 必须输出一次状态行:
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
服务启动中:elapsed=20s, port=not listening, lastLog="..."
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## 批量测试 Runner(强制 setup / test / cleanup 三阶段)
|
|
205
|
+
|
|
206
|
+
> ⚠️ **强制单次执行**:runner 必须一次性跑完所有场景并输出 JSON,主会话不再逐条调用 Playwright MCP。只有 node runner 失败才降级为 PowerShell batch / 多次 `browser_evaluate`。
|
|
207
|
+
|
|
208
|
+
### 文件位置
|
|
209
|
+
|
|
210
|
+
- 脚本:`.harness/changes/<change-name>/runtime/api-test-runner.mjs`
|
|
211
|
+
- 结果:`.harness/changes/<change-name>/runtime/api-test-results.json`
|
|
212
|
+
- 均在 `.harness/changes/<change>/runtime/` 下,不提交到 git
|
|
213
|
+
|
|
214
|
+
### 执行方式(一次命令,PowerShell + node 绝对路径)
|
|
215
|
+
|
|
216
|
+
```powershell
|
|
217
|
+
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& 'C:\nvm4w\nodejs\node.exe' '.harness/changes/<change-name>/runtime/api-test-runner.mjs'"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
- 绝对路径默认 `C:\nvm4w\nodejs\node.exe`;不同环境从 `preflight.json` 读取
|
|
221
|
+
- 禁止裸 `node ...`,禁止用 Bash 执行 node
|
|
222
|
+
- 失败 ≤ 1 次重试,仍失败必须提示用户切换权限模式或手动执行 runner
|
|
223
|
+
|
|
224
|
+
runner 内部按 setup → test → cleanup 三阶段,失败时不会用 null ID 继续请求。
|
|
225
|
+
主会话只 Read `api-test-results.json` 生成摘要,不再调用 MCP。
|
|
226
|
+
|
|
227
|
+
### Runner 三阶段模板(setup / test / cleanup)
|
|
228
|
+
|
|
229
|
+
```javascript
|
|
230
|
+
// api-test-runner.mjs — 批量接口测试 runner(PowerShell + node 绝对路径执行)
|
|
231
|
+
import { request } from '@playwright/test';
|
|
232
|
+
import { writeFileSync, readFileSync } from 'node:fs';
|
|
233
|
+
|
|
234
|
+
const BASE_URL = '<baseUrl-from-build-profile>'; // 直连本地 baseURL
|
|
235
|
+
const CONTEXT_PATH = '/contribution';
|
|
236
|
+
const HEADERS = {
|
|
237
|
+
'Content-Type': 'application/json; charset=UTF-8',
|
|
238
|
+
'<headers-from-build-profile>'
|
|
239
|
+
};
|
|
240
|
+
const RESULTS_FILE = '.harness/changes/<change-name>/runtime/api-test-results.json';
|
|
241
|
+
const TOKEN_CACHE = '.harness/changes/<change-name>/runtime/credential-cache.json';
|
|
242
|
+
|
|
243
|
+
// ===== Payload schema(来自 VO/Controller/真实样例,禁止临场猜)=====
|
|
244
|
+
// CalculationRuleSaveReqVO 关键字段:
|
|
245
|
+
// ruleExpression(不是 expression)
|
|
246
|
+
// orgCode / orgName / defaultFlag 必填
|
|
247
|
+
// 详见 .harness/changes/<change>/plans/<change>-test-scenarios.md
|
|
248
|
+
|
|
249
|
+
const setupState = {
|
|
250
|
+
indicatorId: null,
|
|
251
|
+
ruleId: null,
|
|
252
|
+
errors: []
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
// ===== Token 复用:先本地 /meta 验证,失败才走 SSO =====
|
|
256
|
+
let tokenRefreshCount = 0;
|
|
257
|
+
async function resolveToken(role) {
|
|
258
|
+
let cache = {};
|
|
259
|
+
try { cache = JSON.parse(readFileSync(TOKEN_CACHE, 'utf8')); } catch {}
|
|
260
|
+
const entry = cache.tokens?.[role];
|
|
261
|
+
if (entry?.token) {
|
|
262
|
+
const ctx = await request.newContext({ baseURL: BASE_URL });
|
|
263
|
+
const probe = await ctx.get(`${CONTEXT_PATH}/meta`, {
|
|
264
|
+
headers: { ...HEADERS, Authorization: `Bearer ${entry.token}` },
|
|
265
|
+
timeout: 5000
|
|
266
|
+
});
|
|
267
|
+
if (probe.ok()) return entry.token;
|
|
268
|
+
}
|
|
269
|
+
if (tokenRefreshCount >= 1) {
|
|
270
|
+
throw new Error('Token 重取超过 1 次,请检查 SSO/账号配置');
|
|
271
|
+
}
|
|
272
|
+
tokenRefreshCount++;
|
|
273
|
+
return await loginViaSSO(role); // 写回 cache
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// ===== setup:创建前置数据 =====
|
|
277
|
+
async function setup(token) {
|
|
278
|
+
const ctx = await request.newContext({ baseURL: BASE_URL });
|
|
279
|
+
// 唯一前缀,避免冲突
|
|
280
|
+
const prefix = `JAVATEST_<change-name>_${Date.now()}_${Math.random().toString(36).slice(2,6)}`;
|
|
281
|
+
const priority = 900000 + Math.floor(Math.random() * 9999); // 避开本地 priority 冲突
|
|
282
|
+
try {
|
|
283
|
+
const resp = await ctx.post(`${CONTEXT_PATH}/indicator/create`, {
|
|
284
|
+
headers: { ...HEADERS, Authorization: `Bearer ${token}` },
|
|
285
|
+
data: JSON.stringify({
|
|
286
|
+
indicatorCode: `${prefix}_ind1`,
|
|
287
|
+
indicatorName: `${prefix}_指标`,
|
|
288
|
+
orgCode: '65000799',
|
|
289
|
+
orgName: '一层组织',
|
|
290
|
+
defaultFlag: false,
|
|
291
|
+
priority
|
|
292
|
+
}),
|
|
293
|
+
timeout: 10000
|
|
294
|
+
});
|
|
295
|
+
const json = await resp.json();
|
|
296
|
+
if (json.code === 0 || json.code === '0') {
|
|
297
|
+
setupState.indicatorId = json.data?.id;
|
|
298
|
+
} else {
|
|
299
|
+
setupState.errors.push({ step: 'createIndicator', code: json.code, message: json.message });
|
|
300
|
+
}
|
|
301
|
+
} catch (e) {
|
|
302
|
+
setupState.errors.push({ step: 'createIndicator', error: e.message });
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// ===== test:依赖判定 → BLOCKED 不发请求 =====
|
|
307
|
+
const results = [];
|
|
308
|
+
async function runOne(scenario, token) {
|
|
309
|
+
// 依赖检查
|
|
310
|
+
if (scenario.requires?.indicatorId && !setupState.indicatorId) {
|
|
311
|
+
results.push({ scenario: scenario.id, status: 0, passed: false, state: 'BLOCKED',
|
|
312
|
+
reason: 'setup.createIndicator failed' });
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
const start = Date.now();
|
|
316
|
+
try {
|
|
317
|
+
const ctx = await request.newContext({ baseURL: BASE_URL });
|
|
318
|
+
const url = scenario.url.replace('{indicatorId}', setupState.indicatorId ?? '');
|
|
319
|
+
const resp = await ctx.fetch(url, {
|
|
320
|
+
method: scenario.method,
|
|
321
|
+
headers: { ...HEADERS, ...scenario.headers, Authorization: `Bearer ${token}` },
|
|
322
|
+
data: scenario.body ? JSON.stringify(scenario.body(setupState)) : undefined,
|
|
323
|
+
timeout: scenario.timeout || 10000
|
|
324
|
+
});
|
|
325
|
+
const data = await resp.json();
|
|
326
|
+
const durationMs = Date.now() - start;
|
|
327
|
+
results.push({
|
|
328
|
+
scenario: scenario.id, method: scenario.method, url,
|
|
329
|
+
status: resp.status(), code: data.code, message: data.message || data.msg,
|
|
330
|
+
durationMs,
|
|
331
|
+
state: checkPassed(scenario, resp.status(), data) ? 'PASS' : 'FAIL',
|
|
332
|
+
passed: checkPassed(scenario, resp.status(), data)
|
|
333
|
+
});
|
|
334
|
+
} catch (err) {
|
|
335
|
+
results.push({
|
|
336
|
+
scenario: scenario.id, method: scenario.method, url: scenario.url,
|
|
337
|
+
status: 0, code: 'ERROR', message: err.message,
|
|
338
|
+
durationMs: Date.now() - start,
|
|
339
|
+
state: 'FAIL', passed: false
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// ===== cleanup:尽力清理 =====
|
|
345
|
+
async function cleanup(token) {
|
|
346
|
+
const ctx = await request.newContext({ baseURL: BASE_URL });
|
|
347
|
+
let cleaned = 0, leftover = 0;
|
|
348
|
+
const errors = [];
|
|
349
|
+
if (setupState.indicatorId) {
|
|
350
|
+
try {
|
|
351
|
+
const resp = await ctx.delete(`${CONTEXT_PATH}/indicator/${setupState.indicatorId}`, {
|
|
352
|
+
headers: { ...HEADERS, Authorization: `Bearer ${token}` },
|
|
353
|
+
timeout: 10000
|
|
354
|
+
});
|
|
355
|
+
if (resp.ok()) cleaned++; else { leftover++; errors.push({ id: setupState.indicatorId, status: resp.status() }); }
|
|
356
|
+
} catch (e) {
|
|
357
|
+
leftover++; errors.push({ id: setupState.indicatorId, error: e.message });
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return { cleaned, leftover, errors };
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// ===== 主流程 =====
|
|
364
|
+
const token = await resolveToken('admin');
|
|
365
|
+
await setup(token);
|
|
366
|
+
for (const scenario of scenarios) {
|
|
367
|
+
await runOne(scenario, token);
|
|
368
|
+
}
|
|
369
|
+
const cleanupResult = await cleanup(token);
|
|
370
|
+
|
|
371
|
+
const summary = {
|
|
372
|
+
runner: 'powershell-node-api-runner',
|
|
373
|
+
scenariosTotal: results.length,
|
|
374
|
+
passed: results.filter(r => r.state === 'PASS').length,
|
|
375
|
+
failed: results.filter(r => r.state === 'FAIL').length,
|
|
376
|
+
blocked: results.filter(r => r.state === 'BLOCKED').length,
|
|
377
|
+
skipped: results.filter(r => r.state === 'SKIPPED').length,
|
|
378
|
+
setupErrors: setupState.errors,
|
|
379
|
+
cleanupResult,
|
|
380
|
+
tokenRefreshCount,
|
|
381
|
+
startedAt: '<ISO>', finishedAt: '<ISO>', durationMs: 0
|
|
382
|
+
};
|
|
383
|
+
writeFileSync(RESULTS_FILE, JSON.stringify({ results, summary }, null, 2));
|
|
384
|
+
console.log(`\n结果已写入 ${RESULTS_FILE}`);
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
> **关键点**:
|
|
388
|
+
> - `setup` / `test` / `cleanup` 三阶段,依赖未满足时标 `BLOCKED`,**不发起请求**
|
|
389
|
+
> - runner 用 `request.newContext({ baseURL })` 或 node 原生 `fetch` **直连本地 baseURL**
|
|
390
|
+
> - token 从本地 cache 读 + 本地 `/meta` 验证,**完全不依赖浏览器当前页面 origin**
|
|
391
|
+
> - 同一次执行内 `tokenRefreshCount` 不得 > 1
|
|
392
|
+
> - payload 来自 VO/Controller/真实样例,并在脚本注释中标注字段来源
|
|
393
|
+
|
|
394
|
+
### Runner 降级方案(PowerShell batch runner .ps1)
|
|
395
|
+
|
|
396
|
+
```powershell
|
|
397
|
+
# api-test-runner.ps1 — PowerShell 批量接口测试
|
|
398
|
+
$baseUrl = "<baseUrl-from-build-profile>"
|
|
399
|
+
$headers = @{
|
|
400
|
+
"Content-Type" = "application/json; charset=UTF-8"
|
|
401
|
+
"<headers-from-build-profile>"
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
$results = @()
|
|
405
|
+
foreach ($scenario in $scenarios) {
|
|
406
|
+
$sw = [System.Diagnostics.Stopwatch]::StartNew()
|
|
407
|
+
try {
|
|
408
|
+
$body = $scenario.body | ConvertTo-Json -Depth 10 -Compress
|
|
409
|
+
$resp = Invoke-RestMethod -Uri "$baseUrl$($scenario.url)" -Method $scenario.method -Headers $headers -Body $body -ContentType "application/json; charset=UTF-8"
|
|
410
|
+
$sw.Stop()
|
|
411
|
+
$results += [PSCustomObject]@{
|
|
412
|
+
scenario = $scenario.id
|
|
413
|
+
method = $scenario.method
|
|
414
|
+
url = $scenario.url
|
|
415
|
+
status = 200
|
|
416
|
+
code = $resp.code
|
|
417
|
+
message = $resp.message
|
|
418
|
+
durationMs = $sw.ElapsedMilliseconds
|
|
419
|
+
passed = $true
|
|
420
|
+
}
|
|
421
|
+
} catch {
|
|
422
|
+
$sw.Stop()
|
|
423
|
+
$results += [PSCustomObject]@{
|
|
424
|
+
scenario = $scenario.id
|
|
425
|
+
method = $scenario.method
|
|
426
|
+
url = $scenario.url
|
|
427
|
+
status = $_.Exception.Response.StatusCode.value__
|
|
428
|
+
code = "ERROR"
|
|
429
|
+
message = $_.Exception.Message
|
|
430
|
+
durationMs = $sw.ElapsedMilliseconds
|
|
431
|
+
passed = $false
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
$results | ConvertTo-Json -Depth 4
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
## 命令与请求超时治理
|
|
440
|
+
|
|
441
|
+
所有命令必须有"预期时长 + 超时上限",超过预期时长**必须输出一次当前状态**:
|
|
442
|
+
|
|
443
|
+
| 命令类型 | 预期 | 超时 | 超时行为 |
|
|
444
|
+
|----------|:----:|:----:|----------|
|
|
445
|
+
| PowerShell preflight (0.0y) | 1–2s | **5s** | 失败立即停 0.0y |
|
|
446
|
+
| node runner(普通) | 30s | **60s** | 抛错继续报告,不再重试 |
|
|
447
|
+
| node runner(复杂场景) | 60s | **120s** | 同上 |
|
|
448
|
+
| token 获取(SSO) | 5–10s | **15s** | 计 1 次重取;超过 1 次 → 🟡 WARN |
|
|
449
|
+
| 单个 HTTP GET | < 1s | **8s** | durationMs > 10s → 🟡 SLOW |
|
|
450
|
+
| 单个 HTTP POST/PUT | < 2s | **10s** | durationMs > 10s → 🟡 SLOW |
|
|
451
|
+
| health probe | < 1s | **3s** | 计入启动状态机 |
|
|
452
|
+
| Maven compile | 10–60s | **180s** | 输出最后 30 行日志后停 |
|
|
453
|
+
| Maven test | 60–180s | **300s** | 输出失败用例后停 |
|
|
454
|
+
| service start | 30–60s | **120s** | 4.1 启动状态机收敛 |
|
|
455
|
+
|
|
456
|
+
**反馈规则**:
|
|
457
|
+
- 等待 > 10s 必须输出一次状态行(启动等待、node runner、mvn 均适用)
|
|
458
|
+
- 不得静默等待
|
|
459
|
+
- `durationMs > 10000` → 🟡 SLOW
|
|
460
|
+
- `durationMs > 30000` → ❌ TIMEOUT_RISK
|
|
461
|
+
- 请求慢不得忽略,必须说明是服务、网络、认证还是工具调用开销
|
|
462
|
+
|
|
463
|
+
## Token 缓存与复用
|
|
464
|
+
|
|
465
|
+
### 缓存文件
|
|
466
|
+
|
|
467
|
+
`.harness/changes/<change-name>/runtime/credential-cache.json`(不提交到 git)
|
|
468
|
+
|
|
469
|
+
### 缓存结构
|
|
470
|
+
|
|
471
|
+
```json
|
|
472
|
+
{
|
|
473
|
+
"baseUrl": "<baseUrl-from-build-profile>",
|
|
474
|
+
"profile": "local-dev",
|
|
475
|
+
"tokens": {
|
|
476
|
+
"admin": {
|
|
477
|
+
"username": "admin",
|
|
478
|
+
"role": "SUPER_ADMIN",
|
|
479
|
+
"orgCode": null,
|
|
480
|
+
"token": "<raw token only in runtime file>",
|
|
481
|
+
"tokenHash": "<sha256 prefix>",
|
|
482
|
+
"createdAt": "2026-06-22T10:00:00+08:00",
|
|
483
|
+
"lastValidatedAt": "2026-06-22T10:15:00+08:00",
|
|
484
|
+
"expiresAt": null
|
|
485
|
+
},
|
|
486
|
+
"normal_65000799": {
|
|
487
|
+
"username": "user1",
|
|
488
|
+
"role": "NORMAL",
|
|
489
|
+
"orgCode": "65000799",
|
|
490
|
+
"token": "<raw token only in runtime file>",
|
|
491
|
+
"tokenHash": "<sha256 prefix>",
|
|
492
|
+
"createdAt": "2026-06-22T10:00:00+08:00",
|
|
493
|
+
"lastValidatedAt": "2026-06-22T10:15:00+08:00",
|
|
494
|
+
"expiresAt": null
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### Token 使用策略
|
|
501
|
+
|
|
502
|
+
1. 先读取 `credential-cache.json`
|
|
503
|
+
2. 如果已有目标角色 token,先用**本地轻量接口**验证(如 `GET /meta`,直连本地 baseURL)
|
|
504
|
+
3. 验证通过(200 + code=0)则复用,**不重新登录、不访问远程 SSO**
|
|
505
|
+
4. 验证失败(401 / token expired / login required)→ 才访问远程 SSO 重新获取并写回 cache
|
|
506
|
+
5. 同一上下文中,前面已获取过 token 时必须优先复用
|
|
507
|
+
6. **API runner 必须使用 request context 或 node fetch 直接请求本地 baseURL,不得依赖浏览器当前页面 origin**
|
|
508
|
+
7. **不得因浏览器当前页面 origin 在 SSO 就重新获取 token**——token 是独立凭证,与浏览器停留页面无关
|
|
509
|
+
8. **禁止低效流程**:先在远程 SSO 页面获取 token → 导航到 localhost → 再重新获取 token。正确流程是直接用本地 baseURL + 已缓存 token 验证,缓存失效才走 SSO
|
|
510
|
+
9. **不得在报告、execution-log、对话总结中输出明文 token**
|
|
511
|
+
|
|
512
|
+
**输出示例(正确)**:
|
|
513
|
+
```
|
|
514
|
+
Token 策略:
|
|
515
|
+
- admin token: ✅ 复用缓存(本地 /meta 验证通过),lastValidatedAt=2026-06-22T10:15:00+08:00
|
|
516
|
+
- normal token: 🔄 缓存失效,已通过 SSO 刷新
|
|
517
|
+
Admin token 获取成功:<TOKEN_REDACTED>,hash=sha256:abcd1234
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
**输出示例(错误)**:
|
|
521
|
+
```
|
|
522
|
+
Admin token 获取成功:aedcf3b8c9d2e1f4...
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
## 测试数据治理
|
|
526
|
+
|
|
527
|
+
### 测试数据命名
|
|
528
|
+
|
|
529
|
+
接口测试创建数据必须使用唯一前缀:
|
|
530
|
+
|
|
531
|
+
```
|
|
532
|
+
JAVATEST_<change-name>_<timestamp>_<short-random>
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
示例:`JAVATEST_fix-pagination_20260622_a3f2`
|
|
536
|
+
|
|
537
|
+
所有 ruleCode、ruleName、indicatorCode 等测试数据必须带此前缀。
|
|
538
|
+
|
|
539
|
+
### 测试数据冲突预防
|
|
540
|
+
|
|
541
|
+
存在唯一约束的字段:`priority` / `projectSubtype` 或 `calcScene` 组合:
|
|
542
|
+
|
|
543
|
+
1. 使用随机 priority(如 `900000 + random`)
|
|
544
|
+
2. 先查询已有 priority 后避让
|
|
545
|
+
3. 使用唯一 `projectSubtype` 隔离
|
|
546
|
+
|
|
547
|
+
**不得**因 `priority=1` 与本地预存数据冲突导致大面积 BLOCKED。
|
|
548
|
+
|
|
549
|
+
### 请求体生成(禁止临场猜字段)
|
|
550
|
+
|
|
551
|
+
生成 runner 前必须建立 payload schema:
|
|
552
|
+
|
|
553
|
+
1. 读取对应 `<XxxSaveReqVO>` / `<XxxQueryReqVO>` 定义
|
|
554
|
+
2. 读取 Controller 方法(参数注解、校验注解)
|
|
555
|
+
3. 读取已有测试 / Postman / 真实请求样例
|
|
556
|
+
4. 在 runner 注释或 JSON 中记录字段来源(如 "from CalculationRuleSaveReqVO")
|
|
557
|
+
|
|
558
|
+
### 测试数据记录
|
|
559
|
+
|
|
560
|
+
测试报告必须包含测试数据表:
|
|
561
|
+
|
|
562
|
+
```markdown
|
|
563
|
+
## 测试数据
|
|
564
|
+
| 类型 | ID | Code | 用途 | 是否需要清理 |
|
|
565
|
+
|------|----|------|------|:----------:|
|
|
566
|
+
| 规则 | 123 | JAVATEST_fix-pagination_20260622_a3f2_rule1 | 分页查询测试 | ✅ 已清理 |
|
|
567
|
+
| 指标 | 456 | JAVATEST_fix-pagination_20260622_a3f2_ind1 | 分页查询测试 | 🟡 接口不支持删除 |
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
### 清理策略
|
|
571
|
+
|
|
572
|
+
- 如果接口支持删除、禁用或回滚 → 测试结束后清理
|
|
573
|
+
- 不能清理 → 记录遗留数据和原因
|
|
574
|
+
- 不得反复试错创建冲突数据
|
|
575
|
+
|
|
576
|
+
## 响应验证
|
|
577
|
+
|
|
578
|
+
- HTTP 状态码 与预期对比
|
|
579
|
+
- `code` 字段 与预期对比(**自动兼容两种格式**:下划线 `1_003_002_009` 和数字 `1003002009`)
|
|
580
|
+
- `message` 关键词匹配(模糊匹配即可)
|
|
581
|
+
|
|
582
|
+
## 数据兼容测试
|
|
583
|
+
|
|
584
|
+
如果场景表有「数据兼容场景」:查询已有数据,验证新字段返回 null 或默认值,不报错。
|
|
585
|
+
|
|
586
|
+
## 输出格式(测试报告模板)
|
|
587
|
+
|
|
588
|
+
测试完成后,将报告保存到 `.harness/changes/<change-name>/reports/test/test-report-YYYYMMDD-HHmm.md`(时间戳格式:日期+时分),同时在控制台输出摘要。
|
|
589
|
+
|
|
590
|
+
```markdown
|
|
591
|
+
## 测试报告 — <功能名>
|
|
592
|
+
|
|
593
|
+
### 请求执行器
|
|
594
|
+
- PowerShell Node API runner: ✅ 使用 / ❌ 不可用,原因:...
|
|
595
|
+
- PowerShell batch runner (.ps1): 未使用 / 🟡 fallback,原因:...
|
|
596
|
+
- Playwright MCP browser_evaluate: 未使用 / 🟡 fallback,原因:...
|
|
597
|
+
- curl: 未使用 / 🟡 fallback,原因:...
|
|
598
|
+
|
|
599
|
+
### 服务生命周期
|
|
600
|
+
| 项 | 值 |
|
|
601
|
+
|---|---|
|
|
602
|
+
| serviceState | AI_STARTED / USER_STARTED / REUSED_EXISTING / NOT_STARTED |
|
|
603
|
+
| pid | 12345 |
|
|
604
|
+
| startCommand | <脱敏的 PowerShell 启动命令> |
|
|
605
|
+
| stopAfterTest | true / false |
|
|
606
|
+
| stopped | ✅ / ❌ / N/A |
|
|
607
|
+
|
|
608
|
+
### Token 策略
|
|
609
|
+
- admin token: ✅ 复用缓存(本地验证通过) / 🔄 缓存失效已刷新(SSO)
|
|
610
|
+
- normal token: ✅ 复用缓存 / 🔄 已刷新
|
|
611
|
+
- tokenRefreshCount: 0 / 1(>1 → 🟡 WARN)
|
|
612
|
+
|
|
613
|
+
### 单元测试
|
|
614
|
+
> ✅ 复用 harness-run 单元测试结果:Tests run: N, Failures: 0, Errors: 0
|
|
615
|
+
> (diffHash=<...>, module=<...>, profile=<...>, scope=<...>)
|
|
616
|
+
> 或:🔄 已重跑(原因:diffHash 变化 / 行为性 post-test 修改 / run 未跑全量)
|
|
617
|
+
|
|
618
|
+
| 指标 | 数值 |
|
|
619
|
+
|------|:----:|
|
|
620
|
+
| 总测试数 | 31 |
|
|
621
|
+
| 通过 | 31 |
|
|
622
|
+
| 失败 | 0 |
|
|
623
|
+
| 跳过 | 0 |
|
|
624
|
+
|
|
625
|
+
### Runner 三阶段
|
|
626
|
+
| 阶段 | 状态 | 说明 |
|
|
627
|
+
|---|---|---|
|
|
628
|
+
| setup | ✅ 全部成功 / ❌ N 个错误 | createIndicator OK, createRule OK |
|
|
629
|
+
| test | N PASS / M FAIL / K BLOCKED / J SKIPPED | BLOCKED 全部因 setup.createRule 失败 |
|
|
630
|
+
| cleanup | cleaned=X / leftover=Y | 接口 /indicator 不支持删除,2 条遗留 |
|
|
631
|
+
|
|
632
|
+
### 接口测试
|
|
633
|
+
| # | 场景 | 方法 | URL | 预期 | 实际 | durationMs | 状态 |
|
|
634
|
+
|:--:|------|:----:|-----|------|------|----------:|:--:|
|
|
635
|
+
| API-001 | 创建资源 | POST | /api/xxx | 200, code=0 | 200, code=0 | 245 | ✅ PASS |
|
|
636
|
+
| API-002 | 参数校验 | POST | /api/xxx | code=xxx | code=xxx | 180 | ✅ PASS |
|
|
637
|
+
| API-003 | 查询子规则 | GET | /api/xxx/{id} | 200 | — | — | 🟡 BLOCKED(setup.createRule 失败) |
|
|
638
|
+
|
|
639
|
+
### 请求耗时统计
|
|
640
|
+
| 场景 | 方法 | URL | durationMs | 状态 |
|
|
641
|
+
|------|:----:|-----|----------:|:----:|
|
|
642
|
+
| API-001 | POST | /api/xxx | 245 | ✅ |
|
|
643
|
+
| API-010 | GET | /api/yyy | 12450 | 🟡SLOW |
|
|
644
|
+
|
|
645
|
+
### 数据兼容
|
|
646
|
+
| # | 场景 | 预期 | 实际 | 结果 |
|
|
647
|
+
|:--:|------|------|------|:--:|
|
|
648
|
+
| COM-001 | 旧数据查询 | 200, 不报错 | 200, 新字段=null | ✅ |
|
|
649
|
+
|
|
650
|
+
### 测试数据
|
|
651
|
+
| 类型 | ID | Code | 用途 | 是否需要清理 |
|
|
652
|
+
|------|----|------|------|:----------:|
|
|
653
|
+
| 规则 | 123 | JAVATEST_xxx_20260622_a3f2_rule1 | 分页测试 | ✅ 已清理 |
|
|
654
|
+
|
|
655
|
+
### 汇总
|
|
656
|
+
- 单元测试: N 通过 / 0 失败
|
|
657
|
+
- 接口测试: K PASS / L FAIL / B BLOCKED / S SKIPPED / P 🟡SLOW
|
|
658
|
+
- 数据兼容: N 通过 / 0 失败
|
|
659
|
+
- 请求执行器: PowerShell Node API runner(✅ 正常)
|
|
660
|
+
- serviceState: AI_STARTED → ✅ stopped
|
|
661
|
+
- 测试数据: N 条已清理 / M 条遗留
|
|
662
|
+
- tokenRefreshCount: 0
|
|
663
|
+
|
|
664
|
+
### final-summary(顶层维度状态)
|
|
665
|
+
- compile: ✅ OK
|
|
666
|
+
- unitTest: ✅ OK / 🟡 REUSED_FROM_RUN
|
|
667
|
+
- apiTest: **OK / PARTIAL / BLOCKED / NOT_RUN / FAIL**
|
|
668
|
+
- 例:`apiTest=PARTIAL` — 15 个 API 场景中 5 个 PASS,9 个 BLOCKED,1 个 FAIL
|
|
669
|
+
- gitDiffCheck: ✅
|
|
670
|
+
- serviceLifecycle: ✅ AI_STARTED stopped / 🟡 USER_STARTED 保留
|
|
671
|
+
|
|
672
|
+
### 关门检查结果
|
|
673
|
+
- git status --porcelain: ✅/❌
|
|
674
|
+
- git diff --stat: ✅/❌
|
|
675
|
+
- git diff --check: ✅/❌(❌ → 最终结果 ❌FAIL)
|
|
676
|
+
- 明文敏感信息: ✅无/❌有
|
|
677
|
+
- runtime 不提交: ✅已确认
|
|
678
|
+
- 服务生命周期: AI_STARTED→✅stopped(pid=12345) / USER_STARTED→🟡保留 / REUSED_EXISTING→🟡保留
|
|
679
|
+
- 测试数据清理: ✅已清理/🟡N条遗留
|
|
680
|
+
- 执行器表完整性: ✅四种执行器均已列出,未与 API runner 混写
|
|
681
|
+
|
|
682
|
+
### 下一步
|
|
683
|
+
- 如果 ✅OK:进入 /harness-review
|
|
684
|
+
- 如果 🟡WARN:根据 WARN 原因决定是否补充测试或进入 review
|
|
685
|
+
- 如果 ❌FAIL:修复失败项后重新运行 /harness-test
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
## 结果分级规则
|
|
689
|
+
|
|
690
|
+
### 整体结果
|
|
691
|
+
|
|
692
|
+
**✅OK**(全部满足):
|
|
693
|
+
- 所有 P0 接口/权限/数据兼容场景真实验证通过
|
|
694
|
+
- 无未解释的环境变更
|
|
695
|
+
- 请求执行器、token 策略、测试数据均有记录
|
|
696
|
+
- 关键测试请求有 durationMs 证据
|
|
697
|
+
- git diff --check 通过
|
|
698
|
+
- 服务生命周期已正确收尾
|
|
699
|
+
|
|
700
|
+
**🟡WARN**(任一满足):
|
|
701
|
+
- 业务验证通过,但存在测试环境变更
|
|
702
|
+
- 使用了 fallback 请求执行器
|
|
703
|
+
- 有测试数据未清理
|
|
704
|
+
- 有 P1 场景未验证
|
|
705
|
+
- 有慢请求(🟡SLOW)/ 任一 P0 场景被跳过 / BLOCKED
|
|
706
|
+
- 有非关键降级
|
|
707
|
+
- AI_STARTED 服务未关闭
|
|
708
|
+
- `tokenRefreshCount > 1`
|
|
709
|
+
|
|
710
|
+
**❌FAIL**(任一满足):
|
|
711
|
+
- 任一 P0 场景 FAIL(请求执行了,断言失败)
|
|
712
|
+
- 服务无法启动 / 0.0y 命令执行模式失败且未恢复
|
|
713
|
+
- 编译/单测失败
|
|
714
|
+
- 批量 runner 执行失败且无有效 fallback
|
|
715
|
+
- git diff --check 失败
|
|
716
|
+
|
|
717
|
+
> **P0 场景 BLOCKED 不得仍 OK**:必须 🟡 WARN 或 ❌ FAIL。
|
|
718
|
+
|
|
719
|
+
### API 测试维度状态(final-summary 中输出)
|
|
720
|
+
|
|
721
|
+
| 状态 | 定义 |
|
|
722
|
+
|---|---|
|
|
723
|
+
| `OK` | P0 API 全部 PASS |
|
|
724
|
+
| `PARTIAL` | 部分 PASS + 部分 FAIL/BLOCKED |
|
|
725
|
+
| `BLOCKED` | P0 API 全部无法执行(环境/前置数据) |
|
|
726
|
+
| `NOT_RUN` | 完全没执行任何 API |
|
|
727
|
+
| `FAIL` | P0 API 明确 FAIL |
|
|
728
|
+
|
|
729
|
+
> ⚠️ **不得**把"5 PASS + 9 BLOCKED + 1 FAIL"写成 `apiTest=NOT_RUN`。正确:`apiTest=PARTIAL`。
|
|
730
|
+
|
|
731
|
+
## 请求执行器 fallback 输出
|
|
732
|
+
|
|
733
|
+
在测试报告中必须区分四种执行器(不得笼统写"Playwright"):
|
|
734
|
+
|
|
735
|
+
```markdown
|
|
736
|
+
## 请求执行器
|
|
737
|
+
- PowerShell Node API runner: ✅ 使用 / ❌ 不可用,原因:...
|
|
738
|
+
- PowerShell batch runner (.ps1): 未使用 / 🟡 fallback,原因:...
|
|
739
|
+
- Playwright MCP browser_evaluate: 未使用 / 🟡 fallback,原因:...
|
|
740
|
+
- curl: 未使用 / 🟡 fallback,原因:...
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
默认期望:`PowerShell Node API runner ✅ 使用`,其余三项 `未使用`。
|
|
744
|
+
|
|
745
|
+
- 如果 runner 正常执行,其余三项均标"未使用"
|
|
746
|
+
- 如果 node runner 不可执行降级为 PowerShell batch / 多次 MCP `browser_evaluate`,按实际标 🟡 fallback 并写原因
|
|
747
|
+
- 如果最终用了 curl,必须解释为什么 PowerShell Node runner、PowerShell batch、Playwright MCP 都不可用
|
|
748
|
+
- **不得**把 "Playwright API runner" 与 "Playwright MCP browser_evaluate" 混写
|
|
749
|
+
|
|
750
|
+
## 关门检查
|
|
751
|
+
|
|
752
|
+
在输出最终总结前,必须执行并展示以下 10 项检查:
|
|
753
|
+
|
|
754
|
+
1. `powershell.exe -NoProfile -Command "git status --porcelain"`
|
|
755
|
+
2. `powershell.exe -NoProfile -Command "git diff --stat"`
|
|
756
|
+
3. `powershell.exe -NoProfile -Command "git diff --check"`(如果失败 → 最终结果 ❌FAIL)
|
|
757
|
+
4. 检查报告和日志是否包含明文 token/password/secret/access-key/client-secret
|
|
758
|
+
5. 检查 `.harness/changes/<change>/runtime/` 是否不会被提交(.gitignore 确认)
|
|
759
|
+
6. **服务生命周期收尾**:AI_STARTED→Stop-Process / USER_STARTED→只提示 / REUSED_EXISTING→保留或用户确认 / NOT_STARTED→N/A
|
|
760
|
+
7. 检查测试数据是否需要清理
|
|
761
|
+
8. 检查请求执行器结果是否完整(4 种执行器表完整、未与 API runner 混写)
|
|
762
|
+
9. 检查是否存在慢请求或超时风险
|
|
763
|
+
10. 如果存在未清理测试数据、fallback 请求执行器、慢请求或环境变更 → 至少 🟡WARN
|
|
764
|
+
|
|
765
|
+
## 真实 diffHash 生成
|
|
766
|
+
|
|
767
|
+
后续复用 ledger 前必须生成真实 SHA-256 diffHash,且**必须是 commit-invariant 三部分合并**(与 harness-run 步骤 2c、ledger-protocol 五逐字一致),保证 run→test 跨 checkpoint commit 复用链不断:
|
|
768
|
+
|
|
769
|
+
```powershell
|
|
770
|
+
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"
|
|
771
|
+
```
|
|
772
|
+
|
|
773
|
+
`<baseCommit>` 从 ledger 读取(harness-plan 写入);缺失时用 `git merge-base HEAD <默认分支>` 兜底。三部分:`git diff $base HEAD`(已提交)+ `git diff`(未提交 tracked)+ 未跟踪新文件(`git ls-files --others --exclude-standard`);`& { }` 必须带 `&`。
|
|
774
|
+
|
|
775
|
+
写入 `.harness/changes/<change>/evidence/verification-ledger.json`:
|
|
776
|
+
|
|
777
|
+
```json
|
|
778
|
+
{
|
|
779
|
+
"diffHash": "sha256:<real_hash>",
|
|
780
|
+
"diffPatchFile": ".harness/changes/<change>/runtime/current-diff.patch"
|
|
781
|
+
}
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
禁止使用 `3files-84plus-5minus` 这类描述性 diffHash 作为复用依据。**禁止仅用 `git diff`(未提交)计算 diffHash**——commit 后工作树干净致指纹变空,断裂 run→test 复用链。**同样禁止** `git diff <base> HEAD` 已提交单部分或 `node -e` 自算 SHA-256——commit 后 clean 致单部分偶然等价不得作为依据,无论时序必须三部分合并。
|
|
785
|
+
|
|
786
|
+
## 执行日志记录
|
|
787
|
+
|
|
788
|
+
`/harness-test` 只向 `events.ndjson` 追加事件(schema_version 2);`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`。
|