looply-cli 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +137 -3
- package/dist/.src-hash +1 -0
- package/dist/acceptance-observe.d.ts +108 -0
- package/dist/acceptance-observe.d.ts.map +1 -0
- package/dist/acceptance-observe.js +152 -0
- package/dist/acceptance-observe.js.map +1 -0
- package/dist/agent-cmd.d.ts +131 -0
- package/dist/agent-cmd.d.ts.map +1 -0
- package/dist/agent-cmd.js +154 -0
- package/dist/agent-cmd.js.map +1 -0
- package/dist/agent-contained.d.ts +114 -0
- package/dist/agent-contained.d.ts.map +1 -0
- package/dist/agent-contained.js +292 -0
- package/dist/agent-contained.js.map +1 -0
- package/dist/agent-driver.d.ts +130 -0
- package/dist/agent-driver.d.ts.map +1 -0
- package/dist/agent-driver.js +170 -0
- package/dist/agent-driver.js.map +1 -0
- package/dist/agent-envelope.d.ts +94 -0
- package/dist/agent-envelope.d.ts.map +1 -0
- package/dist/agent-envelope.js +214 -0
- package/dist/agent-envelope.js.map +1 -0
- package/dist/agent-exec.d.ts +182 -0
- package/dist/agent-exec.d.ts.map +1 -0
- package/dist/agent-exec.js +125 -0
- package/dist/agent-exec.js.map +1 -0
- package/dist/agent-runtime.d.ts +23 -0
- package/dist/agent-runtime.d.ts.map +1 -0
- package/dist/agent-runtime.js +143 -0
- package/dist/agent-runtime.js.map +1 -0
- package/dist/approval-gate-read.d.ts +66 -0
- package/dist/approval-gate-read.d.ts.map +1 -0
- package/dist/approval-gate-read.js +138 -0
- package/dist/approval-gate-read.js.map +1 -0
- package/dist/approval-resolution.d.ts +87 -0
- package/dist/approval-resolution.d.ts.map +1 -0
- package/dist/approval-resolution.js +100 -0
- package/dist/approval-resolution.js.map +1 -0
- package/dist/approval-resumes.d.ts +102 -0
- package/dist/approval-resumes.d.ts.map +1 -0
- package/dist/approval-resumes.js +167 -0
- package/dist/approval-resumes.js.map +1 -0
- package/dist/ask-brain.d.ts +167 -0
- package/dist/ask-brain.d.ts.map +1 -0
- package/dist/ask-brain.js +355 -0
- package/dist/ask-brain.js.map +1 -0
- package/dist/autonomy-authority.d.ts +80 -0
- package/dist/autonomy-authority.d.ts.map +1 -0
- package/dist/autonomy-authority.js +82 -0
- package/dist/autonomy-authority.js.map +1 -0
- package/dist/autonomy-controller.d.ts +321 -0
- package/dist/autonomy-controller.d.ts.map +1 -0
- package/dist/autonomy-controller.js +517 -0
- package/dist/autonomy-controller.js.map +1 -0
- package/dist/autonomy-store.d.ts +327 -0
- package/dist/autonomy-store.d.ts.map +1 -0
- package/dist/autonomy-store.js +581 -0
- package/dist/autonomy-store.js.map +1 -0
- package/dist/autonomy-tick.d.ts +257 -0
- package/dist/autonomy-tick.d.ts.map +1 -0
- package/dist/autonomy-tick.js +616 -0
- package/dist/autonomy-tick.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +2719 -0
- package/dist/bin.js.map +1 -0
- package/dist/brain-advice.d.ts +21 -0
- package/dist/brain-advice.d.ts.map +1 -0
- package/dist/brain-advice.js +51 -0
- package/dist/brain-advice.js.map +1 -0
- package/dist/candidate-replay-runtime.d.ts +125 -0
- package/dist/candidate-replay-runtime.d.ts.map +1 -0
- package/dist/candidate-replay-runtime.js +188 -0
- package/dist/candidate-replay-runtime.js.map +1 -0
- package/dist/checkout-carry.d.ts +76 -0
- package/dist/checkout-carry.d.ts.map +1 -0
- package/dist/checkout-carry.js +125 -0
- package/dist/checkout-carry.js.map +1 -0
- package/dist/citation-readers.d.ts +26 -0
- package/dist/citation-readers.d.ts.map +1 -0
- package/dist/citation-readers.js +102 -0
- package/dist/citation-readers.js.map +1 -0
- package/dist/command-receipts.d.ts +79 -0
- package/dist/command-receipts.d.ts.map +1 -0
- package/dist/command-receipts.js +143 -0
- package/dist/command-receipts.js.map +1 -0
- package/dist/command-runner.d.ts +32 -0
- package/dist/command-runner.d.ts.map +1 -0
- package/dist/command-runner.js +108 -0
- package/dist/command-runner.js.map +1 -0
- package/dist/compatible-sets.d.ts +67 -0
- package/dist/compatible-sets.d.ts.map +1 -0
- package/dist/compatible-sets.js +81 -0
- package/dist/compatible-sets.js.map +1 -0
- package/dist/compile-check.d.ts +31 -0
- package/dist/compile-check.d.ts.map +1 -0
- package/dist/compile-check.js +34 -0
- package/dist/compile-check.js.map +1 -0
- package/dist/compile-store.d.ts +16 -0
- package/dist/compile-store.d.ts.map +1 -0
- package/dist/compile-store.js +21 -0
- package/dist/compile-store.js.map +1 -0
- package/dist/completion.d.ts +106 -0
- package/dist/completion.d.ts.map +1 -0
- package/dist/completion.js +131 -0
- package/dist/completion.js.map +1 -0
- package/dist/config.d.ts +549 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +763 -0
- package/dist/config.js.map +1 -0
- package/dist/control-file.d.ts +142 -0
- package/dist/control-file.d.ts.map +1 -0
- package/dist/control-file.js +144 -0
- package/dist/control-file.js.map +1 -0
- package/dist/coordinator-state.d.ts +131 -0
- package/dist/coordinator-state.d.ts.map +1 -0
- package/dist/coordinator-state.js +380 -0
- package/dist/coordinator-state.js.map +1 -0
- package/dist/coordinator.d.ts +95 -0
- package/dist/coordinator.d.ts.map +1 -0
- package/dist/coordinator.js +97 -0
- package/dist/coordinator.js.map +1 -0
- package/dist/cursor-store.d.ts +53 -0
- package/dist/cursor-store.d.ts.map +1 -0
- package/dist/cursor-store.js +98 -0
- package/dist/cursor-store.js.map +1 -0
- package/dist/daemon-cmd.d.ts +239 -0
- package/dist/daemon-cmd.d.ts.map +1 -0
- package/dist/daemon-cmd.js +1751 -0
- package/dist/daemon-cmd.js.map +1 -0
- package/dist/daemon-lock.d.ts +140 -0
- package/dist/daemon-lock.d.ts.map +1 -0
- package/dist/daemon-lock.js +352 -0
- package/dist/daemon-lock.js.map +1 -0
- package/dist/daemon-recovery.d.ts +78 -0
- package/dist/daemon-recovery.d.ts.map +1 -0
- package/dist/daemon-recovery.js +161 -0
- package/dist/daemon-recovery.js.map +1 -0
- package/dist/daemon.d.ts +368 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +601 -0
- package/dist/daemon.js.map +1 -0
- package/dist/declared-response-shape.d.ts +93 -0
- package/dist/declared-response-shape.d.ts.map +1 -0
- package/dist/declared-response-shape.js +200 -0
- package/dist/declared-response-shape.js.map +1 -0
- package/dist/declared-surfaces.d.ts +16 -0
- package/dist/declared-surfaces.d.ts.map +1 -0
- package/dist/declared-surfaces.js +19 -0
- package/dist/declared-surfaces.js.map +1 -0
- package/dist/depends-review.d.ts +113 -0
- package/dist/depends-review.d.ts.map +1 -0
- package/dist/depends-review.js +110 -0
- package/dist/depends-review.js.map +1 -0
- package/dist/doctor.d.ts +91 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +71 -0
- package/dist/doctor.js.map +1 -0
- package/dist/edge-approval.d.ts +105 -0
- package/dist/edge-approval.d.ts.map +1 -0
- package/dist/edge-approval.js +100 -0
- package/dist/edge-approval.js.map +1 -0
- package/dist/evidence-cache.d.ts +45 -0
- package/dist/evidence-cache.d.ts.map +1 -0
- package/dist/evidence-cache.js +90 -0
- package/dist/evidence-cache.js.map +1 -0
- package/dist/evidence-cmd.d.ts +133 -0
- package/dist/evidence-cmd.d.ts.map +1 -0
- package/dist/evidence-cmd.js +347 -0
- package/dist/evidence-cmd.js.map +1 -0
- package/dist/evidence-facts.d.ts +40 -0
- package/dist/evidence-facts.d.ts.map +1 -0
- package/dist/evidence-facts.js +114 -0
- package/dist/evidence-facts.js.map +1 -0
- package/dist/exclusive-lock.d.ts +52 -0
- package/dist/exclusive-lock.d.ts.map +1 -0
- package/dist/exclusive-lock.js +150 -0
- package/dist/exclusive-lock.js.map +1 -0
- package/dist/exec-domains.d.ts +140 -0
- package/dist/exec-domains.d.ts.map +1 -0
- package/dist/exec-domains.js +287 -0
- package/dist/exec-domains.js.map +1 -0
- package/dist/exemption-store.d.ts +197 -0
- package/dist/exemption-store.d.ts.map +1 -0
- package/dist/exemption-store.js +266 -0
- package/dist/exemption-store.js.map +1 -0
- package/dist/explicit-start-gate.d.ts +96 -0
- package/dist/explicit-start-gate.d.ts.map +1 -0
- package/dist/explicit-start-gate.js +103 -0
- package/dist/explicit-start-gate.js.map +1 -0
- package/dist/fs-trouble.d.ts +70 -0
- package/dist/fs-trouble.d.ts.map +1 -0
- package/dist/fs-trouble.js +98 -0
- package/dist/fs-trouble.js.map +1 -0
- package/dist/gate.d.ts +278 -0
- package/dist/gate.d.ts.map +1 -0
- package/dist/gate.js +278 -0
- package/dist/gate.js.map +1 -0
- package/dist/git-driver.d.ts +519 -0
- package/dist/git-driver.d.ts.map +1 -0
- package/dist/git-driver.js +900 -0
- package/dist/git-driver.js.map +1 -0
- package/dist/git-push-executor.d.ts +41 -0
- package/dist/git-push-executor.d.ts.map +1 -0
- package/dist/git-push-executor.js +142 -0
- package/dist/git-push-executor.js.map +1 -0
- package/dist/glob.d.ts +26 -0
- package/dist/glob.d.ts.map +1 -0
- package/dist/glob.js +93 -0
- package/dist/glob.js.map +1 -0
- package/dist/goal-adaptive.d.ts +295 -0
- package/dist/goal-adaptive.d.ts.map +1 -0
- package/dist/goal-adaptive.js +393 -0
- package/dist/goal-adaptive.js.map +1 -0
- package/dist/goal-compile.d.ts +342 -0
- package/dist/goal-compile.d.ts.map +1 -0
- package/dist/goal-compile.js +444 -0
- package/dist/goal-compile.js.map +1 -0
- package/dist/goal-depends-executor.d.ts +55 -0
- package/dist/goal-depends-executor.d.ts.map +1 -0
- package/dist/goal-depends-executor.js +202 -0
- package/dist/goal-depends-executor.js.map +1 -0
- package/dist/goal-execution-evidence.d.ts +135 -0
- package/dist/goal-execution-evidence.d.ts.map +1 -0
- package/dist/goal-execution-evidence.js +159 -0
- package/dist/goal-execution-evidence.js.map +1 -0
- package/dist/goal-gap.d.ts +140 -0
- package/dist/goal-gap.d.ts.map +1 -0
- package/dist/goal-gap.js +197 -0
- package/dist/goal-gap.js.map +1 -0
- package/dist/goal-met-target.d.ts +98 -0
- package/dist/goal-met-target.d.ts.map +1 -0
- package/dist/goal-met-target.js +92 -0
- package/dist/goal-met-target.js.map +1 -0
- package/dist/goal-ownership.d.ts +416 -0
- package/dist/goal-ownership.d.ts.map +1 -0
- package/dist/goal-ownership.js +576 -0
- package/dist/goal-ownership.js.map +1 -0
- package/dist/goal-runs.d.ts +82 -0
- package/dist/goal-runs.d.ts.map +1 -0
- package/dist/goal-runs.js +120 -0
- package/dist/goal-runs.js.map +1 -0
- package/dist/goal-store.d.ts +146 -0
- package/dist/goal-store.d.ts.map +1 -0
- package/dist/goal-store.js +294 -0
- package/dist/goal-store.js.map +1 -0
- package/dist/goal-view.d.ts +156 -0
- package/dist/goal-view.d.ts.map +1 -0
- package/dist/goal-view.js +499 -0
- package/dist/goal-view.js.map +1 -0
- package/dist/governed-approvals.d.ts +152 -0
- package/dist/governed-approvals.d.ts.map +1 -0
- package/dist/governed-approvals.js +246 -0
- package/dist/governed-approvals.js.map +1 -0
- package/dist/governed-broker.d.ts +169 -0
- package/dist/governed-broker.d.ts.map +1 -0
- package/dist/governed-broker.js +196 -0
- package/dist/governed-broker.js.map +1 -0
- package/dist/governed-run.d.ts +220 -0
- package/dist/governed-run.d.ts.map +1 -0
- package/dist/governed-run.js +406 -0
- package/dist/governed-run.js.map +1 -0
- package/dist/grant-reconcile.d.ts +63 -0
- package/dist/grant-reconcile.d.ts.map +1 -0
- package/dist/grant-reconcile.js +121 -0
- package/dist/grant-reconcile.js.map +1 -0
- package/dist/index-for-head.d.ts +56 -0
- package/dist/index-for-head.d.ts.map +1 -0
- package/dist/index-for-head.js +103 -0
- package/dist/index-for-head.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/init-detect.d.ts +39 -0
- package/dist/init-detect.d.ts.map +1 -0
- package/dist/init-detect.js +188 -0
- package/dist/init-detect.js.map +1 -0
- package/dist/integration-deps.d.ts +62 -0
- package/dist/integration-deps.d.ts.map +1 -0
- package/dist/integration-deps.js +251 -0
- package/dist/integration-deps.js.map +1 -0
- package/dist/integration-runtime.d.ts +458 -0
- package/dist/integration-runtime.d.ts.map +1 -0
- package/dist/integration-runtime.js +681 -0
- package/dist/integration-runtime.js.map +1 -0
- package/dist/integration.d.ts +45 -0
- package/dist/integration.d.ts.map +1 -0
- package/dist/integration.js +87 -0
- package/dist/integration.js.map +1 -0
- package/dist/integrator.d.ts +84 -0
- package/dist/integrator.d.ts.map +1 -0
- package/dist/integrator.js +193 -0
- package/dist/integrator.js.map +1 -0
- package/dist/lane-claims.d.ts +174 -0
- package/dist/lane-claims.d.ts.map +1 -0
- package/dist/lane-claims.js +218 -0
- package/dist/lane-claims.js.map +1 -0
- package/dist/lane-coverage.d.ts +87 -0
- package/dist/lane-coverage.d.ts.map +1 -0
- package/dist/lane-coverage.js +129 -0
- package/dist/lane-coverage.js.map +1 -0
- package/dist/ledger-replay.d.ts +115 -0
- package/dist/ledger-replay.d.ts.map +1 -0
- package/dist/ledger-replay.js +155 -0
- package/dist/ledger-replay.js.map +1 -0
- package/dist/ledger-store.d.ts +68 -0
- package/dist/ledger-store.d.ts.map +1 -0
- package/dist/ledger-store.js +111 -0
- package/dist/ledger-store.js.map +1 -0
- package/dist/loop-safety-observer.d.ts +132 -0
- package/dist/loop-safety-observer.d.ts.map +1 -0
- package/dist/loop-safety-observer.js +76 -0
- package/dist/loop-safety-observer.js.map +1 -0
- package/dist/loop-safety-store.d.ts +339 -0
- package/dist/loop-safety-store.d.ts.map +1 -0
- package/dist/loop-safety-store.js +800 -0
- package/dist/loop-safety-store.js.map +1 -0
- package/dist/machine-store.d.ts +54 -0
- package/dist/machine-store.d.ts.map +1 -0
- package/dist/machine-store.js +149 -0
- package/dist/machine-store.js.map +1 -0
- package/dist/mcp-main.d.ts +2 -0
- package/dist/mcp-main.d.ts.map +1 -0
- package/dist/mcp-main.js +116 -0
- package/dist/mcp-main.js.map +1 -0
- package/dist/mcp-server.d.ts +72 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +259 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/model-routing.d.ts +75 -0
- package/dist/model-routing.d.ts.map +1 -0
- package/dist/model-routing.js +108 -0
- package/dist/model-routing.js.map +1 -0
- package/dist/model-transport.d.ts +188 -0
- package/dist/model-transport.d.ts.map +1 -0
- package/dist/model-transport.js +625 -0
- package/dist/model-transport.js.map +1 -0
- package/dist/notify-cadence.d.ts +55 -0
- package/dist/notify-cadence.d.ts.map +1 -0
- package/dist/notify-cadence.js +68 -0
- package/dist/notify-cadence.js.map +1 -0
- package/dist/notify-channel.d.ts +69 -0
- package/dist/notify-channel.d.ts.map +1 -0
- package/dist/notify-channel.js +151 -0
- package/dist/notify-channel.js.map +1 -0
- package/dist/notify.d.ts +71 -0
- package/dist/notify.d.ts.map +1 -0
- package/dist/notify.js +125 -0
- package/dist/notify.js.map +1 -0
- package/dist/observation-inventory.d.ts +65 -0
- package/dist/observation-inventory.d.ts.map +1 -0
- package/dist/observation-inventory.js +139 -0
- package/dist/observation-inventory.js.map +1 -0
- package/dist/owned-children.d.ts +45 -0
- package/dist/owned-children.d.ts.map +1 -0
- package/dist/owned-children.js +64 -0
- package/dist/owned-children.js.map +1 -0
- package/dist/packet-for-goal.d.ts +19 -0
- package/dist/packet-for-goal.d.ts.map +1 -0
- package/dist/packet-for-goal.js +32 -0
- package/dist/packet-for-goal.js.map +1 -0
- package/dist/pair-cmd.d.ts +85 -0
- package/dist/pair-cmd.d.ts.map +1 -0
- package/dist/pair-cmd.js +205 -0
- package/dist/pair-cmd.js.map +1 -0
- package/dist/partial-asker.d.ts +96 -0
- package/dist/partial-asker.d.ts.map +1 -0
- package/dist/partial-asker.js +117 -0
- package/dist/partial-asker.js.map +1 -0
- package/dist/pdf-text-lines.d.ts +17 -0
- package/dist/pdf-text-lines.d.ts.map +1 -0
- package/dist/pdf-text-lines.js +70 -0
- package/dist/pdf-text-lines.js.map +1 -0
- package/dist/pdf-text-worker.d.ts +2 -0
- package/dist/pdf-text-worker.d.ts.map +1 -0
- package/dist/pdf-text-worker.js +81 -0
- package/dist/pdf-text-worker.js.map +1 -0
- package/dist/pdf-text.d.ts +56 -0
- package/dist/pdf-text.d.ts.map +1 -0
- package/dist/pdf-text.js +64 -0
- package/dist/pdf-text.js.map +1 -0
- package/dist/pending-action.d.ts +154 -0
- package/dist/pending-action.d.ts.map +1 -0
- package/dist/pending-action.js +148 -0
- package/dist/pending-action.js.map +1 -0
- package/dist/preemptor.d.ts +40 -0
- package/dist/preemptor.d.ts.map +1 -0
- package/dist/preemptor.js +49 -0
- package/dist/preemptor.js.map +1 -0
- package/dist/programme-mode.d.ts +29 -0
- package/dist/programme-mode.d.ts.map +1 -0
- package/dist/programme-mode.js +50 -0
- package/dist/programme-mode.js.map +1 -0
- package/dist/progress-view.d.ts +14 -0
- package/dist/progress-view.d.ts.map +1 -0
- package/dist/progress-view.js +114 -0
- package/dist/progress-view.js.map +1 -0
- package/dist/project-graph-builder.d.ts +81 -0
- package/dist/project-graph-builder.d.ts.map +1 -0
- package/dist/project-graph-builder.js +246 -0
- package/dist/project-graph-builder.js.map +1 -0
- package/dist/project-graph-runtime.d.ts +86 -0
- package/dist/project-graph-runtime.d.ts.map +1 -0
- package/dist/project-graph-runtime.js +112 -0
- package/dist/project-graph-runtime.js.map +1 -0
- package/dist/project-index-builder.d.ts +96 -0
- package/dist/project-index-builder.d.ts.map +1 -0
- package/dist/project-index-builder.js +298 -0
- package/dist/project-index-builder.js.map +1 -0
- package/dist/project-index-facts.d.ts +51 -0
- package/dist/project-index-facts.d.ts.map +1 -0
- package/dist/project-index-facts.js +117 -0
- package/dist/project-index-facts.js.map +1 -0
- package/dist/project-index-store.d.ts +97 -0
- package/dist/project-index-store.d.ts.map +1 -0
- package/dist/project-index-store.js +140 -0
- package/dist/project-index-store.js.map +1 -0
- package/dist/project-memory-store.d.ts +127 -0
- package/dist/project-memory-store.d.ts.map +1 -0
- package/dist/project-memory-store.js +302 -0
- package/dist/project-memory-store.js.map +1 -0
- package/dist/proposal-store.d.ts +14 -0
- package/dist/proposal-store.d.ts.map +1 -0
- package/dist/proposal-store.js +19 -0
- package/dist/proposal-store.js.map +1 -0
- package/dist/prover.d.ts +80 -0
- package/dist/prover.d.ts.map +1 -0
- package/dist/prover.js +137 -0
- package/dist/prover.js.map +1 -0
- package/dist/provider-identity-store.d.ts +34 -0
- package/dist/provider-identity-store.d.ts.map +1 -0
- package/dist/provider-identity-store.js +72 -0
- package/dist/provider-identity-store.js.map +1 -0
- package/dist/provider-identity.d.ts +104 -0
- package/dist/provider-identity.d.ts.map +1 -0
- package/dist/provider-identity.js +167 -0
- package/dist/provider-identity.js.map +1 -0
- package/dist/provider-limit.d.ts +79 -0
- package/dist/provider-limit.d.ts.map +1 -0
- package/dist/provider-limit.js +148 -0
- package/dist/provider-limit.js.map +1 -0
- package/dist/provider-preflight.d.ts +171 -0
- package/dist/provider-preflight.d.ts.map +1 -0
- package/dist/provider-preflight.js +395 -0
- package/dist/provider-preflight.js.map +1 -0
- package/dist/provider-state.d.ts +120 -0
- package/dist/provider-state.d.ts.map +1 -0
- package/dist/provider-state.js +182 -0
- package/dist/provider-state.js.map +1 -0
- package/dist/providers.d.ts +132 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +161 -0
- package/dist/providers.js.map +1 -0
- package/dist/publication-recorder.d.ts +117 -0
- package/dist/publication-recorder.d.ts.map +1 -0
- package/dist/publication-recorder.js +124 -0
- package/dist/publication-recorder.js.map +1 -0
- package/dist/pursuit-delivery.d.ts +24 -0
- package/dist/pursuit-delivery.d.ts.map +1 -0
- package/dist/pursuit-delivery.js +38 -0
- package/dist/pursuit-delivery.js.map +1 -0
- package/dist/queue-store.d.ts +132 -0
- package/dist/queue-store.d.ts.map +1 -0
- package/dist/queue-store.js +185 -0
- package/dist/queue-store.js.map +1 -0
- package/dist/queue-summary.d.ts +14 -0
- package/dist/queue-summary.d.ts.map +1 -0
- package/dist/queue-summary.js +82 -0
- package/dist/queue-summary.js.map +1 -0
- package/dist/queue-view.d.ts +20 -0
- package/dist/queue-view.d.ts.map +1 -0
- package/dist/queue-view.js +163 -0
- package/dist/queue-view.js.map +1 -0
- package/dist/queue-write-lease.d.ts +106 -0
- package/dist/queue-write-lease.d.ts.map +1 -0
- package/dist/queue-write-lease.js +282 -0
- package/dist/queue-write-lease.js.map +1 -0
- package/dist/rails-home.d.ts +162 -0
- package/dist/rails-home.d.ts.map +1 -0
- package/dist/rails-home.js +452 -0
- package/dist/rails-home.js.map +1 -0
- package/dist/rails-migrations.d.ts +75 -0
- package/dist/rails-migrations.d.ts.map +1 -0
- package/dist/rails-migrations.js +199 -0
- package/dist/rails-migrations.js.map +1 -0
- package/dist/rails-stores.d.ts +49 -0
- package/dist/rails-stores.d.ts.map +1 -0
- package/dist/rails-stores.js +100 -0
- package/dist/rails-stores.js.map +1 -0
- package/dist/reaper.d.ts +69 -0
- package/dist/reaper.d.ts.map +1 -0
- package/dist/reaper.js +152 -0
- package/dist/reaper.js.map +1 -0
- package/dist/record-store.d.ts +36 -0
- package/dist/record-store.d.ts.map +1 -0
- package/dist/record-store.js +78 -0
- package/dist/record-store.js.map +1 -0
- package/dist/recovery-io.d.ts +50 -0
- package/dist/recovery-io.d.ts.map +1 -0
- package/dist/recovery-io.js +122 -0
- package/dist/recovery-io.js.map +1 -0
- package/dist/recovery.d.ts +146 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +110 -0
- package/dist/recovery.js.map +1 -0
- package/dist/redraw.d.ts +34 -0
- package/dist/redraw.d.ts.map +1 -0
- package/dist/redraw.js +62 -0
- package/dist/redraw.js.map +1 -0
- package/dist/rejected-evidence.d.ts +255 -0
- package/dist/rejected-evidence.d.ts.map +1 -0
- package/dist/rejected-evidence.js +324 -0
- package/dist/rejected-evidence.js.map +1 -0
- package/dist/report-cmd.d.ts +32 -0
- package/dist/report-cmd.d.ts.map +1 -0
- package/dist/report-cmd.js +201 -0
- package/dist/report-cmd.js.map +1 -0
- package/dist/repos-cmd.d.ts +80 -0
- package/dist/repos-cmd.d.ts.map +1 -0
- package/dist/repos-cmd.js +240 -0
- package/dist/repos-cmd.js.map +1 -0
- package/dist/request-body-shape.d.ts +93 -0
- package/dist/request-body-shape.d.ts.map +1 -0
- package/dist/request-body-shape.js +407 -0
- package/dist/request-body-shape.js.map +1 -0
- package/dist/requirement-claims.d.ts +89 -0
- package/dist/requirement-claims.d.ts.map +1 -0
- package/dist/requirement-claims.js +92 -0
- package/dist/requirement-claims.js.map +1 -0
- package/dist/retention-apply-runtime.d.ts +105 -0
- package/dist/retention-apply-runtime.d.ts.map +1 -0
- package/dist/retention-apply-runtime.js +269 -0
- package/dist/retention-apply-runtime.js.map +1 -0
- package/dist/reverify.d.ts +41 -0
- package/dist/reverify.d.ts.map +1 -0
- package/dist/reverify.js +69 -0
- package/dist/reverify.js.map +1 -0
- package/dist/round-records.d.ts +65 -0
- package/dist/round-records.d.ts.map +1 -0
- package/dist/round-records.js +61 -0
- package/dist/round-records.js.map +1 -0
- package/dist/round-runner.d.ts +924 -0
- package/dist/round-runner.d.ts.map +1 -0
- package/dist/round-runner.js +1693 -0
- package/dist/round-runner.js.map +1 -0
- package/dist/run-approval.d.ts +180 -0
- package/dist/run-approval.d.ts.map +1 -0
- package/dist/run-approval.js +199 -0
- package/dist/run-approval.js.map +1 -0
- package/dist/run-cmd.d.ts +359 -0
- package/dist/run-cmd.d.ts.map +1 -0
- package/dist/run-cmd.js +4418 -0
- package/dist/run-cmd.js.map +1 -0
- package/dist/run-delivery.d.ts +71 -0
- package/dist/run-delivery.d.ts.map +1 -0
- package/dist/run-delivery.js +104 -0
- package/dist/run-delivery.js.map +1 -0
- package/dist/run-ended.d.ts +75 -0
- package/dist/run-ended.d.ts.map +1 -0
- package/dist/run-ended.js +27 -0
- package/dist/run-ended.js.map +1 -0
- package/dist/run-ending-locator.d.ts +125 -0
- package/dist/run-ending-locator.d.ts.map +1 -0
- package/dist/run-ending-locator.js +133 -0
- package/dist/run-ending-locator.js.map +1 -0
- package/dist/run-launcher.d.ts +459 -0
- package/dist/run-launcher.d.ts.map +1 -0
- package/dist/run-launcher.js +652 -0
- package/dist/run-launcher.js.map +1 -0
- package/dist/run-lease.d.ts +208 -0
- package/dist/run-lease.d.ts.map +1 -0
- package/dist/run-lease.js +301 -0
- package/dist/run-lease.js.map +1 -0
- package/dist/run-refusal-marks.d.ts +189 -0
- package/dist/run-refusal-marks.d.ts.map +1 -0
- package/dist/run-refusal-marks.js +249 -0
- package/dist/run-refusal-marks.js.map +1 -0
- package/dist/run-start-marks.d.ts +153 -0
- package/dist/run-start-marks.d.ts.map +1 -0
- package/dist/run-start-marks.js +269 -0
- package/dist/run-start-marks.js.map +1 -0
- package/dist/scan-cmd.d.ts +14 -0
- package/dist/scan-cmd.d.ts.map +1 -0
- package/dist/scan-cmd.js +270 -0
- package/dist/scan-cmd.js.map +1 -0
- package/dist/scan-events.d.ts +50 -0
- package/dist/scan-events.d.ts.map +1 -0
- package/dist/scan-events.js +91 -0
- package/dist/scan-events.js.map +1 -0
- package/dist/scan.d.ts +191 -0
- package/dist/scan.d.ts.map +1 -0
- package/dist/scan.js +417 -0
- package/dist/scan.js.map +1 -0
- package/dist/scope-rule.d.ts +148 -0
- package/dist/scope-rule.d.ts.map +1 -0
- package/dist/scope-rule.js +121 -0
- package/dist/scope-rule.js.map +1 -0
- package/dist/self-repo-id.d.ts +18 -0
- package/dist/self-repo-id.d.ts.map +1 -0
- package/dist/self-repo-id.js +70 -0
- package/dist/self-repo-id.js.map +1 -0
- package/dist/server-client.d.ts +766 -0
- package/dist/server-client.d.ts.map +1 -0
- package/dist/server-client.js +475 -0
- package/dist/server-client.js.map +1 -0
- package/dist/session-adapter-runtime.d.ts +195 -0
- package/dist/session-adapter-runtime.d.ts.map +1 -0
- package/dist/session-adapter-runtime.js +373 -0
- package/dist/session-adapter-runtime.js.map +1 -0
- package/dist/session-checkpoint-runtime.d.ts +62 -0
- package/dist/session-checkpoint-runtime.d.ts.map +1 -0
- package/dist/session-checkpoint-runtime.js +268 -0
- package/dist/session-checkpoint-runtime.js.map +1 -0
- package/dist/session-control-transport.d.ts +106 -0
- package/dist/session-control-transport.d.ts.map +1 -0
- package/dist/session-control-transport.js +232 -0
- package/dist/session-control-transport.js.map +1 -0
- package/dist/session-observation-store.d.ts +98 -0
- package/dist/session-observation-store.d.ts.map +1 -0
- package/dist/session-observation-store.js +155 -0
- package/dist/session-observation-store.js.map +1 -0
- package/dist/session-observe-runtime.d.ts +123 -0
- package/dist/session-observe-runtime.d.ts.map +1 -0
- package/dist/session-observe-runtime.js +317 -0
- package/dist/session-observe-runtime.js.map +1 -0
- package/dist/session-store.d.ts +98 -0
- package/dist/session-store.d.ts.map +1 -0
- package/dist/session-store.js +116 -0
- package/dist/session-store.js.map +1 -0
- package/dist/sessions-cmd.d.ts +202 -0
- package/dist/sessions-cmd.d.ts.map +1 -0
- package/dist/sessions-cmd.js +609 -0
- package/dist/sessions-cmd.js.map +1 -0
- package/dist/settings-overlay.d.ts +53 -0
- package/dist/settings-overlay.d.ts.map +1 -0
- package/dist/settings-overlay.js +175 -0
- package/dist/settings-overlay.js.map +1 -0
- package/dist/setup-prompt.d.ts +34 -0
- package/dist/setup-prompt.d.ts.map +1 -0
- package/dist/setup-prompt.js +92 -0
- package/dist/setup-prompt.js.map +1 -0
- package/dist/setup.d.ts +103 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +283 -0
- package/dist/setup.js.map +1 -0
- package/dist/shared-grants.d.ts +164 -0
- package/dist/shared-grants.d.ts.map +1 -0
- package/dist/shared-grants.js +242 -0
- package/dist/shared-grants.js.map +1 -0
- package/dist/signals.d.ts +55 -0
- package/dist/signals.d.ts.map +1 -0
- package/dist/signals.js +85 -0
- package/dist/signals.js.map +1 -0
- package/dist/source-cmd.d.ts +201 -0
- package/dist/source-cmd.d.ts.map +1 -0
- package/dist/source-cmd.js +684 -0
- package/dist/source-cmd.js.map +1 -0
- package/dist/source-verdict.d.ts +99 -0
- package/dist/source-verdict.d.ts.map +1 -0
- package/dist/source-verdict.js +182 -0
- package/dist/source-verdict.js.map +1 -0
- package/dist/spend-ledger.d.ts +350 -0
- package/dist/spend-ledger.d.ts.map +1 -0
- package/dist/spend-ledger.js +546 -0
- package/dist/spend-ledger.js.map +1 -0
- package/dist/stale-run-sweep.d.ts +79 -0
- package/dist/stale-run-sweep.d.ts.map +1 -0
- package/dist/stale-run-sweep.js +116 -0
- package/dist/stale-run-sweep.js.map +1 -0
- package/dist/start-attempts.d.ts +385 -0
- package/dist/start-attempts.d.ts.map +1 -0
- package/dist/start-attempts.js +613 -0
- package/dist/start-attempts.js.map +1 -0
- package/dist/status-cmd.d.ts +28 -0
- package/dist/status-cmd.d.ts.map +1 -0
- package/dist/status-cmd.js +116 -0
- package/dist/status-cmd.js.map +1 -0
- package/dist/stop-follow-up.d.ts +107 -0
- package/dist/stop-follow-up.d.ts.map +1 -0
- package/dist/stop-follow-up.js +172 -0
- package/dist/stop-follow-up.js.map +1 -0
- package/dist/surface-lease.d.ts +118 -0
- package/dist/surface-lease.d.ts.map +1 -0
- package/dist/surface-lease.js +485 -0
- package/dist/surface-lease.js.map +1 -0
- package/dist/sync.d.ts +54 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +93 -0
- package/dist/sync.js.map +1 -0
- package/dist/syncing-ledger.d.ts +45 -0
- package/dist/syncing-ledger.d.ts.map +1 -0
- package/dist/syncing-ledger.js +53 -0
- package/dist/syncing-ledger.js.map +1 -0
- package/dist/temp-fixtures.d.ts +68 -0
- package/dist/temp-fixtures.d.ts.map +1 -0
- package/dist/temp-fixtures.js +38 -0
- package/dist/temp-fixtures.js.map +1 -0
- package/dist/token-window.d.ts +84 -0
- package/dist/token-window.d.ts.map +1 -0
- package/dist/token-window.js +143 -0
- package/dist/token-window.js.map +1 -0
- package/dist/tool-bridge.d.ts +177 -0
- package/dist/tool-bridge.d.ts.map +1 -0
- package/dist/tool-bridge.js +329 -0
- package/dist/tool-bridge.js.map +1 -0
- package/dist/tool-call-record.d.ts +197 -0
- package/dist/tool-call-record.d.ts.map +1 -0
- package/dist/tool-call-record.js +276 -0
- package/dist/tool-call-record.js.map +1 -0
- package/dist/tool-protocol.d.ts +135 -0
- package/dist/tool-protocol.d.ts.map +1 -0
- package/dist/tool-protocol.js +104 -0
- package/dist/tool-protocol.js.map +1 -0
- package/dist/tool-worker.d.ts +3 -0
- package/dist/tool-worker.d.ts.map +1 -0
- package/dist/tool-worker.js +478 -0
- package/dist/tool-worker.js.map +1 -0
- package/dist/toolchain-mirror.d.ts +86 -0
- package/dist/toolchain-mirror.d.ts.map +1 -0
- package/dist/toolchain-mirror.js +307 -0
- package/dist/toolchain-mirror.js.map +1 -0
- package/dist/trusted-git.d.ts +243 -0
- package/dist/trusted-git.d.ts.map +1 -0
- package/dist/trusted-git.js +920 -0
- package/dist/trusted-git.js.map +1 -0
- package/dist/ui.d.ts +76 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +118 -0
- package/dist/ui.js.map +1 -0
- package/dist/untrusted-exec.d.ts +275 -0
- package/dist/untrusted-exec.d.ts.map +1 -0
- package/dist/untrusted-exec.js +479 -0
- package/dist/untrusted-exec.js.map +1 -0
- package/dist/untrusted-gate.d.ts +73 -0
- package/dist/untrusted-gate.d.ts.map +1 -0
- package/dist/untrusted-gate.js +226 -0
- package/dist/untrusted-gate.js.map +1 -0
- package/dist/uploader.d.ts +153 -0
- package/dist/uploader.d.ts.map +1 -0
- package/dist/uploader.js +204 -0
- package/dist/uploader.js.map +1 -0
- package/dist/verifier.d.ts +66 -0
- package/dist/verifier.d.ts.map +1 -0
- package/dist/verifier.js +170 -0
- package/dist/verifier.js.map +1 -0
- package/dist/verify-apply.d.ts +26 -0
- package/dist/verify-apply.d.ts.map +1 -0
- package/dist/verify-apply.js +36 -0
- package/dist/verify-apply.js.map +1 -0
- package/dist/verify-cmd.d.ts +44 -0
- package/dist/verify-cmd.d.ts.map +1 -0
- package/dist/verify-cmd.js +125 -0
- package/dist/verify-cmd.js.map +1 -0
- package/dist/verify-pass.d.ts +73 -0
- package/dist/verify-pass.d.ts.map +1 -0
- package/dist/verify-pass.js +103 -0
- package/dist/verify-pass.js.map +1 -0
- package/dist/welcome.d.ts +43 -0
- package/dist/welcome.d.ts.map +1 -0
- package/dist/welcome.js +116 -0
- package/dist/welcome.js.map +1 -0
- package/dist/workspace-provisioner.d.ts +65 -0
- package/dist/workspace-provisioner.d.ts.map +1 -0
- package/dist/workspace-provisioner.js +66 -0
- package/dist/workspace-provisioner.js.map +1 -0
- package/dist/workspace-quarantine.d.ts +64 -0
- package/dist/workspace-quarantine.d.ts.map +1 -0
- package/dist/workspace-quarantine.js +156 -0
- package/dist/workspace-quarantine.js.map +1 -0
- package/dist/workspace-residue-sweep.d.ts +113 -0
- package/dist/workspace-residue-sweep.d.ts.map +1 -0
- package/dist/workspace-residue-sweep.js +158 -0
- package/dist/workspace-residue-sweep.js.map +1 -0
- package/dist/workspace.d.ts +639 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +2026 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +54 -6
- package/win/CredProbe.cs +64 -0
- package/win/FakeClaude.cs +56 -0
- package/win/HandleProbe.cs +116 -0
- package/win/TokenProbe.cs +53 -0
- package/win/appcontainer.ps1 +500 -0
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
import { type EventData, type Evidence, type Exemption, type Item, type PartialAnswer, type ProofVerdict, type RunTotals, type TrailerInput, type FailureFacts, type ItemCrossRepoContext } from '@looply/core';
|
|
2
|
+
import type { ImplementerRunResult } from './agent-driver';
|
|
3
|
+
import type { LooplyConfig } from './config';
|
|
4
|
+
import type { EvidenceLookup } from './evidence-cache';
|
|
5
|
+
import { type CommandResult, type CommandRunner, type GateStepDiagnostic } from './gate';
|
|
6
|
+
import { type RejectedAttemptInput, type RejectedEvidenceSink } from './rejected-evidence';
|
|
7
|
+
import type { AnyEventInput } from './ledger-store';
|
|
8
|
+
import type { RunProgressNotifier } from './notify-cadence';
|
|
9
|
+
import type { ItemPatch, QueueWriteResult } from './queue-store';
|
|
10
|
+
import { type CountCommitsTouching } from './reverify';
|
|
11
|
+
import type { ControlSource } from './control-file';
|
|
12
|
+
import type { VerifyOutcome } from './verifier';
|
|
13
|
+
/**
|
|
14
|
+
* The round runner: pick → implement → gate → prove → commit or discard, one
|
|
15
|
+
* ledger event per transition, until a budget limit fires or the queue is empty.
|
|
16
|
+
*
|
|
17
|
+
* Every effectful collaborator is injected, so the whole loop runs in a test
|
|
18
|
+
* with no git, no agent and no filesystem. The runner owns *sequencing and
|
|
19
|
+
* outcomes*; what a gate step or an agent invocation actually does lives in the
|
|
20
|
+
* modules it is handed. Round-state changes go through core's `transition`, so
|
|
21
|
+
* an illegal path (say, committing out of `gating`) throws instead of shipping.
|
|
22
|
+
*/
|
|
23
|
+
export interface RunnerLedger {
|
|
24
|
+
append(input: AnyEventInput): Promise<unknown>;
|
|
25
|
+
}
|
|
26
|
+
export interface RunnerQueue {
|
|
27
|
+
list(): Item[];
|
|
28
|
+
get(id: string): Item | undefined;
|
|
29
|
+
update(id: string, expectedVersion: number, patch: ItemPatch): Promise<QueueWriteResult>;
|
|
30
|
+
}
|
|
31
|
+
export interface RunnerGit {
|
|
32
|
+
changedPaths(): Promise<string[]>;
|
|
33
|
+
createBranch(name: string, from?: string): Promise<void>;
|
|
34
|
+
headSha(): Promise<string>;
|
|
35
|
+
stageAll(): Promise<void>;
|
|
36
|
+
commit(subject: string, trailer: TrailerInput): Promise<string>;
|
|
37
|
+
discard(): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Whether anything is staged — asked so that "already done" is not an abort.
|
|
40
|
+
*
|
|
41
|
+
* ⚠️ OPTIONAL FOR THE SAME REASON `headTreeSha` IS: the runtime object is a
|
|
42
|
+
* full `GitDriver` and answers it; the suite's fakes need not. A caller that
|
|
43
|
+
* cannot answer simply commits as it always did, so no existing behaviour
|
|
44
|
+
* changes — and the production path gets the check.
|
|
45
|
+
*/
|
|
46
|
+
hasStagedChanges?(): Promise<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* The tree this round ended on, as a fingerprint of what changed.
|
|
49
|
+
*
|
|
50
|
+
* ⚠️ OPTIONAL, AND THE DETECTOR IS THE REASON. `oscillation` returns null the
|
|
51
|
+
* moment ANY of its four fingerprints is null, so a half-wired tree does not
|
|
52
|
+
* degrade the detector — it silently switches it off. Optional here means the
|
|
53
|
+
* per-round record simply is not collected when a caller cannot answer, which
|
|
54
|
+
* is visible, rather than collected as nulls, which is not.
|
|
55
|
+
*
|
|
56
|
+
* The runtime object is a full `GitDriver` and answers it; the fakes in the
|
|
57
|
+
* suite do not, which is exactly the distinction this optionality expresses.
|
|
58
|
+
*/
|
|
59
|
+
headTreeSha?(): Promise<string>;
|
|
60
|
+
/**
|
|
61
|
+
* The three verbs a rejected candidate needs — its manifest, its patch, and
|
|
62
|
+
* the way back. All optional for the same reason `headTreeSha` is: a caller
|
|
63
|
+
* that cannot answer retains less and says so, rather than failing the round.
|
|
64
|
+
*/
|
|
65
|
+
changedEntries?(): Promise<Array<{
|
|
66
|
+
path: string;
|
|
67
|
+
status: string;
|
|
68
|
+
}>>;
|
|
69
|
+
patch?(maxBytes: number): Promise<{
|
|
70
|
+
text: string;
|
|
71
|
+
bytes: number;
|
|
72
|
+
truncated: boolean;
|
|
73
|
+
}>;
|
|
74
|
+
applyPatch?(patchFile: string): Promise<{
|
|
75
|
+
ok: true;
|
|
76
|
+
} | {
|
|
77
|
+
ok: false;
|
|
78
|
+
because: string;
|
|
79
|
+
}>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* What one round did, kept so the caller can be told about rounds rather than
|
|
83
|
+
* about runs.
|
|
84
|
+
*
|
|
85
|
+
* 🔴 THE DENOMINATOR WAS WRONG, AND THAT IS THE WHOLE DEFECT. There was one
|
|
86
|
+
* record per RUN, so a four-hour run that discarded forty rounds on
|
|
87
|
+
* the identical failure was ONE observation — and `MAX_SAME_FAILURE_REPEATS = 3`
|
|
88
|
+
* then needed three such RUNS before it would say anything. Meanwhile
|
|
89
|
+
* `MAX_ITEM_EXECUTION_ATTEMPTS = 3` is spent per round. The two numbers read as
|
|
90
|
+
* if they agreed and were measuring different things by a factor of the round
|
|
91
|
+
* count.
|
|
92
|
+
*/
|
|
93
|
+
export interface RoundFact {
|
|
94
|
+
readonly round: number;
|
|
95
|
+
/**
|
|
96
|
+
* ⚠️ A BOOLEAN, NOT THE OUTCOME WORD. A reachability proof in the CLI reads
|
|
97
|
+
* the one `outcome:` expression in the tree and asserts it names exactly two
|
|
98
|
+
* values; carrying the word here would move that expression into this file
|
|
99
|
+
* and the proof would quietly stop covering anything. `run-cmd.ts` explains
|
|
100
|
+
* it where the expression lives.
|
|
101
|
+
*/
|
|
102
|
+
readonly worked: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* WHERE this round failed, when it failed.
|
|
105
|
+
*
|
|
106
|
+
* 🔴 THE PRODUCER COLLAPSED FOUR OUTCOMES TO TWO, AND NOBODY COULD SEE IT.
|
|
107
|
+
*
|
|
108
|
+
* The one producer computed `committed > 0 ? 'worked' : 'gate_failed'`, so
|
|
109
|
+
* two of the four outcome values had no production producer at all. A
|
|
110
|
+
* four-value enum with two unreachable values makes every observation coarser
|
|
111
|
+
* than it looks: a round the PROVER refused was recorded as "a deterministic
|
|
112
|
+
* gate refused it", which is a different fact about a different mechanism,
|
|
113
|
+
* and any later reader deciding what kept going wrong was reading a category
|
|
114
|
+
* that had been flattened.
|
|
115
|
+
*
|
|
116
|
+
* ⚠️ `null` WHEN THE ROUND DID NOT FAIL, so "worked" and "failed somewhere we
|
|
117
|
+
* did not classify" stay different answers.
|
|
118
|
+
*
|
|
119
|
+
* 🔴 AND THE FIX ABOVE WAS ITSELF HALF DONE, WHICH IS WHY THIS PARAGRAPH IS
|
|
120
|
+
* HERE. Only a prover CRASH ever set `'verifier'`. A prover that ran fine and
|
|
121
|
+
* returned `refuted` left this null — and null maps to `gate_failed`, so the
|
|
122
|
+
* commonest and most informative disagreement in the system was recorded as
|
|
123
|
+
* "a deterministic gate refused it", in a record that simultaneously listed
|
|
124
|
+
* both gate steps as PASSED. A docblock claiming a defect was fixed sat
|
|
125
|
+
* directly above the code that still had it.
|
|
126
|
+
*
|
|
127
|
+
* ⚠️ `'action'` HAS NO PRODUCER, AND THAT IS A STATEMENT RATHER THAN A GAP.
|
|
128
|
+
* A run stopped by an outstanding approval or an ambiguous governed action is
|
|
129
|
+
* recorded as an EXCLUDED observation — `awaiting_approval` and
|
|
130
|
+
* `awaiting_human_resolution`, see `run-cmd` — because a round waiting on a
|
|
131
|
+
* person has not failed at anything and must not feed a stuck-detector. So
|
|
132
|
+
* there is deliberately no path that sets this, and the value is kept only
|
|
133
|
+
* because durable records already carry the union.
|
|
134
|
+
*/
|
|
135
|
+
readonly failedAt: 'gate' | 'verifier' | 'action' | null;
|
|
136
|
+
/**
|
|
137
|
+
* Gate steps that passed in this round, by name.
|
|
138
|
+
*
|
|
139
|
+
* 🔴 THE ROUND WHERE THIS MATTERS IS THE ONE THAT DID NOT FINISH. A gate that
|
|
140
|
+
* goes green on the way to a commit has already moved the item, so recording
|
|
141
|
+
* it changes nothing. A gate that goes green and whose PROVER then refuses
|
|
142
|
+
* moves nothing at all — and without this the observation is byte-identical
|
|
143
|
+
* to the round before it, so real progress counts as none.
|
|
144
|
+
*/
|
|
145
|
+
readonly passingGates: readonly string[];
|
|
146
|
+
readonly treeFingerprint: string | null;
|
|
147
|
+
readonly failure: FailureFacts | null;
|
|
148
|
+
/** True when this round hit an environment it could not use. */
|
|
149
|
+
readonly metUnavailableEnvironment: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* The work list AS IT STOOD when this round ended.
|
|
152
|
+
*
|
|
153
|
+
* 🔴 WITHOUT THIS, EVERY ROUND OF ONE RUN LOOKED IDENTICAL, AND A RUN THAT
|
|
154
|
+
* COMMITTED EVERY ITEM RAISED A HOLD ON ITSELF.
|
|
155
|
+
*
|
|
156
|
+
* MEASURED. The caller built all N records from ONE snapshot taken after the
|
|
157
|
+
* run had finished, so every record carried the same progress fingerprint —
|
|
158
|
+
* and the detector that reads those compares them for EQUALITY and never
|
|
159
|
+
* looks at the outcome. Three rounds was therefore sufficient,
|
|
160
|
+
* unconditionally: pick three items, gate them green, commit all three, end
|
|
161
|
+
* queue-empty, and the machine records that it achieved nothing three times
|
|
162
|
+
* and stops working on the whole pursuit. Such a hold has no expiry.
|
|
163
|
+
*
|
|
164
|
+
* ⚠️ SNAPSHOTTED HERE BECAUSE ONLY HERE CAN. The queue is finished changing by
|
|
165
|
+
* the time the run ends; what each round achieved is only observable while
|
|
166
|
+
* that round is the present one.
|
|
167
|
+
*/
|
|
168
|
+
readonly work: readonly Item[];
|
|
169
|
+
}
|
|
170
|
+
export interface ProofOutcome {
|
|
171
|
+
verdict: ProofVerdict;
|
|
172
|
+
reason: string;
|
|
173
|
+
confidence: number;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Everything the pick-time re-verification route needs (§12 case 19, the caller
|
|
177
|
+
* half of `decideReverify`). All-or-nothing on purpose: a cache read without a
|
|
178
|
+
* verifier would detect stale evidence and then implement on it anyway.
|
|
179
|
+
*/
|
|
180
|
+
export interface ReverifyDeps {
|
|
181
|
+
/** The evidence cache, both halves: read at pick, refill on a confirming verdict. */
|
|
182
|
+
cache: {
|
|
183
|
+
lookup(itemId: string, head: string): EvidenceLookup;
|
|
184
|
+
put(itemId: string, head: string, evidence: readonly Evidence[]): Promise<void>;
|
|
185
|
+
};
|
|
186
|
+
/** Real backend: `GitDriver.countCommitsTouching`. */
|
|
187
|
+
countCommitsTouching: CountCommitsTouching;
|
|
188
|
+
/** Runs the verifier for one item; `runVerifier` → `toVerifyOutcome` lives with the caller. */
|
|
189
|
+
verify(item: Item): Promise<VerifyOutcome>;
|
|
190
|
+
}
|
|
191
|
+
export interface RoundRunnerDeps {
|
|
192
|
+
ledger: RunnerLedger;
|
|
193
|
+
queue: RunnerQueue;
|
|
194
|
+
/**
|
|
195
|
+
* What other repositories have published, for items that declare a need on one.
|
|
196
|
+
*
|
|
197
|
+
* 🔴 ASKED PER PICK, NOT ONCE PER RUN. A sibling repository publishes while
|
|
198
|
+
* this run is working; an item blocked at round 3 can be pickable at round 9,
|
|
199
|
+
* and a context captured at startup would keep it waiting for the rest of the
|
|
200
|
+
* night. It is a function for that reason and no other.
|
|
201
|
+
*
|
|
202
|
+
* ⚠️ OPTIONAL, AND UNDEFINED IS NOT "EVERYTHING IS MET". A project with no
|
|
203
|
+
* declared repositories has no context to give, and no item in it can declare
|
|
204
|
+
* a need — but an item that somehow does is BLOCKED rather than waved
|
|
205
|
+
* through, because `itemCrossRepoBlockedBy` reads an empty declared list as
|
|
206
|
+
* `undeclared`. Absent context means nothing has been established, which is
|
|
207
|
+
* the same thing every other fold in this package says about absence.
|
|
208
|
+
*/
|
|
209
|
+
crossRepo?(): Promise<ItemCrossRepoContext | undefined>;
|
|
210
|
+
/**
|
|
211
|
+
* Extra facts the composition root wants on this run's header.
|
|
212
|
+
*
|
|
213
|
+
* Deliberately opaque: a flat bag of primitives, spread into `run.started`
|
|
214
|
+
* before the six fields this file owns, so it can add attribution without
|
|
215
|
+
* being able to overwrite `runId`, `branch`, `baseSha`, `minHours`,
|
|
216
|
+
* `maxRounds` or `lane`. Omitted by every manual run, and `...undefined`
|
|
217
|
+
* spreads nothing — so a run with no context emits the exact event it always
|
|
218
|
+
* did, byte for byte.
|
|
219
|
+
*
|
|
220
|
+
* This file knows nothing about what the keys MEAN, and must not: whatever is
|
|
221
|
+
* in here is the caller's vocabulary, not the runner's.
|
|
222
|
+
*/
|
|
223
|
+
runContext?: Readonly<Record<string, string | number>>;
|
|
224
|
+
git: RunnerGit;
|
|
225
|
+
/**
|
|
226
|
+
* Collect one {@link RoundFact} per round onto the summary.
|
|
227
|
+
*
|
|
228
|
+
* ⚠️ OFF BY DEFAULT, AND THAT IS A COMPATIBILITY DECISION RATHER THAN
|
|
229
|
+
* TIMIDITY. Turning it on changes the DENOMINATOR every brake threshold in
|
|
230
|
+
* core was calibrated against — from one record per run to one per round —
|
|
231
|
+
* which retunes behaviour for existing projects that asked for none of it.
|
|
232
|
+
*
|
|
233
|
+
* ⚠️ AND THE REASONING LIVES IN `core`, NOT HERE, DELIBERATELY. This file may
|
|
234
|
+
* not name the brake: a confinement test forbids it, because logic that
|
|
235
|
+
* judges a run sharing a code path with the run is how you get a run that
|
|
236
|
+
* suppresses its own record. All this does is collect facts.
|
|
237
|
+
*/
|
|
238
|
+
perRoundSafety?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Called ONCE, after every precondition has passed and immediately before the
|
|
241
|
+
* first round does any work. A refusal here ends the run having done nothing.
|
|
242
|
+
*
|
|
243
|
+
* 🔴 THIS EXISTS BECAUSE "JUST BEFORE `run()`" IS NOT "JUST BEFORE WORK", AND
|
|
244
|
+
* A MEASUREMENT PROVED IT.
|
|
245
|
+
*
|
|
246
|
+
* A caller needed to spend something that only a real attempt could justify,
|
|
247
|
+
* and moved the spend to the statement immediately before `run()`. That was
|
|
248
|
+
* still too early: `run()`'s FIRST statement is the dirty-tree check, and a
|
|
249
|
+
* person with uncommitted edits — which is how people at terminals live —
|
|
250
|
+
* watched the thing be spent and the command die in the same second, with no
|
|
251
|
+
* round started and nothing bought. A second shape reached the same end with
|
|
252
|
+
* a clean tree, when the pre-pick verification demoted the last ready item
|
|
253
|
+
* and the loop stopped `queue-empty` at zero rounds.
|
|
254
|
+
*
|
|
255
|
+
* Only the runner knows when work is actually beginning. So it says so.
|
|
256
|
+
*/
|
|
257
|
+
beforeFirstRound?: () => Promise<{
|
|
258
|
+
ok: boolean;
|
|
259
|
+
because?: string;
|
|
260
|
+
}>;
|
|
261
|
+
/**
|
|
262
|
+
* The path prefixes this run said it would touch, when it said any.
|
|
263
|
+
*
|
|
264
|
+
* 🔴 A DECLARATION IS A HOPE; `changedPaths` IS FACT. What a round actually
|
|
265
|
+
* wrote is compared against what was leased, and a write outside it means the
|
|
266
|
+
* DECLARATION is wrong — so the round is discarded and the run ends. It is
|
|
267
|
+
* deliberately NOT retried: a retry would run the same wrong declaration.
|
|
268
|
+
*
|
|
269
|
+
* ⚠️ EMPTY OR ABSENT IS NO CONSTRAINT. A run that declared nothing is in
|
|
270
|
+
* violation of nothing, which is exactly how every run behaved before
|
|
271
|
+
* surfaces existed.
|
|
272
|
+
*/
|
|
273
|
+
declaredSurfaces?: readonly string[];
|
|
274
|
+
/**
|
|
275
|
+
* Is this run still the current holder of the surfaces it declared?
|
|
276
|
+
*
|
|
277
|
+
* 🔴 THE FENCE HAD NO PRODUCTION CALLER. `surface-lease.ts` opens with
|
|
278
|
+
* "EXPIRY EXISTS ONLY HERE, AND ONLY BECAUSE OF THE FENCE" — and
|
|
279
|
+
* `checkFence` was called by nothing but its own unit test, so the expiry
|
|
280
|
+
* shipped and the thing that made expiry safe did not. A holder whose
|
|
281
|
+
* lease lapsed while a newer run took the surface could commit with no
|
|
282
|
+
* comparison anywhere in the path.
|
|
283
|
+
*
|
|
284
|
+
* Optional, because a run that declared no surfaces has no fence to check
|
|
285
|
+
* and must not gain a new failure mode.
|
|
286
|
+
*/
|
|
287
|
+
checkFence?: () => {
|
|
288
|
+
ok: true;
|
|
289
|
+
} | {
|
|
290
|
+
ok: false;
|
|
291
|
+
because: string;
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* Has the ground moved under this checkout? A reason, or null.
|
|
295
|
+
*
|
|
296
|
+
* 🔴 CHECKED BETWEEN ROUNDS, WHICH IS THE ONLY PLACE IT MAY BE. A round in
|
|
297
|
+
* flight always finishes — that is the invariant recovery rests on, and it is
|
|
298
|
+
* why there is no hard cancel anywhere in this product. So a stale base stops
|
|
299
|
+
* the run at the NEXT boundary, and the round that was running when the
|
|
300
|
+
* ground moved is completed and kept.
|
|
301
|
+
*
|
|
302
|
+
* ⚠️ AND THE RUNNER DOES NOTHING ABOUT IT BUT STOP. It does not rebase, it
|
|
303
|
+
* does not re-cut, it does not merge. Deciding what happens to the pursuit is
|
|
304
|
+
* the coordinator's business; this only ends the run honestly.
|
|
305
|
+
*/
|
|
306
|
+
/**
|
|
307
|
+
* WHERE A NEW RUN'S BRANCH SHOULD BE CUT FROM, when anything has an opinion.
|
|
308
|
+
*
|
|
309
|
+
* ⚠️ THE SIBLING OF `baseStale`, gated by the same flag. Absent means
|
|
310
|
+
* "wherever HEAD is" — every run before Phase 5, and every run with
|
|
311
|
+
* `run.integration` off.
|
|
312
|
+
*/
|
|
313
|
+
integrationBase?: () => Promise<string | null>;
|
|
314
|
+
/**
|
|
315
|
+
* F29 (corr-7): asked about `cutAt`, the commit this run was CUT from — what "has the ground
|
|
316
|
+
* moved under me" is about. It used to be asked about the checkout's HEAD from BEFORE the cut,
|
|
317
|
+
* which in a reused checkout is the previous run's tip: every lane move read as a stale base
|
|
318
|
+
* and every working Start there halted after its first round.
|
|
319
|
+
*/
|
|
320
|
+
baseStale?: (cutAt: string) => Promise<string | null>;
|
|
321
|
+
/** Executes gate steps; the real backend runs them CONTAINED. */
|
|
322
|
+
gateRunner: CommandRunner;
|
|
323
|
+
/**
|
|
324
|
+
* Whether this machine can still make a container, asked BEFORE the model turn.
|
|
325
|
+
*
|
|
326
|
+
* 🔴 THE GATE'S `blocked` VERDICT WAS ONLY HALF THE ANSWER. It protects an
|
|
327
|
+
* item whose round REACHED a gate. On a machine with no containment the round
|
|
328
|
+
* never gets there: every agent tool call is refused by the bridge, the
|
|
329
|
+
* transcript carries no structured result, `runImplementer` returns
|
|
330
|
+
* `abandoned`, and this file writes `{state:'closed'}` with `attempts` still
|
|
331
|
+
* 0 — an item closed on round one, unreachable by any later attempt, for a
|
|
332
|
+
* fault in the machine. Measured end to end against the real code: four items,
|
|
333
|
+
* four paid model turns, four closed, `stopReason: queue-empty`, and the run
|
|
334
|
+
* recorded as `gate_failed` with nothing excluded, which raises a
|
|
335
|
+
* `no_progress` hold on the third such run.
|
|
336
|
+
*
|
|
337
|
+
* Optional, because a runner without it behaves exactly as before — the
|
|
338
|
+
* convention `evidence` and `reverify` already use. Production wiring is
|
|
339
|
+
* pinned by `production-routing.spec.ts` so "optional" cannot become
|
|
340
|
+
* "forgotten".
|
|
341
|
+
*/
|
|
342
|
+
environmentReady?(): Promise<CommandResult>;
|
|
343
|
+
/** Runs the implementer for one item. Prompt/command construction lives with the caller. */
|
|
344
|
+
/**
|
|
345
|
+
* `repair` is present on an attempt that follows a rejection IN THIS RUN:
|
|
346
|
+
* what the previous attempt changed, what refused it and what it printed,
|
|
347
|
+
* and whether that candidate was put back into the tree first. Absent on a
|
|
348
|
+
* first attempt and on an item whose last rejection belongs to another run —
|
|
349
|
+
* the item's `lastFailure` still carries the one-line reason either way.
|
|
350
|
+
*/
|
|
351
|
+
implement(item: Item, attempt: number, repair?: RepairContext): Promise<ImplementerRunResult>;
|
|
352
|
+
/** The second key (DESIGN §2.2). Required whenever `proof.enabled` is true. */
|
|
353
|
+
prove?(input: {
|
|
354
|
+
item: Item;
|
|
355
|
+
changedPaths: readonly string[];
|
|
356
|
+
}): Promise<ProofOutcome>;
|
|
357
|
+
/**
|
|
358
|
+
* Resolves a `partial` verdict when `proof.on_partial: ask` — whatever can
|
|
359
|
+
* reach a human (daemon → phone). It owns emitting question.asked/answered.
|
|
360
|
+
*/
|
|
361
|
+
resolvePartial?(item: Item, proof: ProofOutcome): Promise<PartialAnswer>;
|
|
362
|
+
/**
|
|
363
|
+
* Drops an item's cached evidence (see `EvidenceCache.invalidate`). Called
|
|
364
|
+
* after every discard — §12 case 19's second trigger. Optional because a run
|
|
365
|
+
* without a cache wired is merely slower, never wrong.
|
|
366
|
+
*/
|
|
367
|
+
evidence?: {
|
|
368
|
+
invalidate(itemId: string): Promise<void>;
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* Where a rejected candidate is kept before the tree is reset.
|
|
372
|
+
*
|
|
373
|
+
* 🔴 WITHOUT IT A DISCARD DESTROYS THE ONLY COPY OF THE WORK. Optional so
|
|
374
|
+
* every existing fixture keeps constructing; the production root wires
|
|
375
|
+
* `makeRejectedEvidenceStore`. When absent, `round.ended` carries
|
|
376
|
+
* `evidenceIncomplete` naming the absence — a reader must never take a
|
|
377
|
+
* missing path for a round that had nothing to retain.
|
|
378
|
+
*/
|
|
379
|
+
rejectedEvidence?: RejectedEvidenceSink;
|
|
380
|
+
/**
|
|
381
|
+
* Routes picking through the re-verification triggers (§12 case 19): the
|
|
382
|
+
* topmost item is only handed to a round once `decideReverify` judges its
|
|
383
|
+
* cached evidence fresh; otherwise it goes back through verification first.
|
|
384
|
+
* Optional — a runner without it picks blind, the pre-cache behaviour.
|
|
385
|
+
*/
|
|
386
|
+
reverify?: ReverifyDeps;
|
|
387
|
+
/**
|
|
388
|
+
* Granted exemptions for an item (§8); validity is judged at the interlock.
|
|
389
|
+
* Optional: a runner with no grant source simply keeps every rail shut.
|
|
390
|
+
*/
|
|
391
|
+
exemptionsFor?(itemId: string): Exemption[];
|
|
392
|
+
/**
|
|
393
|
+
* Persists the spent copy of a grant after a committed round (§8 "one
|
|
394
|
+
* round"). Required whenever `exemptionsFor` is wired — the constructor
|
|
395
|
+
* refuses a grant source with no spend sink, because that wiring is exactly
|
|
396
|
+
* the bug this closes: one grant reopening the same rail every round until
|
|
397
|
+
* it expires.
|
|
398
|
+
*/
|
|
399
|
+
spendExemption?(spent: Exemption): Promise<void>;
|
|
400
|
+
/**
|
|
401
|
+
* Progress reporting hooks (§5.3). The runner reports every transition and
|
|
402
|
+
* never checks `every_min` itself — whether anything is actually sent is the
|
|
403
|
+
* notifier's decision (`CadenceNotifier`), so §12 case 35's "0 means silence"
|
|
404
|
+
* lives in one testable place. Implementations must not throw (§12 case 33).
|
|
405
|
+
*/
|
|
406
|
+
notifier?: RunProgressNotifier;
|
|
407
|
+
/** Contents of an env file, or null when it does not exist (not an error). */
|
|
408
|
+
readEnvFile(path: string): string | null;
|
|
409
|
+
/** The live environment; values are matched against `rails.prod_patterns`. */
|
|
410
|
+
env: Readonly<Record<string, string | undefined>>;
|
|
411
|
+
now(): number;
|
|
412
|
+
/** Cooldown between rounds; omit to skip sleeping (tests, cooldown_s: 0). */
|
|
413
|
+
sleep?(ms: number): Promise<void>;
|
|
414
|
+
/** Polled between rounds; true once HUP/INT/TERM arrived. See signals.ts. */
|
|
415
|
+
stopRequested?(): boolean;
|
|
416
|
+
/**
|
|
417
|
+
* The phone's pause/stop, read from `control.json` between rounds. Optional:
|
|
418
|
+
* a runner with no control source cannot be reached from a phone, which is
|
|
419
|
+
* the local-only case rather than a failure. See control-file.ts.
|
|
420
|
+
*/
|
|
421
|
+
control?: ControlSource;
|
|
422
|
+
/**
|
|
423
|
+
* Whether beginning this run consumes the control request on disk.
|
|
424
|
+
*
|
|
425
|
+
* DEFAULTS TO TRUE, which is what every caller before 6D2C did implicitly
|
|
426
|
+
* and what a person tapping Start still means.
|
|
427
|
+
*
|
|
428
|
+
* The reason it is now a question at all: `consume()` writes `resume` over
|
|
429
|
+
* whatever is in `control.json`, and the justification for doing that at
|
|
430
|
+
* every run start was "starting a run is itself the human saying go". That
|
|
431
|
+
* sentence is true of a tap and FALSE of a run a machine decided to begin.
|
|
432
|
+
* With it applied unconditionally, a person who taps Pause between runs has
|
|
433
|
+
* their pause erased by the next automatic run — and the sharpest case is a
|
|
434
|
+
* pause aimed at that very run, eaten by it minutes after it started.
|
|
435
|
+
*
|
|
436
|
+
* Deliberately a plain boolean and deliberately named for what it DOES. The
|
|
437
|
+
* runner has no business knowing what a controller is, which grant
|
|
438
|
+
* authorized this, or that autonomy exists at all; it needs to know one
|
|
439
|
+
* thing, and this is that thing. Translating an origin into this policy is
|
|
440
|
+
* the composition root's job and happens exactly once.
|
|
441
|
+
*/
|
|
442
|
+
consumeControlOnStart?: boolean;
|
|
443
|
+
/** How long a paused run waits before re-reading the control file. */
|
|
444
|
+
pausePollMs?: number;
|
|
445
|
+
/**
|
|
446
|
+
* Asked the instant a model turn returns: has something outside this loop
|
|
447
|
+
* made the rest of the run impossible?
|
|
448
|
+
*
|
|
449
|
+
* The sibling of `stopRequested`, and generic for the same reason. That one
|
|
450
|
+
* answers "a person hit Ctrl-C"; this one answers "the thing that invoked the
|
|
451
|
+
* model met a boundary the round protocol has no vocabulary for". The runner
|
|
452
|
+
* does not learn what the boundary was. It is handed a reason to write down,
|
|
453
|
+
* a sentence for the item, and — like `runContext` on the header — an opaque
|
|
454
|
+
* bag of attribution it spreads without reading.
|
|
455
|
+
*
|
|
456
|
+
* WHY IT IS ASKED WHERE IT IS. Between rounds would be too late. A boundary
|
|
457
|
+
* met during a turn must stop the round it was met in, before the gate runs
|
|
458
|
+
* the project's tests over half-finished work and before a prover is paid to
|
|
459
|
+
* grade it — the run is over, and everything after the turn would be work
|
|
460
|
+
* done past the point where stopping was the answer.
|
|
461
|
+
*/
|
|
462
|
+
haltRequested?(): RunHalt | null;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* A reason the run cannot continue, from outside the round protocol.
|
|
466
|
+
*
|
|
467
|
+
* Deliberately says nothing about what happened. A runner that could tell one
|
|
468
|
+
* kind of halt from another would eventually be asked to behave differently for
|
|
469
|
+
* one of them, and then the round protocol would have a second author.
|
|
470
|
+
*/
|
|
471
|
+
/**
|
|
472
|
+
* WHAT A REPAIR ATTEMPT IS TOLD.
|
|
473
|
+
*
|
|
474
|
+
* 🔴 THE PREVIOUS TRIAL'S SECOND ATTEMPT WOULD HAVE BEEN TOLD "gate red: step
|
|
475
|
+
* typecheck failed" AND HANDED A CLEAN TREE. That is the whole of what
|
|
476
|
+
* `item.lastFailure` carries, and it is the whole of what a retry used to
|
|
477
|
+
* receive: no diagnostics, no patch, and no explanation of why the work it did
|
|
478
|
+
* last round is not there. A worker in that position starts over, differently
|
|
479
|
+
* or identically, and nothing about the loop is a repair.
|
|
480
|
+
*
|
|
481
|
+
* This is the rest of it. It is built by the runner from the evidence retained
|
|
482
|
+
* at the previous discard, bounded, and handed to `implement` — which renders
|
|
483
|
+
* it into the prompt as prose. The evidence directory itself is
|
|
484
|
+
* `protectedPaths` for the contained worker, so this is the only route.
|
|
485
|
+
*/
|
|
486
|
+
export interface RepairContext {
|
|
487
|
+
previous: {
|
|
488
|
+
round: number;
|
|
489
|
+
attempt: number;
|
|
490
|
+
/** The one-line reason, as carried on the item. */
|
|
491
|
+
why: string;
|
|
492
|
+
stage: RejectedAttemptInput['stage'];
|
|
493
|
+
failedStep: string | null;
|
|
494
|
+
/** Where the full evidence sits, for the report; the worker cannot open it. */
|
|
495
|
+
evidencePath: string | null;
|
|
496
|
+
/** Every step that ran, with bounded output. */
|
|
497
|
+
diagnostics: readonly GateStepDiagnostic[];
|
|
498
|
+
manifest: ReadonlyArray<{
|
|
499
|
+
path: string;
|
|
500
|
+
status: string;
|
|
501
|
+
}>;
|
|
502
|
+
/** The candidate's patch, when it was retained and not withheld. */
|
|
503
|
+
patch: {
|
|
504
|
+
text: string;
|
|
505
|
+
truncated: boolean;
|
|
506
|
+
} | null;
|
|
507
|
+
patchWithheld: string | null;
|
|
508
|
+
/**
|
|
509
|
+
* Set when this context was RECOVERED from an earlier run’s retained
|
|
510
|
+
* evidence — a restart between the rejection and this attempt — rather
|
|
511
|
+
* than held in this run’s memory. Absent for a rejection this run saw.
|
|
512
|
+
*/
|
|
513
|
+
recoveredFrom?: {
|
|
514
|
+
runId: string;
|
|
515
|
+
evidencePath: string;
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* Whether the previous candidate was put back into the tree before this
|
|
520
|
+
* attempt. `ok: false` carries the exact reason, and the worker is told it
|
|
521
|
+
* is starting from the base — explained, never silent.
|
|
522
|
+
*/
|
|
523
|
+
restored: {
|
|
524
|
+
ok: true;
|
|
525
|
+
paths: readonly string[];
|
|
526
|
+
} | {
|
|
527
|
+
ok: false;
|
|
528
|
+
because: string;
|
|
529
|
+
};
|
|
530
|
+
/** This attempt's number and the item's cap, so the limit is visible. */
|
|
531
|
+
attempt: number;
|
|
532
|
+
maxAttempts: number;
|
|
533
|
+
}
|
|
534
|
+
export interface RunHalt {
|
|
535
|
+
/** Recorded on `run.ended`. Chosen by the caller; not derived here. */
|
|
536
|
+
stopReason: StopReason;
|
|
537
|
+
/** One sentence, carried onto the item like any other reason. Never parsed. */
|
|
538
|
+
because: string;
|
|
539
|
+
/**
|
|
540
|
+
* Extra attribution for `run.ended`, spread exactly like `runContext` is on
|
|
541
|
+
* `run.started`: the caller may add to the event and can never overwrite the
|
|
542
|
+
* run's own facts, because those are written after the spread.
|
|
543
|
+
*/
|
|
544
|
+
endedContext?: Readonly<Record<string, unknown>>;
|
|
545
|
+
}
|
|
546
|
+
export interface RunIdentity {
|
|
547
|
+
runId: string;
|
|
548
|
+
projectId: string;
|
|
549
|
+
lane: string;
|
|
550
|
+
branch: string;
|
|
551
|
+
}
|
|
552
|
+
export type StopReason = EventData['run.ended']['stopReason'];
|
|
553
|
+
/**
|
|
554
|
+
* How many rounds may fail to run their gate before the run gives up.
|
|
555
|
+
*
|
|
556
|
+
* A blocked round costs the item nothing, which is the point — and which is
|
|
557
|
+
* also why the loop needs its own floor: without one, a machine with no
|
|
558
|
+
* containment would pick, implement, fail to gate and return the item, for ever
|
|
559
|
+
* and at full model cost.
|
|
560
|
+
*/
|
|
561
|
+
export declare const MAX_CONSECUTIVE_BLOCKED_ROUNDS = 3;
|
|
562
|
+
/**
|
|
563
|
+
* WHAT THE GATE'S COMMANDS RESOLVE THROUGH, AND WHAT ITS STEPS FIND FOR THEMSELVES.
|
|
564
|
+
*
|
|
565
|
+
* `judgedBy` refuses to guess either, and this is where the guessing is done
|
|
566
|
+
* instead — in one named place that can be read and argued with, rather than
|
|
567
|
+
* inside a pure fold where it would look like a fact.
|
|
568
|
+
*
|
|
569
|
+
* `defining` is short on purpose. A config that MATTERS to a step is almost
|
|
570
|
+
* always named by that step's own command — `npx tsc --noEmit -p
|
|
571
|
+
* packages/cli/tsconfig.json` names its tsconfig, and `judgedBy` establishes
|
|
572
|
+
* that exactly, from two texts. What is left is the handful a command reaches
|
|
573
|
+
* through without ever writing down: `npm run x` and `npx x` both resolve
|
|
574
|
+
* through `package.json`, and a runner reads its own config by convention.
|
|
575
|
+
* Every basename added here widens a claim, so the bar is that the file
|
|
576
|
+
* decides what a gate step DOES.
|
|
577
|
+
*
|
|
578
|
+
* ⚠️ `discovered` IS THE WEAKER TIER AND `judgedBy` KEEPS IT APART FROM THE
|
|
579
|
+
* REST. `npx --no-install jest --ci` names no spec file; jest globs for them,
|
|
580
|
+
* and this repository declares the shape in `jest.config.js` rather than in
|
|
581
|
+
* any gate step. So a changed spec file is a claim from the file NAME, not
|
|
582
|
+
* from a step's declaration, and the sentence a person reads says so. That is
|
|
583
|
+
* "make the weaker claim and say so" — never "the suite is unchanged", which
|
|
584
|
+
* is the one thing no path pattern can establish.
|
|
585
|
+
*/
|
|
586
|
+
export declare const GATE_MACHINERY: {
|
|
587
|
+
readonly defining: readonly ["package.json", "jest.config.js", "jest.config.ts", "jest.config.cjs", "jest.config.mjs"];
|
|
588
|
+
readonly discovered: readonly [".spec.ts", ".spec.tsx", ".test.ts", ".test.tsx", ".spec.js", ".test.js"];
|
|
589
|
+
};
|
|
590
|
+
/**
|
|
591
|
+
* THE ALERT A RUN WRITES WHEN IT HALTS ITSELF (M6-12), immediately before
|
|
592
|
+
* `run.ended`. Every {@link RunHalt} carries a `because`, and until M6-12
|
|
593
|
+
* that sentence reached nothing: `run.ended` carries `stopReason` and totals,
|
|
594
|
+
* the crash path wrote `run-aborted`, the halt path wrote nothing, and the run
|
|
595
|
+
* child has no log. A person's Start placed under the umbrella in a repo
|
|
596
|
+
* without `looply/integration` ended `aborted` after one round and nobody
|
|
597
|
+
* could read why (found live in M6-11). The reason is one sentence, never
|
|
598
|
+
* parsed; `warn` when the halt is an abort, `info` for any other halt.
|
|
599
|
+
*/
|
|
600
|
+
export declare const RUN_HALTED_CODE = "run-halted";
|
|
601
|
+
/**
|
|
602
|
+
* THE ALERT A RUN WRITES WHEN A CHECKER WAS NOT SURE AND NOBODY COULD BE ASKED (M6-20).
|
|
603
|
+
*
|
|
604
|
+
* `proof.on_partial` defaults to `ask`, and nothing in this build can ask: no
|
|
605
|
+
* CLI code produces a `question.asked`, so `looply run`'s asker answers
|
|
606
|
+
* `discard` and says so to a terminal nobody is watching (the audit's F-03).
|
|
607
|
+
* The work a checker was unsure about was therefore thrown away in silence —
|
|
608
|
+
* the item's failure line said "proof partial: …", which reads as the checker
|
|
609
|
+
* having refused, and nothing anywhere said that the configured answer was to
|
|
610
|
+
* ASK and that asking was impossible.
|
|
611
|
+
*
|
|
612
|
+
* ⚠️ ONLY WHEN THE POLICY IS `ask`. A project that configured `discard` chose
|
|
613
|
+
* this; saying it back to them on every partial verdict would be noise. And the
|
|
614
|
+
* run still discards — making it ask is a change to the round protocol and the
|
|
615
|
+
* owner's decision, not this alert's business.
|
|
616
|
+
*/
|
|
617
|
+
export declare const PARTIAL_DISCARDED_CODE = "proof-partial-discarded";
|
|
618
|
+
/** What a partial proof discarded for want of anyone to ask says, in one sentence. */
|
|
619
|
+
export declare function partialDiscardedText(itemTitle: string, reason: string): string;
|
|
620
|
+
export interface RunSummary {
|
|
621
|
+
stopReason: StopReason;
|
|
622
|
+
totals: RunTotals;
|
|
623
|
+
elapsedMs: number;
|
|
624
|
+
/**
|
|
625
|
+
* The last deterministic failure this run hit, or undefined if it hit none.
|
|
626
|
+
*
|
|
627
|
+
* Carried out so loop safety can tell "the same failure three times" from
|
|
628
|
+
* "three different failures" — a distinction that decides whether a pursuit is
|
|
629
|
+
* stuck or simply working through problems, and one nothing else on this
|
|
630
|
+
* summary can make. `totals.discarded` counts reds; it cannot say whether they
|
|
631
|
+
* were the SAME red.
|
|
632
|
+
*
|
|
633
|
+
* ⚠️ THE DIGEST IS A HASH, NOT OUTPUT. See `failureOutputDigest`.
|
|
634
|
+
*/
|
|
635
|
+
lastFailure?: FailureFacts;
|
|
636
|
+
/**
|
|
637
|
+
* WHERE THE LAST UNSUCCESSFUL ROUND FAILED — the gate, the prover, or an
|
|
638
|
+
* action.
|
|
639
|
+
*
|
|
640
|
+
* 🔴 CARRIED OUT BECAUSE THE RUN-LEVEL ROLLUP WAS GUESSING, AND GUESSING ONE
|
|
641
|
+
* PARTICULAR WRONG THING. Without per-round facts the composition root wrote
|
|
642
|
+
* `failedAt: null`, and null maps to `gate_failed` — so a run whose rounds
|
|
643
|
+
* were all PROVER refusals was recorded as a gate failure, in the DEFAULT
|
|
644
|
+
* configuration, which is the one almost every project runs.
|
|
645
|
+
*
|
|
646
|
+
* `failedAtThisRound` is maintained on every round regardless of
|
|
647
|
+
* `run.per_round_safety`; only the FACTS array is gated. So this costs
|
|
648
|
+
* nothing and needs no flag turned on to make the record honest.
|
|
649
|
+
*
|
|
650
|
+
* ⚠️ IT IS THE LAST ONE, AND SAYS SO. A run summarises many rounds and cannot
|
|
651
|
+
* claim they all failed the same way; what it can say truthfully is where the
|
|
652
|
+
* last unsuccessful one stopped.
|
|
653
|
+
*/
|
|
654
|
+
lastFailedAt?: 'gate' | 'verifier' | 'action';
|
|
655
|
+
/**
|
|
656
|
+
* This run met an environment it could not use — at least once, at any point.
|
|
657
|
+
*
|
|
658
|
+
* ⚠️ "MET", NOT "ENDED BECAUSE OF". The first version set this only when the
|
|
659
|
+
* run aborted at the three-round bound, which left three other endings
|
|
660
|
+
* reachable first — `max-rounds` (config allows 1), `queue-empty`,
|
|
661
|
+
* `min-hours` — each then recorded as `gate_failed`, the outcome list's words
|
|
662
|
+
* for "a deterministic gate refused it", with an unchanged tree fingerprint
|
|
663
|
+
* feeding `noProgress`. That is the exact poisoning the `blocked` verdict
|
|
664
|
+
* exists to prevent, reached by simply configuring a short run.
|
|
665
|
+
*
|
|
666
|
+
* ⚠️ IT IS NOT BY ITSELF A REASON TO EXCLUDE. A run that met a broken
|
|
667
|
+
* container, recovered and committed work made real progress and must be
|
|
668
|
+
* observed normally. The caller pairs this with `totals.committed`; see
|
|
669
|
+
* `run-cmd.ts`. Carried out separately from `stopReason` because that cannot
|
|
670
|
+
* say it — this path ends as `aborted`, and so does an ordinary crash-out.
|
|
671
|
+
*/
|
|
672
|
+
metUnavailableEnvironment?: true;
|
|
673
|
+
/**
|
|
674
|
+
* One record per round, in order, when the caller asked for them.
|
|
675
|
+
*
|
|
676
|
+
* ⚠️ COLLECTED, NOT ACTED ON. The runner does not consult the brake and
|
|
677
|
+
* must not start: a runner that could stop itself on such a verdict would
|
|
678
|
+
* be a second brake with none of the first one's evidence. `run-cmd` turns
|
|
679
|
+
* these into observations after the run, which is the same producer it has
|
|
680
|
+
* always been — only counting rounds instead of runs.
|
|
681
|
+
*/
|
|
682
|
+
rounds?: RoundFact[];
|
|
683
|
+
/** Set when `beforeFirstRound` refused. The run did nothing at all. */
|
|
684
|
+
refusedBeforeFirstRound?: string;
|
|
685
|
+
/**
|
|
686
|
+
* Set when a round wrote outside the surfaces this run declared.
|
|
687
|
+
*
|
|
688
|
+
* The round was discarded where the trespass was seen — before the gate,
|
|
689
|
+
* before any commit — and the run ends. The caller flags the pursuit; it is
|
|
690
|
+
* deliberately not retried, because the declaration is what is wrong.
|
|
691
|
+
*/
|
|
692
|
+
surfaceViolation?: {
|
|
693
|
+
paths: string[];
|
|
694
|
+
declared: readonly string[];
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
export declare class RunnerError extends Error {
|
|
698
|
+
}
|
|
699
|
+
/** How often a paused run re-reads control.json. Overridable via `pausePollMs`. */
|
|
700
|
+
export declare const DEFAULT_PAUSE_POLL_MS = 5000;
|
|
701
|
+
export declare class RoundRunner {
|
|
702
|
+
private readonly cfg;
|
|
703
|
+
private readonly deps;
|
|
704
|
+
private readonly id;
|
|
705
|
+
/**
|
|
706
|
+
* `proverRejected: 0` is set HERE rather than left absent, and the difference
|
|
707
|
+
* matters: this runner always counts, so a run in which the prover rejected
|
|
708
|
+
* nothing reports a PROVEN zero. Absent stays reserved for a producer that
|
|
709
|
+
* did not count at all — see {@link RunTotals.proverRejected}.
|
|
710
|
+
*/
|
|
711
|
+
private readonly totals;
|
|
712
|
+
/** The most recent deterministic failure; see {@link RunSummary.lastFailure}. */
|
|
713
|
+
private lastFailure;
|
|
714
|
+
/**
|
|
715
|
+
* The last rejection of each item IN THIS RUN, kept for the repair attempt.
|
|
716
|
+
* In memory on purpose: the durable copy is the evidence directory, and a
|
|
717
|
+
* later run that picks the item up again reads `lastFailure` off the item —
|
|
718
|
+
* it does not restore a candidate from a run it did not see rejected.
|
|
719
|
+
*/
|
|
720
|
+
private readonly rejections;
|
|
721
|
+
/**
|
|
722
|
+
* Set only on the path that ends the loop through {@link RoundRunnerDeps.haltRequested},
|
|
723
|
+
* and read only when writing `run.ended`. Held rather than threaded because
|
|
724
|
+
* `loop()` returns a stop reason and nothing else — widening that return to
|
|
725
|
+
* carry a payload only one of its eight answers can have would put the
|
|
726
|
+
* exception in the type every other caller reads.
|
|
727
|
+
*/
|
|
728
|
+
private halt;
|
|
729
|
+
/** F29: the commit this run was cut from, set once, before the first round. */
|
|
730
|
+
private cutBase;
|
|
731
|
+
/**
|
|
732
|
+
* Consecutive rounds whose gate could not run. Reset by any gate that reached
|
|
733
|
+
* a verdict, so it counts a machine that is broken now rather than one that
|
|
734
|
+
* was ever briefly unhealthy.
|
|
735
|
+
*/
|
|
736
|
+
private consecutiveBlocked;
|
|
737
|
+
/**
|
|
738
|
+
* Whether the round now running ended blocked.
|
|
739
|
+
*
|
|
740
|
+
* ⚠️ THE RESET LIVES IN THE LOOP, NOT IN THE ROUND, and that is the whole
|
|
741
|
+
* point of this second field. `runRound` has six exits before the gate — an
|
|
742
|
+
* implementer throw, `abandoned`, a railed path, a no-op, an external halt —
|
|
743
|
+
* and a reset placed anywhere inside it is a reset those exits skip. The
|
|
744
|
+
* counter would then read three blocked gates with ordinary rounds between
|
|
745
|
+
* them as "three in a row", and the halt sentence would be a false statement
|
|
746
|
+
* about the machine.
|
|
747
|
+
*/
|
|
748
|
+
private blockedThisRound;
|
|
749
|
+
/** See {@link RunSummary.metUnavailableEnvironment}. */
|
|
750
|
+
private metUnavailableEnvironment;
|
|
751
|
+
constructor(cfg: LooplyConfig, deps: RoundRunnerDeps, id: RunIdentity);
|
|
752
|
+
run(): Promise<RunSummary>;
|
|
753
|
+
/**
|
|
754
|
+
* One record per round, or null when nothing asked for them.
|
|
755
|
+
*
|
|
756
|
+
* ⚠️ NULL RATHER THAN EMPTY, so "nobody asked" and "no rounds happened" stay
|
|
757
|
+
* different answers. A caller handed `[]` cannot tell which it got.
|
|
758
|
+
*/
|
|
759
|
+
private roundFacts;
|
|
760
|
+
/** Why `beforeFirstRound` said no, so `run()` can put it on the summary. */
|
|
761
|
+
private refusedBeforeFirstRound;
|
|
762
|
+
/** Set when a round wrote outside what this run declared. */
|
|
763
|
+
private surfaceViolation;
|
|
764
|
+
/**
|
|
765
|
+
* Where THIS round failed. Reset at the top of every round, like
|
|
766
|
+
* `blockedThisRound` — a latched value would sign round N+1 with round N's
|
|
767
|
+
* failure, which is the shape that makes a detector fire on one real failure
|
|
768
|
+
* repeated by the recorder.
|
|
769
|
+
*/
|
|
770
|
+
private failedAtThisRound;
|
|
771
|
+
/** Gate steps that passed in THIS round. Reset with everything else per-round. */
|
|
772
|
+
private passingGatesThisRound;
|
|
773
|
+
/**
|
|
774
|
+
* The implementer's sentence about the round in flight, on its way to the
|
|
775
|
+
* ledger (DESIGN §9, `round.ended.note`).
|
|
776
|
+
*
|
|
777
|
+
* HELD ON THE RUNNER RATHER THAN THREADED THROUGH, because every one of the
|
|
778
|
+
* seven ways a round can end goes through `endRound` and the note belongs on
|
|
779
|
+
* all of them — most of all on the ones that threw the work away, where it is
|
|
780
|
+
* the only record of what was attempted. A parameter would have to be added to
|
|
781
|
+
* each exit and the next exit somebody writes would silently omit it.
|
|
782
|
+
*
|
|
783
|
+
* ⚠️ CLEARED AT THE TOP OF EVERY ROUND. A stale note is worse than none: it
|
|
784
|
+
* would attribute one round's account of itself to the next round's outcome.
|
|
785
|
+
*/
|
|
786
|
+
private roundNote;
|
|
787
|
+
/** What this round’s repair was, for `round.ended`. Reset with {@link roundNote}. */
|
|
788
|
+
private roundRepair;
|
|
789
|
+
/**
|
|
790
|
+
* WHAT THIS ROUND DID, FROM THE DIFFERENCE THE ROUND MADE.
|
|
791
|
+
*
|
|
792
|
+
* 🔴 THREE FIELDS ARE RUN-LEVEL ROLLUPS AND MUST NOT BE READ DIRECTLY.
|
|
793
|
+
*
|
|
794
|
+
* `this.lastFailure` is assigned when a failure happens and NEVER cleared, so
|
|
795
|
+
* reading it per round signs round N+1's record with round N's failure — the
|
|
796
|
+
* exact shape that would make `repeated_failure` fire on ONE real failure
|
|
797
|
+
* repeated by the recorder rather than by the machine. Same for
|
|
798
|
+
* `metUnavailableEnvironment`, which latches true for the rest of the run,
|
|
799
|
+
* and `totals.committed`, which only grows. The environment flag is read
|
|
800
|
+
* from `blockedThisRound`, which IS per-round, rather than compared.
|
|
801
|
+
*
|
|
802
|
+
* So each is compared against its value BEFORE the round: what changed during
|
|
803
|
+
* this round is this round's, and what did not is not.
|
|
804
|
+
*/
|
|
805
|
+
private recordRoundFact;
|
|
806
|
+
/** The round loop itself, so `run()` can put an honest ending on a throw. */
|
|
807
|
+
private loop;
|
|
808
|
+
/**
|
|
809
|
+
* Consult the control file, holding here for as long as it says `pause`.
|
|
810
|
+
*
|
|
811
|
+
* Returns `continue` to start the next round, or the reason the run should
|
|
812
|
+
* wind down. `stop` ends the run; `pause` keeps it alive on its branch with
|
|
813
|
+
* its queue intact, so resuming continues the same run instead of paying for
|
|
814
|
+
* a fresh one — that is the whole difference between the two.
|
|
815
|
+
*/
|
|
816
|
+
private awaitControl;
|
|
817
|
+
/** Topmost pickable item. Order IS priority (core `Item`), so the sort is the pick. */
|
|
818
|
+
private topPickable;
|
|
819
|
+
/**
|
|
820
|
+
* The pick, routed through the re-verification triggers (§12 case 19): the
|
|
821
|
+
* topmost item is handed to a round only when `decideReverify` judges its
|
|
822
|
+
* cached evidence fresh. A `reverify` decision — HEAD moved past the threshold,
|
|
823
|
+
* or no cache entry at all, which is the post-discard and never-verified state
|
|
824
|
+
* — sends the item back through verification instead, and the queue is re-read
|
|
825
|
+
* because the verdict may have routed the item out of `ready`, promoting the
|
|
826
|
+
* next one.
|
|
827
|
+
*/
|
|
828
|
+
private pickNext;
|
|
829
|
+
/**
|
|
830
|
+
* Send an item back through verification and apply the verdict to the queue
|
|
831
|
+
* (§10, §12 cases 17–19). Confirmed/amended refills the evidence cache at the
|
|
832
|
+
* HEAD the verifier judged against, so the next lookup is a hit; every other
|
|
833
|
+
* verdict routes the item out of `ready` and the pick moves on.
|
|
834
|
+
*/
|
|
835
|
+
private reverifyItem;
|
|
836
|
+
/**
|
|
837
|
+
* Returns how the round ended plus the item's title, for the notifier — and
|
|
838
|
+
* the halt, when this round is also the last one.
|
|
839
|
+
*/
|
|
840
|
+
private runRound;
|
|
841
|
+
/**
|
|
842
|
+
* Discard the tree, and with it the item's cached evidence — §12 case 19's
|
|
843
|
+
* "always after a discard". Unconditional across every discard path: a
|
|
844
|
+
* requeued or later-unblocked item will be picked again, and its next attempt
|
|
845
|
+
* must not start from the very file:line claims that just led into a wall.
|
|
846
|
+
* (For an item closed by the same call the entry is merely dead weight.)
|
|
847
|
+
*/
|
|
848
|
+
private discardTree;
|
|
849
|
+
/**
|
|
850
|
+
* Discard the tree and requeue: back to `ready` with attempt++ and the reason
|
|
851
|
+
* carried, so the next attempt starts knowing why this one failed (§2.2).
|
|
852
|
+
*/
|
|
853
|
+
private discardAndRequeue;
|
|
854
|
+
/**
|
|
855
|
+
* Write the candidate and its verdict where the reset cannot reach, and
|
|
856
|
+
* answer the fields `round.ended` carries about it.
|
|
857
|
+
*
|
|
858
|
+
* NEVER THROWS. A failure to keep evidence is a fact about the round
|
|
859
|
+
* (`evidenceIncomplete`), not a reason to leave the tree dirty — the discard
|
|
860
|
+
* that follows this must run whatever happened here.
|
|
861
|
+
*/
|
|
862
|
+
private retainRejected;
|
|
863
|
+
private rejectionInput;
|
|
864
|
+
/**
|
|
865
|
+
* What this attempt is told about the last one, and whether that candidate
|
|
866
|
+
* was put back first.
|
|
867
|
+
*
|
|
868
|
+
* RESTORED ONLY WHEN ALL OF THESE HOLD, and each refusal names itself:
|
|
869
|
+
* - the driver can apply a patch and one was retained, whole
|
|
870
|
+
* - HEAD is the base the candidate was written against
|
|
871
|
+
* - every path it touched is inside the project's declared scope and
|
|
872
|
+
* outside its rails — the candidate is re-gated afterwards regardless,
|
|
873
|
+
* but a restore must not put a change somewhere the worker itself may
|
|
874
|
+
* not write
|
|
875
|
+
* A restore that fails leaves the tree as it was (`applyPatch` is
|
|
876
|
+
* all-or-nothing, and the tree is discarded again to be sure) and the
|
|
877
|
+
* worker is told it starts from the base, and why.
|
|
878
|
+
*/
|
|
879
|
+
private prepareRepair;
|
|
880
|
+
/** Records what this round’s repair was, for `round.ended`, and hands the context back unchanged. */
|
|
881
|
+
private noteRepair;
|
|
882
|
+
/**
|
|
883
|
+
* The item’s last rejection from an EARLIER run, when the evidence store can
|
|
884
|
+
* vouch for it — see `RejectedEvidenceSink.latestFor` for every check.
|
|
885
|
+
*
|
|
886
|
+
* ⚠️ A REFUSAL IS RECORDED, NOT SILENT. The attempt then goes ahead briefed
|
|
887
|
+
* from `lastFailure` and starting from the base, exactly as before recovery
|
|
888
|
+
* existed — but `round.ended` says a restart found evidence and why it was
|
|
889
|
+
* not used, so "no repair context" can be told apart from "refused one".
|
|
890
|
+
*/
|
|
891
|
+
private recoverRejection;
|
|
892
|
+
/**
|
|
893
|
+
* Discard the tree and put the item back exactly as it was found.
|
|
894
|
+
*
|
|
895
|
+
* THE ATTEMPT IS NOT SPENT, and that is the whole difference from
|
|
896
|
+
* `discardAndRequeue`. An attempt is the budget for an item's implementation
|
|
897
|
+
* FAILING, and nothing failed here — the loop was stopped from outside before
|
|
898
|
+
* this round could reach a verdict. Spending one anyway would mean an item
|
|
899
|
+
* that keeps meeting the same external boundary is `closed` by
|
|
900
|
+
* `afterSpentAttempt` after three interruptions, without a single check ever
|
|
901
|
+
* having gone red, and while whatever the run was waiting for may since have
|
|
902
|
+
* been answered.
|
|
903
|
+
*
|
|
904
|
+
* The tree is still discarded, because every path in this file discards
|
|
905
|
+
* un-gated work: `run()` refuses to start on a dirty tree, and leftovers
|
|
906
|
+
* would fold into the next round's diff.
|
|
907
|
+
*
|
|
908
|
+
* The reason still travels on the item, which is what a person or a later
|
|
909
|
+
* attempt reads to find out why this round produced nothing.
|
|
910
|
+
*/
|
|
911
|
+
private discardAndReturn;
|
|
912
|
+
private endRound;
|
|
913
|
+
/**
|
|
914
|
+
* Queue writes ride the store's optimistic concurrency. When the phone edited
|
|
915
|
+
* the item mid-round the runner loses the version race — its write records
|
|
916
|
+
* what physically happened to the round, so it refetches and lands on top of
|
|
917
|
+
* the curation edit rather than crashing an overnight run over the race.
|
|
918
|
+
*/
|
|
919
|
+
private patchItem;
|
|
920
|
+
/** Same inputs `doctor` probes: prod env files that exist, plus the live env. */
|
|
921
|
+
private collectEnvValues;
|
|
922
|
+
private emit;
|
|
923
|
+
}
|
|
924
|
+
//# sourceMappingURL=round-runner.d.ts.map
|