@mmerterden/multi-agent-pipeline 12.7.0 → 12.8.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.
Files changed (244) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/install/_common.mjs +48 -0
  3. package/install/_dev-only-files.mjs +125 -5
  4. package/install/claude.mjs +14 -8
  5. package/install/copilot.mjs +5 -8
  6. package/package.json +17 -2
  7. package/pipeline/commands/multi-agent/analysis/SKILL.md +1 -1
  8. package/pipeline/lib/credential-store.sh +20 -0
  9. package/pipeline/multi-agent-refs/_account-picker.md +1 -1
  10. package/pipeline/multi-agent-refs/_dev-context.md +1 -1
  11. package/pipeline/multi-agent-refs/_repo-picker.md +1 -1
  12. package/pipeline/multi-agent-refs/phases/operations.md +28 -0
  13. package/pipeline/multi-agent-refs/phases/phase-0-init.md +1 -0
  14. package/pipeline/multi-agent-refs/phases/phase-2-planning.md +1 -1
  15. package/pipeline/multi-agent-refs/phases/phase-3-dev.md +1 -2
  16. package/pipeline/multi-agent-refs/phases/phase-4-review.md +49 -4
  17. package/pipeline/schemas/prefs.schema.json +6 -0
  18. package/pipeline/scripts/_smoke-root.sh +61 -0
  19. package/pipeline/scripts/audit-log.sh +25 -0
  20. package/pipeline/scripts/smoke-cross-cli-behavior.sh +21 -7
  21. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-1-analysis.json +0 -25
  22. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-2-plan.json +0 -30
  23. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-4-review.json +0 -20
  24. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-4-triage.json +0 -15
  25. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/metadata.json +0 -14
  26. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/task.json +0 -12
  27. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-1-analysis.json +0 -29
  28. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-2-plan.json +0 -43
  29. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-4-review.json +0 -35
  30. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-4-triage.json +0 -35
  31. package/pipeline/eval/golden-tasks/02-android-feature-compose/metadata.json +0 -14
  32. package/pipeline/eval/golden-tasks/02-android-feature-compose/task.json +0 -12
  33. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-1-analysis.json +0 -29
  34. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-2-plan.json +0 -42
  35. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-4-review.json +0 -20
  36. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-4-triage.json +0 -15
  37. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/metadata.json +0 -14
  38. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/task.json +0 -12
  39. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-1-analysis.json +0 -29
  40. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-2-plan.json +0 -40
  41. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-4-review.json +0 -20
  42. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-4-triage.json +0 -15
  43. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/metadata.json +0 -14
  44. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/task.json +0 -12
  45. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-1-analysis.json +0 -29
  46. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-2-plan.json +0 -42
  47. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-4-review.json +0 -28
  48. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-4-triage.json +0 -27
  49. package/pipeline/eval/golden-tasks/05-ios-security-keychain/metadata.json +0 -14
  50. package/pipeline/eval/golden-tasks/05-ios-security-keychain/task.json +0 -12
  51. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-1-analysis.json +0 -29
  52. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-2-plan.json +0 -41
  53. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-4-review.json +0 -12
  54. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-4-triage.json +0 -6
  55. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/metadata.json +0 -14
  56. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/task.json +0 -12
  57. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-1-analysis.json +0 -29
  58. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-2-plan.json +0 -42
  59. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-4-review.json +0 -28
  60. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-4-triage.json +0 -27
  61. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/metadata.json +0 -14
  62. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/task.json +0 -12
  63. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-1-analysis.json +0 -25
  64. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-2-plan.json +0 -31
  65. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-4-review.json +0 -12
  66. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-4-triage.json +0 -18
  67. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/metadata.json +0 -14
  68. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/task.json +0 -12
  69. package/pipeline/eval/golden-tasks/README.md +0 -65
  70. package/pipeline/eval/intent-cases.json +0 -40
  71. package/pipeline/eval/run-metrics-fixture.json +0 -93
  72. package/pipeline/eval/triage/01-empty-findings/expected.json +0 -6
  73. package/pipeline/eval/triage/01-empty-findings/input.json +0 -5
  74. package/pipeline/eval/triage/01-empty-findings/notes.md +0 -7
  75. package/pipeline/eval/triage/02-real-blocker/expected.json +0 -15
  76. package/pipeline/eval/triage/02-real-blocker/input.json +0 -14
  77. package/pipeline/eval/triage/02-real-blocker/notes.md +0 -7
  78. package/pipeline/eval/triage/03-out-of-scope-defer/expected.json +0 -18
  79. package/pipeline/eval/triage/03-out-of-scope-defer/input.json +0 -14
  80. package/pipeline/eval/triage/03-out-of-scope-defer/notes.md +0 -10
  81. package/pipeline/eval/triage/04-false-positive-reject/expected.json +0 -18
  82. package/pipeline/eval/triage/04-false-positive-reject/input.json +0 -14
  83. package/pipeline/eval/triage/04-false-positive-reject/notes.md +0 -10
  84. package/pipeline/eval/triage/05-mixed-classification/expected.json +0 -43
  85. package/pipeline/eval/triage/05-mixed-classification/input.json +0 -38
  86. package/pipeline/eval/triage/05-mixed-classification/notes.md +0 -17
  87. package/pipeline/eval/triage/06-severity-mismatch/expected.json +0 -15
  88. package/pipeline/eval/triage/06-severity-mismatch/input.json +0 -14
  89. package/pipeline/eval/triage/06-severity-mismatch/notes.md +0 -9
  90. package/pipeline/eval/triage/07-duplicate-reviewers/expected.json +0 -27
  91. package/pipeline/eval/triage/07-duplicate-reviewers/input.json +0 -22
  92. package/pipeline/eval/triage/07-duplicate-reviewers/notes.md +0 -9
  93. package/pipeline/eval/triage/08-style-misclassified/expected.json +0 -18
  94. package/pipeline/eval/triage/08-style-misclassified/input.json +0 -14
  95. package/pipeline/eval/triage/08-style-misclassified/notes.md +0 -9
  96. package/pipeline/eval/triage/09-cascading-finding/expected.json +0 -23
  97. package/pipeline/eval/triage/09-cascading-finding/input.json +0 -22
  98. package/pipeline/eval/triage/09-cascading-finding/notes.md +0 -9
  99. package/pipeline/eval/triage/10-deferred-crossref/expected.json +0 -18
  100. package/pipeline/eval/triage/10-deferred-crossref/input.json +0 -14
  101. package/pipeline/eval/triage/10-deferred-crossref/notes.md +0 -9
  102. package/pipeline/eval/triage/11-vercel-token-leak-blocker/expected.json +0 -27
  103. package/pipeline/eval/triage/11-vercel-token-leak-blocker/input.json +0 -22
  104. package/pipeline/eval/triage/11-vercel-token-leak-blocker/notes.md +0 -14
  105. package/pipeline/eval/triage/README.md +0 -54
  106. package/pipeline/scripts/benchmark-phase-0.sh +0 -128
  107. package/pipeline/scripts/check-md-links.mjs +0 -88
  108. package/pipeline/scripts/eval-golden-tasks-live.mjs +0 -302
  109. package/pipeline/scripts/eval-golden-tasks.mjs +0 -224
  110. package/pipeline/scripts/eval-intent.mjs +0 -107
  111. package/pipeline/scripts/eval-mine-corpus.mjs +0 -211
  112. package/pipeline/scripts/eval-triage.mjs +0 -171
  113. package/pipeline/scripts/fixtures/diff-risk-android.diff +0 -40
  114. package/pipeline/scripts/fixtures/diff-risk-ios.diff +0 -48
  115. package/pipeline/scripts/fixtures/diff-risk-test-removal.diff +0 -40
  116. package/pipeline/scripts/fixtures/install-layout.tsv +0 -19
  117. package/pipeline/scripts/fixtures/pack-expected-count.txt +0 -1
  118. package/pipeline/scripts/fixtures/test-gap-node.diff +0 -30
  119. package/pipeline/scripts/fixtures/test-gap-python.diff +0 -32
  120. package/pipeline/scripts/lint-mcp-refs.mjs +0 -218
  121. package/pipeline/scripts/lint-skills.mjs +0 -154
  122. package/pipeline/scripts/run-smokes.mjs +0 -130
  123. package/pipeline/scripts/scorecard.mjs +0 -258
  124. package/pipeline/scripts/smoke-add-detail.sh +0 -137
  125. package/pipeline/scripts/smoke-agent-guard.sh +0 -74
  126. package/pipeline/scripts/smoke-agent-log-cost.sh +0 -262
  127. package/pipeline/scripts/smoke-agent-model-routing.sh +0 -87
  128. package/pipeline/scripts/smoke-ask-choice.sh +0 -42
  129. package/pipeline/scripts/smoke-autopilot-circuit-breaker.sh +0 -36
  130. package/pipeline/scripts/smoke-bitbucket-contract.sh +0 -255
  131. package/pipeline/scripts/smoke-changelog-version.sh +0 -47
  132. package/pipeline/scripts/smoke-channels-approval-gate.sh +0 -60
  133. package/pipeline/scripts/smoke-channels-flow.sh +0 -130
  134. package/pipeline/scripts/smoke-ci-workflows.sh +0 -88
  135. package/pipeline/scripts/smoke-clarify.sh +0 -148
  136. package/pipeline/scripts/smoke-command-inventory.sh +0 -81
  137. package/pipeline/scripts/smoke-commands-skills-parity.sh +0 -87
  138. package/pipeline/scripts/smoke-community-gates.sh +0 -75
  139. package/pipeline/scripts/smoke-compliance-skills.sh +0 -119
  140. package/pipeline/scripts/smoke-config-hygiene.sh +0 -58
  141. package/pipeline/scripts/smoke-context-budget.sh +0 -72
  142. package/pipeline/scripts/smoke-cost-budget.sh +0 -70
  143. package/pipeline/scripts/smoke-cost-summary.sh +0 -139
  144. package/pipeline/scripts/smoke-cross-phase-cohesion.sh +0 -128
  145. package/pipeline/scripts/smoke-description-tr.sh +0 -82
  146. package/pipeline/scripts/smoke-dev-critic.sh +0 -144
  147. package/pipeline/scripts/smoke-diff-explain.sh +0 -147
  148. package/pipeline/scripts/smoke-diff-risk.sh +0 -190
  149. package/pipeline/scripts/smoke-dynamic-skill-loading.sh +0 -160
  150. package/pipeline/scripts/smoke-eval-live.sh +0 -136
  151. package/pipeline/scripts/smoke-evidence-gate.sh +0 -93
  152. package/pipeline/scripts/smoke-extract-conventions.sh +0 -163
  153. package/pipeline/scripts/smoke-fetchers-offline.sh +0 -448
  154. package/pipeline/scripts/smoke-figma-dispatch.sh +0 -112
  155. package/pipeline/scripts/smoke-gate-hooks.sh +0 -74
  156. package/pipeline/scripts/smoke-gc-tmp.sh +0 -130
  157. package/pipeline/scripts/smoke-gc-worktrees.sh +0 -125
  158. package/pipeline/scripts/smoke-generate-issue.sh +0 -120
  159. package/pipeline/scripts/smoke-handoff-contract.sh +0 -92
  160. package/pipeline/scripts/smoke-identity-isolation.sh +0 -70
  161. package/pipeline/scripts/smoke-install-layout.sh +0 -248
  162. package/pipeline/scripts/smoke-intent-guard.sh +0 -86
  163. package/pipeline/scripts/smoke-issue-comment-template.sh +0 -86
  164. package/pipeline/scripts/smoke-issue-jira-triad.sh +0 -120
  165. package/pipeline/scripts/smoke-keychain.sh +0 -158
  166. package/pipeline/scripts/smoke-language-axis.sh +0 -109
  167. package/pipeline/scripts/smoke-learning-curve.sh +0 -61
  168. package/pipeline/scripts/smoke-learnings-ledger.sh +0 -86
  169. package/pipeline/scripts/smoke-lib-scripts.sh +0 -448
  170. package/pipeline/scripts/smoke-mcp-gate.sh +0 -68
  171. package/pipeline/scripts/smoke-md-links.sh +0 -8
  172. package/pipeline/scripts/smoke-md2confluence.sh +0 -126
  173. package/pipeline/scripts/smoke-metrics-cache-ratio.sh +0 -72
  174. package/pipeline/scripts/smoke-migrate-state.sh +0 -102
  175. package/pipeline/scripts/smoke-mode-dispatch-drift.sh +0 -161
  176. package/pipeline/scripts/smoke-model-fallback.sh +0 -89
  177. package/pipeline/scripts/smoke-multi-repo-integration.sh +0 -116
  178. package/pipeline/scripts/smoke-multi-repo-worktree.sh +0 -61
  179. package/pipeline/scripts/smoke-no-mcp-in-dev-phases.sh +0 -194
  180. package/pipeline/scripts/smoke-no-token-prompt.sh +0 -85
  181. package/pipeline/scripts/smoke-own-punctuation.sh +0 -103
  182. package/pipeline/scripts/smoke-pack-contents.sh +0 -140
  183. package/pipeline/scripts/smoke-pat-audit.sh +0 -128
  184. package/pipeline/scripts/smoke-per-repo-memory.sh +0 -156
  185. package/pipeline/scripts/smoke-phase-0-multi-repo.sh +0 -170
  186. package/pipeline/scripts/smoke-phase-6-multi.sh +0 -79
  187. package/pipeline/scripts/smoke-phase-banner.sh +0 -101
  188. package/pipeline/scripts/smoke-phase-tracker.sh +0 -324
  189. package/pipeline/scripts/smoke-phase0-bridge-contract.sh +0 -241
  190. package/pipeline/scripts/smoke-phase4-gates.sh +0 -45
  191. package/pipeline/scripts/smoke-phase4-triage.sh +0 -229
  192. package/pipeline/scripts/smoke-plan-approval-gate.sh +0 -71
  193. package/pipeline/scripts/smoke-plan-safety.sh +0 -139
  194. package/pipeline/scripts/smoke-plan-todos.sh +0 -196
  195. package/pipeline/scripts/smoke-pr-review-actions.sh +0 -152
  196. package/pipeline/scripts/smoke-pre-commit.sh +0 -170
  197. package/pipeline/scripts/smoke-pref-migration.sh +0 -226
  198. package/pipeline/scripts/smoke-prefs-language.sh +0 -134
  199. package/pipeline/scripts/smoke-progress-contract.sh +0 -127
  200. package/pipeline/scripts/smoke-prune-logs.sh +0 -137
  201. package/pipeline/scripts/smoke-purge.sh +0 -138
  202. package/pipeline/scripts/smoke-push-retry.sh +0 -75
  203. package/pipeline/scripts/smoke-repo-map.sh +0 -300
  204. package/pipeline/scripts/smoke-review-readiness.sh +0 -92
  205. package/pipeline/scripts/smoke-review-watch.sh +0 -146
  206. package/pipeline/scripts/smoke-routines.sh +0 -84
  207. package/pipeline/scripts/smoke-run-aggregator.sh +0 -216
  208. package/pipeline/scripts/smoke-run-metrics.sh +0 -50
  209. package/pipeline/scripts/smoke-search.sh +0 -187
  210. package/pipeline/scripts/smoke-shadow-git.sh +0 -224
  211. package/pipeline/scripts/smoke-skill-authoring.sh +0 -137
  212. package/pipeline/scripts/smoke-skill-language.sh +0 -83
  213. package/pipeline/scripts/smoke-skill-manifest.sh +0 -138
  214. package/pipeline/scripts/smoke-skill-scan.sh +0 -198
  215. package/pipeline/scripts/smoke-source-parity.sh +0 -85
  216. package/pipeline/scripts/smoke-subagent-validators.sh +0 -108
  217. package/pipeline/scripts/smoke-sync-parity.sh +0 -92
  218. package/pipeline/scripts/smoke-tasklist-ordering.sh +0 -112
  219. package/pipeline/scripts/smoke-telemetry.sh +0 -147
  220. package/pipeline/scripts/smoke-test-gap.sh +0 -183
  221. package/pipeline/scripts/smoke-token-budget.sh +0 -67
  222. package/pipeline/scripts/smoke-token-preflight.sh +0 -82
  223. package/pipeline/scripts/smoke-tracker-contract.sh +0 -191
  224. package/pipeline/scripts/smoke-tracker-tokens-invocation.sh +0 -73
  225. package/pipeline/scripts/smoke-triage-memory.sh +0 -174
  226. package/pipeline/scripts/smoke-update-check.sh +0 -135
  227. package/pipeline/scripts/smoke-url-enrichment.sh +0 -70
  228. package/pipeline/scripts/smoke-validate-analysis-doc.sh +0 -161
  229. package/pipeline/scripts/smoke-validator-contradiction.sh +0 -67
  230. package/pipeline/scripts/smoke-validator-gates.sh +0 -164
  231. package/pipeline/scripts/smoke-vercel-deploy-redact.sh +0 -129
  232. package/pipeline/scripts/smoke-verify-by-test.sh +0 -148
  233. package/pipeline/scripts/smoke-wiki-integration.sh +0 -122
  234. package/pipeline/scripts/smoke-work-summary.sh +0 -163
  235. package/pipeline/scripts/smoke-workflow-audit.sh +0 -101
  236. package/pipeline/scripts/smoke-worktree-path-convention.sh +0 -86
  237. package/pipeline/scripts/smoke-wrapper-preservation.sh +0 -68
  238. package/pipeline/scripts/smoke-write-state.sh +0 -159
  239. package/pipeline/scripts/sync-parity-check.sh +0 -135
  240. package/pipeline/scripts/test-gap-rules/android.json +0 -25
  241. package/pipeline/scripts/test-gap-rules/ios.json +0 -34
  242. package/pipeline/scripts/test-gap-rules/node.json +0 -29
  243. package/pipeline/scripts/test-gap-rules/python.json +0 -25
  244. package/pipeline/scripts/validate-schemas.mjs +0 -88
