@probelabs/visor 0.1.106 → 0.1.107

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 (450) hide show
  1. package/README.md +65 -2
  2. package/action.yml +1 -1
  3. package/defaults/code-refiner.yaml +114 -0
  4. package/defaults/{.visor.yaml → code-review.yaml} +35 -226
  5. package/defaults/override.yaml +52 -0
  6. package/defaults/task-refinement.yaml +620 -0
  7. package/defaults/visor.tests.yaml +674 -0
  8. package/defaults/visor.yaml +482 -0
  9. package/dist/663.index.js +2 -3
  10. package/dist/80.index.js +2 -3
  11. package/dist/action-cli-bridge.d.ts +11 -82
  12. package/dist/action-cli-bridge.d.ts.map +1 -1
  13. package/dist/ai-review-service.d.ts +15 -0
  14. package/dist/ai-review-service.d.ts.map +1 -1
  15. package/dist/check-execution-engine.d.ts +19 -331
  16. package/dist/check-execution-engine.d.ts.map +1 -1
  17. package/dist/cli-main.d.ts.map +1 -1
  18. package/dist/cli.d.ts +0 -1
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/config.d.ts +16 -0
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/cron-scheduler.d.ts +3 -3
  23. package/dist/cron-scheduler.d.ts.map +1 -1
  24. package/dist/debug-visualizer/ws-server.d.ts.map +1 -1
  25. package/dist/defaults/code-refiner.yaml +114 -0
  26. package/dist/defaults/{.visor.yaml → code-review.yaml} +35 -226
  27. package/dist/defaults/override.yaml +52 -0
  28. package/dist/defaults/task-refinement.yaml +620 -0
  29. package/dist/defaults/visor.tests.yaml +674 -0
  30. package/dist/defaults/visor.yaml +482 -0
  31. package/dist/docs/DEPLOYMENT.md +118 -0
  32. package/dist/docs/GITHUB_CHECKS.md +280 -0
  33. package/dist/docs/NPM_USAGE.md +208 -0
  34. package/dist/docs/action-reference.md +19 -0
  35. package/dist/docs/advanced-ai.md +178 -0
  36. package/dist/docs/ai-configuration.md +468 -0
  37. package/dist/docs/author-permissions.md +610 -0
  38. package/dist/docs/ci-cli-mode.md +34 -0
  39. package/dist/docs/claude-code.md +74 -0
  40. package/dist/docs/command-provider.md +559 -0
  41. package/dist/docs/commands.md +8 -0
  42. package/dist/docs/configuration.md +303 -0
  43. package/dist/docs/custom-tools.md +424 -0
  44. package/dist/docs/dashboards/README.md +23 -0
  45. package/dist/docs/dashboards/grafana-visor-diagrams.json +20 -0
  46. package/dist/docs/dashboards/grafana-visor-overview.json +33 -0
  47. package/dist/docs/debug-visualizer-progress.md +572 -0
  48. package/dist/docs/debug-visualizer-rfc.md +691 -0
  49. package/dist/docs/debug-visualizer.md +114 -0
  50. package/dist/docs/debugging.md +636 -0
  51. package/dist/docs/default-output-schema.md +28 -0
  52. package/dist/docs/dependencies.md +369 -0
  53. package/dist/docs/dev-playbook.md +9 -0
  54. package/dist/docs/engine-state-machine-plan.md +333 -0
  55. package/dist/docs/event-driven-github-integration-rfc.md +743 -0
  56. package/dist/docs/event-triggers.md +292 -0
  57. package/dist/docs/execution-statistics-rfc.md +290 -0
  58. package/dist/docs/fact-validator-gap-analysis.md +178 -0
  59. package/dist/docs/fact-validator-implementation-plan.md +1235 -0
  60. package/dist/docs/fail-if.md +95 -0
  61. package/dist/docs/failure-conditions-implementation.md +271 -0
  62. package/dist/docs/failure-conditions-schema.md +173 -0
  63. package/dist/docs/failure-routing-rfc.md +193 -0
  64. package/dist/docs/failure-routing.md +507 -0
  65. package/dist/docs/foreach-dependency-propagation.md +473 -0
  66. package/dist/docs/github-ops.md +89 -0
  67. package/dist/docs/goto-forward-run-plan.md +113 -0
  68. package/dist/docs/guides/criticality-modes.md +332 -0
  69. package/dist/docs/guides/fault-management-and-contracts.md +738 -0
  70. package/dist/docs/guides/workflow-style-guide.md +224 -0
  71. package/dist/docs/http.md +299 -0
  72. package/dist/docs/human-input-provider.md +372 -0
  73. package/dist/docs/limits.md +64 -0
  74. package/dist/docs/liquid-templates.md +347 -0
  75. package/dist/docs/loop-routing-refactor.md +89 -0
  76. package/dist/docs/mcp-provider.md +557 -0
  77. package/dist/docs/mcp.md +124 -0
  78. package/dist/docs/memory.md +903 -0
  79. package/dist/docs/observability.md +12 -0
  80. package/dist/docs/output-formats.md +20 -0
  81. package/dist/docs/output-formatting.md +29 -0
  82. package/dist/docs/output-history.md +383 -0
  83. package/dist/docs/performance.md +6 -0
  84. package/dist/docs/pluggable.md +124 -0
  85. package/dist/docs/proposals/snapshot-scope-execution.md +236 -0
  86. package/dist/docs/recipes.md +21 -0
  87. package/dist/docs/roadmap/criticality-implementation-tasks.md +92 -0
  88. package/dist/docs/schema-next-pr.md +10 -0
  89. package/dist/docs/schema-templates.md +68 -0
  90. package/dist/docs/script.md +34 -0
  91. package/dist/docs/sdk.md +222 -0
  92. package/dist/docs/security.md +7 -0
  93. package/dist/docs/suppressions.md +89 -0
  94. package/dist/docs/tag-filtering.md +258 -0
  95. package/dist/docs/telemetry-setup.md +119 -0
  96. package/dist/docs/telemetry-tracing-rfc.md +275 -0
  97. package/dist/docs/test-framework-rfc.md +680 -0
  98. package/dist/docs/testing/assertions.md +85 -0
  99. package/dist/docs/testing/ci.md +44 -0
  100. package/dist/docs/testing/cli.md +41 -0
  101. package/dist/docs/testing/cookbook.md +172 -0
  102. package/dist/docs/testing/dsl-reference.md +199 -0
  103. package/dist/docs/testing/fixtures-and-mocks.md +91 -0
  104. package/dist/docs/testing/flows.md +92 -0
  105. package/dist/docs/testing/getting-started.md +93 -0
  106. package/dist/docs/testing/troubleshooting.md +55 -0
  107. package/dist/docs/timeouts.md +50 -0
  108. package/dist/docs/troubleshooting.md +7 -0
  109. package/dist/docs/visor-sdk-rfc.md +186 -0
  110. package/dist/docs/workflows.md +569 -0
  111. package/dist/engine/on-finish/orchestrator.d.ts +19 -0
  112. package/dist/engine/on-finish/orchestrator.d.ts.map +1 -0
  113. package/dist/engine/on-finish/utils.d.ts +44 -0
  114. package/dist/engine/on-finish/utils.d.ts.map +1 -0
  115. package/dist/event-bus/event-bus.d.ts +13 -0
  116. package/dist/event-bus/event-bus.d.ts.map +1 -0
  117. package/dist/event-bus/types.d.ts +57 -0
  118. package/dist/event-bus/types.d.ts.map +1 -0
  119. package/dist/examples/.claude/agents/code-reviewer.md +69 -0
  120. package/dist/examples/.mcp.json +34 -0
  121. package/dist/examples/CALCULATOR-SDK.md +364 -0
  122. package/dist/examples/README.md +384 -0
  123. package/dist/examples/ai-retry-fallback-config.yaml +180 -0
  124. package/dist/examples/ai-with-bash.yaml +126 -0
  125. package/dist/examples/ai-with-mcp.yaml +82 -0
  126. package/dist/examples/basic-human-input.yaml +15 -0
  127. package/dist/examples/bedrock-config.yaml +77 -0
  128. package/dist/examples/calculator-config.yaml +133 -0
  129. package/dist/examples/calculator-json-output-guide.md +311 -0
  130. package/dist/examples/calculator-sdk-automated.ts +340 -0
  131. package/dist/examples/calculator-sdk-example.ts +275 -0
  132. package/dist/examples/calculator-sdk-json.ts +331 -0
  133. package/dist/examples/calculator-sdk-real.ts +374 -0
  134. package/dist/examples/calculator-sdk-test.ts +148 -0
  135. package/dist/examples/claude-code-config.yaml +191 -0
  136. package/dist/examples/cron-webhook-config.yaml +215 -0
  137. package/dist/examples/custom-template.liquid +57 -0
  138. package/dist/examples/custom-tools-example.yaml +281 -0
  139. package/dist/examples/enhanced-config.yaml +165 -0
  140. package/dist/examples/environments/visor.base.yaml +92 -0
  141. package/dist/examples/environments/visor.dev.yaml +33 -0
  142. package/dist/examples/environments/visor.prod.yaml +95 -0
  143. package/dist/examples/environments/visor.staging.yaml +46 -0
  144. package/dist/examples/fact-validator.yaml +361 -0
  145. package/dist/examples/fail-if-simple.yaml +90 -0
  146. package/dist/examples/failure-conditions-advanced.yaml +136 -0
  147. package/dist/examples/failure-conditions-basic.yaml +48 -0
  148. package/dist/examples/failure-conditions-github-style.yaml +119 -0
  149. package/dist/examples/failure-conditions-migration.yaml +74 -0
  150. package/dist/examples/for-loop-example.yaml +176 -0
  151. package/dist/examples/forEach-example.yaml +120 -0
  152. package/dist/examples/github-workflow-with-tags.yml +163 -0
  153. package/dist/examples/http-integration-config.yaml +240 -0
  154. package/dist/examples/https-server-config.yaml +209 -0
  155. package/dist/examples/human-input-example.yaml +63 -0
  156. package/dist/examples/if-conditions.yaml +173 -0
  157. package/dist/examples/jira-simple-example.yaml +56 -0
  158. package/dist/examples/jira-single-issue-workflow.yaml +166 -0
  159. package/dist/examples/jira-workflow-mcp.yaml +182 -0
  160. package/dist/examples/mcp/analyzer.py +119 -0
  161. package/dist/examples/mcp-provider-example.yaml +301 -0
  162. package/dist/examples/memory-counter.yaml +99 -0
  163. package/dist/examples/memory-error-collection.yaml +104 -0
  164. package/dist/examples/memory-exec-js.yaml +247 -0
  165. package/dist/examples/memory-namespace-isolation.yaml +184 -0
  166. package/dist/examples/memory-retry-counter.yaml +65 -0
  167. package/dist/examples/memory-state-machine.yaml +170 -0
  168. package/dist/examples/outputs-raw-basic.yaml +26 -0
  169. package/dist/examples/project-with-tools.yaml +174 -0
  170. package/dist/examples/prompts/architecture-analysis.liquid +116 -0
  171. package/dist/examples/prompts/security-comprehensive.liquid +107 -0
  172. package/dist/examples/quick-start-tags.yaml +53 -0
  173. package/dist/examples/routing-basic.yaml +35 -0
  174. package/dist/examples/routing-dynamic-js.yaml +46 -0
  175. package/dist/examples/routing-foreach.yaml +34 -0
  176. package/dist/examples/routing-goto-event.yaml +34 -0
  177. package/dist/examples/routing-on-success.yaml +25 -0
  178. package/dist/examples/run-calculator-demo.sh +71 -0
  179. package/dist/examples/sdk-basic.mjs +10 -0
  180. package/dist/examples/sdk-cjs.cjs +10 -0
  181. package/dist/examples/sdk-comprehensive.mjs +175 -0
  182. package/dist/examples/sdk-manual-config.mjs +65 -0
  183. package/dist/examples/sdk-typescript.js +81 -0
  184. package/dist/examples/sdk-typescript.ts +92 -0
  185. package/dist/examples/session-reuse-config.yaml +151 -0
  186. package/dist/examples/templates/security-report.liquid +137 -0
  187. package/dist/examples/tools-library.yaml +281 -0
  188. package/dist/examples/transform-example.yaml +199 -0
  189. package/dist/examples/visor-with-tags.yaml +198 -0
  190. package/dist/examples/webhook-pipeline-config.yaml +218 -0
  191. package/dist/examples/workflows/calculator-workflow.yaml +163 -0
  192. package/dist/examples/workflows/code-quality.yaml +222 -0
  193. package/dist/examples/workflows/quick-pr-check.yaml +90 -0
  194. package/dist/examples/workflows/workflow-composition-example.yaml +130 -0
  195. package/dist/failure-condition-evaluator.d.ts +1 -0
  196. package/dist/failure-condition-evaluator.d.ts.map +1 -1
  197. package/dist/frontends/github-frontend.d.ts +38 -0
  198. package/dist/frontends/github-frontend.d.ts.map +1 -0
  199. package/dist/frontends/host.d.ts +43 -0
  200. package/dist/frontends/host.d.ts.map +1 -0
  201. package/dist/frontends/ndjson-sink.d.ts +12 -0
  202. package/dist/frontends/ndjson-sink.d.ts.map +1 -0
  203. package/dist/generated/config-schema.d.ts +564 -22
  204. package/dist/generated/config-schema.d.ts.map +1 -1
  205. package/dist/generated/config-schema.json +612 -24
  206. package/dist/github-check-service.d.ts +4 -6
  207. package/dist/github-check-service.d.ts.map +1 -1
  208. package/dist/github-comments.d.ts +0 -4
  209. package/dist/github-comments.d.ts.map +1 -1
  210. package/dist/index.d.ts.map +1 -1
  211. package/dist/index.js +70335 -62514
  212. package/dist/liquid-extensions.d.ts.map +1 -1
  213. package/dist/logger.d.ts +1 -0
  214. package/dist/logger.d.ts.map +1 -1
  215. package/dist/memory-store.d.ts +6 -0
  216. package/dist/memory-store.d.ts.map +1 -1
  217. package/dist/output/assistant-json/template.liquid +0 -0
  218. package/dist/output/traces/run-2025-11-21T11-50-46-505Z.ndjson +138 -0
  219. package/dist/output/traces/run-2025-11-21T11-51-33-674Z.ndjson +839 -0
  220. package/dist/output-formatters.d.ts +1 -1
  221. package/dist/output-formatters.d.ts.map +1 -1
  222. package/dist/providers/ai-check-provider.d.ts.map +1 -1
  223. package/dist/providers/check-provider-registry.d.ts +6 -0
  224. package/dist/providers/check-provider-registry.d.ts.map +1 -1
  225. package/dist/providers/check-provider.interface.d.ts +34 -1
  226. package/dist/providers/check-provider.interface.d.ts.map +1 -1
  227. package/dist/providers/claude-code-check-provider.d.ts.map +1 -1
  228. package/dist/providers/command-check-provider.d.ts +1 -1
  229. package/dist/providers/command-check-provider.d.ts.map +1 -1
  230. package/dist/providers/custom-tool-executor.d.ts +61 -0
  231. package/dist/providers/custom-tool-executor.d.ts.map +1 -0
  232. package/dist/providers/github-ops-provider.d.ts.map +1 -1
  233. package/dist/providers/http-client-provider.d.ts +1 -4
  234. package/dist/providers/http-client-provider.d.ts.map +1 -1
  235. package/dist/providers/human-input-check-provider.d.ts +3 -0
  236. package/dist/providers/human-input-check-provider.d.ts.map +1 -1
  237. package/dist/providers/index.d.ts +1 -0
  238. package/dist/providers/index.d.ts.map +1 -1
  239. package/dist/providers/log-check-provider.d.ts +2 -5
  240. package/dist/providers/log-check-provider.d.ts.map +1 -1
  241. package/dist/providers/mcp-check-provider.d.ts +9 -3
  242. package/dist/providers/mcp-check-provider.d.ts.map +1 -1
  243. package/dist/providers/memory-check-provider.d.ts +2 -8
  244. package/dist/providers/memory-check-provider.d.ts.map +1 -1
  245. package/dist/providers/script-check-provider.d.ts +25 -0
  246. package/dist/providers/script-check-provider.d.ts.map +1 -0
  247. package/dist/providers/workflow-check-provider.d.ts +56 -0
  248. package/dist/providers/workflow-check-provider.d.ts.map +1 -0
  249. package/dist/reviewer.d.ts +2 -1
  250. package/dist/reviewer.d.ts.map +1 -1
  251. package/dist/sdk/chunk-37ZSCMFC.mjs +482 -0
  252. package/dist/sdk/chunk-37ZSCMFC.mjs.map +1 -0
  253. package/dist/sdk/chunk-6Y4YTKCF.mjs +197 -0
  254. package/dist/sdk/chunk-6Y4YTKCF.mjs.map +1 -0
  255. package/dist/sdk/chunk-CNX7V5JK.mjs +89 -0
  256. package/dist/sdk/chunk-CNX7V5JK.mjs.map +1 -0
  257. package/dist/sdk/chunk-IEO6CFLG.mjs +1215 -0
  258. package/dist/sdk/chunk-IEO6CFLG.mjs.map +1 -0
  259. package/dist/sdk/chunk-JEHPDJIF.mjs +223 -0
  260. package/dist/sdk/chunk-JEHPDJIF.mjs.map +1 -0
  261. package/dist/sdk/chunk-O5EZDNYL.mjs +274 -0
  262. package/dist/sdk/chunk-O5EZDNYL.mjs.map +1 -0
  263. package/dist/sdk/{chunk-TUTOLSFV.mjs → chunk-OOZITMRU.mjs} +1 -1
  264. package/dist/sdk/chunk-OOZITMRU.mjs.map +1 -0
  265. package/dist/sdk/chunk-OWUVOILT.mjs +557 -0
  266. package/dist/sdk/chunk-OWUVOILT.mjs.map +1 -0
  267. package/dist/sdk/chunk-OZJ263FM.mjs +986 -0
  268. package/dist/sdk/chunk-OZJ263FM.mjs.map +1 -0
  269. package/dist/sdk/chunk-PTL3K3PN.mjs +3128 -0
  270. package/dist/sdk/chunk-PTL3K3PN.mjs.map +1 -0
  271. package/dist/sdk/chunk-S2RUE2RG.mjs +145 -0
  272. package/dist/sdk/chunk-S2RUE2RG.mjs.map +1 -0
  273. package/dist/sdk/chunk-VMPLF6FT.mjs +127 -0
  274. package/dist/sdk/chunk-VMPLF6FT.mjs.map +1 -0
  275. package/dist/sdk/chunk-YSN4G6CI.mjs +146 -0
  276. package/dist/sdk/chunk-YSN4G6CI.mjs.map +1 -0
  277. package/dist/sdk/chunk-ZYAUYXSW.mjs +206 -0
  278. package/dist/sdk/chunk-ZYAUYXSW.mjs.map +1 -0
  279. package/dist/sdk/config-M4ZNO6NU.mjs +14 -0
  280. package/dist/sdk/config-merger-PX3WIT57.mjs +10 -0
  281. package/dist/sdk/event-bus-5BEVPQ6T.mjs +35 -0
  282. package/dist/sdk/event-bus-5BEVPQ6T.mjs.map +1 -0
  283. package/dist/sdk/failure-condition-evaluator-NBO5YRXW.mjs +16 -0
  284. package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs +458 -0
  285. package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs.map +1 -0
  286. package/dist/sdk/github-frontend-4AWRJT7D.mjs +1242 -0
  287. package/dist/sdk/github-frontend-4AWRJT7D.mjs.map +1 -0
  288. package/dist/sdk/host-7GBC3S7L.mjs +49 -0
  289. package/dist/sdk/host-7GBC3S7L.mjs.map +1 -0
  290. package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs → liquid-extensions-C7EG3YKH.mjs} +7 -2
  291. package/dist/sdk/memory-store-GJACZC2A.mjs +11 -0
  292. package/dist/sdk/metrics-7PP3EJUH.mjs +29 -0
  293. package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs +44 -0
  294. package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs.map +1 -0
  295. package/dist/sdk/renderer-schema-6RF26VUS.mjs +50 -0
  296. package/dist/sdk/renderer-schema-6RF26VUS.mjs.map +1 -0
  297. package/dist/sdk/routing-RP56JTV2.mjs +23 -0
  298. package/dist/sdk/routing-RP56JTV2.mjs.map +1 -0
  299. package/dist/sdk/sdk.d.mts +326 -21
  300. package/dist/sdk/sdk.d.ts +326 -21
  301. package/dist/sdk/sdk.js +21403 -16366
  302. package/dist/sdk/sdk.js.map +1 -1
  303. package/dist/sdk/sdk.mjs +13510 -2096
  304. package/dist/sdk/sdk.mjs.map +1 -1
  305. package/dist/sdk/session-registry-N5FFYFTM.mjs +10 -0
  306. package/dist/sdk/session-registry-N5FFYFTM.mjs.map +1 -0
  307. package/dist/sdk/trace-helpers-VP6QYVBX.mjs +23 -0
  308. package/dist/sdk/trace-helpers-VP6QYVBX.mjs.map +1 -0
  309. package/dist/sdk/{tracer-init-WC75N5NW.mjs → tracer-init-WP4X46IF.mjs} +2 -2
  310. package/dist/sdk/tracer-init-WP4X46IF.mjs.map +1 -0
  311. package/dist/sdk/workflow-registry-2YIIXQCK.mjs +11 -0
  312. package/dist/sdk/workflow-registry-2YIIXQCK.mjs.map +1 -0
  313. package/dist/sdk.d.ts.map +1 -1
  314. package/dist/snapshot-store.d.ts +59 -0
  315. package/dist/snapshot-store.d.ts.map +1 -0
  316. package/dist/state-machine/context/build-engine-context.d.ts +9 -0
  317. package/dist/state-machine/context/build-engine-context.d.ts.map +1 -0
  318. package/dist/state-machine/dispatch/dependency-gating.d.ts +12 -0
  319. package/dist/state-machine/dispatch/dependency-gating.d.ts.map +1 -0
  320. package/dist/state-machine/dispatch/execution-invoker.d.ts +14 -0
  321. package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -0
  322. package/dist/state-machine/dispatch/foreach-processor.d.ts +8 -0
  323. package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -0
  324. package/dist/state-machine/dispatch/history-snapshot.d.ts +8 -0
  325. package/dist/state-machine/dispatch/history-snapshot.d.ts.map +1 -0
  326. package/dist/state-machine/dispatch/renderer-schema.d.ts +8 -0
  327. package/dist/state-machine/dispatch/renderer-schema.d.ts.map +1 -0
  328. package/dist/state-machine/dispatch/stats-manager.d.ts +15 -0
  329. package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -0
  330. package/dist/state-machine/dispatch/template-renderer.d.ts +7 -0
  331. package/dist/state-machine/dispatch/template-renderer.d.ts.map +1 -0
  332. package/dist/state-machine/execution/summary.d.ts +8 -0
  333. package/dist/state-machine/execution/summary.d.ts.map +1 -0
  334. package/dist/state-machine/runner.d.ts +73 -0
  335. package/dist/state-machine/runner.d.ts.map +1 -0
  336. package/dist/state-machine/states/check-running.d.ts +14 -0
  337. package/dist/state-machine/states/check-running.d.ts.map +1 -0
  338. package/dist/state-machine/states/completed.d.ts +12 -0
  339. package/dist/state-machine/states/completed.d.ts.map +1 -0
  340. package/dist/state-machine/states/error.d.ts +11 -0
  341. package/dist/state-machine/states/error.d.ts.map +1 -0
  342. package/dist/state-machine/states/init.d.ts +11 -0
  343. package/dist/state-machine/states/init.d.ts.map +1 -0
  344. package/dist/state-machine/states/level-dispatch.d.ts +17 -0
  345. package/dist/state-machine/states/level-dispatch.d.ts.map +1 -0
  346. package/dist/state-machine/states/plan-ready.d.ts +12 -0
  347. package/dist/state-machine/states/plan-ready.d.ts.map +1 -0
  348. package/dist/state-machine/states/routing.d.ts +52 -0
  349. package/dist/state-machine/states/routing.d.ts.map +1 -0
  350. package/dist/state-machine/states/wave-planning.d.ts +14 -0
  351. package/dist/state-machine/states/wave-planning.d.ts.map +1 -0
  352. package/dist/state-machine/workflow-projection.d.ts +47 -0
  353. package/dist/state-machine/workflow-projection.d.ts.map +1 -0
  354. package/dist/state-machine-execution-engine.d.ts +147 -0
  355. package/dist/state-machine-execution-engine.d.ts.map +1 -0
  356. package/dist/telemetry/opentelemetry.d.ts.map +1 -1
  357. package/dist/test-runner/assertions.d.ts +59 -0
  358. package/dist/test-runner/assertions.d.ts.map +1 -0
  359. package/dist/test-runner/core/environment.d.ts +8 -0
  360. package/dist/test-runner/core/environment.d.ts.map +1 -0
  361. package/dist/test-runner/core/fixture.d.ts +3 -0
  362. package/dist/test-runner/core/fixture.d.ts.map +1 -0
  363. package/dist/test-runner/core/flow-stage.d.ts +32 -0
  364. package/dist/test-runner/core/flow-stage.d.ts.map +1 -0
  365. package/dist/test-runner/core/mocks.d.ts +8 -0
  366. package/dist/test-runner/core/mocks.d.ts.map +1 -0
  367. package/dist/test-runner/core/test-execution-wrapper.d.ts +18 -0
  368. package/dist/test-runner/core/test-execution-wrapper.d.ts.map +1 -0
  369. package/dist/test-runner/evaluators.d.ts +12 -0
  370. package/dist/test-runner/evaluators.d.ts.map +1 -0
  371. package/dist/test-runner/fixture-loader.d.ts +30 -0
  372. package/dist/test-runner/fixture-loader.d.ts.map +1 -0
  373. package/dist/test-runner/index.d.ts +120 -0
  374. package/dist/test-runner/index.d.ts.map +1 -0
  375. package/dist/test-runner/recorders/github-recorder.d.ts +23 -0
  376. package/dist/test-runner/recorders/github-recorder.d.ts.map +1 -0
  377. package/dist/test-runner/recorders/global-recorder.d.ts +4 -0
  378. package/dist/test-runner/recorders/global-recorder.d.ts.map +1 -0
  379. package/dist/test-runner/utils/selectors.d.ts +2 -0
  380. package/dist/test-runner/utils/selectors.d.ts.map +1 -0
  381. package/dist/test-runner/validator.d.ts +8 -0
  382. package/dist/test-runner/validator.d.ts.map +1 -0
  383. package/dist/traces/run-2025-11-21T11-50-46-505Z.ndjson +138 -0
  384. package/dist/traces/run-2025-11-21T11-51-33-674Z.ndjson +839 -0
  385. package/dist/types/cli.d.ts +4 -1
  386. package/dist/types/cli.d.ts.map +1 -1
  387. package/dist/types/config.d.ts +278 -5
  388. package/dist/types/config.d.ts.map +1 -1
  389. package/dist/types/engine.d.ts +172 -0
  390. package/dist/types/engine.d.ts.map +1 -0
  391. package/dist/types/execution.d.ts +73 -0
  392. package/dist/types/execution.d.ts.map +1 -0
  393. package/dist/types/github.d.ts +51 -0
  394. package/dist/types/github.d.ts.map +1 -0
  395. package/dist/types/workflow.d.ts +237 -0
  396. package/dist/types/workflow.d.ts.map +1 -0
  397. package/dist/utils/command-executor.d.ts +43 -0
  398. package/dist/utils/command-executor.d.ts.map +1 -0
  399. package/dist/utils/comment-metadata.d.ts +21 -0
  400. package/dist/utils/comment-metadata.d.ts.map +1 -0
  401. package/dist/utils/config-loader.d.ts.map +1 -1
  402. package/dist/utils/config-merger.d.ts.map +1 -1
  403. package/dist/utils/env-exposure.d.ts +3 -0
  404. package/dist/utils/env-exposure.d.ts.map +1 -0
  405. package/dist/utils/file-exclusion.d.ts.map +1 -1
  406. package/dist/utils/interactive-prompt.d.ts +1 -1
  407. package/dist/utils/interactive-prompt.d.ts.map +1 -1
  408. package/dist/utils/sandbox.d.ts.map +1 -1
  409. package/dist/utils/script-memory-ops.d.ts +21 -0
  410. package/dist/utils/script-memory-ops.d.ts.map +1 -0
  411. package/dist/utils/template-context.d.ts +7 -0
  412. package/dist/utils/template-context.d.ts.map +1 -0
  413. package/dist/webhook-server.d.ts +3 -3
  414. package/dist/webhook-server.d.ts.map +1 -1
  415. package/dist/workflow-executor.d.ts +81 -0
  416. package/dist/workflow-executor.d.ts.map +1 -0
  417. package/dist/workflow-registry.d.ts +79 -0
  418. package/dist/workflow-registry.d.ts.map +1 -0
  419. package/package.json +10 -5
  420. package/dist/output/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
  421. package/dist/sdk/check-execution-engine-2YYKUUSH.mjs +0 -11
  422. package/dist/sdk/check-execution-engine-6QJXYYON.mjs +0 -11
  423. package/dist/sdk/check-execution-engine-PJZ4ZOKG.mjs +0 -11
  424. package/dist/sdk/chunk-33QVZ2D4.mjs +0 -316
  425. package/dist/sdk/chunk-33QVZ2D4.mjs.map +0 -1
  426. package/dist/sdk/chunk-B5QBV2QJ.mjs +0 -752
  427. package/dist/sdk/chunk-B5QBV2QJ.mjs.map +0 -1
  428. package/dist/sdk/chunk-BVFNRCHT.mjs +0 -14129
  429. package/dist/sdk/chunk-BVFNRCHT.mjs.map +0 -1
  430. package/dist/sdk/chunk-KWZW23FG.mjs +0 -14129
  431. package/dist/sdk/chunk-KWZW23FG.mjs.map +0 -1
  432. package/dist/sdk/chunk-O4RP4BRH.mjs +0 -14092
  433. package/dist/sdk/chunk-O4RP4BRH.mjs.map +0 -1
  434. package/dist/sdk/chunk-TUTOLSFV.mjs.map +0 -1
  435. package/dist/sdk/chunk-U5D2LY66.mjs +0 -245
  436. package/dist/sdk/chunk-U5D2LY66.mjs.map +0 -1
  437. package/dist/sdk/chunk-U7X54EMV.mjs +0 -331
  438. package/dist/sdk/chunk-U7X54EMV.mjs.map +0 -1
  439. package/dist/sdk/config-merger-TWUBWFC2.mjs +0 -8
  440. package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs +0 -61
  441. package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs.map +0 -1
  442. package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs +0 -61
  443. package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs.map +0 -1
  444. package/dist/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
  445. /package/dist/sdk/{check-execution-engine-2YYKUUSH.mjs.map → config-M4ZNO6NU.mjs.map} +0 -0
  446. /package/dist/sdk/{check-execution-engine-6QJXYYON.mjs.map → config-merger-PX3WIT57.mjs.map} +0 -0
  447. /package/dist/sdk/{check-execution-engine-PJZ4ZOKG.mjs.map → failure-condition-evaluator-NBO5YRXW.mjs.map} +0 -0
  448. /package/dist/sdk/{config-merger-TWUBWFC2.mjs.map → liquid-extensions-C7EG3YKH.mjs.map} +0 -0
  449. /package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs.map → memory-store-GJACZC2A.mjs.map} +0 -0
  450. /package/dist/sdk/{tracer-init-WC75N5NW.mjs.map → metrics-7PP3EJUH.mjs.map} +0 -0
