feat: v2.0 iteration — test coverage, reliability, observability

M0: Test coverage expansion (151 → 321 tests, 61% → 66% lines)
  - normalizeKnowledge CRLF/LF normalization fix
  - gooseReviewer: 11 tests, 97.35% coverage
  - r2 storage: 22 tests, 100% coverage
  - triage processor: 11 tests, exported buildTriagePrompt/labelName
  - webhook processor: 35 tests, 72.39% coverage
  - conflict resolver: 12 tests
  - review processor: 7 tests

M1: Reliability hardening
  - Smart retry with jitter, maxTotalTimeoutMs, custom retryable predicate
  - MergeGuard: in-memory merge dedup tracker (100% coverage)
  - failureMessages: 7-category failure classifier (100% coverage)

M2: Observability
  - MetricsCollector: Actions-run metrics with snapshot/markdown/reset
  - 11 tests, 100% coverage

New files: 12 test files, 3 source modules
All gates: typecheck ✓ lint ✓ format ✓ 321/321 tests ✓ build ✓
This commit is contained in:
ghbot committed 2026-08-24 17:34:04 +08:00
1 parent db53296d78
commit 78bf8e9e41
87 files changed
+6003 -2587

No files matched your search

+2 -2
View File
@@ -21,7 +21,7 @@ if (!fs.existsSync(gitDir)) {
fs.mkdirSync(hooksDir, { recursive: true });
// git hooks 以仓库根为工作目录,相对路径在 Windows 与 POSIX 下都可靠。
const hookScript = ["#!/bin/sh", 'node scripts/husky-pre-commit.cjs'].join("\n");
const hookScript = ["#!/bin/sh", "node scripts/husky-pre-commit.cjs"].join("\n");
fs.writeFileSync(hookPath, `${hookScript}\n`, { mode: 0o755 });
console.log(`[install-husky] 已写入 git pre-commit 钩子: ${hookPath}`);
console.log(`[install-husky] 已写入 git pre-commit 钩子: ${hookPath}`);