@@ -1,93 +0,0 @@
1
- #!/usr/bin/env bash
2
- # smoke-evidence-gate.sh - contract check for the default-FAIL evidence gate.
3
- #
4
- # The gate must fail CLOSED: a "passed" claim with no / empty / contradicting
5
- # evidence is blocked; only a log that actually shows success lets the claim
6
- # through. Non-pass statuses pass through untouched.
7
- #
8
- # Exit 0 = all pass, 1 = any failure.
9
-
10
- set -uo pipefail
11
-
12
- ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
13
- GATE="$ROOT/pipeline/scripts/evidence-gate.mjs"
14
- TMP="$(mktemp -d)"
15
- trap 'rm -rf "$TMP"' EXIT
16
-
17
- PASS=0
18
- FAIL=0
19
- pass() { PASS=$((PASS+1)); echo " ✓ $1"; }
20
- fail() { FAIL=$((FAIL+1)); echo " ✗ $1"; }
21
-
22
- command -v node >/dev/null 2>&1 || { echo "error: node required" >&2; exit 127; }
23
- [ -f "$GATE" ] || { echo "FAIL: evidence-gate.mjs missing" >&2; exit 1; }
24
-
25
- printf '** BUILD SUCCEEDED **\nCompiling 12 files\n' > "$TMP/build-ok.log"
26
- printf '** BUILD FAILED **\nerror: cannot find type Foo\n' > "$TMP/build-fail.log"
27
- printf 'Test Suite All passed\n0 failures\n' > "$TMP/test-ok.log"
28
- printf 'Test Suite failed\n3 failures\n' > "$TMP/test-fail.log"
29
- : > "$TMP/empty.log"
30
-
31
- expect_exit() {
32
- local want="$1"; shift
33
- local desc="$1"; shift
34
- local got=0
35
- node "$GATE" "$@" >/dev/null 2>&1 || got=$?
36
- if [ "$got" = "$want" ]; then
37
- pass "$desc (exit=$got)"
38
- else
39
- fail "$desc (expected $want, got $got)"
40
- fi
41
- }
42
-
43
- echo "→ 1. Substantiated pass claims (exit 0)"
44
- expect_exit 0 "build passed + SUCCEEDED log" --claim build --status passed --evidence "$TMP/build-ok.log"
45
- expect_exit 0 "test passed + passing log" --claim test --status passed --evidence "$TMP/test-ok.log"
46
-
47
- echo ""
48
- echo "→ 2. Default-FAIL: unverified pass claims (exit 1)"
49
- expect_exit 1 "build passed + no evidence flag" --claim build --status passed
50
- expect_exit 1 "build passed + missing file" --claim build --status passed --evidence "$TMP/nope.log"
51
- expect_exit 1 "build passed + empty log" --claim build --status passed --evidence "$TMP/empty.log"
52
- expect_exit 1 "build passed + FAILED log (contradicted)" --claim build --status passed --evidence "$TMP/build-fail.log"
53
- expect_exit 1 "test passed + failing log (contradicted)" --claim test --status passed --evidence "$TMP/test-fail.log"
54
-
55
- echo ""
56
- echo "→ 3. Non-pass statuses pass through (exit 0)"
57
- expect_exit 0 "status=failed passes through" --claim build --status failed --evidence "$TMP/build-fail.log"
58
- expect_exit 0 "status=pending passes through" --claim build --status pending
59
-
60
- echo ""
61
- echo "→ 4. Custom success pattern override"
62
- printf 'CUSTOM_OK marker here\n' > "$TMP/custom.log"
63
- expect_exit 0 "custom success pattern matches" --claim test --status passed --evidence "$TMP/custom.log" --success-pattern 'CUSTOM_OK'
64
- expect_exit 1 "custom success pattern absent" --claim test --status passed --evidence "$TMP/build-ok.log" --success-pattern 'CUSTOM_OK'
65
-
66
- echo ""
67
- echo "→ 4b. Failure is decisive (closes the SUCCESS-substring bypass)"
68
- printf '** BUILD FAILED **\nnote: previous step SUCCESS (cached)\n' > "$TMP/bypass.log"
69
- expect_exit 1 "failing log that also says SUCCESS still fails" --claim build --status passed --evidence "$TMP/bypass.log"
70
- printf 'BUILD SUCCEEDED\nwarning: deprecated API used\n' > "$TMP/warn.log"
71
- expect_exit 0 "success log with a warning still passes" --claim build --status passed --evidence "$TMP/warn.log"
72
-
73
- echo ""
74
- echo "→ 4c. Bad/oversized custom patterns are a clean usage error (no crash)"
75
- expect_exit 2 "invalid regex pattern -> usage exit 2" --claim test --status passed --evidence "$TMP/test-ok.log" --success-pattern '('
76
- OVERLONG=$(printf 'a%.0s' $(seq 1 250))
77
- expect_exit 2 "overlong pattern -> usage exit 2" --claim test --status passed --evidence "$TMP/test-ok.log" --success-pattern "$OVERLONG"
78
-
79
- echo ""
80
- echo "→ 5. Wiring: phase docs reference the gate"
81
- GREP_HITS=0
82
- for doc in phase-3-dev phase-4-review phase-6-commit; do
83
- grep -q "evidence-gate" "$ROOT/pipeline/multi-agent-refs/phases/$doc.md" && GREP_HITS=$((GREP_HITS+1))
84
- done
85
- if [ "$GREP_HITS" -ge 2 ]; then
86
- pass "evidence-gate referenced in $GREP_HITS phase docs"
87
- else
88
- fail "evidence-gate referenced in only $GREP_HITS phase docs (expected >= 2)"
89
- fi
90
-
91
- echo ""
92
- echo "══ evidence-gate smoke: $PASS passed, $FAIL failed ══"
93
- [ "$FAIL" -eq 0 ]
@@ -1,163 +0,0 @@
1
- #!/usr/bin/env bash
2
- # smoke-extract-conventions.sh - offline sanity checks for extract-conventions.sh.
3
- # Builds a throwaway iOS-shaped fixture repo, runs the extractor, and asserts the
4
- # emitted JSON honours pipeline/schemas/conventions-output.schema.json: all 12
5
- # convention fields present, every bucket carries the 5-field shape, confidence
6
- # stays inside its enum, and evidenceFiles is capped at 5. Also covers the
7
- # invalid-platform and missing-args error paths. No network, no credentials.
8
-
9
- set -uo pipefail
10
-
11
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
12
- REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
13
- EXTRACT="$REPO_ROOT/pipeline/lib/extract-conventions.sh"
14
-
15
- PASS=0
16
- FAIL=0
17
-
18
- ok() { echo " ✓ $1"; PASS=$((PASS+1)); }
19
- fail() { echo " ✗ $1" >&2; FAIL=$((FAIL+1)); }
20
-
21
- if ! command -v jq >/dev/null 2>&1; then
22
- echo "smoke-extract-conventions: jq not found; skipping (install jq to enable)" >&2
23
- exit 0
24
- fi
25
-
26
- if [ ! -x "$EXTRACT" ]; then
27
- fail "extract-conventions.sh missing or not executable at $EXTRACT"
28
- echo "══ extract-conventions smoke: $PASS passed, $FAIL failed ══" >&2
29
- exit 1
30
- fi
31
-
32
- # --- Error paths ---------------------------------------------------------------
33
- echo "→ error paths"
34
-
35
- if "$EXTRACT" >/dev/null 2>&1; then
36
- fail "missing args should exit non-zero"
37
- else
38
- ok "missing args exits non-zero"
39
- fi
40
-
41
- if "$EXTRACT" /tmp "bogus-platform" >/dev/null 2>&1; then
42
- fail "invalid platform should exit non-zero"
43
- else
44
- ok "invalid platform exits non-zero"
45
- fi
46
-
47
- # --- Fixture repo ----------------------------------------------------------------
48
- echo "→ ios fixture extraction"
49
-
50
- FIXTURE="$(mktemp -d "${TMPDIR:-/tmp}/conv-smoke.XXXXXX")"
51
- trap 'rm -rf "$FIXTURE"' EXIT
52
-
53
- mkdir -p "$FIXTURE/Domains/Sample/Presentation/ViewModel" \
54
- "$FIXTURE/Domains/Sample/Presentation/View" \
55
- "$FIXTURE/Domains/Sample/Domain/UseCases" \
56
- "$FIXTURE/Domains/Sample/Tests"
57
-
58
- for n in One Two Three Four Five; do
59
- cat > "$FIXTURE/Domains/Sample/Presentation/ViewModel/Sample${n}ViewModel.swift" <<EOF
60
- import SwiftUI
61
-
62
- @MainActor
63
- final class Sample${n}ViewModel: ObservableObject {
64
- @Published private(set) var state: Sample${n}UIState = .loading
65
- }
66
-
67
- enum Sample${n}UIState {
68
- case loading
69
- case idle
70
- case error
71
- }
72
- EOF
73
- cat > "$FIXTURE/Domains/Sample/Presentation/View/Sample${n}View.swift" <<EOF
74
- import SwiftUI
75
-
76
- struct Sample${n}View: View {
77
- var body: some View { Text("sample") }
78
- }
79
- EOF
80
- cat > "$FIXTURE/Domains/Sample/Domain/UseCases/Fetch${n}UseCase.swift" <<EOF
81
- protocol Fetch${n}UseCaseProtocol {
82
- func execute() async throws
83
- }
84
- EOF
85
- done
86
-
87
- OUTPUT="$("$EXTRACT" "$FIXTURE" ios 2>/dev/null)" || OUTPUT=""
88
-
89
- if [ -z "$OUTPUT" ]; then
90
- fail "extractor produced no output on fixture repo"
91
- else
92
- if printf '%s' "$OUTPUT" | jq -e . >/dev/null 2>&1; then
93
- ok "output parses as JSON"
94
- else
95
- fail "output is not valid JSON"
96
- fi
97
-
98
- EXPECTED_KEYS="folderStructure stateHolderNaming viewNaming navigatorNaming useCaseNaming repositoryNaming dtoNaming uiStateModel testMethodNaming accessibilityIdentifier localizationKey diRegistration"
99
-
100
- MISSING=""
101
- for key in $EXPECTED_KEYS; do
102
- if ! printf '%s' "$OUTPUT" | jq -e --arg k "$key" 'has($k)' >/dev/null 2>&1; then
103
- MISSING="$MISSING $key"
104
- fi
105
- done
106
- if [ -z "$MISSING" ]; then
107
- ok "all 12 convention fields present"
108
- else
109
- fail "missing convention fields:$MISSING"
110
- fi
111
-
112
- BAD_SHAPE=$(printf '%s' "$OUTPUT" | jq -r '
113
- to_entries[]
114
- | select(
115
- (.value | type) != "object"
116
- or ((.value | keys | sort) != ["alternativeCandidates","confidence","evidenceFiles","example","pattern"])
117
- )
118
- | .key' 2>/dev/null)
119
- if [ -z "$BAD_SHAPE" ]; then
120
- ok "every bucket carries the 5-field shape"
121
- else
122
- fail "buckets with wrong shape: $(printf '%s' "$BAD_SHAPE" | tr '\n' ' ')"
123
- fi
124
-
125
- BAD_CONF=$(printf '%s' "$OUTPUT" | jq -r '
126
- to_entries[]
127
- | select(.value.confidence as $c | ["high","medium","low","none"] | index($c) | not)
128
- | .key' 2>/dev/null)
129
- if [ -z "$BAD_CONF" ]; then
130
- ok "confidence values stay inside the enum"
131
- else
132
- fail "out-of-enum confidence in: $(printf '%s' "$BAD_CONF" | tr '\n' ' ')"
133
- fi
134
-
135
- OVER_CAP=$(printf '%s' "$OUTPUT" | jq -r '
136
- to_entries[]
137
- | select((.value.evidenceFiles | length) > 5)
138
- | .key' 2>/dev/null)
139
- if [ -z "$OVER_CAP" ]; then
140
- ok "evidenceFiles capped at 5"
141
- else
142
- fail "evidenceFiles over cap in: $(printf '%s' "$OVER_CAP" | tr '\n' ' ')"
143
- fi
144
-
145
- VM_CONF=$(printf '%s' "$OUTPUT" | jq -r '.stateHolderNaming.confidence' 2>/dev/null)
146
- case "$VM_CONF" in
147
- high|medium)
148
- ok "fixture ViewModels detected (stateHolderNaming confidence: $VM_CONF)" ;;
149
- *)
150
- fail "expected stateHolderNaming confidence high|medium on 5-example fixture, got: $VM_CONF" ;;
151
- esac
152
- fi
153
-
154
- # --- Summary -----------------------------------------------------------------
155
- echo ""
156
- TOTAL=$((PASS+FAIL))
157
- if [ $FAIL -eq 0 ]; then
158
- echo "══ extract-conventions smoke: $PASS passed, 0 failed ══"
159
- exit 0
160
- else
161
- echo "══ extract-conventions smoke: $PASS passed, $FAIL failed (of $TOTAL) ══" >&2
162
- exit 1
163
- fi