@@ -0,0 +1,674 @@
1
+ version: "1.0"
2
+ extends: "visor.yaml"
3
+
4
+ # Integration test suite for Visor default configuration
5
+ # - Driven by events + fixtures; no manual step lists
6
+ # - Strict by default: every executed step must have an expect
7
+ # - AI mocks accept structured JSON when a schema is defined; plain uses text
8
+ # - GitHub calls are recorded by default by the test runner (no network)
9
+
10
+ tests:
11
+ defaults:
12
+ strict: true
13
+ ai_provider: mock
14
+ fail_on_unexpected_calls: true
15
+ # Enable GitHub frontend for this suite (PR comment grouping & checks)
16
+ frontends: [github]
17
+ # Run GitHub-tagged checks in tests (e.g., label application)
18
+ tags: "github"
19
+ # Example: enable negative GitHub recorder for all tests
20
+ # github_recorder: { error_code: 429 }
21
+ # Built-in fixtures are provided by the test runner (gh.* namespace).
22
+ # Custom fixtures may still be added here if needed.
23
+ fixtures: []
24
+
25
+ cases:
26
+ - name: label-flow
27
+ description: |
28
+ Validates the happy path for PR open:
29
+ - overview runs and emits tags.label and tags.review-effort (mocked)
30
+ - apply-overview-labels adds two labels (feature and review/effort:2)
31
+ - overview prompt includes PR title and unified diff header
32
+ event: pr_opened
33
+ fixture: gh.pr_open.minimal
34
+ mocks:
35
+ overview:
36
+ text: |
37
+ High‑level summary of the changes and impact.
38
+ tags:
39
+ label: feature
40
+ review-effort: 2
41
+ expect:
42
+ calls:
43
+ - step: overview
44
+ exactly: 1
45
+ - step: apply-overview-labels
46
+ exactly: 1
47
+ - provider: github
48
+ op: labels.add
49
+ at_least: 1
50
+ args:
51
+ contains:
52
+ - feature
53
+ - "review/effort:2"
54
+ outputs:
55
+ - step: overview
56
+ path: "tags.label"
57
+ equals: feature
58
+ - step: overview
59
+ path: "tags['review-effort']"
60
+ equals: 2
61
+ prompts:
62
+ - step: overview
63
+ contains:
64
+ - "feat: add user search"
65
+
66
+ - name: references-example-link-issue
67
+ description: Ensure issue-assistant prompt renders example with HEAD fallback and includes References section.
68
+ event: issue_opened
69
+ fixture: gh.issue_open.minimal
70
+ ai_include_code_context: true
71
+ strict: false
72
+ expect:
73
+ prompts:
74
+ - step: issue-assistant
75
+ contains:
76
+ - "References:"
77
+ - "https://github.com/owner/repo/blob/HEAD/path/to/file.ext#LSTART-LEND"
78
+
79
+ - name: references-example-link-comment
80
+ description: Ensure comment-assistant prompt renders example with HEAD fallback and includes References section.
81
+ event: issue_comment
82
+ fixture: gh.issue_comment.visor_help
83
+ ai_include_code_context: true
84
+ strict: false
85
+ expect:
86
+ prompts:
87
+ - step: comment-assistant
88
+ contains:
89
+ - "References:"
90
+ - "https://github.com/owner/repo/blob/HEAD/path/to/file.ext#LSTART-LEND"
91
+
92
+ - name: issue-triage
93
+ skip: true
94
+ description: |
95
+ Ensures the issue assistant triages a newly opened issue and applies labels.
96
+ Asserts the structured output (intent=issue_triage) and the GitHub label op.
97
+ event: issue_opened
98
+ fixture: gh.issue_open.minimal
99
+ mocks:
100
+ issue-assistant:
101
+ text: |
102
+ Thanks for the detailed report! We will investigate.
103
+ intent: issue_triage
104
+ labels: [bug, priority/medium]
105
+ expect:
106
+ calls:
107
+ - step: issue-assistant
108
+ exactly: 1
109
+ - step: apply-issue-labels
110
+ exactly: 1
111
+ - step: init-fact-validation
112
+ exactly: 1
113
+ - step: extract-facts
114
+ exactly: 1
115
+ - step: validate-fact
116
+ at_least: 1
117
+ - provider: github
118
+ op: labels.add
119
+ at_least: 1
120
+ args:
121
+ contains:
122
+ - bug
123
+ outputs:
124
+ - step: issue-assistant
125
+ path: intent
126
+ equals: issue_triage
127
+ prompts:
128
+ - step: issue-assistant
129
+ contains:
130
+ - "Bug: crashes on search edge case"
131
+
132
+ - name: issue-triage-labels
133
+ description: |
134
+ Minimal issue triage path to validate label application from issue-assistant output.
135
+ Provider derives labels from dependency outputs and normalizes them.
136
+ event: issue_opened
137
+ fixture: gh.issue_open.minimal
138
+ mocks:
139
+ issue-assistant:
140
+ text: |
141
+ Thanks for the report — we will triage shortly.
142
+ intent: issue_triage
143
+ labels: [bug, priority/medium]
144
+ expect:
145
+ calls:
146
+ - step: issue-assistant
147
+ exactly: 1
148
+ - step: apply-issue-labels
149
+ exactly: 1
150
+ - provider: github
151
+ op: labels.add
152
+ at_least: 1
153
+ args:
154
+ contains:
155
+ - bug
156
+
157
+ - name: pr-review-e2e-flow
158
+ description: |
159
+ End-to-end PR lifecycle covering multiple external events:
160
+ 1) PR opened → overview + labels
161
+ 2) Standard comment → no bot reply
162
+ 3) /visor help → single assistant reply (no retrigger)
163
+ 4) /visor Regenerate reviews → retrigger overview
164
+ 5) Fact validation enabled on comment → extract/validate/aggregate
165
+ 6) Fact validation disabled on comment → only assistant, no validation steps
166
+ 7) PR synchronized (new commit) → overview runs again
167
+ strict: true
168
+ flow:
169
+ - name: pr-open
170
+ description: |
171
+ PR open event. Mocks overview/security/quality/performance as empty issue lists.
172
+ Expects all review steps to run and labels to be added.
173
+ event: pr_opened
174
+ fixture: gh.pr_open.minimal
175
+ mocks:
176
+ overview:
177
+ text: "Overview body"
178
+ tags: { label: feature, review-effort: 2 }
179
+ security: { issues: [] }
180
+ architecture: { issues: [] }
181
+ quality: { issues: [] }
182
+ performance: { issues: [] }
183
+ expect:
184
+ calls:
185
+ - step: overview
186
+ at_least: 1
187
+ - step: security
188
+ exactly: 1
189
+ - step: architecture
190
+ exactly: 1
191
+ - step: performance
192
+ exactly: 1
193
+ - step: quality
194
+ exactly: 1
195
+ - step: apply-overview-labels
196
+ exactly: 1
197
+ - provider: github
198
+ op: issues.createComment
199
+ at_least: 1
200
+ - provider: github
201
+ op: labels.add
202
+ at_least: 1
203
+ args:
204
+ contains: [feature]
205
+ prompts:
206
+ - step: overview
207
+ contains:
208
+ - "feat: add user search"
209
+
210
+ - name: standard-comment
211
+ description: |
212
+ A regular human comment on a PR should not produce a bot reply.
213
+ event: issue_comment
214
+ fixture: gh.issue_comment.standard
215
+ mocks:
216
+ comment-assistant:
217
+ text: "" # empty text to avoid posting a reply
218
+ intent: comment_reply
219
+ expect:
220
+ no_calls:
221
+ - provider: github
222
+ op: issues.createComment
223
+ calls:
224
+ - step: comment-assistant
225
+ exactly: 1
226
+
227
+ - name: visor-plain
228
+ description: |
229
+ A "/visor help" comment should be recognized and answered once by the assistant.
230
+ event: issue_comment
231
+ fixture: gh.issue_comment.visor_help
232
+ mocks:
233
+ comment-assistant:
234
+ text: "Sure, here’s how I can help."
235
+ intent: comment_reply
236
+ expect:
237
+ calls:
238
+ - step: comment-assistant
239
+ exactly: 1
240
+ - provider: github
241
+ op: issues.createComment
242
+ exactly: 1
243
+ outputs:
244
+ - step: comment-assistant
245
+ path: intent
246
+ equals: comment_reply
247
+ prompts:
248
+ - step: comment-assistant
249
+ matches: "(?i)\\/visor\\s+help"
250
+
251
+ - name: visor-retrigger
252
+ description: |
253
+ A "/visor Regenerate reviews" comment should set intent=comment_retrigger
254
+ and schedule a new overview.
255
+ event: issue_comment
256
+ fixture: gh.issue_comment.visor_regenerate
257
+ mocks:
258
+ comment-assistant:
259
+ text: "Regenerating."
260
+ intent: comment_retrigger
261
+ overview:
262
+ text: "Overview (regenerated)"
263
+ tags: { label: feature, review-effort: 2 }
264
+ expect:
265
+ calls:
266
+ - step: comment-assistant
267
+ exactly: 1
268
+ - step: overview
269
+ exactly: 1
270
+ - step: security
271
+ exactly: 1
272
+ - step: architecture
273
+ exactly: 1
274
+ - step: performance
275
+ exactly: 1
276
+ - step: quality
277
+ exactly: 1
278
+ - provider: github
279
+ op: issues.createComment
280
+ at_least: 1
281
+ outputs:
282
+ - step: comment-assistant
283
+ path: intent
284
+ equals: comment_retrigger
285
+ prompts:
286
+ - step: comment-assistant
287
+ contains: ["Regenerate reviews"]
288
+
289
+ - name: facts-enabled (comment)
290
+ description: |
291
+ With fact validation enabled, the assistant reply is followed by
292
+ extract-facts and validate-fact (per fact). No aggregator is required for routing.
293
+ event: issue_comment
294
+ fixture: gh.issue_comment.visor_help
295
+ env:
296
+ ENABLE_FACT_VALIDATION: "true"
297
+ mocks:
298
+ comment-assistant:
299
+ text: "We rely on defaults/visor.yaml line 11 for max_parallelism=4."
300
+ intent: comment_reply
301
+ extract-facts:
302
+ - { id: f1, category: Configuration, claim: "max_parallelism defaults to 4", verifiable: true }
303
+ validate-fact[]:
304
+ - fact_id: f1
305
+ claim: "max_parallelism defaults to 4"
306
+ is_valid: true
307
+ confidence: high
308
+ evidence: "defaults/visor.yaml:11"
309
+ expect:
310
+ calls:
311
+ - step: comment-assistant
312
+ exactly: 1
313
+ - step: extract-facts
314
+ exactly: 1
315
+ - step: validate-fact
316
+ at_least: 1
317
+ # Prompt assertions are validated separately in stage-level prompt tests
318
+
319
+ - name: facts-invalid (comment)
320
+ description: |
321
+ Invalid fact path: after assistant reply, extract-facts finds one claim and
322
+ validate-fact returns is_valid=false; the runner detects problems from
323
+ validate-fact history and reruns the assistant once with correction context.
324
+ Due to goto forward-running dependents, extract-facts and validate-fact also run again.
325
+ event: issue_comment
326
+ fixture: gh.issue_comment.visor_help
327
+ env:
328
+ ENABLE_FACT_VALIDATION: "true"
329
+ routing:
330
+ max_loops: 1
331
+ mocks:
332
+ comment-assistant:
333
+ text: "We rely on defaults/visor.yaml line 11 for max_parallelism=4."
334
+ intent: comment_reply
335
+ extract-facts:
336
+ - { id: f1, category: Configuration, claim: "max_parallelism defaults to 4", verifiable: true }
337
+ validate-fact[]:
338
+ - fact_id: f1
339
+ claim: "max_parallelism defaults to 4"
340
+ is_valid: false
341
+ confidence: high
342
+ evidence: "defaults/visor.yaml:11 does not set 4"
343
+ correction: "max_parallelism defaults to 3"
344
+ expect:
345
+ calls:
346
+ - step: comment-assistant
347
+ exactly: 2
348
+ - step: extract-facts
349
+ exactly: 2
350
+ - step: validate-fact
351
+ exactly: 2
352
+ - step: aggregate
353
+ exactly: 1
354
+ outputs:
355
+ - step: validate-fact
356
+ where: { path: fact_id, equals: f1 }
357
+ path: correction
358
+ equals: "max_parallelism defaults to 3"
359
+
360
+ - name: facts-two-items (comment)
361
+ description: |
362
+ Two facts extracted; only the invalid fact should appear in the correction pass.
363
+ Due to goto forward-running dependents, extract-facts and validate-fact run again on retry.
364
+ event: issue_comment
365
+ fixture: gh.issue_comment.visor_help
366
+ env:
367
+ ENABLE_FACT_VALIDATION: "true"
368
+ routing:
369
+ max_loops: 1
370
+ mocks:
371
+ comment-assistant:
372
+ text: "We rely on defaults/visor.yaml for concurrency defaults."
373
+ intent: comment_reply
374
+ extract-facts:
375
+ - { id: f1, category: Configuration, claim: "max_parallelism defaults to 4", verifiable: true }
376
+ - { id: f2, category: Feature, claim: "Fast mode is enabled by default", verifiable: true }
377
+ validate-fact[]:
378
+ - { fact_id: f1, claim: "max_parallelism defaults to 4", is_valid: false, confidence: high, evidence: "defaults/visor.yaml:11", correction: "max_parallelism defaults to 3" }
379
+ - { fact_id: f2, claim: "Fast mode is enabled by default", is_valid: true, confidence: high, evidence: "src/config.ts:FAST_MODE=true" }
380
+ expect:
381
+ calls:
382
+ - step: comment-assistant
383
+ exactly: 2
384
+ - step: extract-facts
385
+ exactly: 2
386
+ - step: validate-fact
387
+ exactly: 4
388
+ - step: aggregate
389
+ exactly: 1
390
+ outputs:
391
+ - step: validate-fact
392
+ where: { path: fact_id, equals: f1 }
393
+ path: is_valid
394
+ equals: false
395
+ - step: validate-fact
396
+ where: { path: fact_id, equals: f2 }
397
+ path: is_valid
398
+ equals: true
399
+ - step: validate-fact
400
+ where: { path: fact_id, equals: f1 }
401
+ path: correction
402
+ equals: "max_parallelism defaults to 3"
403
+
404
+ - name: facts-disabled
405
+ description: |
406
+ With fact validation disabled, only the assistant runs; no validation steps execute.
407
+ event: issue_comment
408
+ fixture: gh.issue_comment.standard
409
+ env:
410
+ ENABLE_FACT_VALIDATION: "false"
411
+ expect:
412
+ calls:
413
+ - step: comment-assistant
414
+ exactly: 1
415
+ no_calls:
416
+ - step: extract-facts
417
+ - step: validate-fact
418
+
419
+ - name: facts-enabled (issue)
420
+ description: Fact validation runs from an issue creation path.
421
+ event: issue_opened
422
+ fixture: gh.issue_open.minimal
423
+ env:
424
+ ENABLE_FACT_VALIDATION: "true"
425
+ mocks:
426
+ issue-assistant:
427
+ text: "Opening issue with claim about defaults/visor.yaml"
428
+ intent: issue_triage
429
+ extract-facts:
430
+ - { id: f1, category: Configuration, claim: "max_parallelism defaults to 4", verifiable: true }
431
+ validate-fact[]:
432
+ - fact_id: f1
433
+ claim: "max_parallelism defaults to 4"
434
+ is_valid: true
435
+ confidence: high
436
+ evidence: "defaults/visor.yaml:11"
437
+ expect:
438
+ calls:
439
+ - step: issue-assistant
440
+ at_least: 1
441
+ - step: apply-issue-labels
442
+ exactly: 1
443
+ - step: extract-facts
444
+ exactly: 1
445
+ - step: validate-fact
446
+ at_least: 1
447
+
448
+ - name: facts-invalid (issue)
449
+ description: |
450
+ Invalid claim triggers correction by rerunning issue-assistant.
451
+ Due to goto forward-running dependents, extract-facts and validate-fact also run again.
452
+ event: issue_opened
453
+ fixture: gh.issue_open.minimal
454
+ env:
455
+ ENABLE_FACT_VALIDATION: "true"
456
+ routing:
457
+ max_loops: 1
458
+ mocks:
459
+ issue-assistant:
460
+ text: "Claim: max_parallelism defaults to 4"
461
+ intent: issue_triage
462
+ extract-facts:
463
+ - { id: f1, category: Configuration, claim: "max_parallelism defaults to 4", verifiable: true }
464
+ validate-fact[]:
465
+ - fact_id: f1
466
+ claim: "max_parallelism defaults to 4"
467
+ is_valid: false
468
+ confidence: high
469
+ evidence: "defaults/visor.yaml:11 does not set 4"
470
+ correction: "max_parallelism defaults to 3"
471
+ expect:
472
+ calls:
473
+ - step: issue-assistant
474
+ exactly: 2
475
+ - step: apply-issue-labels
476
+ exactly: 2
477
+ - step: extract-facts
478
+ exactly: 2
479
+ - step: validate-fact
480
+ exactly: 2
481
+ - step: aggregate
482
+ exactly: 1
483
+ outputs:
484
+ - step: validate-fact
485
+ where: { path: fact_id, equals: f1 }
486
+ path: correction
487
+ equals: "max_parallelism defaults to 3"
488
+
489
+ - name: pr-updated
490
+ description: |
491
+ When a new commit is pushed (synchronize), overview should run again
492
+ and post/refresh a comment.
493
+ event: pr_updated
494
+ fixture: gh.pr_sync.minimal
495
+ mocks:
496
+ overview:
497
+ text: "Overview for new commit"
498
+ tags: { label: feature, review-effort: 3 }
499
+ expect:
500
+ calls:
501
+ - step: overview
502
+ exactly: 1
503
+ - step: security
504
+ exactly: 1
505
+ - step: architecture
506
+ exactly: 1
507
+ - step: performance
508
+ exactly: 1
509
+ - step: quality
510
+ exactly: 1
511
+
512
+ - name: security-fail-if
513
+ description: |
514
+ Verifies that the global fail_if trips when security produces an error‑severity issue.
515
+ event: pr_opened
516
+ fixture: gh.pr_open.minimal
517
+ mocks:
518
+ overview:
519
+ text: "Overview text"
520
+ tags:
521
+ label: bug
522
+ review-effort: 3
523
+ security:
524
+ issues:
525
+ - id: S-001
526
+ file: src/search.ts
527
+ line: 10
528
+ message: "Command injection risk"
529
+ severity: error
530
+ category: security
531
+ expect:
532
+ calls:
533
+ - step: overview
534
+ exactly: 1
535
+ - step: security
536
+ exactly: 1
537
+ outputs:
538
+ - step: security
539
+ path: "issues[0].severity"
540
+ equals: error
541
+ fail:
542
+ message_contains: "fail_if"
543
+
544
+ - name: strict-mode-example
545
+ skip: true
546
+ description: |
547
+ Demonstrates strict mode: a step executed without a corresponding expect
548
+ (apply-overview-labels) triggers a strict_violation with a helpful message.
549
+ event: pr_opened
550
+ fixture: gh.pr_open.minimal
551
+ mocks:
552
+ overview:
553
+ text: "Short overview"
554
+ tags:
555
+ label: chore
556
+ review-effort: 1
557
+ expect:
558
+ calls:
559
+ - step: overview
560
+ exactly: 1
561
+ strict_violation:
562
+ for_step: apply-overview-labels
563
+ message_contains: "Add an expect for this step or set strict: false"
564
+
565
+ - name: visor-plain-prompt
566
+ description: |
567
+ Standalone prompt check for a "/visor help" comment.
568
+ event: issue_comment
569
+ fixture: gh.issue_comment.visor_help
570
+ mocks:
571
+ comment-assistant:
572
+ text: "Here is how I can help."
573
+ intent: comment_reply
574
+ expect:
575
+ calls:
576
+ - step: comment-assistant
577
+ exactly: 1
578
+ prompts:
579
+ - step: comment-assistant
580
+ matches: "(?i)\\/visor\\s+help"
581
+
582
+ - name: visor-retrigger-prompt
583
+ description: |
584
+ Standalone prompt check for "/visor Regenerate reviews".
585
+ event: issue_comment
586
+ fixture: gh.issue_comment.visor_regenerate
587
+ strict: false
588
+ mocks:
589
+ comment-assistant:
590
+ text: "Regenerating."
591
+ intent: comment_retrigger
592
+ expect:
593
+ calls:
594
+ - step: comment-assistant
595
+ exactly: 1
596
+ prompts:
597
+ - step: comment-assistant
598
+ contains: ["Regenerate reviews"]
599
+
600
+ - name: command-mock-shape
601
+ description: |
602
+ Illustrates command provider mocking and output assertions.
603
+ Skipped by default; enable when command steps exist.
604
+ skip: true # illustrative only, enable when a command step exists
605
+ event: pr_opened
606
+ fixture: gh.pr_open.minimal
607
+ mocks:
608
+ unit-tests:
609
+ stdout: '{"passed": 128, "failed": 0, "duration_sec": 1.2}'
610
+ exit_code: 0
611
+ expect:
612
+ calls:
613
+ - step: unit-tests
614
+ exactly: 1
615
+ outputs:
616
+ - step: unit-tests
617
+ path: failed
618
+ equals: 0
619
+
620
+ - name: github-negative-mode
621
+ description: |
622
+ Demonstrates negative GitHub recorder mode: simulate a 429 error and assert failure path.
623
+ event: pr_opened
624
+ fixture: gh.pr_open.minimal
625
+ github_recorder: { error_code: 429 }
626
+ # Override defaults for this case only by specifying a local recorder via env-like knob
627
+ # The runner reads tests.defaults.github_recorder; we provide it at the suite level by default.
628
+ mocks:
629
+ overview:
630
+ text: "Overview body"
631
+ tags: { label: feature, review-effort: 2 }
632
+ expect:
633
+ calls:
634
+ - step: overview
635
+ exactly: 1
636
+ - step: apply-overview-labels
637
+ exactly: 1
638
+ fail:
639
+ message_contains: "github/op_failed"
640
+
641
+ - name: facts-invalid
642
+ skip: true
643
+ description: |
644
+ With fact validation enabled and an invalid fact, aggregate-validations should detect
645
+ not-all-valid and route back to the assistant for a correction pass in the same stage.
646
+ event: issue_comment
647
+ fixture: gh.issue_comment.visor_help
648
+ env:
649
+ ENABLE_FACT_VALIDATION: "true"
650
+ mocks:
651
+ comment-assistant:
652
+ text: "We rely on defaults/visor.yaml line 11 for max_parallelism=4."
653
+ intent: comment_reply
654
+ extract-facts:
655
+ - { id: f1, category: Configuration, claim: "max_parallelism defaults to 4", verifiable: true }
656
+ validate-fact[]:
657
+ - fact_id: f1
658
+ claim: "max_parallelism defaults to 4"
659
+ is_valid: false
660
+ confidence: high
661
+ evidence: "defaults/visor.yaml:11 does not set 4"
662
+ correction: "max_parallelism defaults to 3"
663
+ expect:
664
+ calls:
665
+ - step: comment-assistant
666
+ exactly: 1
667
+ - step: extract-facts
668
+ exactly: 1
669
+ - step: validate-fact
670
+ at_least: 1
671
+ - step: aggregate-validations
672
+ exactly: 1
673
+ - step: init-fact-validation
674
+ exactly: 1