@wardby/cli 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/local/docker-compose.quickstart-coding.yml +13 -0
- package/dist/claude-coding-worker/driver.d.ts +21 -3
- package/dist/claude-coding-worker/driver.js +125 -17
- package/dist/claude-coding-worker/main.js +34 -6
- package/dist/claude-coding-worker/sdk.js +12 -1
- package/dist/claude-coding-worker/tool-socket.d.ts +27 -0
- package/dist/claude-coding-worker/tool-socket.js +111 -0
- package/dist/claude-coding-worker/transcript.d.ts +18 -0
- package/dist/claude-coding-worker/transcript.js +77 -0
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +1 -0
- package/dist/cli.js +24 -10
- package/dist/coding/continuation-wording.d.ts +35 -0
- package/dist/coding/continuation-wording.js +73 -0
- package/dist/coding/linked-issue-note.d.ts +23 -0
- package/dist/coding/linked-issue-note.js +47 -0
- package/dist/coding/merge-wording.d.ts +28 -0
- package/dist/coding/merge-wording.js +78 -0
- package/dist/coding/pr-description-note.d.ts +9 -0
- package/dist/coding/pr-description-note.js +32 -0
- package/dist/coding/profile.d.ts +46 -126
- package/dist/coding/profile.js +45 -4
- package/dist/coding/protected-path-wording.d.ts +8 -0
- package/dist/coding/protected-path-wording.js +1 -1
- package/dist/coding/protocol.d.ts +264 -346
- package/dist/coding/protocol.js +235 -12
- package/dist/coding/redact.d.ts +3 -0
- package/dist/coding/redact.js +12 -0
- package/dist/coding/registry/allowlist.d.ts +12 -0
- package/dist/coding/registry/allowlist.js +14 -1
- package/dist/coding/registry/audit-mode.d.ts +153 -0
- package/dist/coding/registry/audit-mode.js +304 -0
- package/dist/coding/registry/lockfile-shared.d.ts +36 -0
- package/dist/coding/registry/lockfile-shared.js +128 -0
- package/dist/coding/registry/lockfiles.js +1 -1
- package/dist/coding/registry/npm-lockfile-formats.d.ts +11 -0
- package/dist/coding/registry/npm-lockfile-formats.js +41 -0
- package/dist/coding/registry/npm-lockfile.d.ts +8 -4
- package/dist/coding/registry/npm-lockfile.js +4 -6
- package/dist/coding/registry/npm.js +78 -8
- package/dist/coding/registry/pnpm-lockfile.d.ts +17 -0
- package/dist/coding/registry/pnpm-lockfile.js +189 -0
- package/dist/coding/registry/pypi-plan.d.ts +50 -0
- package/dist/coding/registry/pypi-plan.js +406 -0
- package/dist/coding/registry/pypi-requirements.d.ts +58 -0
- package/dist/coding/registry/pypi-requirements.js +155 -0
- package/dist/coding/registry/pypi.d.ts +3 -27
- package/dist/coding/registry/pypi.js +40 -154
- package/dist/coding/registry/refusal-hints.d.ts +20 -0
- package/dist/coding/registry/refusal-hints.js +61 -0
- package/dist/coding/registry/refusal-wording.d.ts +11 -0
- package/dist/coding/registry/refusal-wording.js +56 -0
- package/dist/coding/registry/report.d.ts +70 -8
- package/dist/coding/registry/report.js +112 -5
- package/dist/coding/registry/types.d.ts +58 -8
- package/dist/coding/registry/yarn-lockfile.d.ts +30 -0
- package/dist/coding/registry/yarn-lockfile.js +367 -0
- package/dist/coding/services/catalog.d.ts +37 -351
- package/dist/coding/transcript/claude-code.d.ts +13 -0
- package/dist/coding/transcript/claude-code.js +273 -0
- package/dist/coding/transcript/download-protocol.d.ts +30 -0
- package/dist/coding/transcript/download-protocol.js +18 -0
- package/dist/coding/transcript/format.d.ts +20 -0
- package/dist/coding/transcript/format.js +32 -0
- package/dist/coding/transcript/recorder.d.ts +51 -0
- package/dist/coding/transcript/recorder.js +225 -0
- package/dist/coding/transcript/resume/checkout.d.ts +31 -0
- package/dist/coding/transcript/resume/checkout.js +203 -0
- package/dist/coding/transcript/resume/command.d.ts +17 -0
- package/dist/coding/transcript/resume/command.js +176 -0
- package/dist/coding/transcript/resume/download.d.ts +20 -0
- package/dist/coding/transcript/resume/download.js +153 -0
- package/dist/coding/transcript/resume/launch.d.ts +38 -0
- package/dist/coding/transcript/resume/launch.js +128 -0
- package/dist/coding/transcript/resume/session-file.d.ts +13 -0
- package/dist/coding/transcript/resume/session-file.js +79 -0
- package/dist/coding/transcript/resume/stand-in.d.ts +11 -0
- package/dist/coding/transcript/resume/stand-in.js +49 -0
- package/dist/coding-worker/artifact.d.ts +8 -3
- package/dist/coding-worker/artifact.js +3 -1
- package/dist/coding-worker/debug-trace.d.ts +6 -5
- package/dist/coding-worker/debug-trace.js +13 -18
- package/dist/coding-worker/dependency-cache.d.mts +229 -0
- package/dist/coding-worker/dependency-cache.mjs +2123 -0
- package/dist/coding-worker/driver.d.ts +4 -3
- package/dist/coding-worker/driver.js +116 -38
- package/dist/coding-worker/errors.d.ts +1 -0
- package/dist/coding-worker/errors.js +32 -0
- package/dist/coding-worker/task-note.d.ts +11 -0
- package/dist/coding-worker/task-note.js +13 -0
- package/dist/coding-worker/types.d.ts +11 -0
- package/dist/config/dependency-cache.d.ts +23 -0
- package/dist/config/dependency-cache.js +32 -0
- package/dist/config/providers.d.ts +12 -3
- package/dist/config/providers.js +55 -5
- package/dist/config/test-simulators.d.ts +82 -0
- package/dist/config/test-simulators.js +305 -0
- package/dist/core/async-context.d.ts +2 -0
- package/dist/core/async-context.js +12 -0
- package/dist/core/budget-events.d.ts +108 -0
- package/dist/core/budget-events.js +346 -0
- package/dist/core/budget-groups.d.ts +50 -1
- package/dist/core/budget-groups.js +236 -27
- package/dist/core/budget-stopped-head.d.ts +46 -0
- package/dist/core/budget-stopped-head.js +81 -0
- package/dist/core/budget-topup.d.ts +51 -0
- package/dist/core/budget-topup.js +156 -0
- package/dist/core/budget-wording.d.ts +16 -2
- package/dist/core/budget-wording.js +40 -2
- package/dist/core/coding-queue.d.ts +2 -1
- package/dist/core/coding-queue.js +7 -0
- package/dist/core/cron.d.ts +19 -1
- package/dist/core/cron.js +17 -0
- package/dist/core/datastores.js +1 -1
- package/dist/core/deferred-coding.d.ts +14 -0
- package/dist/core/deferred-coding.js +62 -0
- package/dist/core/delegation-child.d.ts +25 -0
- package/dist/core/delegation-child.js +37 -0
- package/dist/core/dispatch.d.ts +42 -0
- package/dist/core/dispatch.js +131 -56
- package/dist/core/engine-native.js +1 -1
- package/dist/core/error-code.d.ts +38 -0
- package/dist/core/error-code.js +168 -0
- package/dist/core/grants.d.ts +19 -6
- package/dist/core/grants.js +55 -6
- package/dist/core/host-events.d.ts +18 -2
- package/dist/core/host-events.js +284 -24
- package/dist/core/host-status.d.ts +85 -3
- package/dist/core/host-status.js +298 -20
- package/dist/core/issue-bridge.d.ts +50 -6
- package/dist/core/issue-bridge.js +124 -33
- package/dist/core/issue-events.d.ts +1 -1
- package/dist/core/issue-events.js +4 -10
- package/dist/core/issue-status.d.ts +1 -1
- package/dist/core/issue-status.js +54 -26
- package/dist/core/logger.d.ts +5 -0
- package/dist/core/logger.js +14 -1
- package/dist/core/lost-run-children.d.ts +6 -0
- package/dist/core/lost-run-children.js +32 -0
- package/dist/core/mark-ready.d.ts +34 -0
- package/dist/core/mark-ready.js +152 -0
- package/dist/core/markdown-code.d.ts +8 -0
- package/dist/core/markdown-code.js +107 -0
- package/dist/core/memory-tools.js +7 -0
- package/dist/core/merge-order-check.d.ts +2 -1
- package/dist/core/merge-order-check.js +8 -1
- package/dist/core/notification-templates.d.ts +1 -7
- package/dist/core/notification-templates.js +36 -2
- package/dist/core/pull-request-state-sync.js +2 -2
- package/dist/core/reconciler.d.ts +4 -3
- package/dist/core/reconciler.js +8 -1
- package/dist/core/related-pull-requests.d.ts +11 -3
- package/dist/core/related-pull-requests.js +27 -14
- package/dist/core/reply-parts.d.ts +21 -0
- package/dist/core/reply-parts.js +73 -0
- package/dist/core/review-fix.d.ts +1 -1
- package/dist/core/review-fix.js +2 -1
- package/dist/core/review-host-checks.d.ts +1 -1
- package/dist/core/review-host-tools.d.ts +3 -0
- package/dist/core/review-host-tools.js +99 -13
- package/dist/core/review-reads.d.ts +55 -0
- package/dist/core/review-reads.js +233 -0
- package/dist/core/run-status.d.ts +12 -0
- package/dist/core/run-status.js +12 -0
- package/dist/core/runner.d.ts +80 -34
- package/dist/core/runner.js +439 -144
- package/dist/core/schedule-start.d.ts +12 -0
- package/dist/core/schedule-start.js +14 -0
- package/dist/core/secret-broker-config.d.ts +10 -74
- package/dist/core/secret-guard.d.ts +46 -0
- package/dist/core/secret-guard.js +104 -0
- package/dist/core/secret-guarded-stores.d.ts +12 -0
- package/dist/core/secret-guarded-stores.js +41 -0
- package/dist/core/secret-spans.d.ts +50 -0
- package/dist/core/secret-spans.js +94 -0
- package/dist/core/stop-run.d.ts +46 -0
- package/dist/core/stop-run.js +61 -0
- package/dist/core/workflow-events.d.ts +14 -2
- package/dist/core/workflow-events.js +4 -0
- package/dist/core/workflow-run-events.d.ts +5 -3
- package/dist/core/workflow-run-events.js +43 -8
- package/dist/core/zod-json-schema.d.ts +4 -0
- package/dist/core/zod-json-schema.js +39 -0
- package/dist/core/zod3-window.d.ts +35 -0
- package/dist/core/zod3-window.js +124 -0
- package/dist/generated/prisma/browser.d.ts +34 -3
- package/dist/generated/prisma/client.d.ts +34 -3
- package/dist/generated/prisma/commonInputTypes.d.ts +220 -60
- package/dist/generated/prisma/enums.d.ts +10 -0
- package/dist/generated/prisma/enums.js +8 -0
- package/dist/generated/prisma/internal/class.d.ts +44 -0
- package/dist/generated/prisma/internal/class.js +4 -4
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +428 -9
- package/dist/generated/prisma/internal/prismaNamespace.js +92 -1
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +95 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +92 -1
- package/dist/generated/prisma/models/Agent.d.ts +106 -8
- package/dist/generated/prisma/models/AgentRepository.d.ts +42 -1
- package/dist/generated/prisma/models/CodingAgentProfile.d.ts +229 -1
- package/dist/generated/prisma/models/CodingProxyRequest.d.ts +207 -3
- package/dist/generated/prisma/models/CodingProxySession.d.ts +114 -1
- package/dist/generated/prisma/models/CodingRun.d.ts +1637 -1
- package/dist/generated/prisma/models/DependencySnapshot.d.ts +1668 -0
- package/dist/generated/prisma/models/DependencySnapshot.js +1 -0
- package/dist/generated/prisma/models/IssuePullRequest.d.ts +6 -2
- package/dist/generated/prisma/models/LocalReview.d.ts +40 -1
- package/dist/generated/prisma/models/NativeGatewayCall.d.ts +39 -1
- package/dist/generated/prisma/models/NativeGatewaySession.d.ts +35 -1
- package/dist/generated/prisma/models/RegistryAllowance.d.ts +41 -1
- package/dist/generated/prisma/models/RegistryApprovedVersion.d.ts +75 -1
- package/dist/generated/prisma/models/RegistryAuditRecord.d.ts +1364 -0
- package/dist/generated/prisma/models/RegistryAuditRecord.js +1 -0
- package/dist/generated/prisma/models/Run.d.ts +738 -2
- package/dist/generated/prisma/models/RunBudgetEvent.d.ts +1211 -0
- package/dist/generated/prisma/models/RunBudgetEvent.js +1 -0
- package/dist/generated/prisma/models/RunTranscript.d.ts +1339 -0
- package/dist/generated/prisma/models/RunTranscript.js +1 -0
- package/dist/generated/prisma/models.d.ts +4 -0
- package/dist/help-index.json +1320 -69
- package/dist/import/create.js +32 -3
- package/dist/import/neutral-schema.d.ts +50 -281
- package/dist/import/neutral-schema.js +5 -4
- package/dist/knowledge/check.d.ts +1 -1
- package/dist/knowledge/cli.d.ts +11 -1
- package/dist/knowledge/cli.js +37 -4
- package/dist/knowledge/concept.d.ts +3 -19
- package/dist/knowledge/location.d.ts +31 -0
- package/dist/knowledge/location.js +78 -0
- package/dist/mcp/auth/access.d.ts +10 -2
- package/dist/mcp/auth/access.js +15 -1
- package/dist/mcp/auth/ownership.d.ts +7 -7
- package/dist/mcp/auth/self-hosted/credentials.d.ts +3 -3
- package/dist/mcp/auth/self-hosted/session.d.ts +2 -2
- package/dist/mcp/host-events/github-ingress.d.ts +2 -0
- package/dist/mcp/host-events/github-ingress.js +2 -1
- package/dist/mcp/index.d.ts +6 -0
- package/dist/mcp/index.js +58 -10
- package/dist/mcp/server.d.ts +13 -0
- package/dist/mcp/server.js +33 -14
- package/dist/mcp/tools/agents.d.ts +4 -0
- package/dist/mcp/tools/agents.js +198 -16
- package/dist/mcp/tools/datastore.js +17 -8
- package/dist/mcp/tools/grants.js +9 -3
- package/dist/mcp/tools/memory.js +11 -1
- package/dist/mcp/tools/notification-channels.js +2 -2
- package/dist/mcp/tools/packages.d.ts +2 -0
- package/dist/mcp/tools/packages.js +195 -0
- package/dist/mcp/tools/repositories.js +18 -5
- package/dist/mcp/tools/run-access.d.ts +16 -0
- package/dist/mcp/tools/run-access.js +25 -0
- package/dist/mcp/tools/run-transcript-download.d.ts +30 -0
- package/dist/mcp/tools/run-transcript-download.js +129 -0
- package/dist/mcp/tools/run-transcript.d.ts +19 -0
- package/dist/mcp/tools/run-transcript.js +70 -0
- package/dist/mcp/tools/runs.js +34 -12
- package/dist/mcp/tools/scheduling.js +3 -1
- package/dist/mcp/tools/secret-elicitation-form.js +5 -0
- package/dist/mcp/tools/secret-elicitation-server.d.ts +6 -0
- package/dist/mcp/tools/secret-elicitation-server.js +10 -61
- package/dist/mcp/tools/secrets.js +2 -2
- package/dist/mcp/tools/stop-run.d.ts +2 -0
- package/dist/mcp/tools/stop-run.js +82 -0
- package/dist/mcp/tools/subagents.js +2 -2
- package/dist/mcp/tools/tools.d.ts +1 -1
- package/dist/mcp/tools/tools.js +25 -9
- package/dist/mcp/transport/stdio-link-host.d.ts +20 -0
- package/dist/mcp/transport/stdio-link-host.js +67 -0
- package/dist/mcp/transport/streamable-http.d.ts +13 -0
- package/dist/mcp/transport/streamable-http.js +41 -1
- package/dist/native-worker/docker-launcher.d.ts +38 -2
- package/dist/native-worker/docker-launcher.js +65 -5
- package/dist/native-worker/gateway-server.d.ts +41 -3
- package/dist/native-worker/gateway-server.js +124 -27
- package/dist/native-worker/gateway.d.ts +27 -1
- package/dist/native-worker/gateway.js +70 -4
- package/dist/native-worker/http-server.d.ts +3 -1
- package/dist/native-worker/http-server.js +11 -7
- package/dist/native-worker/http-transport.js +1 -1
- package/dist/native-worker/kubernetes-launcher.d.ts +7 -3
- package/dist/native-worker/kubernetes-launcher.js +43 -3
- package/dist/native-worker/launch.d.ts +18 -1
- package/dist/native-worker/launch.js +6 -1
- package/dist/native-worker/ledger.d.ts +18 -2
- package/dist/native-worker/ledger.js +57 -4
- package/dist/native-worker/loopback.js +3 -8
- package/dist/native-worker/main.d.ts +2 -1
- package/dist/native-worker/main.js +14 -3
- package/dist/native-worker/protocol.d.ts +129 -577
- package/dist/native-worker/protocol.js +47 -1
- package/dist/native-worker/sandbox-executor.d.ts +17 -2
- package/dist/native-worker/sandbox-executor.js +78 -4
- package/dist/native-worker/stderr-redaction.d.ts +77 -0
- package/dist/native-worker/stderr-redaction.js +237 -0
- package/dist/native-worker/stdio.d.ts +1 -1
- package/dist/native-worker/stdio.js +6 -5
- package/dist/native-worker/warm-pool.d.ts +2 -2
- package/dist/native-worker/warm-pool.js +4 -4
- package/dist/native-worker/worker.js +28 -2
- package/dist/observability/metrics.js +6 -1
- package/dist/providers/auth/self-hosted.d.ts +1 -1
- package/dist/providers/coding-proxy/dependency-cache/eviction.d.ts +29 -0
- package/dist/providers/coding-proxy/dependency-cache/eviction.js +87 -0
- package/dist/providers/coding-proxy/dependency-cache/key.d.ts +33 -0
- package/dist/providers/coding-proxy/dependency-cache/key.js +86 -0
- package/dist/providers/coding-proxy/dependency-cache/model-request-seal.d.ts +18 -0
- package/dist/providers/coding-proxy/dependency-cache/model-request-seal.js +40 -0
- package/dist/providers/coding-proxy/dependency-cache/prisma-store.d.ts +25 -0
- package/dist/providers/coding-proxy/dependency-cache/prisma-store.js +131 -0
- package/dist/providers/coding-proxy/dependency-cache/service.d.ts +70 -0
- package/dist/providers/coding-proxy/dependency-cache/service.js +409 -0
- package/dist/providers/coding-proxy/dependency-cache/store.d.ts +85 -0
- package/dist/providers/coding-proxy/dependency-cache/store.js +95 -0
- package/dist/providers/coding-proxy/hold.d.ts +32 -0
- package/dist/providers/coding-proxy/hold.js +86 -0
- package/dist/providers/coding-proxy/interrupted.d.ts +70 -0
- package/dist/providers/coding-proxy/interrupted.js +104 -0
- package/dist/providers/coding-proxy/memory-ledger.d.ts +15 -2
- package/dist/providers/coding-proxy/memory-ledger.js +84 -8
- package/dist/providers/coding-proxy/metering.d.ts +16 -0
- package/dist/providers/coding-proxy/metering.js +27 -4
- package/dist/providers/coding-proxy/prisma-ledger.d.ts +15 -2
- package/dist/providers/coding-proxy/prisma-ledger.js +179 -67
- package/dist/providers/coding-proxy/proxy.d.ts +14 -1
- package/dist/providers/coding-proxy/proxy.js +166 -14
- package/dist/providers/coding-proxy/registry/audit.d.ts +53 -10
- package/dist/providers/coding-proxy/registry/audit.js +94 -17
- package/dist/providers/coding-proxy/registry/lockfile-parse-worker.d.ts +36 -0
- package/dist/providers/coding-proxy/registry/lockfile-parse-worker.js +67 -0
- package/dist/providers/coding-proxy/registry/lockfile-parse.d.ts +16 -0
- package/dist/providers/coding-proxy/registry/lockfile-parse.js +110 -0
- package/dist/providers/coding-proxy/registry/plan.d.ts +9 -0
- package/dist/providers/coding-proxy/registry/plan.js +201 -48
- package/dist/providers/coding-proxy/registry/prisma-store.d.ts +11 -5
- package/dist/providers/coding-proxy/registry/prisma-store.js +120 -17
- package/dist/providers/coding-proxy/registry/service.d.ts +97 -16
- package/dist/providers/coding-proxy/registry/service.js +579 -112
- package/dist/providers/coding-proxy/registry/store.d.ts +84 -9
- package/dist/providers/coding-proxy/registry/store.js +54 -1
- package/dist/providers/coding-proxy/runtime.d.ts +4 -0
- package/dist/providers/coding-proxy/runtime.js +78 -16
- package/dist/providers/coding-proxy/server.d.ts +6 -1
- package/dist/providers/coding-proxy/server.js +45 -1
- package/dist/providers/coding-proxy/types.d.ts +65 -1
- package/dist/providers/datastore/types.d.ts +5 -0
- package/dist/providers/engine/types.d.ts +17 -2
- package/dist/providers/engine/types.js +17 -0
- package/dist/providers/executor/composition.d.ts +10 -3
- package/dist/providers/executor/composition.js +47 -7
- package/dist/providers/executor/container.d.ts +361 -8
- package/dist/providers/executor/container.js +1136 -91
- package/dist/providers/executor/dbos-status.d.ts +31 -0
- package/dist/providers/executor/dbos-status.js +64 -0
- package/dist/providers/executor/dbos.d.ts +50 -1
- package/dist/providers/executor/dbos.js +207 -20
- package/dist/providers/executor/deferred.d.ts +12 -24
- package/dist/providers/executor/deferred.js +10 -29
- package/dist/providers/executor/in-process.d.ts +9 -1
- package/dist/providers/executor/in-process.js +14 -4
- package/dist/providers/executor/linked-issue-reader.d.ts +16 -0
- package/dist/providers/executor/linked-issue-reader.js +30 -0
- package/dist/providers/executor/routing.d.ts +2 -0
- package/dist/providers/executor/routing.js +4 -0
- package/dist/providers/executor/types.d.ts +13 -0
- package/dist/providers/index.d.ts +2 -1
- package/dist/providers/issue-tracker/types.d.ts +17 -0
- package/dist/providers/issue-tracker/types.js +39 -1
- package/dist/providers/jobs/claude-tool-setup.d.ts +4 -0
- package/dist/providers/jobs/claude-tool-setup.js +5 -2
- package/dist/providers/jobs/docker-isolation.d.ts +8 -0
- package/dist/providers/jobs/docker-isolation.js +17 -0
- package/dist/providers/jobs/docker.d.ts +1 -0
- package/dist/providers/jobs/docker.js +27 -2
- package/dist/providers/jobs/fake-kubernetes-api.d.ts +2 -0
- package/dist/providers/jobs/fake-kubernetes-api.js +3 -0
- package/dist/providers/jobs/kubernetes-api.d.ts +8 -0
- package/dist/providers/jobs/kubernetes-api.js +10 -0
- package/dist/providers/jobs/kubernetes-client.js +10 -1
- package/dist/providers/jobs/kubernetes-isolation.d.ts +2 -0
- package/dist/providers/jobs/kubernetes-isolation.js +17 -1
- package/dist/providers/jobs/kubernetes.d.ts +6 -1
- package/dist/providers/jobs/kubernetes.js +105 -16
- package/dist/providers/jobs/types.d.ts +33 -0
- package/dist/providers/jobs/types.js +13 -1
- package/dist/providers/llm/anthropic.js +5 -1
- package/dist/providers/llm/bedrock.d.ts +0 -12
- package/dist/providers/llm/bedrock.js +4 -0
- package/dist/providers/llm/claude-messages.d.ts +3 -1
- package/dist/providers/llm/claude-messages.js +4 -1
- package/dist/providers/llm/claude-provider.d.ts +2 -2
- package/dist/providers/llm/claude-provider.js +2 -2
- package/dist/providers/llm/openai.d.ts +2 -2
- package/dist/providers/llm/openai.js +6 -2
- package/dist/providers/llm/routing.d.ts +2 -2
- package/dist/providers/llm/routing.js +2 -2
- package/dist/providers/llm/types.d.ts +12 -2
- package/dist/providers/review-host/github-events.d.ts +9 -1
- package/dist/providers/review-host/github-events.js +34 -12
- package/dist/providers/review-host/github.d.ts +29 -2
- package/dist/providers/review-host/github.js +224 -29
- package/dist/providers/review-host/local.d.ts +8 -4
- package/dist/providers/review-host/local.js +49 -31
- package/dist/providers/review-host/patch-pages.d.ts +41 -0
- package/dist/providers/review-host/patch-pages.js +176 -0
- package/dist/providers/review-host/review-format.d.ts +19 -1
- package/dist/providers/review-host/review-format.js +38 -7
- package/dist/providers/review-host/types.d.ts +134 -2
- package/dist/providers/review-host/types.js +8 -0
- package/dist/providers/storage/gcs.d.ts +63 -0
- package/dist/providers/storage/gcs.js +69 -0
- package/dist/providers/storage/index.d.ts +15 -0
- package/dist/providers/storage/index.js +14 -0
- package/dist/providers/storage/local.d.ts +24 -0
- package/dist/providers/storage/local.js +92 -0
- package/dist/providers/storage/meter.d.ts +14 -0
- package/dist/providers/storage/meter.js +34 -0
- package/dist/providers/storage/s3.d.ts +41 -0
- package/dist/providers/storage/s3.js +107 -0
- package/dist/providers/storage/types.d.ts +37 -3
- package/dist/providers/storage/types.js +21 -4
- package/dist/providers/vcs/git.d.ts +33 -2
- package/dist/providers/vcs/git.js +324 -22
- package/dist/providers/vcs/github-remote.d.ts +26 -3
- package/dist/providers/vcs/github-remote.js +124 -14
- package/dist/providers/vcs/github.d.ts +214 -6
- package/dist/providers/vcs/github.js +447 -45
- package/dist/providers/vcs/index.js +8 -1
- package/dist/providers/vcs/pr-description.d.ts +127 -0
- package/dist/providers/vcs/pr-description.js +270 -0
- package/dist/providers/vcs/remote.d.ts +33 -1
- package/dist/providers/vcs/routing.d.ts +4 -2
- package/dist/providers/vcs/routing.js +6 -0
- package/dist/providers/vcs/types.d.ts +80 -3
- package/dist/quickstart/coding-seed.d.ts +14 -3
- package/dist/quickstart/coding-seed.js +213 -4
- package/dist/quickstart/reviewer-prompt.d.ts +1 -1
- package/dist/quickstart/reviewer-prompt.js +6 -6
- package/dist/quickstart-images.json +1 -1
- package/dist/sandbox/generated/zod.bundle.js +62 -1
- package/dist/sandbox/generated/zod3.bundle.js +5 -0
- package/dist/sandbox/host-functions.d.ts +1 -0
- package/dist/sandbox/host-functions.js +6 -11
- package/dist/sandbox/secret-broker.js +3 -4
- package/dist/sandbox/tool-capabilities.d.ts +10 -30
- package/dist/sandbox/zod-params.d.ts +37 -5
- package/dist/sandbox/zod-params.js +181 -26
- package/dist/serve.js +8 -1
- package/dist/viewer/api-schema.d.ts +349 -2627
- package/dist/viewer/api-schema.js +7 -0
- package/dist/viewer/build-schemas.js +6 -2
- package/dist/viewer/openapi.js +2 -4
- package/dist/wardby-bin.js +10 -0
- package/docs/agent-recipes.md +58 -20
- package/docs/code-review-agents.md +551 -41
- package/docs/coding-agent-setup.md +489 -7
- package/docs/coding-packages.md +1033 -90
- package/docs/coding-services.md +27 -12
- package/docs/coding-worker-byo-images.md +20 -0
- package/docs/coding-worker-isolation.md +105 -30
- package/docs/getting-started-gke.md +124 -137
- package/docs/getting-started-identity-provider.md +10 -1
- package/docs/getting-started.md +9 -0
- package/docs/jira-agents.md +17 -8
- package/docs/knowledge/blob-not-found-semantics.md +41 -0
- package/docs/knowledge/bounded-file-descriptor.md +52 -0
- package/docs/knowledge/delegation-admission-slots.md +52 -0
- package/docs/knowledge/http-dispatcher-bootstrap.md +61 -0
- package/docs/knowledge/import-rename-target.md +52 -0
- package/docs/knowledge/index.md +57 -0
- package/docs/knowledge/log.md +9 -0
- package/docs/knowledge/mcp-cancelled-task-precedence.md +41 -0
- package/docs/knowledge/mcp-http-prompt-discovery.md +41 -0
- package/docs/knowledge/mcp-schema-module-boundary.md +41 -0
- package/docs/knowledge/nullable-tool-uniqueness.md +52 -0
- package/docs/knowledge/overview-cli.md +74 -0
- package/docs/knowledge/overview-coding-proxy.md +72 -0
- package/docs/knowledge/overview-coding.md +72 -0
- package/docs/knowledge/overview-config.md +60 -0
- package/docs/knowledge/overview-core.md +72 -0
- package/docs/knowledge/overview-deploy.md +83 -0
- package/docs/knowledge/overview-mcp.md +61 -0
- package/docs/knowledge/overview-prisma.md +72 -0
- package/docs/knowledge/overview-providers.md +89 -0
- package/docs/knowledge/overview-sandbox.md +83 -0
- package/docs/knowledge/overview-surfaces.md +83 -0
- package/docs/knowledge/private-datastore-shared-boundary.md +54 -0
- package/docs/knowledge/proxy-settlement-projections.md +41 -0
- package/docs/knowledge/run-pricing-first-writer.md +43 -0
- package/docs/knowledge/schedule-claim-transaction.md +41 -0
- package/docs/knowledge/secret-entry-replica-contract.md +52 -0
- package/docs/knowledge/terminal-run-first-writer.md +41 -0
- package/docs/knowledge/transactional-agent-authorization.md +52 -0
- package/docs/knowledge/viewer-notify-write-isolation.md +30 -0
- package/docs/knowledge/warm-input-publication.md +30 -0
- package/docs/knowledge/workspace-staging-failure.md +54 -0
- package/docs/knowledge.md +54 -14
- package/docs/native-sandbox.md +119 -23
- package/docs/observability.md +4 -0
- package/docs/security-deployment.md +33 -2
- package/docs/slack-notifications.md +35 -19
- package/docs/tool-secrets.md +42 -10
- package/docs/viewer-api.openapi.yml +1 -1
- package/help/admin-viewer.md +24 -2
- package/help/architecture-agent.md +11 -6
- package/help/build-worker-image.md +3 -1
- package/help/builder-agent.md +19 -6
- package/help/code-review-agents.md +177 -6
- package/help/coding-packages.md +156 -6
- package/help/cost-attribution.md +9 -5
- package/help/creating-agents.md +14 -1
- package/help/dependency-cache.md +143 -0
- package/help/deploy-gke.md +15 -8
- package/help/errors/budget-exhausted.md +187 -0
- package/help/errors/budget-group-exhausted.md +5 -1
- package/help/errors/coding-stream-quota-exceeded.md +33 -0
- package/help/errors/coding-workspace-disk-exceeds-limit.md +39 -0
- package/help/errors/continuation-closed.md +9 -12
- package/help/errors/delegation-conflict.md +24 -0
- package/help/errors/file-list-truncated.md +45 -0
- package/help/errors/full-read-required.md +49 -0
- package/help/errors/github-account-not-allowed.md +4 -0
- package/help/errors/graph-incomplete.md +43 -0
- package/help/errors/graph-limit.md +43 -0
- package/help/errors/merge-conflict.md +49 -0
- package/help/errors/native-sandbox-gateway-error.md +20 -0
- package/help/errors/native-sandbox-launch-abandoned.md +21 -0
- package/help/errors/native-sandbox-worker-exited.md +3 -2
- package/help/errors/package-not-allowed-pending.md +52 -0
- package/help/errors/package-not-allowed.md +51 -0
- package/help/errors/package-refusals.md +43 -0
- package/help/errors/patch-cursor-malformed.md +31 -0
- package/help/errors/run-lost.md +39 -0
- package/help/errors/run-transcript-download.md +44 -0
- package/help/errors/secret-in-value.md +69 -0
- package/help/errors/target-merge.md +40 -0
- package/help/fix-merge-conflicts.md +73 -0
- package/help/github-app-setup.md +132 -0
- package/help/github.md +22 -0
- package/help/identity-and-access.md +2 -0
- package/help/jira.md +23 -6
- package/help/knowledge.md +16 -7
- package/help/local-repositories.md +1 -1
- package/help/low-power-mode.md +7 -1
- package/help/merge-order-check.md +5 -0
- package/help/native-capabilities.md +29 -1
- package/help/native-sandbox.md +15 -1
- package/help/operating-agents.md +5 -0
- package/help/package-audit-mode.md +91 -0
- package/help/related-pull-requests.md +10 -7
- package/help/resume-runs-locally.md +131 -0
- package/help/review-fix-rounds.md +33 -1
- package/help/sharing-agents.md +59 -0
- package/help/slack-notifications.md +19 -5
- package/help/status-comments.md +31 -0
- package/help/stop-run.md +58 -0
- package/help/troubleshooting/budgets.md +28 -0
- package/help/troubleshooting/coding-workers.md +78 -7
- package/package.json +17 -10
- package/prisma/migrations/20261016000000_registry_approved_accepted_advisories/migration.sql +3 -0
- package/prisma/migrations/20261016000001_mark_ready_when_passing/migration.sql +3 -0
- package/prisma/migrations/20261017000000_debug_trace_max_mb/migration.sql +4 -0
- package/prisma/migrations/20261018000000_dependency_cache/migration.sql +53 -0
- package/prisma/migrations/20261019000000_claude_max_output_tokens/migration.sql +5 -0
- package/prisma/migrations/20261021000000_pr_description_hash/migration.sql +4 -0
- package/prisma/migrations/20261022000000_dependency_snapshot_validation_metadata/migration.sql +4 -0
- package/prisma/migrations/20261023000000_package_audit_mode/migration.sql +27 -0
- package/prisma/migrations/20261024000000_budget_events/migration.sql +26 -0
- package/prisma/migrations/20261025000000_cache_aware_holds/migration.sql +9 -0
- package/prisma/migrations/20261026000000_budget_overrun/migration.sql +4 -0
- package/prisma/migrations/20261027000000_coding_run_request/migration.sql +1 -0
- package/prisma/migrations/20261028000000_native_gateway_review_reads/migration.sql +6 -0
- package/prisma/migrations/20261029000000_lead_survives_deploy/migration.sql +6 -0
- package/prisma/migrations/20261030000000_local_review_covered_sha/migration.sql +2 -0
- package/prisma/migrations/20261031000000_coding_run_budget_limit/migration.sql +9 -0
- package/prisma/migrations/20261101000000_run_transcripts/migration.sql +22 -0
- package/prisma/schema.prisma +311 -97
- package/dist/sandbox/generated/zod-to-json-schema.bundle.js +0 -5
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: dependency-cache
|
|
3
|
+
title: Dependency cache for coding runs
|
|
4
|
+
summary: Restore npm node_modules from a verified snapshot before a coding agent starts, so runs skip the install.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [coding-agents, packages, npm, node_modules, dependency-cache, cache, npm-ci, lockfile, snapshot, restore, blob-store, workspaces, tool_unavailable, budget_too_small, snapshot_skipped, timeout, CODING_CPUS, CODING_MEMORY_MB, disk, sha_mismatch, unsafe_archive, dependencyCache, worker_input_failed, workerImageRef]
|
|
7
|
+
appliesTo: >=0.7.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Dependency cache for coding runs
|
|
11
|
+
|
|
12
|
+
With the dependency cache on, a coding run's `node_modules` is prepared
|
|
13
|
+
**before the agent starts** from a snapshot in a blob store, so the agent
|
|
14
|
+
doesn't spend minutes on `npm ci`. It covers npm only. Off by default.
|
|
15
|
+
|
|
16
|
+
## How it behaves
|
|
17
|
+
|
|
18
|
+
For each eligible project the run reports one result in `get_run`
|
|
19
|
+
(`dependencyCache.projects[]`):
|
|
20
|
+
|
|
21
|
+
- `hit`: a snapshot for this exact lockfile was restored; nothing was
|
|
22
|
+
installed. A snapshot that fails to download or verify isn't used: the
|
|
23
|
+
project installs `cold` instead.
|
|
24
|
+
- `nearest`: a snapshot for an older lockfile of the same repository and folder
|
|
25
|
+
was restored, then updated to the committed lockfile.
|
|
26
|
+
- `cold`: no snapshot, so `npm ci` ran and the result was stored (when it fit the disk).
|
|
27
|
+
- `skipped` or `refused`: nothing was prepared and the agent installs for
|
|
28
|
+
itself. A skip never fails the run; its `reason` says why.
|
|
29
|
+
|
|
30
|
+
The agent's task says dependencies are pre-installed and not to run `npm ci`
|
|
31
|
+
there (it would delete the prepared tree); `npm install <package>` is fine.
|
|
32
|
+
A pull request gets a "Dependency cache: restored `node_modules` for ..." line
|
|
33
|
+
for folders restored from a snapshot.
|
|
34
|
+
|
|
35
|
+
## Why it is safe
|
|
36
|
+
|
|
37
|
+
- Snapshots are built only by Wardby, before the agent starts. Then the upload
|
|
38
|
+
window is sealed: the worker seals it, and the coding proxy seals it itself
|
|
39
|
+
on the run's first model request, so the agent can't read or write the
|
|
40
|
+
cache.
|
|
41
|
+
- A restore happens only after the coding proxy re-approves the committed
|
|
42
|
+
lockfile under the agent's current allowlist, release age and advisory
|
|
43
|
+
policy. A policy that now refuses a package means no restore.
|
|
44
|
+
- Agents on the same repository share snapshots (the key is the repository,
|
|
45
|
+
project folder, lockfile and image, not the package policy), and each
|
|
46
|
+
restore is still gated by that agent's own current policy.
|
|
47
|
+
- Keys come from the server, not the worker. Downloads are checked against the
|
|
48
|
+
SHA-256 and size the proxy recorded (that is the integrity check), the
|
|
49
|
+
archive is scanned, and the tree's recorded package versions are compared
|
|
50
|
+
with the lockfile before use. A damaged snapshot is deleted and rebuilt.
|
|
51
|
+
A restore skips re-scanning an archive whose scan result was recorded at
|
|
52
|
+
upload and whose digest matches; extraction still enforces every archive
|
|
53
|
+
rule.
|
|
54
|
+
- The packages are the ones the agent's policy approves; the cache doesn't vet
|
|
55
|
+
their contents beyond what a normal install through the registry does.
|
|
56
|
+
- Install scripts are not cached. Snapshots are built with `--ignore-scripts`;
|
|
57
|
+
`npm rebuild` runs after the seal, only when needed, with a minimal
|
|
58
|
+
environment.
|
|
59
|
+
|
|
60
|
+
## When it applies
|
|
61
|
+
|
|
62
|
+
- npm with `package-lock.json` `lockfileVersion` 2 or 3, at the repository root
|
|
63
|
+
and/or up to 4 projects up to 3 folders deep.
|
|
64
|
+
- Ignored: `node_modules`, dot-folders, symlinks, folders that already have a
|
|
65
|
+
`node_modules`, and npm workspaces monorepos (root and members are skipped).
|
|
66
|
+
- The agent needs a package allowlist.
|
|
67
|
+
- Every worker image must come from a release that includes the cache: the
|
|
68
|
+
Codex worker images, the Claude Code worker image and its tool runner
|
|
69
|
+
images. An older Codex or Claude Code worker image fails the run at input
|
|
70
|
+
(`worker_input_failed`). Rebuild a `workerImageRef` image `FROM` that
|
|
71
|
+
release's driver image (Codex) or tool runner image (Claude Code) first;
|
|
72
|
+
`create_agent` and `update_agent` warn when an agent has both.
|
|
73
|
+
|
|
74
|
+
## Turn it on
|
|
75
|
+
|
|
76
|
+
1. On the coding proxy: `WARDBY_DEPENDENCY_CACHE=true` plus a blob store
|
|
77
|
+
(`BLOB_STORE=gcs|s3|local` and its bucket or directory variables). GKE:
|
|
78
|
+
`dependency_cache_enabled` and `dependency_cache_bucket_name` in Terraform,
|
|
79
|
+
then `WARDBY_DEPENDENCY_CACHE=true deploy/gke/up.sh`. AWS: the same Terraform
|
|
80
|
+
variables, plus the `BLOB_STORE_S3_*` proxy variables. kind:
|
|
81
|
+
`WARDBY_DEPENDENCY_CACHE=true bash deploy/kind-coding/up.sh` (not durable).
|
|
82
|
+
Docker quickstart: add `WARDBY_DEPENDENCY_CACHE=true` to `.wardby/.env`
|
|
83
|
+
(requires wardby 0.7.0 or later).
|
|
84
|
+
2. GKE: nothing extra. `up.sh` grants the proxy the `DependencySnapshot`
|
|
85
|
+
table before the rollout.
|
|
86
|
+
3. Per agent, once the worker images are current: `update_agent` with
|
|
87
|
+
`codingProfile.dependencyCache: true`. This needs `packages:approve` or
|
|
88
|
+
`agents:admin`.
|
|
89
|
+
|
|
90
|
+
## Disk use
|
|
91
|
+
|
|
92
|
+
The cache works within a budget: the run's workspace disk
|
|
93
|
+
(`workspaceDiskMb`) less what the checkout uses and a margin. Restores and the
|
|
94
|
+
snapshot archive are held to it while they are written. An install is checked
|
|
95
|
+
only before it starts: at least 1 GiB must be left (or twice the project's
|
|
96
|
+
tree when a snapshot of it was seen), otherwise the project is
|
|
97
|
+
`budget_too_small` and the agent installs for itself. npm's writes during the
|
|
98
|
+
install itself aren't bounded. After its own install the worker deletes npm's
|
|
99
|
+
download cache (`_cacache`), then archives the tree for upload only if the
|
|
100
|
+
archive fits what is left. A snapshot skipped for space keeps the installed
|
|
101
|
+
tree and the `cold` or `nearest` result; the worker log says
|
|
102
|
+
`snapshot_skipped` (reason `budget`), not `get_run`.
|
|
103
|
+
|
|
104
|
+
Tuning, on the proxy: `WARDBY_DEPENDENCY_CACHE_MAX_SNAPSHOT_MB` (1024),
|
|
105
|
+
`_REPO_CAP_MB` (4096), `_TOTAL_CAP_MB` (20480), `_MAX_AGE_DAYS` (14, counted
|
|
106
|
+
from creation, so snapshots are rebuilt periodically) and `_UPLOAD_SECONDS`
|
|
107
|
+
(900). On GKE and AWS keep the Terraform `dependency_cache_max_age_days` equal
|
|
108
|
+
to `_MAX_AGE_DAYS`; the bucket also deletes objects older than that plus 7 days.
|
|
109
|
+
|
|
110
|
+
## Troubleshooting
|
|
111
|
+
|
|
112
|
+
Read `dependencyCache` in `get_run`; then match the `reason`. A rejected `hit`
|
|
113
|
+
or `nearest` snapshot is not a reason: the project shows `cold`.
|
|
114
|
+
|
|
115
|
+
| Reason | What to do |
|
|
116
|
+
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
117
|
+
| `no_lockfile`, `lockfile_unreadable`, `no_package_json`, `no_dependencies` | Nothing to cache in that folder. |
|
|
118
|
+
| `lockfile_version` | Regenerate the lockfile with npm 7 or later. |
|
|
119
|
+
| `workspaces`, `workspace_member`, `shrinkwrap_present` | Not supported; the agent installs itself. |
|
|
120
|
+
| `node_modules_present`, `cache_dir_unsafe` | Remove the committed `node_modules` or `.cache` (symlink) from the repository. |
|
|
121
|
+
| `too_many_projects` | Only 4 projects per run are prepared. |
|
|
122
|
+
| `no_registry`, `plan_failed`, `plan_refused` | Give the agent a package allowlist and fix refused packages; see [Approve packages for coding agents](help://coding-packages). A plan the proxy left incomplete is retried for up to 10 minutes (at most 5 attempts per project, 8 plans per run). |
|
|
123
|
+
| `cache_unavailable`, `plan_required`, `sealed`, `lookup_failed`, `download_failed` | Check `WARDBY_DEPENDENCY_CACHE` and `BLOB_STORE` on the proxy, the store's permissions and the proxy log. |
|
|
124
|
+
| `size_mismatch`, `sha_mismatch`, `unsafe_archive`, `inconsistent` | The snapshot was not trusted; the project installed `cold` instead. It is rebuilt when it ages out or is deleted. Repeats point at the blob store. |
|
|
125
|
+
| `too_large`, `over_budget`, `budget_unknown`, `budget_too_small` | Raise `WARDBY_DEPENDENCY_CACHE_MAX_SNAPSHOT_MB` or the agent's `workspaceDiskMb` (see [Disk use](#disk-use)). |
|
|
126
|
+
| `install_failed`, `timeout`, `cancelled`, `internal_error`, `worker_error`, `report_invalid` | The agent installs for itself; check the worker log. The preparation gets at most 20 minutes or half the time left before the run's deadline. On Docker a huge restore can exhaust the tmpfs inode limit before its bytes. |
|
|
127
|
+
| `tool_unavailable` | Claude Code tool-runner image predates the cache or is custom; rebuild it from the current tool-runner image. The proxy still seals on the run's first model request. |
|
|
128
|
+
| `already_started`, `invalid_deadline` | Not expected: a command ran before preparation, or the worker and tool runner images are from different releases. |
|
|
129
|
+
| `worker_input_failed` (the run fails) | A Codex or Claude Code worker image, or a `workerImageRef` image, older than the cache. Update the images, or rebuild the custom image `FROM` the current release, before turning the cache on. |
|
|
130
|
+
|
|
131
|
+
Every run of a large project installing `cold` again usually means its
|
|
132
|
+
snapshot is never stored. Check the worker log for `snapshot_skipped` with
|
|
133
|
+
reason `timeout`: its `limit` says which bound ran out. For `pack` or
|
|
134
|
+
`deadline`, give coding pods more CPU (`CODING_CPUS=2`); for `upload_window`,
|
|
135
|
+
raise `WARDBY_DEPENDENCY_CACHE_UPLOAD_SECONDS`. A large tree (about 1 GiB) can
|
|
136
|
+
also need more than the default 2048 MiB of memory to install under gVisor;
|
|
137
|
+
raise `CODING_MEMORY_MB`.
|
|
138
|
+
|
|
139
|
+
`rebuild` of `failed`, `timeout` or `unsealed` means native add-ons may be
|
|
140
|
+
unbuilt; the agent can run `npm rebuild`.
|
|
141
|
+
|
|
142
|
+
The full reference, with every limit, is
|
|
143
|
+
[`docs/coding-packages.md`](../docs/coding-packages.md#dependency-cache).
|
package/help/deploy-gke.md
CHANGED
|
@@ -3,7 +3,7 @@ id: deploy-gke
|
|
|
3
3
|
title: Deploy Wardby on GKE Autopilot
|
|
4
4
|
summary: Use the supported Google Cloud path for a private database, isolated coding workers, and HTTPS ingress.
|
|
5
5
|
audience: operator
|
|
6
|
-
tags: [deployment, gke, gcp, kubernetes, production, secrets, jira]
|
|
6
|
+
tags: [deployment, gke, gcp, kubernetes, production, secrets, jira, upgrade, database-grants]
|
|
7
7
|
appliesTo: >=0.2.1
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -25,22 +25,29 @@ The deployment process is:
|
|
|
25
25
|
1. Install `gcloud`, Terraform, Docker with `linux/amd64` support, `kubectl`,
|
|
26
26
|
Helm, Node.js 24, and authenticate to the target project.
|
|
27
27
|
2. Configure `deploy/gke/terraform.tfvars`, apply Terraform, and prepare the
|
|
28
|
-
Gateway's address, certificate map, Cloud Armor policy, and DNS record.
|
|
28
|
+
Gateway's address, certificate map, Cloud Armor policy, and DNS record. On
|
|
29
|
+
a brand-new project, run `deploy/gke/bootstrap-database-iam.sh` once after
|
|
30
|
+
`terraform apply`, so the migrator has its database grants before the
|
|
31
|
+
first migration.
|
|
29
32
|
3. Put first-time values in an untracked `.env.local`; `deploy/gke/up.sh`
|
|
30
33
|
seeds Secret Manager without overwriting existing production values.
|
|
31
34
|
Jira settings are optional there, all or none; see [Jira](jira.md).
|
|
32
35
|
4. Run `WARDBY_HOSTNAME=wardby.example.com deploy/gke/up.sh`, then verify DNS,
|
|
33
|
-
certificate issuance,
|
|
36
|
+
certificate issuance, and service health.
|
|
34
37
|
Use `WARDBY_HOSTNAME`, not `HOSTNAME` (shells set that to the machine name);
|
|
35
38
|
the script refuses local names such as `*.lan` or `*.local`, and asks you
|
|
36
39
|
to confirm (or set `WARDBY_HOSTNAME_CHANGE=<new hostname>`) before moving
|
|
37
40
|
a deployment to a different hostname.
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
To upgrade, re-run `deploy/gke/up.sh` from the new release. It applies the
|
|
43
|
+
migrations, then the database grants (`deploy/gke/database-grants.sql`), and
|
|
44
|
+
only then rolls out the new pods, so a release that adds tables or columns the
|
|
45
|
+
coding proxy uses (such as per-model usage for
|
|
46
|
+
[cost attribution](cost-attribution.md)) needs no manual grants step. If the
|
|
47
|
+
grants fail, `up.sh` stops before the rollout with a non-zero exit;
|
|
48
|
+
`deploy/gke/bootstrap-database-iam.sh --check` shows the refused statement
|
|
49
|
+
without changing anything. See
|
|
50
|
+
[Upgrading an existing deployment](../docs/getting-started-gke.md#upgrading-an-existing-deployment).
|
|
44
51
|
|
|
45
52
|
The Kubernetes launcher runs Codex and Claude Code coding workers; a Claude
|
|
46
53
|
Code pod adds a tool-runner sidecar with its own image. Configure an identity
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: errors/budget-exhausted
|
|
3
|
+
title: Run stopped out of budget (budget_exhausted)
|
|
4
|
+
summary: A coding run stopped because its next model request did not fit what was left of its budget; get_run's budgetEvents says which limit and why.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [budget, budget_exhausted, coding_budget_exhausted, overrun, allowedOverrunPercent, overrun_unavailable, draft]
|
|
7
|
+
appliesTo: ">=0.7.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Run stopped out of budget
|
|
11
|
+
|
|
12
|
+
## What happened
|
|
13
|
+
|
|
14
|
+
Before each model request the coding proxy holds an amount against the run's
|
|
15
|
+
budget. The first request of a conversation (and any fallback) holds the worst
|
|
16
|
+
case: the whole request body as new input plus the largest reply the request
|
|
17
|
+
allows, priced at the model's output rate. After a mostly cached reply in the
|
|
18
|
+
same conversation, the cached part of the prompt is held at the cache-read
|
|
19
|
+
rate instead, so the hold is much smaller. A request whose hold does not fit in what is
|
|
20
|
+
left is refused, and the run ends `budget_exhausted` (its error reads
|
|
21
|
+
`coding_budget_exhausted: <sentence>`). The run stopped before a request whose
|
|
22
|
+
hold did not fit. A cache miss can make a settled reply cost more than its
|
|
23
|
+
hold, up to its worst case (see [Holds vs actual spend](#holds-vs-actual-spend)).
|
|
24
|
+
|
|
25
|
+
## Find out why
|
|
26
|
+
|
|
27
|
+
Call `get_run` and read `budgetEvents`. Each event has:
|
|
28
|
+
|
|
29
|
+
- `kind`: `refused`, or `overrun_unavailable` for an overrun top-up its group
|
|
30
|
+
or run tree had no room for (see [Overrun not available](#overrun-not-available)).
|
|
31
|
+
- `limit`: which cap bound the run.
|
|
32
|
+
- `run`: the agent's own `budgetUsd`.
|
|
33
|
+
- `run-tree`: what the lead agent had left for its whole run tree.
|
|
34
|
+
- `day`, `week`, `month`: the budget group's cap for that period.
|
|
35
|
+
- `at`: when it was recorded.
|
|
36
|
+
- `details`: for a refused model request, the budget, the amount spent, the
|
|
37
|
+
holds of requests in flight, the refused hold, the model and the turn. For a
|
|
38
|
+
refusal at dispatch, the cap, the amount spent, the amount held and
|
|
39
|
+
`heldRuns`, the number of runs holding budget. A refused model request also
|
|
40
|
+
carries `refusedHoldBasis` (`cached` or `full`) and `refusedHoldCeilingUsd`
|
|
41
|
+
(the worst-case hold for that request). Both also carry
|
|
42
|
+
`groupName` (the agent's budget group, when it has one) and, for a
|
|
43
|
+
`run-tree` limit, `leadAgentName`. A refused model request also carries
|
|
44
|
+
`agentBudgetUsd`, the agent's own `budgetUsd`. An `overrun_unavailable`
|
|
45
|
+
event carries the full cap or tree's `capUsd`, `spentUsd`, `heldUsd` and
|
|
46
|
+
`leftUsd`, the run's `baseBudgetUsd`, `grantedUsd` and `limitUsd`, and
|
|
47
|
+
`groupName`, the group whose cap was full (which can be the lead's).
|
|
48
|
+
|
|
49
|
+
The run's error, and a lead's sub-agent result (in its `budget` field), carry
|
|
50
|
+
the same facts as one sentence. Pull request and issue comments and check
|
|
51
|
+
summaries show the amounts and the budget group's name only.
|
|
52
|
+
|
|
53
|
+
## Holds vs actual spend
|
|
54
|
+
|
|
55
|
+
A hold is not a charge. The run is charged the reply's real cost, and the hold
|
|
56
|
+
is released when the reply is settled. A hold is larger than a typical reply
|
|
57
|
+
because it must cover the whole output allowance (`maxOutputTokens`), and
|
|
58
|
+
because the first request of a conversation, and any fallback, assumes the whole
|
|
59
|
+
body is new input. Fallbacks apply when there is no previous reply in the
|
|
60
|
+
conversation, the model changed, the previous reply was interrupted or mostly
|
|
61
|
+
uncached, the previous request in the conversation was sent more than 5 minutes
|
|
62
|
+
earlier, or the body got smaller.
|
|
63
|
+
|
|
64
|
+
If the cache misses, a reply can cost more than its hold. It is still settled
|
|
65
|
+
when it costs no more than its worst case, so a run can exceed its budget by at
|
|
66
|
+
most the difference between a request's worst case and its hold, for each
|
|
67
|
+
request in flight.
|
|
68
|
+
|
|
69
|
+
Read `refusedHoldBasis`: `full` means the hold was a fallback, so the next
|
|
70
|
+
request in a warm conversation would likely hold less; `cached` means it
|
|
71
|
+
already used the cache-read rate, so the budget is simply low for the request.
|
|
72
|
+
`refusedHoldCeilingUsd` is the most the request could ever hold.
|
|
73
|
+
|
|
74
|
+
## What to do
|
|
75
|
+
|
|
76
|
+
- `run`: raise `budgetUsd` on the agent, set `allowedOverrunPercent` (see
|
|
77
|
+
below), or lower `codingProfile.maxOutputTokens`
|
|
78
|
+
so each request holds less. If the sentence says the allowed overrun wasn't
|
|
79
|
+
available, raising the overrun will not help: raise the full group's cap, or
|
|
80
|
+
the lead's `budgetUsd` for a run tree, as the sentence says.
|
|
81
|
+
- `run-tree`: raise `budgetUsd` on the lead agent; its sub-agents draw on it.
|
|
82
|
+
- `day`, `week`, `month`: raise the budget group's cap for that period, or wait
|
|
83
|
+
for the period to reset. See [Budget group exhausted](budget-group-exhausted.md).
|
|
84
|
+
|
|
85
|
+
A refused run is not resumed automatically; trigger a new one.
|
|
86
|
+
|
|
87
|
+
## Allowed overrun
|
|
88
|
+
|
|
89
|
+
A coding agent's `allowedOverrunPercent` (integer 0 to 100, default 0; set with
|
|
90
|
+
`create_agent` or `update_agent`, same permission as `budgetUsd`) lets a run
|
|
91
|
+
spend up to that percent beyond `budgetUsd`. On a lead agent that delegates,
|
|
92
|
+
it raises its run tree's ceiling for coding sub-agents instead; native runs' own
|
|
93
|
+
model calls are not affected. A delegated run tree's ceiling uses the lead
|
|
94
|
+
agent's percent.
|
|
95
|
+
|
|
96
|
+
The overrun is permission, not a reservation. A run reserves only its base
|
|
97
|
+
budget (`budgetUsd`, trimmed to the room its budget group and run tree have).
|
|
98
|
+
While it works, it is topped up in steps toward its limit (`budgetUsd` raised
|
|
99
|
+
by the percent), each only from room the group and run tree still have, so
|
|
100
|
+
group caps and run-tree ceilings stay hard. `get_run` shows `budgetBaseUsd`
|
|
101
|
+
(before the overrun), `budgetLimitUsd` (the limit) and `budgetReservedUsd`
|
|
102
|
+
(what has been granted so far). The sentence names what the run had, for
|
|
103
|
+
example "this run's $1.00 budget and its 10% allowed overrun ($1.10 in all)",
|
|
104
|
+
or "$1.00 budget and $0.05 of its 10% allowed overrun ($1.05 in all)".
|
|
105
|
+
|
|
106
|
+
### Overrun not available
|
|
107
|
+
|
|
108
|
+
When the group or run tree has no room left for the next top-up, `get_run`
|
|
109
|
+
lists an `overrun_unavailable` event (its `limit` names the full cap or
|
|
110
|
+
`run-tree`), and the run asks for no more, even if room frees up later. The
|
|
111
|
+
proxy then stops it at what it was granted, and the sentence says why, for
|
|
112
|
+
example "Only $0.40 of its 10% allowed overrun was available because the
|
|
113
|
+
"team" group had no more left of its daily cap.", or "Its 10% allowed overrun
|
|
114
|
+
wasn't available because the lead's run tree had nothing left of its $15.00
|
|
115
|
+
budget." when it got none. A top-up takes whatever room is left, so the run is
|
|
116
|
+
refused only once nothing is. A run whose base is smaller than its first model
|
|
117
|
+
request cannot use its overrun: that request is refused before any top-up.
|
|
118
|
+
To continue, raise that cap (or the lead's `budgetUsd`) and continue the draft
|
|
119
|
+
pull request. Runs dispatched before this behaviour have no `budgetLimitUsd`:
|
|
120
|
+
their reservation already included the overrun, and they finish as before.
|
|
121
|
+
|
|
122
|
+
A worker that finishes is delivered even when it ended over the limit: the run
|
|
123
|
+
is `succeeded` and its status comment says, for example, "Spent $1.04, $0.04
|
|
124
|
+
(4%) over its $1.00 budget, within its allowed overrun."
|
|
125
|
+
|
|
126
|
+
## Keeping the work of a stopped run
|
|
127
|
+
|
|
128
|
+
When a run is stopped for budget and its worker ended cleanly, its changes so
|
|
129
|
+
far are pushed as the usual draft pull request (or added to the one it was
|
|
130
|
+
continuing). A new pull request's description starts "Stopped at its budget
|
|
131
|
+
before finishing; the changes so far are in this draft." A continuation leaves
|
|
132
|
+
the existing description alone. The run stays `budget_exhausted` and
|
|
133
|
+
keeps its `budgetEvents`. Mentioning the agent on that pull request (a
|
|
134
|
+
comment mentioning the App), or on the issue it came from (the App on a
|
|
135
|
+
GitHub issue, the service account on a Jira issue), continues the work with
|
|
136
|
+
a fresh budget. The pull
|
|
137
|
+
request is not marked ready automatically until a later continuation finishes.
|
|
138
|
+
|
|
139
|
+
A new pull request's description has a `### Task` section quoting the request
|
|
140
|
+
that started the run (capped at 4 KiB, mentions defused), so a continuation
|
|
141
|
+
knows what the draft was for. The request text is visible to anyone who can
|
|
142
|
+
read the pull request. While the draft's latest commit is the stopped
|
|
143
|
+
run's push, the automatic review is skipped with a neutral check, "Skipped:
|
|
144
|
+
stopped at its budget", and no fix round starts. Marking the pull request ready
|
|
145
|
+
or pushing a new commit gets a normal review. See
|
|
146
|
+
[Run GitHub code-review agents](../code-review-agents.md#drafts-stopped-at-their-budget).
|
|
147
|
+
|
|
148
|
+
If a push check refuses (protected paths, diff limits, access) or there are no
|
|
149
|
+
changes, the run ends as above with nothing pushed. So does a continuation of a
|
|
150
|
+
pull request that is no longer a draft (marked ready for review): unfinished
|
|
151
|
+
work is never pushed onto it. A worker that crashed, timed out or was stopped
|
|
152
|
+
is not kept.
|
|
153
|
+
|
|
154
|
+
## Interrupted replies
|
|
155
|
+
|
|
156
|
+
When a reply breaks off before its final usage, the proxy settles the request
|
|
157
|
+
at an estimate instead of keeping its whole hold: the usage it already read,
|
|
158
|
+
else the input of the same conversation's previous reply on the same model plus
|
|
159
|
+
the body's growth since then, else the whole body as new input, plus the output
|
|
160
|
+
relayed so far (text, tool-call input, and thinking or reasoning text) counted
|
|
161
|
+
high, and never more than the request's worst case. With nothing relayed, the
|
|
162
|
+
run's median completed reply on that model is used, or no output if there is
|
|
163
|
+
none yet. The previous reply is used only if it started within the 5-minute
|
|
164
|
+
prompt cache window before the request and the body has not shrunk since. New
|
|
165
|
+
input is counted at one token per 3 bytes and priced at the higher of the
|
|
166
|
+
model's input and cache-write rates. A streaming request that failed before the
|
|
167
|
+
provider's response started books no output. The native sandbox gateway follows
|
|
168
|
+
the same rule: a call cut after the response started but before any output (for
|
|
169
|
+
example while the model was thinking) is booked at its input plus the run's
|
|
170
|
+
median completed reply, or its input alone if there is none yet. The request is
|
|
171
|
+
flagged as estimated and counted in the run's cost. If the estimate cannot be
|
|
172
|
+
computed or recorded, the request keeps its full hold. A run can exceed its budget by at
|
|
173
|
+
most the gap between the estimate and the real cost.
|
|
174
|
+
|
|
175
|
+
## Group holds for delegated runs
|
|
176
|
+
|
|
177
|
+
A lead and the sub-agents it starts in the same budget group hold the lead's
|
|
178
|
+
budget once, at the lead (its reservation minus what the whole tree has spent),
|
|
179
|
+
decided per period. If the tree's live sub-agent runs hold more than that
|
|
180
|
+
(a coding run can be topped up past the lead's budget by the lead's
|
|
181
|
+
`allowedOverrunPercent`), the lead holds their unspent holds instead. `get_budget_group` reports `heldRuns` for each period.
|
|
182
|
+
|
|
183
|
+
See also [Troubleshoot budgets and reservations](../troubleshooting/budgets.md).
|
|
184
|
+
|
|
185
|
+
A coding run refused by the model provider itself because its account is out of
|
|
186
|
+
credit or over a spend limit is a different failure; see
|
|
187
|
+
[errors/coding-stream-quota-exceeded](coding-stream-quota-exceeded.md).
|
|
@@ -14,7 +14,9 @@ has no capacity left for that period after accounting for actual spending and
|
|
|
14
14
|
active reservations. Wardby refuses the run before model work or a coding
|
|
15
15
|
worker begins.
|
|
16
16
|
|
|
17
|
-
1. Inspect the budget group's `spentUsd` and `
|
|
17
|
+
1. Inspect the budget group's `spentUsd`, `reservedUsd` and `heldRuns` values.
|
|
18
|
+
The refused run's `get_run` output lists the cap, spend and holds in
|
|
19
|
+
`budgetEvents`.
|
|
18
20
|
2. Inspect active and recent runs that use the group.
|
|
19
21
|
3. Wait for the period to reset, cancel unneeded active work, or deliberately
|
|
20
22
|
adjust the agent or group budget.
|
|
@@ -23,3 +25,5 @@ worker begins.
|
|
|
23
25
|
|
|
24
26
|
Do not raise a limit merely to clear a refusal without confirming the intended
|
|
25
27
|
owner, schedule, and overlapping work. See [Budget troubleshooting](../troubleshooting/budgets.md).
|
|
28
|
+
|
|
29
|
+
For a coding run stopped mid-run, see the help article `errors/budget-exhausted`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: errors/coding-stream-quota-exceeded
|
|
3
|
+
title: Coding provider out of credit or over its spend limit
|
|
4
|
+
summary: A coding run's model provider refused it because the account is out of credit or over its spend limit; retrying does not help until the limit is raised.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [error, coding-agents, billing, quota, spend-limit, coding_stream_quota_exceeded]
|
|
7
|
+
appliesTo: ">=0.7.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Coding provider out of credit or over its spend limit
|
|
11
|
+
|
|
12
|
+
`job_coding_stream_quota_exceeded` in a coding run's diagnostic (the
|
|
13
|
+
control-plane log line under the run's `coding_diag_…` id) means the model
|
|
14
|
+
provider refused the run's requests because the provider account behind the
|
|
15
|
+
coding proxy has run out of credit or reached a spend limit. OpenAI reports
|
|
16
|
+
this as `insufficient_quota` or a project spend limit (with HTTP 429, like a
|
|
17
|
+
rate limit); Anthropic as a credit balance that is too low. It is not wardby's
|
|
18
|
+
own run budget: that ends the run as `budget_exhausted` (see
|
|
19
|
+
[errors/budget-exhausted](budget-exhausted.md)).
|
|
20
|
+
|
|
21
|
+
Retrying does not help: every coding run on that provider account fails the
|
|
22
|
+
same way until the limit changes.
|
|
23
|
+
|
|
24
|
+
1. Check the provider account the coding proxy uses: the OpenAI project's
|
|
25
|
+
billing and limits, or the Anthropic organization's credit balance and spend
|
|
26
|
+
limits.
|
|
27
|
+
2. Add credit or raise the limit there.
|
|
28
|
+
3. Trigger the run again.
|
|
29
|
+
|
|
30
|
+
The coding proxy's log for the same request (`audit.*` events) shows the
|
|
31
|
+
provider's status. See
|
|
32
|
+
[Coding worker isolation](../../docs/coding-worker-isolation.md) for where the
|
|
33
|
+
diagnostic and proxy logs live.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: errors/coding-workspace-disk-exceeds-limit
|
|
3
|
+
title: Coding workspace larger than the deployment allows
|
|
4
|
+
summary: create_agent and update_agent refuse workspaceDiskMb above CODING_MAX_DISK_MB; already-saved agents above the cap fail at run start.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [error, coding-agents, workspace, disk, workspaceDiskMb, CODING_MAX_DISK_MB, create_agent, update_agent]
|
|
7
|
+
appliesTo: ">=0.2.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Coding workspace larger than the deployment allows
|
|
11
|
+
|
|
12
|
+
`coding_workspace_disk_exceeds_limit` (on the run record as
|
|
13
|
+
`coding_failure_workspace:<id>`) means the agent's
|
|
14
|
+
`codingProfile.workspaceDiskMb` is larger than the deployment's
|
|
15
|
+
`CODING_MAX_DISK_MB`. The run fails before a worker starts and costs nothing.
|
|
16
|
+
When `CODING_MAX_DISK_MB` is unset, the limit is `CODING_DISK_MB` (2048 MiB by
|
|
17
|
+
default).
|
|
18
|
+
|
|
19
|
+
`create_agent` also checks this limit at save time. `update_agent` checks it
|
|
20
|
+
when setting a numeric `workspaceDiskMb` or changing an agent's kind to coding.
|
|
21
|
+
You can still make unrelated edits to an already-saved over-cap coding agent,
|
|
22
|
+
lower its size to within the cap, or set it to `null`.
|
|
23
|
+
The error names the requested size in MiB,
|
|
24
|
+
the effective cap in MiB, and `CODING_MAX_DISK_MB`. A size exactly at the cap
|
|
25
|
+
is allowed; `null` uses the deployment default. Agents already saved above
|
|
26
|
+
the cap still fail at run time, including if the operator lowers the cap.
|
|
27
|
+
|
|
28
|
+
Fix it one of two ways:
|
|
29
|
+
|
|
30
|
+
1. Lower the agent's size to the limit or below with `update_agent`:
|
|
31
|
+
`{ "id": "<agent id>", "codingProfile": { "workspaceDiskMb": 2048 } }`.
|
|
32
|
+
2. Or raise the deployment's `CODING_MAX_DISK_MB` on the control plane and
|
|
33
|
+
restart it. On GKE, deploy with `CODING_MAX_DISK_MB=8192 deploy/gke/up.sh`
|
|
34
|
+
(see the GKE deploy guide). On GKE Autopilot the value must leave room for the
|
|
35
|
+
worker's 1 GiB inside the 10 GiB pod ephemeral-storage ceiling.
|
|
36
|
+
|
|
37
|
+
A run that installs more than its workspace holds is evicted mid-run instead;
|
|
38
|
+
that needs a larger `workspaceDiskMb`, within this limit. See
|
|
39
|
+
[Build a worker image](../build-worker-image.md).
|
|
@@ -19,15 +19,13 @@ an open pull request carrying that run's marker for the branch. Nothing from
|
|
|
19
19
|
the run was pushed either way, so the pull request (and anyone who merged or
|
|
20
20
|
closed it) is unaffected.
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
"no longer found," since it looks for an **open** pull request
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
the pull request's description (wardby relies on it to find its own PR;
|
|
30
|
-
nothing else identifies it).
|
|
22
|
+
One thing besides an actual merge or close can also make the check come back
|
|
23
|
+
"no longer found," since it looks for an **open** pull request from the run's
|
|
24
|
+
branch with the run's hidden marker still in its description: the hidden
|
|
25
|
+
`<!-- wardby:<run-id> -->` marker was removed or edited out of the pull
|
|
26
|
+
request's description (wardby relies on it to find its own PR; nothing else
|
|
27
|
+
identifies it). Retargeting the pull request to another base branch does not
|
|
28
|
+
close it for wardby: the follow-up continues it and merges the new base.
|
|
31
29
|
|
|
32
30
|
When the pull request was merged or closed **before the run started**, the
|
|
33
31
|
check before cloning catches it: the run's status is `refused`, and nothing
|
|
@@ -66,9 +64,8 @@ sub-run instead, without the error code:
|
|
|
66
64
|
If the change is still needed, ask again without `continuePriorRun` (or
|
|
67
65
|
without naming the closed pull request). The new run opens a fresh pull
|
|
68
66
|
request from the repository's default branch. If the check is wrongly
|
|
69
|
-
finding nothing when the pull request is in fact open, check that
|
|
70
|
-
|
|
71
|
-
marker is still in its description, unedited.
|
|
67
|
+
finding nothing when the pull request is in fact open, check that the
|
|
68
|
+
`<!-- wardby:... -->` marker is still in its description, unedited.
|
|
72
69
|
|
|
73
70
|
Related: [Run GitHub code-review agents](../code-review-agents.md),
|
|
74
71
|
[Automatic review fix rounds](../review-fix-rounds.md),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: errors/delegation-conflict
|
|
3
|
+
title: Delegation conflict
|
|
4
|
+
summary: A delegate_to_* call returned delegation_conflict because its call id is already used by a run of another sub-agent.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [error, delegation, sub-agents, runs, delegation_conflict]
|
|
7
|
+
appliesTo: ">=0.7.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Delegation conflict
|
|
11
|
+
|
|
12
|
+
`delegation_conflict` is the error a `delegate_to_*` call returns to the model when wardby could not create the sub-agent run: each sub-agent run records the parent's tool-call id, and that id is already used by a run of a different sub-agent of the same parent.
|
|
13
|
+
|
|
14
|
+
It can happen when two executions of the same delegate step overlap (for example, a stalled process and the process that took the run over). When the other execution already started this sub-agent, wardby waits on that run instead and no error is returned. Only when the existing run belongs to a different sub-agent does the call return `delegation_conflict`.
|
|
15
|
+
|
|
16
|
+
No new sub-agent run is started, and the parent run is not failed: the model gets the error as the tool result ("The sub-agent run could not be created: its call id is already used by another sub-agent run.") and can report it or try again.
|
|
17
|
+
|
|
18
|
+
## What to do
|
|
19
|
+
|
|
20
|
+
1. List the runs of the parent's sub-agents with `list_runs` (by each sub-agent's `agentId`) and look for those whose `parentRunId` is the parent run.
|
|
21
|
+
2. Check the server logs for `delegation child create hit a unique key held by no child of this agent`, which names the run and the sub-agent.
|
|
22
|
+
3. If the model did not delegate again on its own, trigger the request again.
|
|
23
|
+
|
|
24
|
+
See [Run lost](run-lost.md) for how runs continue after a restart, and [Native capabilities](../native-capabilities.md) for sub-agents.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: errors/file-list-truncated
|
|
3
|
+
title: APPROVE refused on a cut file list (file_list_truncated)
|
|
4
|
+
summary: The pull request has more changed files than repo_pr_read lists, so repo_publish_review refuses the agent's APPROVE; it can still request changes or comment.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [error, code-review, repo_publish_review, repo_pr_read, file_list_truncated, fileListComplete, large-pull-request]
|
|
7
|
+
appliesTo: ">=0.7.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# APPROVE refused on a cut file list
|
|
11
|
+
|
|
12
|
+
`repo_publish_review` returns the tool error `file_list_truncated` when a
|
|
13
|
+
review agent publishes `APPROVE` on a pull request head after a
|
|
14
|
+
`repo_pr_read` of that head in the run reported `fileListComplete: false`,
|
|
15
|
+
and no complete read of the whole pull request (without `sinceSha`) has
|
|
16
|
+
followed. The host lists at most
|
|
17
|
+
1,000 changed files of a pull request (a GitHub compare, used when the agent
|
|
18
|
+
passes `sinceSha`, lists at most 300). Files past that cut never reach the
|
|
19
|
+
agent, so an approval would cover code nobody reviewed.
|
|
20
|
+
|
|
21
|
+
Nothing is published and nothing else changes. `CHANGES_REQUESTED` and
|
|
22
|
+
`COMMENT` are still allowed on the same head.
|
|
23
|
+
|
|
24
|
+
## What the agent should do
|
|
25
|
+
|
|
26
|
+
- If it passed `sinceSha`, call `repo_pr_read` again without it. When the
|
|
27
|
+
whole pull request fits in the list, `fileListComplete` becomes `true` and
|
|
28
|
+
`APPROVE` is allowed again (once every listed source, test or config file
|
|
29
|
+
is read; see `unread_files`). A complete `sinceSha` read does not lift the
|
|
30
|
+
refusal.
|
|
31
|
+
- Otherwise publish `CHANGES_REQUESTED` on what it read, and say the pull
|
|
32
|
+
request is too large to review in full. That review does not cover the
|
|
33
|
+
head, so a later run cannot approve it through a `sinceSha` delta either
|
|
34
|
+
(see `full_read_required`). `COMMENT` completes the check as
|
|
35
|
+
neutral, which branch protection treats as passing.
|
|
36
|
+
|
|
37
|
+
## What the owner does
|
|
38
|
+
|
|
39
|
+
Split the change into smaller pull requests, each under the limit, or have
|
|
40
|
+
a person review it. The limit is the same for GitHub and local repositories.
|
|
41
|
+
|
|
42
|
+
## Related
|
|
43
|
+
|
|
44
|
+
- [Run GitHub code-review agents](../code-review-agents.md)
|
|
45
|
+
- [Large pull requests](../../docs/code-review-agents.md#large-pull-requests)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: errors/full-read-required
|
|
3
|
+
title: APPROVE refused after a partial compare (full_read_required)
|
|
4
|
+
summary: The review agent compared the pull request from a commit wardby did not vouch for, so it never saw the full change; it must read the whole pull request before approving.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [error, code-review, repo_publish_review, repo_pr_read, full_read_required, sinceSha, lastCoveredSha]
|
|
7
|
+
appliesTo: ">=0.7.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# APPROVE refused after a partial compare
|
|
11
|
+
|
|
12
|
+
`repo_publish_review` returns the tool error `full_read_required` when a
|
|
13
|
+
review agent publishes `APPROVE` on a pull request head and, in that run:
|
|
14
|
+
|
|
15
|
+
- no `repo_pr_read` of the head was made without `sinceSha`, and
|
|
16
|
+
- a `repo_pr_read` of the head passed a `sinceSha` other than the
|
|
17
|
+
`lastCoveredSha` that same read returned.
|
|
18
|
+
|
|
19
|
+
A read with `sinceSha` lists only the files changed since that commit. Any
|
|
20
|
+
earlier commit of the branch is accepted as `sinceSha`, so a compare from a
|
|
21
|
+
commit wardby did not record as covered hides every change made before it.
|
|
22
|
+
`lastCoveredSha` is the latest head this agent reviewed after reading every
|
|
23
|
+
file. Any other commit, such as one named in the pull request's text, or a
|
|
24
|
+
`lastReviewedSha` whose review did not read everything, is not a safe base. An approval would
|
|
25
|
+
then cover code nobody reviewed.
|
|
26
|
+
|
|
27
|
+
Nothing is published and nothing else changes. `CHANGES_REQUESTED` and
|
|
28
|
+
`COMMENT` are still allowed on the same head.
|
|
29
|
+
|
|
30
|
+
## What the agent should do
|
|
31
|
+
|
|
32
|
+
Call `repo_pr_read` without `sinceSha`, read the source, test and config
|
|
33
|
+
files it lists, and publish again. Or, for a re-review, pass the
|
|
34
|
+
`lastCoveredSha` the read returns as `sinceSha`. If neither is possible,
|
|
35
|
+
publish `CHANGES_REQUESTED` on what it read.
|
|
36
|
+
|
|
37
|
+
## What the owner does
|
|
38
|
+
|
|
39
|
+
Nothing, normally: the refusal tells the agent what to do. If it recurs, check
|
|
40
|
+
the reviewer's system prompt: it should pass only the `lastCoveredSha` that
|
|
41
|
+
`repo_pr_read` returned as `sinceSha`, never `lastReviewedSha` or a commit
|
|
42
|
+
named in the pull request's text. Reviewer prompts written before 0.7.0 pass
|
|
43
|
+
`lastReviewedSha`; update the re-review step from the shipped reviewer prompt.
|
|
44
|
+
|
|
45
|
+
## Related
|
|
46
|
+
|
|
47
|
+
- [Run GitHub code-review agents](../code-review-agents.md)
|
|
48
|
+
- [APPROVE refused on a cut file list: `file_list_truncated`](file-list-truncated.md)
|
|
49
|
+
- [Large pull requests](../../docs/code-review-agents.md#large-pull-requests)
|
|
@@ -19,6 +19,10 @@ existing link to it are refused.
|
|
|
19
19
|
|
|
20
20
|
- **The repository should be served:** an operator adds its owner's login to
|
|
21
21
|
`WARDBY_GITHUB_ALLOWED_ACCOUNTS` and restarts the server, then links it again.
|
|
22
|
+
- **Only sandboxed runs are refused** (the same link works for a
|
|
23
|
+
`control-plane` agent): the native sandbox gateway runs a sandboxed agent's
|
|
24
|
+
repository tools and needs the same `WARDBY_GITHUB_ALLOWED_ACCOUNTS` as the
|
|
25
|
+
control plane. Set it on both, then restart the gateway.
|
|
22
26
|
- **It should not:** use a repository owned by a served account, or another
|
|
23
27
|
wardby server with its own GitHub App.
|
|
24
28
|
|