@probelabs/visor 0.1.124 → 0.1.126
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/dist/config.d.ts.map +1 -1
- package/dist/docs/DEPLOYMENT.md +117 -11
- package/dist/docs/GITHUB_CHECKS.md +18 -4
- package/dist/docs/NPM_USAGE.md +112 -39
- package/dist/docs/action-reference.md +63 -9
- package/dist/docs/advanced-ai.md +58 -51
- package/dist/docs/ai-configuration.md +99 -11
- package/dist/docs/ai-custom-tools-usage.md +70 -33
- package/dist/docs/ai-custom-tools.md +50 -27
- package/dist/docs/architecture.md +1232 -0
- package/dist/docs/bot-transports-rfc.md +13 -3
- package/dist/docs/ci-cli-mode.md +116 -8
- package/dist/docs/claude-code.md +111 -41
- package/dist/docs/command-provider.md +37 -15
- package/dist/docs/commands.md +252 -6
- package/dist/docs/configuration.md +138 -4
- package/dist/docs/contributing.md +737 -0
- package/dist/docs/custom-tools.md +39 -8
- package/dist/docs/dashboards/README.md +33 -19
- package/dist/docs/debug-visualizer-progress.md +14 -13
- package/dist/docs/debug-visualizer-rfc.md +14 -13
- package/dist/docs/debug-visualizer.md +30 -5
- package/dist/docs/debugging.md +73 -8
- package/dist/docs/default-output-schema.md +24 -20
- package/dist/docs/dependencies.md +75 -21
- package/dist/docs/dev-playbook.md +85 -9
- package/dist/docs/engine-pause-resume-rfc.md +11 -11
- package/dist/docs/engine-state-machine-plan.md +10 -3
- package/dist/docs/event-driven-github-integration-rfc.md +20 -11
- package/dist/docs/event-triggers.md +95 -6
- package/dist/docs/execution-statistics-rfc.md +16 -4
- package/dist/docs/fact-validator-gap-analysis.md +12 -1
- package/dist/docs/fact-validator-implementation-plan.md +19 -11
- package/dist/docs/fail-if.md +116 -11
- package/dist/docs/failure-conditions-implementation.md +40 -6
- package/dist/docs/failure-conditions-schema.md +243 -87
- package/dist/docs/failure-routing-rfc.md +43 -18
- package/dist/docs/failure-routing.md +80 -23
- package/dist/docs/faq.md +836 -0
- package/dist/docs/foreach-dependency-propagation.md +32 -15
- package/dist/docs/github-ops.md +6 -5
- package/dist/docs/glossary.md +322 -0
- package/dist/docs/goto-forward-run-plan.md +23 -10
- package/dist/docs/guides/criticality-modes.md +15 -13
- package/dist/docs/guides/fault-management-and-contracts.md +8 -5
- package/dist/docs/guides/workflow-style-guide.md +17 -8
- package/dist/docs/http.md +102 -3
- package/dist/docs/human-input-provider.md +20 -36
- package/dist/docs/index.md +206 -0
- package/dist/docs/lifecycle-hooks.md +322 -2
- package/dist/docs/limits.md +20 -5
- package/dist/docs/liquid-templates.md +86 -14
- package/dist/docs/loop-routing-refactor.md +4 -2
- package/dist/docs/mcp-provider.md +53 -19
- package/dist/docs/mcp.md +27 -1
- package/dist/docs/memory.md +7 -2
- package/dist/docs/migration.md +596 -0
- package/dist/docs/observability.md +227 -6
- package/dist/docs/output-formats.md +388 -9
- package/dist/docs/output-history.md +36 -6
- package/dist/docs/performance.md +510 -4
- package/dist/docs/pluggable.md +95 -4
- package/dist/docs/proposals/snapshot-scope-execution.md +6 -5
- package/dist/docs/providers/git-checkout.md +16 -14
- package/dist/docs/providers/noop.md +696 -0
- package/dist/docs/recipes.md +8 -9
- package/dist/docs/rfc/git-checkout-step.md +3 -1
- package/dist/docs/rfc/on_init-hook.md +18 -5
- package/dist/docs/rfc/workspace-isolation.md +16 -0
- package/dist/docs/roadmap/criticality-implementation-tasks.md +27 -27
- package/dist/docs/router-patterns.md +155 -43
- package/dist/docs/schema-templates.md +51 -15
- package/dist/docs/script.md +162 -13
- package/dist/docs/sdk.md +46 -12
- package/dist/docs/security.md +464 -5
- package/dist/docs/slack-integration.md +481 -0
- package/dist/docs/tag-filtering.md +60 -20
- package/dist/docs/telemetry-setup.md +157 -46
- package/dist/docs/test-framework-rfc.md +37 -36
- package/dist/docs/testing/assertions.md +92 -4
- package/dist/docs/testing/ci.md +56 -7
- package/dist/docs/testing/cli.md +57 -15
- package/dist/docs/testing/cookbook.md +53 -20
- package/dist/docs/testing/dsl-reference.md +110 -9
- package/dist/docs/testing/fixtures-and-mocks.md +28 -3
- package/dist/docs/testing/flows.md +59 -4
- package/dist/docs/testing/getting-started.md +14 -13
- package/dist/docs/testing/troubleshooting.md +39 -2
- package/dist/docs/timeouts.md +174 -18
- package/dist/docs/troubleshooting.md +176 -6
- package/dist/docs/workflow-creation-guide.md +101 -3
- package/dist/docs/workflows.md +138 -41
- package/dist/examples/README.md +169 -4
- package/dist/examples/ai-custom-tools-simple.yaml +2 -3
- package/dist/examples/cron-webhook-config.yaml +15 -0
- package/dist/examples/forEach-example.yaml +6 -0
- package/dist/examples/git-checkout-basic.yaml +4 -0
- package/dist/examples/git-checkout-compare.yaml +6 -0
- package/dist/examples/git-checkout-cross-repo.yaml +7 -0
- package/dist/examples/http-integration-config.yaml +30 -0
- package/dist/examples/https-server-config.yaml +15 -0
- package/dist/examples/mcp-provider-example.yaml +10 -10
- package/dist/examples/transform-example.yaml +3 -0
- package/dist/examples/webhook-pipeline-config.yaml +18 -0
- package/dist/examples/workflows/workflow-composition-example.yaml +4 -0
- package/dist/frontends/slack-frontend.d.ts +2 -0
- package/dist/frontends/slack-frontend.d.ts.map +1 -1
- package/dist/generated/config-schema.d.ts +11 -7
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +11 -7
- package/dist/index.js +3127 -974
- package/dist/output/traces/{run-2026-01-28T16-15-24-569Z.ndjson → run-2026-01-31T16-37-22-321Z.ndjson} +84 -84
- package/dist/output/traces/{run-2026-01-28T16-16-09-757Z.ndjson → run-2026-01-31T16-38-06-031Z.ndjson} +1013 -1013
- package/dist/providers/ai-check-provider.d.ts +9 -2
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/providers/command-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-custom-sse-server.d.ts +17 -1
- package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -1
- package/dist/providers/workflow-check-provider.d.ts.map +1 -1
- package/dist/providers/workflow-tool-executor.d.ts +68 -0
- package/dist/providers/workflow-tool-executor.d.ts.map +1 -0
- package/dist/sdk/{check-provider-registry-AQ3JETBG.mjs → check-provider-registry-3KI5RKXT.mjs} +6 -5
- package/dist/sdk/check-provider-registry-IYILYY35.mjs +28 -0
- package/dist/sdk/chunk-2CPMMNIX.mjs +1459 -0
- package/dist/sdk/chunk-2CPMMNIX.mjs.map +1 -0
- package/dist/sdk/chunk-5LI6T4O3.mjs +3600 -0
- package/dist/sdk/chunk-5LI6T4O3.mjs.map +1 -0
- package/dist/sdk/{chunk-YLQ4UN62.mjs → chunk-A4PGHURG.mjs} +6838 -6257
- package/dist/sdk/chunk-A4PGHURG.mjs.map +1 -0
- package/dist/sdk/chunk-EXFGO4FX.mjs +147 -0
- package/dist/sdk/chunk-EXFGO4FX.mjs.map +1 -0
- package/dist/sdk/chunk-PJ7K5UFC.mjs +17732 -0
- package/dist/sdk/chunk-PJ7K5UFC.mjs.map +1 -0
- package/dist/sdk/{chunk-BHZ4CKUS.mjs → chunk-PXFIALUH.mjs} +77 -8
- package/dist/sdk/chunk-PXFIALUH.mjs.map +1 -0
- package/dist/sdk/{chunk-PVITVJ6J.mjs → chunk-RTKJXNZS.mjs} +32 -9
- package/dist/sdk/chunk-RTKJXNZS.mjs.map +1 -0
- package/dist/sdk/chunk-VW2GBXQT.mjs +606 -0
- package/dist/sdk/chunk-VW2GBXQT.mjs.map +1 -0
- package/dist/sdk/{config-RQQPMLRD.mjs → config-5AUYQFHE.mjs} +2 -2
- package/dist/sdk/config-6CUVEH7H.mjs +16 -0
- package/dist/sdk/config-6CUVEH7H.mjs.map +1 -0
- package/dist/sdk/{github-frontend-6Q4BISZX.mjs → github-frontend-BZ4N3BFZ.mjs} +7 -3
- package/dist/sdk/github-frontend-BZ4N3BFZ.mjs.map +1 -0
- package/dist/sdk/host-4MT3EW2I.mjs +52 -0
- package/dist/sdk/{host-P5NQICP7.mjs → host-NYWXLIFC.mjs} +2 -2
- package/dist/sdk/host-NYWXLIFC.mjs.map +1 -0
- package/dist/sdk/{routing-DEY2AIXM.mjs → routing-6R42GXUO.mjs} +2 -2
- package/dist/sdk/routing-6R42GXUO.mjs.map +1 -0
- package/dist/sdk/routing-7FXPULTO.mjs +24 -0
- package/dist/sdk/routing-7FXPULTO.mjs.map +1 -0
- package/dist/sdk/sdk.d.mts +3 -1
- package/dist/sdk/sdk.d.ts +3 -1
- package/dist/sdk/sdk.js +12163 -11204
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +14 -10
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/sdk/slack-frontend-JUT3TYVC.mjs +821 -0
- package/dist/sdk/slack-frontend-JUT3TYVC.mjs.map +1 -0
- package/dist/sdk/workflow-check-provider-H3CUOLUD.mjs +28 -0
- package/dist/sdk/workflow-check-provider-H3CUOLUD.mjs.map +1 -0
- package/dist/sdk/workflow-check-provider-YUNNF4KC.mjs +28 -0
- package/dist/sdk/workflow-check-provider-YUNNF4KC.mjs.map +1 -0
- package/dist/sdk/workflow-registry-KFWSDSLM.mjs +12 -0
- package/dist/sdk/workflow-registry-KFWSDSLM.mjs.map +1 -0
- package/dist/slack/socket-runner.d.ts +2 -0
- package/dist/slack/socket-runner.d.ts.map +1 -1
- package/dist/state-machine/context/workflow-inputs.d.ts +20 -0
- package/dist/state-machine/context/workflow-inputs.d.ts.map +1 -0
- package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -1
- package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -1
- package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -1
- package/dist/state-machine/states/level-dispatch.d.ts.map +1 -1
- package/dist/state-machine/states/routing.d.ts +2 -1
- package/dist/state-machine/states/routing.d.ts.map +1 -1
- package/dist/traces/{run-2026-01-28T16-15-24-569Z.ndjson → run-2026-01-31T16-37-22-321Z.ndjson} +84 -84
- package/dist/traces/{run-2026-01-28T16-16-09-757Z.ndjson → run-2026-01-31T16-38-06-031Z.ndjson} +1013 -1013
- package/dist/types/config.d.ts +3 -1
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/human-id.d.ts +12 -0
- package/dist/utils/human-id.d.ts.map +1 -0
- package/dist/utils/worktree-manager.d.ts +3 -0
- package/dist/utils/worktree-manager.d.ts.map +1 -1
- package/dist/workflow-executor.d.ts.map +1 -1
- package/dist/workflow-registry.d.ts +1 -0
- package/dist/workflow-registry.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/sdk/chunk-BHZ4CKUS.mjs.map +0 -1
- package/dist/sdk/chunk-PVITVJ6J.mjs.map +0 -1
- package/dist/sdk/chunk-YLQ4UN62.mjs.map +0 -1
- package/dist/sdk/github-frontend-6Q4BISZX.mjs.map +0 -1
- /package/dist/sdk/{check-provider-registry-AQ3JETBG.mjs.map → check-provider-registry-3KI5RKXT.mjs.map} +0 -0
- /package/dist/sdk/{config-RQQPMLRD.mjs.map → check-provider-registry-IYILYY35.mjs.map} +0 -0
- /package/dist/sdk/{routing-DEY2AIXM.mjs.map → config-5AUYQFHE.mjs.map} +0 -0
- /package/dist/sdk/{host-P5NQICP7.mjs.map → host-4MT3EW2I.mjs.map} +0 -0
|
@@ -35,8 +35,9 @@ Common issues and how to fix them quickly.
|
|
|
35
35
|
|
|
36
36
|
## How do I see more logs?
|
|
37
37
|
|
|
38
|
-
-
|
|
39
|
-
- To isolate the problem, run a single stage: `visor test --only case#stage
|
|
38
|
+
- Use the `--debug` CLI flag or set `VISOR_DEBUG=true`.
|
|
39
|
+
- To isolate the problem, run a single stage: `visor test --only case#stage` (name substring match) or `--only case#N` (1-based index).
|
|
40
|
+
- Example: `visor test --debug --only pr-review-e2e-flow#facts-invalid`
|
|
40
41
|
|
|
41
42
|
## Pause at “on_finish: no result found … — skip”
|
|
42
43
|
|
|
@@ -53,3 +54,39 @@ What we changed: we added an early return in `handleOnFinishHooks` when there ar
|
|
|
53
54
|
Downsides: none functionally. The only trade‑off is that debug visibility is slightly reduced in that specific “no parents ran” case; enable `VISOR_DEBUG=true` if you need to trace the discovery step regardless.
|
|
54
55
|
|
|
55
56
|
Guarantee: if a check executed and defines `on_finish`, `on_finish` still executes for that check once its forEach finishes. The early return only triggers when no eligible parent produced results in the run.
|
|
57
|
+
|
|
58
|
+
## Mock structure does not match expected output
|
|
59
|
+
|
|
60
|
+
- Ensure mock shapes match what the step schema expects. For AI steps with a schema, provide structured fields directly (not wrapped in `returns:`).
|
|
61
|
+
- For command/HTTP provider steps, include `stdout`, `exit_code`, `status`, or `body` as appropriate.
|
|
62
|
+
- Review [Fixtures and Mocks](./fixtures-and-mocks.md) for detailed mock examples.
|
|
63
|
+
|
|
64
|
+
## Flow stage fails unexpectedly
|
|
65
|
+
|
|
66
|
+
- Each stage computes coverage as a delta from the previous stage. If a step from a prior stage executes again, you need to account for it in the current stage's `expect.calls`.
|
|
67
|
+
- Check that mocks are merged correctly: stage mocks override flow-level mocks (`{...flow.mocks, ...stage.mocks}`).
|
|
68
|
+
- Use `--only case#stage` to isolate and debug a single stage.
|
|
69
|
+
|
|
70
|
+
## CI test runs slower than expected
|
|
71
|
+
|
|
72
|
+
- Ensure `ai_provider: mock` is set in `tests.defaults` for offline, fast execution.
|
|
73
|
+
- Use `--max-parallel` to run cases concurrently within a suite.
|
|
74
|
+
- Use `--max-suites` when running multiple test files.
|
|
75
|
+
- Consider `--prompt-max-chars` to reduce memory usage for large diffs.
|
|
76
|
+
|
|
77
|
+
## Tests pass locally but fail in CI
|
|
78
|
+
|
|
79
|
+
- Check for environment variable differences. CI auto-detects and adjusts some defaults (e.g., `VISOR_TEST_PROMPT_MAX_CHARS`).
|
|
80
|
+
- Ensure fixtures don't depend on local file paths or network access.
|
|
81
|
+
- Run with `--debug` in CI to capture more diagnostic output.
|
|
82
|
+
|
|
83
|
+
## Related Documentation
|
|
84
|
+
|
|
85
|
+
- [Getting Started](./getting-started.md) - Introduction to the test framework
|
|
86
|
+
- [DSL Reference](./dsl-reference.md) - Complete test YAML schema
|
|
87
|
+
- [Assertions](./assertions.md) - Available assertion types
|
|
88
|
+
- [Fixtures and Mocks](./fixtures-and-mocks.md) - Managing test data
|
|
89
|
+
- [Flows](./flows.md) - Multi-stage test flows
|
|
90
|
+
- [Cookbook](./cookbook.md) - Copy-pasteable test recipes
|
|
91
|
+
- [CLI](./cli.md) - Test runner command line options
|
|
92
|
+
- [CI Integration](./ci.md) - Running tests in CI pipelines
|
package/dist/docs/timeouts.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Timeouts:
|
|
1
|
+
# Timeouts: Configuration and Behavior
|
|
2
2
|
|
|
3
|
-
Checks can specify a per
|
|
3
|
+
Checks can specify a per-check timeout. When a timeout is reached, the provider is aborted and the engine records a timeout error and skips direct dependents.
|
|
4
4
|
|
|
5
5
|
## Configuration
|
|
6
6
|
|
|
@@ -8,31 +8,149 @@ Checks can specify a per‑check timeout. When a timeout is reached, the provide
|
|
|
8
8
|
steps:
|
|
9
9
|
fetch-tickets:
|
|
10
10
|
type: command
|
|
11
|
-
timeout:
|
|
11
|
+
timeout: 60 # seconds (command provider uses seconds)
|
|
12
12
|
exec: node scripts/jira/batch-fetch.js "$JQL" --limit $LIMIT
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Provider
|
|
15
|
+
## Provider-Specific Timeout Behavior
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
- Units: seconds.
|
|
19
|
-
- Default: 60s if not specified.
|
|
20
|
-
- Effect on timeout: issue `command/timeout` with message “Command execution timed out after <N> seconds”. Direct dependents are skipped.
|
|
21
|
-
- `http_client`:
|
|
22
|
-
- Units: milliseconds.
|
|
23
|
-
- Default: provider default (see provider docs/test for specifics).
|
|
24
|
-
- `ai`:
|
|
25
|
-
- Use `ai.timeout` (milliseconds). CLI `--timeout` also maps to AI timeout.
|
|
17
|
+
Each provider has its own timeout handling:
|
|
26
18
|
|
|
27
|
-
|
|
19
|
+
| Provider | Unit | Default | Config Key |
|
|
20
|
+
|----------|------|---------|------------|
|
|
21
|
+
| `command` | seconds | 60s | `timeout` |
|
|
22
|
+
| `http_client` | milliseconds | 30000ms (30s) | `timeout` |
|
|
23
|
+
| `mcp` | seconds | 60s | `timeout` |
|
|
24
|
+
| `ai` | milliseconds | varies by model | `ai.timeout` |
|
|
25
|
+
| `human-input` | seconds | none (waits indefinitely) | `timeout` |
|
|
26
|
+
| `custom tools` | milliseconds | 30000ms (30s) | `timeout` |
|
|
27
|
+
| `git-checkout` | milliseconds | 300000ms (5 min) | `clone_timeout_ms` |
|
|
28
|
+
|
|
29
|
+
### Command Provider
|
|
30
|
+
|
|
31
|
+
- **Units**: seconds
|
|
32
|
+
- **Default**: 60 seconds
|
|
33
|
+
- **Error rule ID**: `command/timeout`
|
|
34
|
+
- **Message**: "Command execution timed out after N seconds"
|
|
35
|
+
- **Behavior**: Dependents are skipped with reason `dependency_failed`
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
steps:
|
|
39
|
+
long-build:
|
|
40
|
+
type: command
|
|
41
|
+
timeout: 300 # 5 minutes
|
|
42
|
+
exec: npm run build
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### HTTP Client Provider
|
|
46
|
+
|
|
47
|
+
- **Units**: milliseconds
|
|
48
|
+
- **Default**: 30000ms (30 seconds)
|
|
49
|
+
- **Error rule ID**: `http_client/fetch_error` or `http_client/download_timeout`
|
|
50
|
+
- **Message**: "Request timed out after Nms"
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
steps:
|
|
54
|
+
fetch-data:
|
|
55
|
+
type: http_client
|
|
56
|
+
timeout: 60000 # 60 seconds
|
|
57
|
+
url: https://api.example.com/data
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### MCP Provider
|
|
61
|
+
|
|
62
|
+
- **Units**: seconds (converted to milliseconds internally)
|
|
63
|
+
- **Default**: 60 seconds
|
|
64
|
+
- **Applies to**: Connection timeout and request timeout separately
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
steps:
|
|
68
|
+
mcp-analysis:
|
|
69
|
+
type: mcp
|
|
70
|
+
timeout: 120 # 2 minutes
|
|
71
|
+
command: npx
|
|
72
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
73
|
+
method: search_code
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### AI Provider
|
|
77
|
+
|
|
78
|
+
- **Units**: milliseconds
|
|
79
|
+
- **Default**: varies by provider/model
|
|
80
|
+
- **Config location**: Nested under `ai:` block
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
steps:
|
|
84
|
+
ai-review:
|
|
85
|
+
type: ai
|
|
86
|
+
prompt: "Review this code"
|
|
87
|
+
ai:
|
|
88
|
+
provider: anthropic
|
|
89
|
+
model: claude-3-opus
|
|
90
|
+
timeout: 120000 # 2 minutes
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Human Input Provider
|
|
94
|
+
|
|
95
|
+
- **Units**: seconds
|
|
96
|
+
- **Default**: no timeout (waits indefinitely)
|
|
97
|
+
- **Behavior**: Returns default value if timeout expires
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
steps:
|
|
101
|
+
approval:
|
|
102
|
+
type: human-input
|
|
103
|
+
prompt: "Approve deployment? (yes/no)"
|
|
104
|
+
timeout: 300 # 5 minutes
|
|
105
|
+
default: "no"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Custom Tools
|
|
109
|
+
|
|
110
|
+
- **Units**: milliseconds
|
|
111
|
+
- **Default**: 30000ms (30 seconds)
|
|
112
|
+
|
|
113
|
+
```yaml
|
|
114
|
+
tools:
|
|
115
|
+
my-tool:
|
|
116
|
+
name: my-tool
|
|
117
|
+
exec: ./slow-script.sh
|
|
118
|
+
timeout: 60000 # 60 seconds
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Git Checkout Provider
|
|
122
|
+
|
|
123
|
+
- **Units**: milliseconds
|
|
124
|
+
- **Default**: 300000ms (5 minutes)
|
|
125
|
+
- **Config key**: `clone_timeout_ms`
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
steps:
|
|
129
|
+
checkout-repo:
|
|
130
|
+
type: git-checkout
|
|
131
|
+
ref: main
|
|
132
|
+
clone_timeout_ms: 600000 # 10 minutes for large repos
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## CLI Global Timeout
|
|
136
|
+
|
|
137
|
+
The CLI supports a global timeout via the `--timeout` flag:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
visor --check all --timeout 300000 # 5 minute global timeout (milliseconds)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
This timeout applies to AI operations. The default is 1200000ms (20 minutes).
|
|
28
144
|
|
|
29
145
|
## Examples
|
|
30
146
|
|
|
147
|
+
### Basic Command Timeout
|
|
148
|
+
|
|
31
149
|
```yaml
|
|
32
150
|
steps:
|
|
33
151
|
fetch:
|
|
34
152
|
type: command
|
|
35
|
-
timeout: 120
|
|
153
|
+
timeout: 120 # 2 minutes
|
|
36
154
|
exec: curl -s https://example.com/data
|
|
37
155
|
|
|
38
156
|
process:
|
|
@@ -41,10 +159,48 @@ steps:
|
|
|
41
159
|
exec: echo "{{ outputs.fetch }}" | jq '.items | length'
|
|
42
160
|
```
|
|
43
161
|
|
|
44
|
-
If `fetch` exceeds
|
|
162
|
+
If `fetch` exceeds 120 seconds, `process` is skipped with reason `dependency_failed`.
|
|
163
|
+
|
|
164
|
+
### Mixed Provider Timeouts
|
|
165
|
+
|
|
166
|
+
```yaml
|
|
167
|
+
steps:
|
|
168
|
+
# Command: seconds
|
|
169
|
+
build:
|
|
170
|
+
type: command
|
|
171
|
+
timeout: 300
|
|
172
|
+
exec: npm run build
|
|
173
|
+
|
|
174
|
+
# HTTP: milliseconds
|
|
175
|
+
notify:
|
|
176
|
+
type: http_client
|
|
177
|
+
timeout: 10000
|
|
178
|
+
url: https://webhook.example.com
|
|
179
|
+
depends_on: [build]
|
|
180
|
+
|
|
181
|
+
# AI: milliseconds (nested)
|
|
182
|
+
review:
|
|
183
|
+
type: ai
|
|
184
|
+
prompt: "Review the build output"
|
|
185
|
+
ai:
|
|
186
|
+
timeout: 60000
|
|
187
|
+
depends_on: [build]
|
|
188
|
+
```
|
|
45
189
|
|
|
46
190
|
## Notes
|
|
47
191
|
|
|
48
|
-
- Be mindful of units when switching providers (seconds vs milliseconds).
|
|
49
|
-
-
|
|
192
|
+
- **Unit awareness**: Be mindful of units when switching between providers (seconds vs milliseconds).
|
|
193
|
+
- **Dependency propagation**: When a check times out, all direct dependents are skipped.
|
|
194
|
+
- **Failure handling**: Consider using [`fail_if`](./fail-if.md) conditions for additional guarding.
|
|
195
|
+
- **Routing**: Use [`on_fail`](./failure-routing.md) to define retry or recovery behavior on timeout.
|
|
196
|
+
|
|
197
|
+
## Related Documentation
|
|
50
198
|
|
|
199
|
+
- [Command Provider](./command-provider.md) - Shell command execution
|
|
200
|
+
- [HTTP Integration](./http.md) - HTTP client and webhook providers
|
|
201
|
+
- [MCP Provider](./mcp-provider.md) - MCP tool execution
|
|
202
|
+
- [AI Configuration](./ai-configuration.md) - AI provider settings
|
|
203
|
+
- [Human Input Provider](./human-input-provider.md) - Interactive input
|
|
204
|
+
- [Custom Tools](./custom-tools.md) - YAML-defined tools
|
|
205
|
+
- [Git Checkout Provider](./providers/git-checkout.md) - Repository checkout
|
|
206
|
+
- [Failure Routing](./failure-routing.md) - Handling failures and retries
|
|
@@ -1,7 +1,177 @@
|
|
|
1
|
-
|
|
1
|
+
# Troubleshooting
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
This guide covers common issues and their solutions when using Visor.
|
|
4
|
+
|
|
5
|
+
For in-depth debugging techniques including JavaScript expression debugging, Liquid template inspection, and OpenTelemetry tracing, see the [Debugging Guide](./debugging.md).
|
|
6
|
+
|
|
7
|
+
## Quick Diagnostics
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Enable debug mode for detailed output
|
|
11
|
+
visor --check all --debug
|
|
12
|
+
|
|
13
|
+
# Validate configuration before running
|
|
14
|
+
visor validate --config .visor.yaml
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Common Issues
|
|
18
|
+
|
|
19
|
+
### Configuration Not Found
|
|
20
|
+
|
|
21
|
+
**Symptoms**: Visor runs but uses default configuration instead of your custom config.
|
|
22
|
+
|
|
23
|
+
**Solutions**:
|
|
24
|
+
1. Ensure your config file is named `.visor.yaml` (with leading dot) in the project root
|
|
25
|
+
2. Explicitly specify the config path: `visor --config path/to/.visor.yaml`
|
|
26
|
+
3. Check for YAML syntax errors: `visor validate --config .visor.yaml`
|
|
27
|
+
|
|
28
|
+
### GitHub Check Runs Not Appearing
|
|
29
|
+
|
|
30
|
+
**Symptoms**: PR comments work but GitHub Check runs are missing.
|
|
31
|
+
|
|
32
|
+
**Solutions**:
|
|
33
|
+
1. Verify workflow permissions include `checks: write`:
|
|
34
|
+
```yaml
|
|
35
|
+
permissions:
|
|
36
|
+
contents: read
|
|
37
|
+
pull-requests: write
|
|
38
|
+
issues: write
|
|
39
|
+
checks: write
|
|
40
|
+
```
|
|
41
|
+
2. For fork PRs, check runs require `pull_request_target` trigger - see [Fork PR Support](./GITHUB_CHECKS.md#fork-pr-support)
|
|
42
|
+
3. Ensure `create-check: 'true'` in action inputs (default)
|
|
43
|
+
4. Check action logs for permission errors (403)
|
|
44
|
+
|
|
45
|
+
### Annotations Not Appearing on Files
|
|
46
|
+
|
|
47
|
+
**Symptoms**: Check runs exist but no inline annotations on PR files.
|
|
48
|
+
|
|
49
|
+
**Solutions**:
|
|
50
|
+
1. Confirm the check uses `schema: code-review`
|
|
51
|
+
2. Ensure issues include `file` and `line` properties
|
|
52
|
+
3. Verify the file paths match the PR diff (relative paths from repo root)
|
|
53
|
+
|
|
54
|
+
### AI Provider Errors
|
|
55
|
+
|
|
56
|
+
**Symptoms**: Checks fail with API errors or return no results.
|
|
57
|
+
|
|
58
|
+
**Solutions**:
|
|
59
|
+
1. Verify API key is set correctly:
|
|
60
|
+
- `GOOGLE_API_KEY` for Gemini
|
|
61
|
+
- `ANTHROPIC_API_KEY` for Claude
|
|
62
|
+
- `OPENAI_API_KEY` for OpenAI
|
|
63
|
+
2. Check API key permissions and quotas
|
|
64
|
+
3. Enable debug mode to see full API responses: `--debug`
|
|
65
|
+
4. For rate limiting, reduce `--max-parallelism` or add delays between checks
|
|
66
|
+
|
|
67
|
+
### Fork PR Permission Errors (403)
|
|
68
|
+
|
|
69
|
+
**Symptoms**: `Resource not accessible by integration` errors for fork PRs.
|
|
70
|
+
|
|
71
|
+
**Cause**: GitHub restricts write permissions for workflows triggered by fork PRs.
|
|
72
|
+
|
|
73
|
+
**Solutions**:
|
|
74
|
+
1. **Accept comment-only mode**: Visor automatically falls back to PR comments
|
|
75
|
+
2. **Enable full fork support**: Use `pull_request_target` trigger (see [GITHUB_CHECKS.md](./GITHUB_CHECKS.md#fork-pr-support))
|
|
76
|
+
|
|
77
|
+
### Remote Extends Not Loading
|
|
78
|
+
|
|
79
|
+
**Symptoms**: Configuration fails to load remote URLs in `extends` field.
|
|
80
|
+
|
|
81
|
+
**Solutions**:
|
|
82
|
+
1. Allow specific URL patterns: `--allowed-remote-patterns "https://github.com/,https://raw.githubusercontent.com/"`
|
|
83
|
+
2. Or disable remote extends entirely: `--no-remote-extends`
|
|
84
|
+
3. Check network connectivity and URL accessibility
|
|
85
|
+
|
|
86
|
+
### Timeout Errors
|
|
87
|
+
|
|
88
|
+
**Symptoms**: Checks fail with timeout messages.
|
|
89
|
+
|
|
90
|
+
**Solutions**:
|
|
91
|
+
1. Increase timeout: `--timeout 300000` (5 minutes in ms)
|
|
92
|
+
2. Reduce check complexity or split into smaller checks
|
|
93
|
+
3. Check for slow network or API responses
|
|
94
|
+
4. See [Timeouts Guide](./timeouts.md) for detailed configuration
|
|
95
|
+
|
|
96
|
+
### Output Access Issues in Checks
|
|
97
|
+
|
|
98
|
+
**Symptoms**: `outputs is undefined` or `Cannot read property` errors.
|
|
99
|
+
|
|
100
|
+
**Solutions**:
|
|
101
|
+
1. Ensure `depends_on` is set for checks that need outputs from other checks:
|
|
102
|
+
```yaml
|
|
103
|
+
steps:
|
|
104
|
+
my-check:
|
|
105
|
+
type: command
|
|
106
|
+
depends_on: [previous-check] # Required to access outputs
|
|
107
|
+
exec: echo "{{ outputs['previous-check'] }}"
|
|
108
|
+
```
|
|
109
|
+
2. Use optional chaining for safe access: `outputs?.['check-name']?.property`
|
|
110
|
+
3. Debug output structure with the `log()` function - see [Debugging Guide](./debugging.md#debugging-javascript-expressions)
|
|
111
|
+
|
|
112
|
+
### forEach Not Iterating
|
|
113
|
+
|
|
114
|
+
**Symptoms**: Check with `forEach: true` runs once instead of iterating.
|
|
115
|
+
|
|
116
|
+
**Solutions**:
|
|
117
|
+
1. Ensure the output is an array (not a single object)
|
|
118
|
+
2. Use `transform_js` to convert output to array format if needed
|
|
119
|
+
3. Debug with `log()` to inspect the actual output structure
|
|
120
|
+
|
|
121
|
+
## GitHub Actions Permissions
|
|
122
|
+
|
|
123
|
+
Required permissions for full functionality:
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
permissions:
|
|
127
|
+
contents: read # Read repository content
|
|
128
|
+
pull-requests: write # Post PR comments
|
|
129
|
+
issues: write # Post issue comments
|
|
130
|
+
checks: write # Create check runs and annotations
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Environment Variables
|
|
134
|
+
|
|
135
|
+
| Variable | Purpose |
|
|
136
|
+
|----------|---------|
|
|
137
|
+
| `VISOR_TELEMETRY_ENABLED` | Enable OpenTelemetry tracing |
|
|
138
|
+
| `VISOR_TELEMETRY_SINK` | Trace output: `file`, `otlp`, or `console` |
|
|
139
|
+
| `DEBUG=1` or `VERBOSE=1` | Enable verbose internal logging |
|
|
140
|
+
| `VISOR_NOBROWSER=true` | Skip auto-opening browser (CI/headless) |
|
|
141
|
+
|
|
142
|
+
## Increasing Verbosity
|
|
143
|
+
|
|
144
|
+
Different verbosity levels for troubleshooting:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Standard verbose mode
|
|
148
|
+
visor --check all --verbose
|
|
149
|
+
|
|
150
|
+
# Full debug mode (includes AI interactions)
|
|
151
|
+
visor --check all --debug
|
|
152
|
+
|
|
153
|
+
# Debug mode in GitHub Action
|
|
154
|
+
- uses: probelabs/visor@v1
|
|
155
|
+
with:
|
|
156
|
+
debug: 'true'
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Validating Configuration
|
|
160
|
+
|
|
161
|
+
Always validate your configuration before running:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Validate config syntax and schema
|
|
165
|
+
visor validate --config .visor.yaml
|
|
166
|
+
|
|
167
|
+
# Test locally with a specific check
|
|
168
|
+
visor --check security --config .visor.yaml --output table
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Further Reading
|
|
172
|
+
|
|
173
|
+
- [Debugging Guide](./debugging.md) - Comprehensive debugging techniques
|
|
174
|
+
- [Configuration Reference](./configuration.md) - Full configuration options
|
|
175
|
+
- [GitHub Checks Integration](./GITHUB_CHECKS.md) - Check runs and annotations
|
|
176
|
+
- [Telemetry Setup](./telemetry-setup.md) - OpenTelemetry tracing
|
|
177
|
+
- [Timeouts Guide](./timeouts.md) - Timeout configuration
|
|
@@ -100,6 +100,8 @@ Available events:
|
|
|
100
100
|
- `issue_opened` - Issue created
|
|
101
101
|
- `issue_comment` - Comment on issue or PR
|
|
102
102
|
- `manual` - CLI execution (no event)
|
|
103
|
+
- `schedule` - Scheduled/cron-triggered execution
|
|
104
|
+
- `webhook_received` - HTTP webhook was received (via http_input provider)
|
|
103
105
|
|
|
104
106
|
---
|
|
105
107
|
|
|
@@ -246,7 +248,7 @@ Output structure: `{ text: string, ts: number }`
|
|
|
246
248
|
|
|
247
249
|
### 5. Log Check (`type: log`)
|
|
248
250
|
|
|
249
|
-
Output messages to the console/log.
|
|
251
|
+
Output messages to the console/log. Useful for debugging workflows and displaying execution information.
|
|
250
252
|
|
|
251
253
|
```yaml
|
|
252
254
|
steps:
|
|
@@ -261,12 +263,14 @@ steps:
|
|
|
261
263
|
- {{ item.name }}: {{ item.status }}
|
|
262
264
|
{% endfor %}
|
|
263
265
|
|
|
264
|
-
level: info # info, warn, error
|
|
266
|
+
level: info # debug, info, warn, error
|
|
265
267
|
include_pr_context: false
|
|
266
268
|
include_dependencies: false
|
|
267
269
|
include_metadata: false
|
|
268
270
|
```
|
|
269
271
|
|
|
272
|
+
Note: The type must be `log` (not `logger`).
|
|
273
|
+
|
|
270
274
|
### 6. Script Check (`type: script`)
|
|
271
275
|
|
|
272
276
|
Execute JavaScript code.
|
|
@@ -617,10 +621,63 @@ steps:
|
|
|
617
621
|
type: ai
|
|
618
622
|
depends_on: [initial-analysis]
|
|
619
623
|
reuse_ai_session: initial-analysis
|
|
620
|
-
session_mode: clone # or '
|
|
624
|
+
session_mode: clone # or 'append'
|
|
621
625
|
prompt: "Now look for security issues in what we discussed"
|
|
622
626
|
```
|
|
623
627
|
|
|
628
|
+
Session modes:
|
|
629
|
+
- `clone` (default): Copy the conversation history to a new session
|
|
630
|
+
- `append`: Share the conversation history (subsequent messages append to the same session)
|
|
631
|
+
|
|
632
|
+
### Transform Output (`transform`, `transform_js`)
|
|
633
|
+
|
|
634
|
+
Transform step outputs before they're consumed by dependent steps:
|
|
635
|
+
|
|
636
|
+
```yaml
|
|
637
|
+
steps:
|
|
638
|
+
fetch-data:
|
|
639
|
+
type: http_client
|
|
640
|
+
url: "https://api.example.com/data"
|
|
641
|
+
# Liquid transform
|
|
642
|
+
transform: |
|
|
643
|
+
{% assign items = response.data.items %}
|
|
644
|
+
{{ items | json }}
|
|
645
|
+
# OR JavaScript transform (alternative)
|
|
646
|
+
transform_js: |
|
|
647
|
+
const data = JSON.parse(output);
|
|
648
|
+
return data.items.filter(i => i.active);
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
### Init Hook (`on_init`)
|
|
652
|
+
|
|
653
|
+
Run preprocessing steps before a step executes:
|
|
654
|
+
|
|
655
|
+
```yaml
|
|
656
|
+
steps:
|
|
657
|
+
ai-review:
|
|
658
|
+
type: ai
|
|
659
|
+
on_init:
|
|
660
|
+
run:
|
|
661
|
+
# Invoke a tool to enrich context
|
|
662
|
+
- tool: fetch-jira
|
|
663
|
+
with:
|
|
664
|
+
issue_key: "{{ pr.body | regex_search: '[A-Z]+-[0-9]+' }}"
|
|
665
|
+
as: jira_context
|
|
666
|
+
# Or invoke another step
|
|
667
|
+
- step: enrich-context
|
|
668
|
+
as: extra_context
|
|
669
|
+
prompt: |
|
|
670
|
+
Review the code with this context:
|
|
671
|
+
JIRA: {{ outputs['jira_context'] | json }}
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
The `on_init` hook allows:
|
|
675
|
+
- `run`: Array of tool invocations, step invocations, or workflow invocations
|
|
676
|
+
- `run_js`: Dynamic computation of what to run
|
|
677
|
+
- `transitions`: Declarative routing rules
|
|
678
|
+
|
|
679
|
+
See [on_init Hook RFC](./rfc/on_init-hook.md) for detailed documentation.
|
|
680
|
+
|
|
624
681
|
---
|
|
625
682
|
|
|
626
683
|
## Testing DSL
|
|
@@ -1271,4 +1328,45 @@ visor test --list
|
|
|
1271
1328
|
|
|
1272
1329
|
# Validate tests only
|
|
1273
1330
|
visor test --validate
|
|
1331
|
+
|
|
1332
|
+
# Simulate event
|
|
1333
|
+
visor --config workflow.yaml --event pr_opened
|
|
1274
1334
|
```
|
|
1335
|
+
|
|
1336
|
+
---
|
|
1337
|
+
|
|
1338
|
+
## Related Documentation
|
|
1339
|
+
|
|
1340
|
+
For more detailed information on specific topics:
|
|
1341
|
+
|
|
1342
|
+
### Core Concepts
|
|
1343
|
+
- [Configuration Reference](./configuration.md) - Full configuration options
|
|
1344
|
+
- [Event Triggers](./event-triggers.md) - Event types and filtering
|
|
1345
|
+
- [Dependencies](./dependencies.md) - Dependency patterns and execution order
|
|
1346
|
+
- [Failure Routing](./failure-routing.md) - Retry, remediation, and routing
|
|
1347
|
+
|
|
1348
|
+
### Providers
|
|
1349
|
+
- [AI Configuration](./ai-configuration.md) - AI provider settings
|
|
1350
|
+
- [Claude Code](./claude-code.md) - Claude Code provider details
|
|
1351
|
+
- [MCP Provider](./mcp-provider.md) - MCP tool integration
|
|
1352
|
+
- [Command Provider](./command-provider.md) - Shell command execution
|
|
1353
|
+
- [HTTP Provider](./http.md) - HTTP client and webhooks
|
|
1354
|
+
- [Git Checkout](./providers/git-checkout.md) - Repository checkout
|
|
1355
|
+
- [Memory](./memory.md) - State persistence
|
|
1356
|
+
- [Script](./script.md) - JavaScript execution
|
|
1357
|
+
|
|
1358
|
+
### Testing
|
|
1359
|
+
- [Testing Getting Started](./testing/getting-started.md) - Quick start for testing
|
|
1360
|
+
- [Testing DSL Reference](./testing/dsl-reference.md) - Complete test syntax
|
|
1361
|
+
- [Fixtures and Mocks](./testing/fixtures-and-mocks.md) - Test data setup
|
|
1362
|
+
- [Assertions](./testing/assertions.md) - Assertion syntax
|
|
1363
|
+
|
|
1364
|
+
### Advanced Topics
|
|
1365
|
+
- [Workflow Style Guide](./guides/workflow-style-guide.md) - Best practices
|
|
1366
|
+
- [Criticality Modes](./guides/criticality-modes.md) - Safety levels
|
|
1367
|
+
- [Fault Management](./guides/fault-management-and-contracts.md) - Contracts and guards
|
|
1368
|
+
- [on_init Hook](./rfc/on_init-hook.md) - Context preprocessing
|
|
1369
|
+
- [Output History](./output-history.md) - Accessing historical outputs
|
|
1370
|
+
- [Tag Filtering](./tag-filtering.md) - Selective execution
|
|
1371
|
+
- [Liquid Templates](./liquid-templates.md) - Template syntax
|
|
1372
|
+
- [Debugging](./debugging.md) - Troubleshooting workflows
|