@telora/daemon 0.22.97 → 0.22.131
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/build-info.json +4 -3
- package/dist/cli/verify-setup-config.d.ts +4 -3
- package/dist/cli/verify-setup-config.d.ts.map +1 -1
- package/dist/cli/verify-setup-config.js.map +1 -1
- package/dist/completion/commit-verdict-release.d.ts +49 -0
- package/dist/completion/commit-verdict-release.d.ts.map +1 -0
- package/dist/completion/commit-verdict-release.js +240 -0
- package/dist/completion/commit-verdict-release.js.map +1 -0
- package/dist/completion/completion-phase-registry.d.ts +10 -4
- package/dist/completion/completion-phase-registry.d.ts.map +1 -1
- package/dist/completion/completion-phase-registry.js +19 -7
- package/dist/completion/completion-phase-registry.js.map +1 -1
- package/dist/completion/detector.d.ts.map +1 -1
- package/dist/completion/detector.js +1 -0
- package/dist/completion/detector.js.map +1 -1
- package/dist/completion/event-entry-phases.d.ts +6 -3
- package/dist/completion/event-entry-phases.d.ts.map +1 -1
- package/dist/completion/event-entry-phases.js +135 -76
- package/dist/completion/event-entry-phases.js.map +1 -1
- package/dist/completion/event-phases.d.ts +24 -3
- package/dist/completion/event-phases.d.ts.map +1 -1
- package/dist/completion/event-phases.js +9 -9
- package/dist/completion/event-phases.js.map +1 -1
- package/dist/completion/event.d.ts +8 -0
- package/dist/completion/event.d.ts.map +1 -1
- package/dist/completion/event.js +47 -21
- package/dist/completion/event.js.map +1 -1
- package/dist/completion/exit-classification.d.ts.map +1 -1
- package/dist/completion/exit-classification.js +1 -0
- package/dist/completion/exit-classification.js.map +1 -1
- package/dist/completion/merge-phase.d.ts +21 -9
- package/dist/completion/merge-phase.d.ts.map +1 -1
- package/dist/completion/merge-phase.js +35 -10
- package/dist/completion/merge-phase.js.map +1 -1
- package/dist/completion/review-auto-approval-record.d.ts +19 -0
- package/dist/completion/review-auto-approval-record.d.ts.map +1 -0
- package/dist/completion/review-auto-approval-record.js +102 -0
- package/dist/completion/review-auto-approval-record.js.map +1 -0
- package/dist/completion/review-cycle-cap.d.ts +62 -0
- package/dist/completion/review-cycle-cap.d.ts.map +1 -0
- package/dist/completion/review-cycle-cap.js +180 -0
- package/dist/completion/review-cycle-cap.js.map +1 -0
- package/dist/completion/review-exit-deps.d.ts +17 -2
- package/dist/completion/review-exit-deps.d.ts.map +1 -1
- package/dist/completion/review-exit-deps.js +19 -2
- package/dist/completion/review-exit-deps.js.map +1 -1
- package/dist/completion/review-exit-escalations.d.ts +45 -23
- package/dist/completion/review-exit-escalations.d.ts.map +1 -1
- package/dist/completion/review-exit-escalations.js +15 -74
- package/dist/completion/review-exit-escalations.js.map +1 -1
- package/dist/completion/review-exit-evidence.d.ts +9 -0
- package/dist/completion/review-exit-evidence.d.ts.map +1 -1
- package/dist/completion/review-exit-evidence.js +4 -1
- package/dist/completion/review-exit-evidence.js.map +1 -1
- package/dist/completion/review-exit-foreign-findings.d.ts +151 -0
- package/dist/completion/review-exit-foreign-findings.d.ts.map +1 -0
- package/dist/completion/review-exit-foreign-findings.js +474 -0
- package/dist/completion/review-exit-foreign-findings.js.map +1 -0
- package/dist/completion/review-exit-phase.d.ts.map +1 -1
- package/dist/completion/review-exit-phase.js +71 -64
- package/dist/completion/review-exit-phase.js.map +1 -1
- package/dist/completion/review-exit-progress.d.ts +20 -0
- package/dist/completion/review-exit-progress.d.ts.map +1 -1
- package/dist/completion/review-exit-progress.js +28 -19
- package/dist/completion/review-exit-progress.js.map +1 -1
- package/dist/completion/review-exit-rehoming.d.ts +5 -0
- package/dist/completion/review-exit-rehoming.d.ts.map +1 -1
- package/dist/completion/review-exit-rehoming.js.map +1 -1
- package/dist/completion/review-exit-verdict-gate.d.ts +202 -0
- package/dist/completion/review-exit-verdict-gate.d.ts.map +1 -0
- package/dist/completion/review-exit-verdict-gate.js +228 -0
- package/dist/completion/review-exit-verdict-gate.js.map +1 -0
- package/dist/completion/review-next-step.d.ts +62 -0
- package/dist/completion/review-next-step.d.ts.map +1 -0
- package/dist/completion/review-next-step.js +63 -0
- package/dist/completion/review-next-step.js.map +1 -0
- package/dist/completion/session-hold-sweep-deps.d.ts +17 -0
- package/dist/completion/session-hold-sweep-deps.d.ts.map +1 -0
- package/dist/completion/session-hold-sweep-deps.js +89 -0
- package/dist/completion/session-hold-sweep-deps.js.map +1 -0
- package/dist/completion/session-hold.d.ts +180 -0
- package/dist/completion/session-hold.d.ts.map +1 -0
- package/dist/completion/session-hold.js +238 -0
- package/dist/completion/session-hold.js.map +1 -0
- package/dist/completion/state-cascade.d.ts +19 -0
- package/dist/completion/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade.js +85 -31
- package/dist/completion/state-cascade.js.map +1 -1
- package/dist/completion/team-lifecycle.d.ts +35 -2
- package/dist/completion/team-lifecycle.d.ts.map +1 -1
- package/dist/completion/team-lifecycle.js +165 -94
- package/dist/completion/team-lifecycle.js.map +1 -1
- package/dist/completion/team-phase.d.ts +27 -15
- package/dist/completion/team-phase.d.ts.map +1 -1
- package/dist/completion/team-phase.js +34 -15
- package/dist/completion/team-phase.js.map +1 -1
- package/dist/delivery/commit-verdict-hold.d.ts +55 -0
- package/dist/delivery/commit-verdict-hold.d.ts.map +1 -0
- package/dist/delivery/commit-verdict-hold.js +118 -0
- package/dist/delivery/commit-verdict-hold.js.map +1 -0
- package/dist/directive/directive-dispatch.d.ts.map +1 -1
- package/dist/directive/directive-dispatch.js +10 -3
- package/dist/directive/directive-dispatch.js.map +1 -1
- package/dist/directive/directive-executor.d.ts.map +1 -1
- package/dist/directive/directive-executor.js +1 -0
- package/dist/directive/directive-executor.js.map +1 -1
- package/dist/directive/directive-queue.d.ts.map +1 -1
- package/dist/directive/directive-queue.js +6 -1
- package/dist/directive/directive-queue.js.map +1 -1
- package/dist/directive/phase-sync.d.ts +29 -2
- package/dist/directive/phase-sync.d.ts.map +1 -1
- package/dist/directive/phase-sync.js +30 -6
- package/dist/directive/phase-sync.js.map +1 -1
- package/dist/drift/artifact-ref-shape.d.ts +34 -0
- package/dist/drift/artifact-ref-shape.d.ts.map +1 -0
- package/dist/drift/artifact-ref-shape.js +94 -0
- package/dist/drift/artifact-ref-shape.js.map +1 -0
- package/dist/drift/drift-eval-loop.d.ts +7 -0
- package/dist/drift/drift-eval-loop.d.ts.map +1 -1
- package/dist/drift/drift-eval-loop.js +34 -5
- package/dist/drift/drift-eval-loop.js.map +1 -1
- package/dist/drift/drift-evaluator.d.ts.map +1 -1
- package/dist/drift/drift-evaluator.js +8 -3
- package/dist/drift/drift-evaluator.js.map +1 -1
- package/dist/focus/awaiting-slot.d.ts +34 -0
- package/dist/focus/awaiting-slot.d.ts.map +1 -0
- package/dist/focus/awaiting-slot.js +26 -0
- package/dist/focus/awaiting-slot.js.map +1 -0
- package/dist/focus/focus-lifecycle.js +2 -2
- package/dist/focus/focus-lifecycle.js.map +1 -1
- package/dist/focus/focus-phase.d.ts.map +1 -1
- package/dist/focus/focus-phase.js +3 -1
- package/dist/focus/focus-phase.js.map +1 -1
- package/dist/focus/focus-spawn-decision.d.ts +62 -0
- package/dist/focus/focus-spawn-decision.d.ts.map +1 -0
- package/dist/focus/focus-spawn-decision.js +41 -0
- package/dist/focus/focus-spawn-decision.js.map +1 -0
- package/dist/focus/focus-team-state.d.ts.map +1 -1
- package/dist/focus/focus-team-state.js +1 -13
- package/dist/focus/focus-team-state.js.map +1 -1
- package/dist/focus/listener-spawn.d.ts +16 -55
- package/dist/focus/listener-spawn.d.ts.map +1 -1
- package/dist/focus/listener-spawn.js +102 -64
- package/dist/focus/listener-spawn.js.map +1 -1
- package/dist/focus/listener-state.d.ts.map +1 -1
- package/dist/focus/listener-state.js +4 -1
- package/dist/focus/listener-state.js.map +1 -1
- package/dist/focus/listener.d.ts +41 -2
- package/dist/focus/listener.d.ts.map +1 -1
- package/dist/focus/listener.js +135 -83
- package/dist/focus/listener.js.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.d.ts +69 -0
- package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -0
- package/dist/focus/pending-spawn-pass-deps.js +34 -0
- package/dist/focus/pending-spawn-pass-deps.js.map +1 -0
- package/dist/focus/pending-spawn-review-next-step.d.ts +83 -0
- package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -0
- package/dist/focus/pending-spawn-review-next-step.js +325 -0
- package/dist/focus/pending-spawn-review-next-step.js.map +1 -0
- package/dist/focus/review-cycle-cap-hold.d.ts +132 -0
- package/dist/focus/review-cycle-cap-hold.d.ts.map +1 -0
- package/dist/focus/review-cycle-cap-hold.js +178 -0
- package/dist/focus/review-cycle-cap-hold.js.map +1 -0
- package/dist/focus/team-actionable-work.js +2 -2
- package/dist/focus/verify-open-issues.d.ts +22 -0
- package/dist/focus/verify-open-issues.d.ts.map +1 -1
- package/dist/focus/verify-open-issues.js +118 -57
- package/dist/focus/verify-open-issues.js.map +1 -1
- package/dist/focus/verify-routing-passes.d.ts +32 -0
- package/dist/focus/verify-routing-passes.d.ts.map +1 -0
- package/dist/focus/verify-routing-passes.js +18 -0
- package/dist/focus/verify-routing-passes.js.map +1 -0
- package/dist/git/exec.d.ts.map +1 -1
- package/dist/git/exec.js +2 -1
- package/dist/git/exec.js.map +1 -1
- package/dist/git/index.d.ts.map +1 -1
- package/dist/git/index.js +9 -5
- package/dist/git/index.js.map +1 -1
- package/dist/merge/focus-merge.d.ts +16 -2
- package/dist/merge/focus-merge.d.ts.map +1 -1
- package/dist/merge/focus-merge.js +53 -30
- package/dist/merge/focus-merge.js.map +1 -1
- package/dist/merge/merge-back-loop.d.ts +5 -0
- package/dist/merge/merge-back-loop.d.ts.map +1 -1
- package/dist/merge/merge-back-loop.js +17 -8
- package/dist/merge/merge-back-loop.js.map +1 -1
- package/dist/merge/merge-gate-coverage.d.ts +94 -0
- package/dist/merge/merge-gate-coverage.d.ts.map +1 -0
- package/dist/merge/merge-gate-coverage.js +217 -0
- package/dist/merge/merge-gate-coverage.js.map +1 -0
- package/dist/prompt/focus-prompt-builder.d.ts.map +1 -1
- package/dist/prompt/focus-prompt-builder.js +6 -0
- package/dist/prompt/focus-prompt-builder.js.map +1 -1
- package/dist/prompt/prompt-listing.d.ts.map +1 -1
- package/dist/prompt/prompt-listing.js +8 -0
- package/dist/prompt/prompt-listing.js.map +1 -1
- package/dist/prompt/team-prompt-base.d.ts.map +1 -1
- package/dist/prompt/team-prompt-base.js +5 -1
- package/dist/prompt/team-prompt-base.js.map +1 -1
- package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
- package/dist/prompt-sections/execution-sections.js +14 -39
- package/dist/prompt-sections/execution-sections.js.map +1 -1
- package/dist/prompt-sections/gate-ownership.d.ts +36 -0
- package/dist/prompt-sections/gate-ownership.d.ts.map +1 -0
- package/dist/prompt-sections/gate-ownership.js +68 -0
- package/dist/prompt-sections/gate-ownership.js.map +1 -0
- package/dist/prompt-sections/gate-verdict-section.d.ts +58 -0
- package/dist/prompt-sections/gate-verdict-section.d.ts.map +1 -0
- package/dist/prompt-sections/gate-verdict-section.js +88 -0
- package/dist/prompt-sections/gate-verdict-section.js.map +1 -0
- package/dist/prompt-sections/persona-sections.d.ts +10 -0
- package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
- package/dist/prompt-sections/persona-sections.js +35 -11
- package/dist/prompt-sections/persona-sections.js.map +1 -1
- package/dist/prompt-sections/shared.js +1 -1
- package/dist/prompt-sections/shared.js.map +1 -1
- package/dist/queries/agent-resolvable-promotion.d.ts +6 -3
- package/dist/queries/agent-resolvable-promotion.d.ts.map +1 -1
- package/dist/queries/agent-resolvable-promotion.js +20 -9
- package/dist/queries/agent-resolvable-promotion.js.map +1 -1
- package/dist/queries/deliveries.d.ts +46 -4
- package/dist/queries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries.js +69 -16
- package/dist/queries/deliveries.js.map +1 -1
- package/dist/queries/delivery-gate-state.d.ts +159 -1
- package/dist/queries/delivery-gate-state.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state.js +95 -14
- package/dist/queries/delivery-gate-state.js.map +1 -1
- package/dist/queries/delivery-write-discipline.d.ts +65 -0
- package/dist/queries/delivery-write-discipline.d.ts.map +1 -0
- package/dist/queries/delivery-write-discipline.js +101 -0
- package/dist/queries/delivery-write-discipline.js.map +1 -0
- package/dist/queries/escalation-consumption.d.ts +11 -0
- package/dist/queries/escalation-consumption.d.ts.map +1 -1
- package/dist/queries/escalation-consumption.js +22 -0
- package/dist/queries/escalation-consumption.js.map +1 -1
- package/dist/queries/escalation-spool.d.ts +75 -0
- package/dist/queries/escalation-spool.d.ts.map +1 -0
- package/dist/queries/escalation-spool.js +232 -0
- package/dist/queries/escalation-spool.js.map +1 -0
- package/dist/queries/escalation-suppression.d.ts.map +1 -1
- package/dist/queries/escalation-suppression.js +2 -0
- package/dist/queries/escalation-suppression.js.map +1 -1
- package/dist/queries/escalations.js +1 -1
- package/dist/queries/filing-observation.d.ts.map +1 -1
- package/dist/queries/filing-observation.js +2 -0
- package/dist/queries/filing-observation.js.map +1 -1
- package/dist/queries/focus-discovery.d.ts +4 -4
- package/dist/queries/focus-discovery.d.ts.map +1 -1
- package/dist/queries/focus-discovery.js +1 -0
- package/dist/queries/focus-discovery.js.map +1 -1
- package/dist/queries/focus-review-approval.d.ts +84 -0
- package/dist/queries/focus-review-approval.d.ts.map +1 -0
- package/dist/queries/focus-review-approval.js +158 -0
- package/dist/queries/focus-review-approval.js.map +1 -0
- package/dist/queries/focuses.d.ts +6 -5
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +9 -5
- package/dist/queries/focuses.js.map +1 -1
- package/dist/queries/incident-correlation.d.ts +5 -4
- package/dist/queries/incident-correlation.d.ts.map +1 -1
- package/dist/queries/incident-correlation.js +11 -5
- package/dist/queries/incident-correlation.js.map +1 -1
- package/dist/queries/issues.d.ts.map +1 -1
- package/dist/queries/issues.js +2 -1
- package/dist/queries/issues.js.map +1 -1
- package/dist/queries/loop-refusal-observation.d.ts +64 -0
- package/dist/queries/loop-refusal-observation.d.ts.map +1 -0
- package/dist/queries/loop-refusal-observation.js +137 -0
- package/dist/queries/loop-refusal-observation.js.map +1 -0
- package/dist/queries/schemas.d.ts +9 -0
- package/dist/queries/schemas.d.ts.map +1 -1
- package/dist/queries/schemas.js +11 -3
- package/dist/queries/schemas.js.map +1 -1
- package/dist/queries/shared.js +1 -1
- package/dist/queries/verification.d.ts +15 -0
- package/dist/queries/verification.d.ts.map +1 -1
- package/dist/queries/verification.js +1 -14
- package/dist/queries/verification.js.map +1 -1
- package/dist/queries/wire-contract.generated.d.ts +3 -0
- package/dist/queries/wire-contract.generated.d.ts.map +1 -1
- package/dist/queries/wire-contract.generated.js +3 -0
- package/dist/queries/wire-contract.generated.js.map +1 -1
- package/dist/resolvers/assembly-engine.d.ts.map +1 -1
- package/dist/resolvers/assembly-engine.js +3 -1
- package/dist/resolvers/assembly-engine.js.map +1 -1
- package/dist/resolvers/git-diff-against-base.d.ts +5 -2
- package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
- package/dist/resolvers/git-diff-against-base.js +121 -39
- package/dist/resolvers/git-diff-against-base.js.map +1 -1
- package/dist/resolvers/shared/git-diff.d.ts +2 -0
- package/dist/resolvers/shared/git-diff.d.ts.map +1 -1
- package/dist/resolvers/shared/git-diff.js +5 -1
- package/dist/resolvers/shared/git-diff.js.map +1 -1
- package/dist/resolvers/shared/review-window-commits.d.ts +96 -0
- package/dist/resolvers/shared/review-window-commits.d.ts.map +1 -0
- package/dist/resolvers/shared/review-window-commits.js +262 -0
- package/dist/resolvers/shared/review-window-commits.js.map +1 -0
- package/dist/session/session-lineage.d.ts.map +1 -1
- package/dist/session/session-lineage.js +4 -1
- package/dist/session/session-lineage.js.map +1 -1
- package/dist/shell/config.d.ts.map +1 -1
- package/dist/shell/config.js +10 -9
- package/dist/shell/config.js.map +1 -1
- package/dist/shell/fail-stop.d.ts +18 -0
- package/dist/shell/fail-stop.d.ts.map +1 -0
- package/dist/shell/fail-stop.js +53 -0
- package/dist/shell/fail-stop.js.map +1 -0
- package/dist/shell/graceful-shutdown.d.ts +48 -0
- package/dist/shell/graceful-shutdown.d.ts.map +1 -0
- package/dist/shell/graceful-shutdown.js +152 -0
- package/dist/shell/graceful-shutdown.js.map +1 -0
- package/dist/shell/heartbeat.d.ts.map +1 -1
- package/dist/shell/heartbeat.js +5 -4
- package/dist/shell/heartbeat.js.map +1 -1
- package/dist/shell/log.d.ts.map +1 -1
- package/dist/shell/log.js +4 -1
- package/dist/shell/log.js.map +1 -1
- package/dist/shell/stop-request.d.ts.map +1 -1
- package/dist/shell/stop-request.js +2 -1
- package/dist/shell/stop-request.js.map +1 -1
- package/dist/shell/unified-shell-status.d.ts +6 -0
- package/dist/shell/unified-shell-status.d.ts.map +1 -1
- package/dist/shell/unified-shell-status.js +9 -2
- package/dist/shell/unified-shell-status.js.map +1 -1
- package/dist/shell/unified-shell.d.ts.map +1 -1
- package/dist/shell/unified-shell.js +41 -114
- package/dist/shell/unified-shell.js.map +1 -1
- package/dist/spawn/lifecycle.d.ts +12 -0
- package/dist/spawn/lifecycle.d.ts.map +1 -1
- package/dist/spawn/lifecycle.js +25 -21
- package/dist/spawn/lifecycle.js.map +1 -1
- package/dist/spawn/prompt-assembly.d.ts +19 -1
- package/dist/spawn/prompt-assembly.d.ts.map +1 -1
- package/dist/spawn/prompt-assembly.js +70 -21
- package/dist/spawn/prompt-assembly.js.map +1 -1
- package/dist/spawn/review-hold-park.d.ts.map +1 -1
- package/dist/spawn/review-hold-park.js +18 -8
- package/dist/spawn/review-hold-park.js.map +1 -1
- package/dist/spawn/spawn-cooldown.d.ts.map +1 -1
- package/dist/spawn/spawn-cooldown.js +4 -0
- package/dist/spawn/spawn-cooldown.js.map +1 -1
- package/dist/spawn/spawn-decision.d.ts.map +1 -1
- package/dist/spawn/spawn-decision.js +2 -1
- package/dist/spawn/spawn-decision.js.map +1 -1
- package/dist/spawn/worktree-session.d.ts +6 -0
- package/dist/spawn/worktree-session.d.ts.map +1 -1
- package/dist/spawn/worktree-session.js +15 -2
- package/dist/spawn/worktree-session.js.map +1 -1
- package/dist/testing/fixtures/index.d.ts +10 -1
- package/dist/testing/fixtures/index.d.ts.map +1 -1
- package/dist/testing/fixtures/index.js +59 -1
- package/dist/testing/fixtures/index.js.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.d.ts +34 -0
- package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -0
- package/dist/testing/fixtures/pending-spawn-world.js +92 -0
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -0
- package/dist/types/config.d.ts +9 -6
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/verify/commit-gate-configured.d.ts +86 -0
- package/dist/verify/commit-gate-configured.d.ts.map +1 -0
- package/dist/verify/commit-gate-configured.js +234 -0
- package/dist/verify/commit-gate-configured.js.map +1 -0
- package/dist/verify/commit-verdict-record.d.ts +98 -0
- package/dist/verify/commit-verdict-record.d.ts.map +1 -0
- package/dist/verify/commit-verdict-record.js +297 -0
- package/dist/verify/commit-verdict-record.js.map +1 -0
- package/dist/verify/explicit-gate-outcome.d.ts +161 -0
- package/dist/verify/explicit-gate-outcome.d.ts.map +1 -0
- package/dist/verify/explicit-gate-outcome.js +215 -0
- package/dist/verify/explicit-gate-outcome.js.map +1 -0
- package/dist/verify/explicit-rearm.d.ts +27 -0
- package/dist/verify/explicit-rearm.d.ts.map +1 -0
- package/dist/verify/explicit-rearm.js +161 -0
- package/dist/verify/explicit-rearm.js.map +1 -0
- package/dist/verify/explicit-run-ledger.d.ts +26 -0
- package/dist/verify/explicit-run-ledger.d.ts.map +1 -0
- package/dist/verify/explicit-run-ledger.js +93 -0
- package/dist/verify/explicit-run-ledger.js.map +1 -0
- package/dist/verify/failure-signature.d.ts.map +1 -1
- package/dist/verify/failure-signature.js +5 -1
- package/dist/verify/failure-signature.js.map +1 -1
- package/dist/verify/gate-run-registry.d.ts +105 -0
- package/dist/verify/gate-run-registry.d.ts.map +1 -0
- package/dist/verify/gate-run-registry.js +111 -0
- package/dist/verify/gate-run-registry.js.map +1 -0
- package/dist/verify/gate-verdict-source.d.ts +68 -0
- package/dist/verify/gate-verdict-source.d.ts.map +1 -0
- package/dist/verify/gate-verdict-source.js +143 -0
- package/dist/verify/gate-verdict-source.js.map +1 -0
- package/dist/verify/judged-commit-gate.d.ts +11 -0
- package/dist/verify/judged-commit-gate.d.ts.map +1 -0
- package/dist/verify/judged-commit-gate.js +48 -0
- package/dist/verify/judged-commit-gate.js.map +1 -0
- package/dist/verify/rework-judgment.d.ts +58 -0
- package/dist/verify/rework-judgment.d.ts.map +1 -0
- package/dist/verify/rework-judgment.js +54 -0
- package/dist/verify/rework-judgment.js.map +1 -0
- package/dist/verify/verification-attribution.d.ts +105 -0
- package/dist/verify/verification-attribution.d.ts.map +1 -0
- package/dist/verify/verification-attribution.js +322 -0
- package/dist/verify/verification-attribution.js.map +1 -0
- package/dist/verify/verification-baseline-run.d.ts +123 -0
- package/dist/verify/verification-baseline-run.d.ts.map +1 -0
- package/dist/verify/verification-baseline-run.js +386 -0
- package/dist/verify/verification-baseline-run.js.map +1 -0
- package/dist/verify/verification-baseline.d.ts +117 -28
- package/dist/verify/verification-baseline.d.ts.map +1 -1
- package/dist/verify/verification-baseline.js +147 -120
- package/dist/verify/verification-baseline.js.map +1 -1
- package/dist/verify/verification-checkout.d.ts +32 -6
- package/dist/verify/verification-checkout.d.ts.map +1 -1
- package/dist/verify/verification-checkout.js +132 -8
- package/dist/verify/verification-checkout.js.map +1 -1
- package/dist/verify/verification-commit-sharing.d.ts +84 -0
- package/dist/verify/verification-commit-sharing.d.ts.map +1 -0
- package/dist/verify/verification-commit-sharing.js +416 -0
- package/dist/verify/verification-commit-sharing.js.map +1 -0
- package/dist/verify/verification-config.d.ts +76 -0
- package/dist/verify/verification-config.d.ts.map +1 -1
- package/dist/verify/verification-config.js +112 -14
- package/dist/verify/verification-config.js.map +1 -1
- package/dist/verify/verification-default-on.d.ts +102 -19
- package/dist/verify/verification-default-on.d.ts.map +1 -1
- package/dist/verify/verification-default-on.js +307 -38
- package/dist/verify/verification-default-on.js.map +1 -1
- package/dist/verify/verification-deps-default.d.ts.map +1 -1
- package/dist/verify/verification-deps-default.js +50 -43
- package/dist/verify/verification-deps-default.js.map +1 -1
- package/dist/verify/verification-deps.d.ts +86 -7
- package/dist/verify/verification-deps.d.ts.map +1 -1
- package/dist/verify/verification-deterministic.d.ts +56 -2
- package/dist/verify/verification-deterministic.d.ts.map +1 -1
- package/dist/verify/verification-deterministic.js +44 -25
- package/dist/verify/verification-deterministic.js.map +1 -1
- package/dist/verify/verification-diagnostics.d.ts +16 -0
- package/dist/verify/verification-diagnostics.d.ts.map +1 -0
- package/dist/verify/verification-diagnostics.js +219 -0
- package/dist/verify/verification-diagnostics.js.map +1 -0
- package/dist/verify/verification-engine.d.ts +12 -8
- package/dist/verify/verification-engine.d.ts.map +1 -1
- package/dist/verify/verification-engine.js +118 -102
- package/dist/verify/verification-engine.js.map +1 -1
- package/dist/verify/verification-evidence-unavailable-feedback.d.ts +2 -1
- package/dist/verify/verification-evidence-unavailable-feedback.d.ts.map +1 -1
- package/dist/verify/verification-evidence-unavailable-feedback.js +19 -5
- package/dist/verify/verification-evidence-unavailable-feedback.js.map +1 -1
- package/dist/verify/verification-feedback.d.ts +21 -34
- package/dist/verify/verification-feedback.d.ts.map +1 -1
- package/dist/verify/verification-feedback.js +37 -88
- package/dist/verify/verification-feedback.js.map +1 -1
- package/dist/verify/verification-gate-stages.d.ts +110 -0
- package/dist/verify/verification-gate-stages.d.ts.map +1 -0
- package/dist/verify/verification-gate-stages.js +179 -0
- package/dist/verify/verification-gate-stages.js.map +1 -0
- package/dist/verify/verification-history-reset.d.ts +61 -0
- package/dist/verify/verification-history-reset.d.ts.map +1 -0
- package/dist/verify/verification-history-reset.js +90 -0
- package/dist/verify/verification-history-reset.js.map +1 -0
- package/dist/verify/verification-manifest.d.ts.map +1 -1
- package/dist/verify/verification-manifest.js +3 -1
- package/dist/verify/verification-manifest.js.map +1 -1
- package/dist/verify/verification-rework-messages.d.ts +19 -0
- package/dist/verify/verification-rework-messages.d.ts.map +1 -0
- package/dist/verify/verification-rework-messages.js +52 -0
- package/dist/verify/verification-rework-messages.js.map +1 -0
- package/dist/verify/verification-timeout-fault.d.ts +147 -0
- package/dist/verify/verification-timeout-fault.d.ts.map +1 -0
- package/dist/verify/verification-timeout-fault.js +211 -0
- package/dist/verify/verification-timeout-fault.js.map +1 -0
- package/dist/verify/verify-gate-stall.d.ts +5 -1
- package/dist/verify/verify-gate-stall.d.ts.map +1 -1
- package/dist/verify/verify-gate-stall.js +10 -1
- package/dist/verify/verify-gate-stall.js.map +1 -1
- package/dist/worktree/install-inputs.d.ts +89 -0
- package/dist/worktree/install-inputs.d.ts.map +1 -0
- package/dist/worktree/install-inputs.js +625 -0
- package/dist/worktree/install-inputs.js.map +1 -0
- package/dist/worktree/install-script-effects.d.ts +30 -0
- package/dist/worktree/install-script-effects.d.ts.map +1 -0
- package/dist/worktree/install-script-effects.js +524 -0
- package/dist/worktree/install-script-effects.js.map +1 -0
- package/dist/worktree/install-script-tokens.d.ts +57 -0
- package/dist/worktree/install-script-tokens.d.ts.map +1 -0
- package/dist/worktree/install-script-tokens.js +299 -0
- package/dist/worktree/install-script-tokens.js.map +1 -0
- package/dist/worktree/provision.d.ts +27 -4
- package/dist/worktree/provision.d.ts.map +1 -1
- package/dist/worktree/provision.js +46 -7
- package/dist/worktree/provision.js.map +1 -1
- package/dist/worktree/safety.d.ts +11 -0
- package/dist/worktree/safety.d.ts.map +1 -1
- package/dist/worktree/safety.js +20 -3
- package/dist/worktree/safety.js.map +1 -1
- package/dist/worktree/verify-interlock.d.ts.map +1 -1
- package/dist/worktree/verify-interlock.js +3 -1
- package/dist/worktree/verify-interlock.js.map +1 -1
- package/dist/worktree/worktree-package-provisioning.d.ts +75 -0
- package/dist/worktree/worktree-package-provisioning.d.ts.map +1 -0
- package/dist/worktree/worktree-package-provisioning.js +362 -0
- package/dist/worktree/worktree-package-provisioning.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { DaemonConfig } from '../types/index.js';
|
|
2
|
+
import { type ResolvedDefaultVerification } from './verification-config.js';
|
|
3
|
+
import type { VerifyManifestReader } from './verification-manifest.js';
|
|
4
|
+
import { type JudgedCommitRead } from './verification-default-on.js';
|
|
5
|
+
import { type CommitVerdict, type CommitVerdictGate } from './commit-verdict-record.js';
|
|
6
|
+
import { type RecordedGateOutcome } from './gate-run-registry.js';
|
|
7
|
+
/** The delivery the question is asked about. */
|
|
8
|
+
export interface CommitGateSubject {
|
|
9
|
+
productId: string;
|
|
10
|
+
focusId: string;
|
|
11
|
+
focusReadOnly: boolean;
|
|
12
|
+
deliveryId: string;
|
|
13
|
+
injectionId: string | null;
|
|
14
|
+
/** The delivery's gate_state as the caller read it: it carries the explicit-method verdict across a restart. */
|
|
15
|
+
gateState?: unknown;
|
|
16
|
+
}
|
|
17
|
+
/** What governs a delivery's gate verdict. */
|
|
18
|
+
export interface CommitGateResolution {
|
|
19
|
+
/** Whether the verification tick runs a gate whose verdict routing can wait on. */
|
|
20
|
+
configured: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The gate the delivery's per-commit verdict is recorded under -- its explicit
|
|
23
|
+
* row's command + timeout, or the product's default-on gate -- or null when no
|
|
24
|
+
* per-commit record can govern it.
|
|
25
|
+
*/
|
|
26
|
+
gate: CommitVerdictGate | null;
|
|
27
|
+
/**
|
|
28
|
+
* The gate an explicit run's recorded verdict must have been rendered under to
|
|
29
|
+
* govern the delivery (explicitGateKeyOf over its row's method + config); null
|
|
30
|
+
* when the row names no method or cannot be read, so no explicit verdict governs
|
|
31
|
+
* it; absent when an older edge sends the row without its columns, so a verdict
|
|
32
|
+
* of any gate does.
|
|
33
|
+
*/
|
|
34
|
+
explicitGateKey?: string | null;
|
|
35
|
+
}
|
|
36
|
+
/** The gate reads a verify routing decision takes (review exit, release pass, live open-work pass). */
|
|
37
|
+
export interface CommitGateSeams {
|
|
38
|
+
/** Whether a gate is configured for the delivery, and which gate governs its verdict. */
|
|
39
|
+
resolveCommitGate: (subject: CommitGateSubject) => Promise<CommitGateResolution>;
|
|
40
|
+
/**
|
|
41
|
+
* A bare configured-ness predicate: supplied only by a partial deps object (a
|
|
42
|
+
* test), it answers alone and asks the record with no gate, and it wins over a
|
|
43
|
+
* resolver beside it. Production wires resolveCommitGate only.
|
|
44
|
+
*/
|
|
45
|
+
isCommitGateConfigured?: (subject: CommitGateSubject) => Promise<boolean>;
|
|
46
|
+
/** The commit a focus's deliveries are judged on (its worktree HEAD), or null when unreadable. */
|
|
47
|
+
resolveJudgedCommit: (focusId: string) => string | null;
|
|
48
|
+
/** The per-commit verdict recorded for the focus commit under `gate`; a null gate matches no record. */
|
|
49
|
+
readCommitVerdict: (productId: string, focusId: string, sha: string, gate: CommitVerdictGate | null) => CommitVerdict | null;
|
|
50
|
+
/** The outcome an explicit-method run recorded for the delivery (in process, else on `gateState`), when it applies to `sha` under `gateKey`. */
|
|
51
|
+
readDeliveryGateOutcome: (deliveryId: string, sha: string | null, gateState?: unknown, gateKey?: string | null) => RecordedGateOutcome | null;
|
|
52
|
+
/** Whether a gate run that may judge `sha` on the focus is selected or in flight. */
|
|
53
|
+
hasPendingGateRun: (focusId: string, sha: string | null) => boolean;
|
|
54
|
+
}
|
|
55
|
+
/** A delivery row as the explicit-identity read takes it (undefined columns: an edge that does not send them). */
|
|
56
|
+
interface VerificationIdentityRow {
|
|
57
|
+
id: string;
|
|
58
|
+
verificationMethod?: string | null;
|
|
59
|
+
verificationConfig?: unknown;
|
|
60
|
+
verificationOutcome?: string | null;
|
|
61
|
+
}
|
|
62
|
+
/** Injectable seams; each defaults to the real implementation. */
|
|
63
|
+
export interface CommitGateConfiguredDeps {
|
|
64
|
+
getConfig?: () => DaemonConfig | null;
|
|
65
|
+
env?: NodeJS.ProcessEnv;
|
|
66
|
+
/** The durable delivery rows of a focus (their verification columns). */
|
|
67
|
+
getFocusDeliveries?: (focusId: string) => Promise<ReadonlyArray<VerificationIdentityRow>>;
|
|
68
|
+
getPendingVerifications?: (productId: string) => Promise<ReadonlyArray<{
|
|
69
|
+
deliveryId: string;
|
|
70
|
+
verificationMethod?: string;
|
|
71
|
+
verificationConfig?: Record<string, unknown> | null;
|
|
72
|
+
verificationOutcome?: string | null;
|
|
73
|
+
}>>;
|
|
74
|
+
resolveDefaultVerification?: (config: DaemonConfig, readManifest?: VerifyManifestReader) => ResolvedDefaultVerification;
|
|
75
|
+
readJudgedCommitManifest?: (focusId: string) => JudgedCommitRead | null;
|
|
76
|
+
}
|
|
77
|
+
/** The commit a focus's deliveries are judged on: its registered worktree's HEAD, or null when unreadable. */
|
|
78
|
+
export declare function resolveFocusJudgedCommit(focusId: string): string | null;
|
|
79
|
+
/** See the module header: whether a gate is configured for the delivery, and which gate governs its verdict. */
|
|
80
|
+
export declare function resolveCommitGate(subject: CommitGateSubject, deps?: CommitGateConfiguredDeps): Promise<CommitGateResolution>;
|
|
81
|
+
/** Whether a gate is configured for the delivery (see the module header). */
|
|
82
|
+
export declare function isCommitGateConfigured(subject: CommitGateSubject, deps?: CommitGateConfiguredDeps): Promise<boolean>;
|
|
83
|
+
/** The production gate seams (see the module header). */
|
|
84
|
+
export declare const commitGateSeams: CommitGateSeams;
|
|
85
|
+
export {};
|
|
86
|
+
//# sourceMappingURL=commit-gate-configured.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-gate-configured.d.ts","sourceRoot":"","sources":["../../src/verify/commit-gate-configured.ts"],"names":[],"mappings":"AA0GA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAA8B,KAAK,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;AAMtC,OAAO,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,MAAM,GAAG,MAAM,GAAG,IAAI,CAGvE;AA0DD,gHAAgH;AAChH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,iBAAiB,EAC1B,IAAI,GAAE,wBAA6B,GAClC,OAAO,CAAC,oBAAoB,CAAC,CAwB/B;AA+BD,6EAA6E;AAC7E,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,iBAAiB,EAC1B,IAAI,GAAE,wBAA6B,GAClC,OAAO,CAAC,OAAO,CAAC,CAElB;AAED,yDAAyD;AACzD,eAAO,MAAM,eAAe,EAAE,eAM7B,CAAC"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/completion/review-exit-verdict-gate.test.ts,
|
|
3
|
+
// packages/daemon/src/focus/listener-product-poll.test.ts,
|
|
4
|
+
// packages/daemon/src/integration/delivery-gate-write-interleaving.test.ts,
|
|
5
|
+
// packages/daemon/src/integration/explicit-gate-identity-unreadable.test.ts,
|
|
6
|
+
// packages/daemon/src/integration/explicit-gate-outcome-restart.test.ts,
|
|
7
|
+
// packages/daemon/src/integration/explicit-verdict-invalidation-restart.test.ts,
|
|
8
|
+
// packages/daemon/src/integration/explicit-verdict-reuse.test.ts,
|
|
9
|
+
// packages/daemon/src/integration/focus-commit-verdict-scenario.test.ts,
|
|
10
|
+
// packages/daemon/src/integration/review-rework-resume-verdict.test.ts,
|
|
11
|
+
// packages/daemon/src/integration/verification-rework-resume-verdict.test.ts,
|
|
12
|
+
// packages/daemon/src/spawn/prompt-assembly-resume-verdict.test.ts,
|
|
13
|
+
// packages/daemon/src/verify/commit-gate-configured.test.ts,
|
|
14
|
+
// packages/daemon/src/verify/verification-commit-sharing.test.ts
|
|
15
|
+
// PINNED-BY-END
|
|
16
|
+
/**
|
|
17
|
+
* Whether a deterministic gate is configured for a verify delivery -- whether the
|
|
18
|
+
* verification tick runs a gate whose verdict the review exit can wait on, and
|
|
19
|
+
* WHICH gate that is -- plus the production gate seams every verify routing
|
|
20
|
+
* decision reads.
|
|
21
|
+
*
|
|
22
|
+
* The review exit holds a verify delivery out of done until a passing verdict
|
|
23
|
+
* exists for the commit it judges (completion/review-exit-verdict-gate.ts). That
|
|
24
|
+
* hold is only safe where a verdict will actually be rendered -- holding a
|
|
25
|
+
* delivery no gate will ever judge strands it in verify -- so this predicate
|
|
26
|
+
* mirrors the tick's own selection (runVerificationTick ->
|
|
27
|
+
* resolveProductVerificationScopes -> collectDefaultOnVerifications) instead of
|
|
28
|
+
* restating it:
|
|
29
|
+
* - the verification loop runs (TELORA_VERIFICATION_LOOP is not '0');
|
|
30
|
+
* - the focus is not read-only and the delivery is anchored to an injection;
|
|
31
|
+
* - the delivery is an explicit-method row with a method that renders verdicts,
|
|
32
|
+
* OR its product resolves a command, or -- unless the operator declined -- the
|
|
33
|
+
* telora.verify.json its judged commit ships declares one (or is malformed,
|
|
34
|
+
* which the dispatch still runs and fails loudly).
|
|
35
|
+
*
|
|
36
|
+
* An explicit-method delivery is gated by its own run, and is known as one from
|
|
37
|
+
* the DURABLE delivery row (its verification_method, on the focus delivery read),
|
|
38
|
+
* not from the pending-verification queue: that queue drops a row once its
|
|
39
|
+
* outcome is terminal, and an explicit pass must not then read as a default-on
|
|
40
|
+
* delivery. Only a row from an edge that does not send the column yet (undefined,
|
|
41
|
+
* not null), or an unreadable row, falls back to the queue. Where neither names a
|
|
42
|
+
* method, a verdict an explicit run recorded (verify/explicit-gate-outcome.ts: in
|
|
43
|
+
* process, or on the gate_state the subject carries) still reads "configured", so
|
|
44
|
+
* a restarted daemon never takes that verdict for no gate at all. The exception
|
|
45
|
+
* is the behavioral method, a scaffold that always returns pending: no verdict is
|
|
46
|
+
* ever rendered for it, so waiting on one would strand the delivery -- not
|
|
47
|
+
* configured.
|
|
48
|
+
*
|
|
49
|
+
* Where an explicit run writes no per-commit verdict (an in-place run has no
|
|
50
|
+
* judged sha; an ai_inspection writes none), the outcome it records IS the
|
|
51
|
+
* verdict, from two sources read in order (readDeliveryGateOutcome):
|
|
52
|
+
* (a) this process's own record (verify/gate-run-registry.ts);
|
|
53
|
+
* (b) else the record on the delivery's gate_state
|
|
54
|
+
* (verificationHistory.explicitOutcome), which carries failures, no-SHA
|
|
55
|
+
* outcomes and the commit the run judged, and is removed before a
|
|
56
|
+
* replacement run starts -- so it never outlives the run that supersedes it.
|
|
57
|
+
* The row's own verification_outcome is NOT a verdict source: the edge stores a
|
|
58
|
+
* pass with no judged commit, so a pass rendered for commit A would read as a
|
|
59
|
+
* pass for every later commit. Where neither (a) nor (b) knows the run, the
|
|
60
|
+
* explicit re-arm scan (verify/explicit-rearm.ts) selects the row again, so the
|
|
61
|
+
* gate renders a verdict bound to the judged commit.
|
|
62
|
+
*
|
|
63
|
+
* The gate is part of the answer (resolveCommitGate). A per-commit verdict is
|
|
64
|
+
* recorded under the gate its run APPLIED (verify/commit-verdict-record.ts), and
|
|
65
|
+
* one commit can carry verdicts of several gates: a sibling's default-on pass says
|
|
66
|
+
* nothing about a delivery whose own explicit command never ran, and a sibling's
|
|
67
|
+
* failure must not hold it. Routing reads a verdict only under the delivery's own
|
|
68
|
+
* gate -- its explicit row's command + timeout, or, for a default-on delivery, the
|
|
69
|
+
* gate its run applies at the judged commit (verify/judged-commit-gate.ts: a
|
|
70
|
+
* branch manifest that overrides the repoPath gate is the gate that runs), or the
|
|
71
|
+
* scan's gate where no focus worktree exists and the run is in place. No gate (no
|
|
72
|
+
* command, a judged commit nobody could read or whose manifest is malformed, or a
|
|
73
|
+
* delivery gated only by its recorded explicit verdict) matches no per-commit
|
|
74
|
+
* record. Every own-gate source is read, and a failure from any wins
|
|
75
|
+
* (completion/review-exit-verdict-gate.ts).
|
|
76
|
+
*
|
|
77
|
+
* An explicit run's recorded verdict is read the same way: only under the gate its
|
|
78
|
+
* run applied (explicitGateKey: the row's method + config). The edge lets an
|
|
79
|
+
* operator change a row's method or config without resetting its outcome, so a
|
|
80
|
+
* verdict rendered under the old gate governs nothing, and a row that names no
|
|
81
|
+
* method takes no explicit verdict at all. A row an older edge sends without the
|
|
82
|
+
* columns, which the queue does not list, takes a recorded verdict of any gate, as
|
|
83
|
+
* before those columns existed. But a row that cannot be read at all, or that a
|
|
84
|
+
* successful read of the focus's deliveries does not contain, which the queue does
|
|
85
|
+
* not list, has an identity nobody knows -- it may name a changed gate,
|
|
86
|
+
* or be explicit where the product also has a default-on gate -- so it is gated by
|
|
87
|
+
* NO gate: configured, with no per-commit gate and no explicit gate. It holds until
|
|
88
|
+
* the row reads again, and never borrows the default-on gate's verdict or one an
|
|
89
|
+
* arbitrary explicit gate rendered.
|
|
90
|
+
*
|
|
91
|
+
* Deliberately NOT mirrored: the tick's re-run guards (already ran this
|
|
92
|
+
* verify-entry; failed on the unchanged HEAD). They decide whether to run AGAIN,
|
|
93
|
+
* not whether a gate is configured, and the verdict is read from the durable
|
|
94
|
+
* per-commit record either way.
|
|
95
|
+
*
|
|
96
|
+
* Direction of error: an answer git could not give (the judged commit's manifest
|
|
97
|
+
* is unreadable) and an unreadable explicit-method list read as "configured" --
|
|
98
|
+
* hold, fail closed -- because the release pass re-asks every poll and releases
|
|
99
|
+
* the moment this reads "not configured". No daemon config or no such product (no
|
|
100
|
+
* running daemon context) reads "not configured": nothing would run a gate there.
|
|
101
|
+
*
|
|
102
|
+
* @module verify/commit-gate-configured
|
|
103
|
+
*/
|
|
104
|
+
import { loadEnvConfig } from '@telora/daemon-core';
|
|
105
|
+
import { config as liveDaemonConfig } from '../focus/listener-state.js';
|
|
106
|
+
import { findProduct } from '../shell/config.js';
|
|
107
|
+
import { resolveDefaultVerification } from './verification-config.js';
|
|
108
|
+
import { buildJudgedCommitManifestReader, resolveProductVerificationScopes, } from './verification-default-on.js';
|
|
109
|
+
import { judgedCommitGate } from './judged-commit-gate.js';
|
|
110
|
+
import { getPendingVerifications } from '../queries/verification.js';
|
|
111
|
+
import { getFocusDeliveries } from '../queries/focuses.js';
|
|
112
|
+
import { getFocusWorktree } from '../focus/focus-worktree-state.js';
|
|
113
|
+
import { resolveHeadSha } from './verification-baseline.js';
|
|
114
|
+
import { commitVerdictGateOf, explicitGateKeyOf, readCommitVerdict, } from './commit-verdict-record.js';
|
|
115
|
+
import { hasPendingGateRun } from './gate-run-registry.js';
|
|
116
|
+
import { hasRecordedExplicitGateOutcome, readDeliveryGateOutcome } from './explicit-gate-outcome.js';
|
|
117
|
+
const defaultReadJudgedCommitManifest = buildJudgedCommitManifestReader();
|
|
118
|
+
const NOT_CONFIGURED = { configured: false, gate: null };
|
|
119
|
+
/** The commit a focus's deliveries are judged on: its registered worktree's HEAD, or null when unreadable. */
|
|
120
|
+
export function resolveFocusJudgedCommit(focusId) {
|
|
121
|
+
const worktree = getFocusWorktree(focusId);
|
|
122
|
+
return worktree ? resolveHeadSha(worktree.worktreePath) : null;
|
|
123
|
+
}
|
|
124
|
+
function configRecord(value) {
|
|
125
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value) ? value : null;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The delivery's explicit verification identity: from the durable row, or -- when
|
|
129
|
+
* the row does not carry the columns or cannot be read -- from the
|
|
130
|
+
* pending-verification queue. See the module header.
|
|
131
|
+
*/
|
|
132
|
+
async function readExplicitIdentity(subject, deps) {
|
|
133
|
+
// Until a read shows the row itself, its identity is unknown: a read that throws, or one that omits the row.
|
|
134
|
+
let unlisted = { kind: 'unknown' };
|
|
135
|
+
try {
|
|
136
|
+
const rows = await (deps.getFocusDeliveries ?? getFocusDeliveries)(subject.focusId);
|
|
137
|
+
const row = rows.find((d) => d.id === subject.deliveryId);
|
|
138
|
+
if (row && row.verificationMethod !== undefined) {
|
|
139
|
+
return row.verificationMethod
|
|
140
|
+
? { kind: 'explicit', identity: { method: row.verificationMethod, config: configRecord(row.verificationConfig), outcome: row.verificationOutcome ?? null } }
|
|
141
|
+
: { kind: 'none' };
|
|
142
|
+
}
|
|
143
|
+
// A present row without the columns is an older edge's; an absent one stays unknown.
|
|
144
|
+
if (row)
|
|
145
|
+
unlisted = { kind: 'unsent' };
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
// Unreadable row: the pending queue below may still name its identity.
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
const pending = await (deps.getPendingVerifications ?? getPendingVerifications)(subject.productId);
|
|
152
|
+
const row = pending.find((p) => p.deliveryId === subject.deliveryId);
|
|
153
|
+
return row
|
|
154
|
+
? { kind: 'explicit', identity: { method: row.verificationMethod ?? '', config: row.verificationConfig ?? null, outcome: row.verificationOutcome ?? null } }
|
|
155
|
+
: unlisted;
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
// Unreadable: the tick skips the product on this same failure and retries.
|
|
159
|
+
return unlisted;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/** A delivery whose identity nobody could read: held, and governed by no gate's verdict (see the module header). */
|
|
163
|
+
const UNKNOWN_IDENTITY = { configured: true, gate: null, explicitGateKey: null };
|
|
164
|
+
/** See the module header: whether a gate is configured for the delivery, and which gate governs its verdict. */
|
|
165
|
+
export async function resolveCommitGate(subject, deps = {}) {
|
|
166
|
+
const env = deps.env ?? process.env;
|
|
167
|
+
if (!loadEnvConfig(env).TELORA_VERIFICATION_LOOP)
|
|
168
|
+
return NOT_CONFIGURED;
|
|
169
|
+
if (subject.focusReadOnly || !subject.injectionId)
|
|
170
|
+
return NOT_CONFIGURED;
|
|
171
|
+
const config = (deps.getConfig ?? (() => liveDaemonConfig))();
|
|
172
|
+
const product = config ? findProduct(config, subject.productId) : undefined;
|
|
173
|
+
if (!config || !product)
|
|
174
|
+
return NOT_CONFIGURED;
|
|
175
|
+
const read = await readExplicitIdentity(subject, deps);
|
|
176
|
+
if (read.kind === 'explicit') {
|
|
177
|
+
const explicit = read.identity;
|
|
178
|
+
if (explicit.method === 'behavioral')
|
|
179
|
+
return NOT_CONFIGURED;
|
|
180
|
+
return {
|
|
181
|
+
configured: true,
|
|
182
|
+
gate: commitVerdictGateOf({ verificationConfig: explicit.config }),
|
|
183
|
+
explicitGateKey: explicitGateKeyOf(explicit.method, explicit.config),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
if (read.kind === 'unknown')
|
|
187
|
+
return UNKNOWN_IDENTITY;
|
|
188
|
+
const defaultOn = resolveDefaultOnGate(subject, deps, env, config, product);
|
|
189
|
+
// The row names no method: no explicit verdict governs it, one recorded before its method was cleared included.
|
|
190
|
+
if (read.kind === 'none')
|
|
191
|
+
return { ...defaultOn, explicitGateKey: null };
|
|
192
|
+
if (defaultOn.configured || !hasRecordedExplicitGateOutcome(subject.deliveryId, subject.gateState))
|
|
193
|
+
return defaultOn;
|
|
194
|
+
// No method named anywhere, but its explicit run recorded a verdict: gated by that run, with no per-commit gate.
|
|
195
|
+
return { configured: true, gate: null };
|
|
196
|
+
}
|
|
197
|
+
/** The default-on gate the verification scan arms for the delivery (see the module header), or not configured. */
|
|
198
|
+
function resolveDefaultOnGate(subject, deps, env, config, product) {
|
|
199
|
+
const resolve = deps.resolveDefaultVerification
|
|
200
|
+
?? ((c, readManifest) => resolveDefaultVerification(c, env, readManifest));
|
|
201
|
+
const [scope] = resolveProductVerificationScopes({ ...config, products: [product] }, resolve);
|
|
202
|
+
const scanResolved = scope?.resolved ?? scope?.judgedCommitOnly;
|
|
203
|
+
if (!scope || !scanResolved)
|
|
204
|
+
return NOT_CONFIGURED;
|
|
205
|
+
if (!scanResolved.enabled && scope.productConfig.defaultVerification?.declined === true)
|
|
206
|
+
return NOT_CONFIGURED;
|
|
207
|
+
const read = (deps.readJudgedCommitManifest ?? defaultReadJudgedCommitManifest)(subject.focusId);
|
|
208
|
+
if (read === null) {
|
|
209
|
+
// No focus worktree: an armed candidate runs in place on the scan's own config.
|
|
210
|
+
return scanResolved.enabled
|
|
211
|
+
? { configured: true, gate: { command: scanResolved.command, timeoutMs: scanResolved.timeoutMs } }
|
|
212
|
+
: NOT_CONFIGURED;
|
|
213
|
+
}
|
|
214
|
+
if ('unreadable' in read)
|
|
215
|
+
return { configured: true, gate: null };
|
|
216
|
+
if (!scanResolved.enabled && read.manifest === undefined && read.malformed === undefined)
|
|
217
|
+
return NOT_CONFIGURED;
|
|
218
|
+
// The run re-resolves its gate from the judged commit and records under what it applied: read under that same gate.
|
|
219
|
+
const source = { defaultVerification: scope.productConfig.defaultVerification, repoPath: scope.productConfig.repoPath };
|
|
220
|
+
return { configured: true, gate: judgedCommitGate(source, read, env) };
|
|
221
|
+
}
|
|
222
|
+
/** Whether a gate is configured for the delivery (see the module header). */
|
|
223
|
+
export async function isCommitGateConfigured(subject, deps = {}) {
|
|
224
|
+
return (await resolveCommitGate(subject, deps)).configured;
|
|
225
|
+
}
|
|
226
|
+
/** The production gate seams (see the module header). */
|
|
227
|
+
export const commitGateSeams = {
|
|
228
|
+
resolveCommitGate: (subject) => resolveCommitGate(subject),
|
|
229
|
+
resolveJudgedCommit: resolveFocusJudgedCommit,
|
|
230
|
+
readCommitVerdict: (productId, focusId, sha, gate) => (gate ? readCommitVerdict(productId, focusId, sha, { gate }) : null),
|
|
231
|
+
readDeliveryGateOutcome,
|
|
232
|
+
hasPendingGateRun,
|
|
233
|
+
};
|
|
234
|
+
//# sourceMappingURL=commit-gate-configured.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-gate-configured.js","sourceRoot":"","sources":["../../src/verify/commit-gate-configured.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8EAA8E;AAC9E,6DAA6D;AAC7D,8EAA8E;AAC9E,+EAA+E;AAC/E,2EAA2E;AAC3E,mFAAmF;AACnF,oEAAoE;AACpE,2EAA2E;AAC3E,0EAA0E;AAC1E,gFAAgF;AAChF,sEAAsE;AACtE,+DAA+D;AAC/D,mEAAmE;AACnE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;AACzE,CAAC;AAED,6EAA6E;AAC7E,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAA0B,EAC1B,OAAiC,EAAE;IAEnC,OAAO,CAAC,MAAM,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;AAC7D,CAAC;AAED,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C,iBAAiB,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,iBAAiB,CAAC,OAAO,CAAC;IAC1D,mBAAmB,EAAE,wBAAwB;IAC7C,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1H,uBAAuB;IACvB,iBAAiB;CAClB,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { type StrategyResult } from './verification-deterministic.js';
|
|
2
|
+
import type { PendingVerification } from '../queries/verification.js';
|
|
3
|
+
/** The gate a verdict was rendered under: the command + timeout the run applied. */
|
|
4
|
+
export interface CommitVerdictGate {
|
|
5
|
+
command: string;
|
|
6
|
+
timeoutMs: number;
|
|
7
|
+
}
|
|
8
|
+
/** A recorded deterministic verdict for one focus commit. */
|
|
9
|
+
export interface CommitVerdict {
|
|
10
|
+
productId: string;
|
|
11
|
+
focusId: string;
|
|
12
|
+
/** The judged commit (StrategyResult.verifiedSha). */
|
|
13
|
+
sha: string;
|
|
14
|
+
outcome: 'passed' | 'failed';
|
|
15
|
+
/** The gate the run applied -- the reuse key. */
|
|
16
|
+
gate: CommitVerdictGate;
|
|
17
|
+
exitCode: number | null;
|
|
18
|
+
/** The delivery whose dispatch ran the gate (provenance only; the verdict is the commit's). */
|
|
19
|
+
judgedDeliveryId: string;
|
|
20
|
+
recordedAt: string;
|
|
21
|
+
rationale?: string;
|
|
22
|
+
failedStage?: string;
|
|
23
|
+
preExistingStages?: string[];
|
|
24
|
+
newFailures?: string[];
|
|
25
|
+
preExisting?: string[];
|
|
26
|
+
logPath?: string;
|
|
27
|
+
stdoutTail?: string;
|
|
28
|
+
stderrTail?: string;
|
|
29
|
+
appliedConfig?: StrategyResult['appliedConfig'];
|
|
30
|
+
}
|
|
31
|
+
/** Who a verdict is being built for. */
|
|
32
|
+
export interface CommitVerdictSubject {
|
|
33
|
+
productId: string;
|
|
34
|
+
focusId: string;
|
|
35
|
+
deliveryId: string;
|
|
36
|
+
gate: CommitVerdictGate;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The record file for a (product, focus, sha, gate); without a gate, the gate-less
|
|
40
|
+
* file records were written to before they were keyed by gate. `dir` defaults to
|
|
41
|
+
* the global state dir. Exported for tests.
|
|
42
|
+
*/
|
|
43
|
+
export declare function commitVerdictPath(productId: string, focusId: string, sha: string, dir?: string, gate?: CommitVerdictGate): string;
|
|
44
|
+
/**
|
|
45
|
+
* The recorded verdict for a focus commit, or null on a miss, an unreadable or
|
|
46
|
+
* malformed file, or a record for another commit. With `gate`: only a verdict
|
|
47
|
+
* rendered under that gate. Without: the newest verdict recorded for the commit
|
|
48
|
+
* under any gate.
|
|
49
|
+
*/
|
|
50
|
+
export declare function readCommitVerdict(productId: string, focusId: string, sha: string, opts?: {
|
|
51
|
+
gate?: CommitVerdictGate;
|
|
52
|
+
dir?: string;
|
|
53
|
+
}): CommitVerdict | null;
|
|
54
|
+
/** Write a verdict atomically. Best-effort: returns false (and logs) when the write failed. */
|
|
55
|
+
export declare function writeCommitVerdict(verdict: CommitVerdict, dir?: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Build the verdict a finished deterministic run renders for its commit, or null
|
|
58
|
+
* when the run rendered none (see the module header). `instrumentFault` is true
|
|
59
|
+
* when attribution routed the run to instrument-fault re-work. Pure.
|
|
60
|
+
*/
|
|
61
|
+
export declare function buildCommitVerdict(subject: CommitVerdictSubject, result: StrategyResult, instrumentFault: boolean, now?: Date): CommitVerdict | null;
|
|
62
|
+
/** The recorder a verification is wired with (VerificationDeps.recordCommitVerdict). */
|
|
63
|
+
export type CommitVerdictRecorder = (verdict: CommitVerdict) => void;
|
|
64
|
+
/** The reader a verification is wired with (VerificationDeps.readCommitVerdict): the verdict for a commit under a gate, or null. */
|
|
65
|
+
export type CommitVerdictReader = (productId: string, focusId: string, sha: string, gate: CommitVerdictGate) => CommitVerdict | null;
|
|
66
|
+
/**
|
|
67
|
+
* The gate a verification carries: the command + timeout on its config -- a
|
|
68
|
+
* missing or non-positive timeout is the strategy default, exactly as a run
|
|
69
|
+
* applies it -- or null when it carries no command. It keys an explicit row's
|
|
70
|
+
* verdict, and a default-on candidate's only where that candidate runs in place;
|
|
71
|
+
* a default-on run from a checkout of the judged commit is keyed by the gate it
|
|
72
|
+
* applies there (verify/judged-commit-gate.ts).
|
|
73
|
+
*/
|
|
74
|
+
export declare function commitVerdictGateOf(v: Pick<PendingVerification, 'verificationConfig'>): CommitVerdictGate | null;
|
|
75
|
+
/**
|
|
76
|
+
* The identity of the gate an EXPLICIT-METHOD row renders its verdict under: its
|
|
77
|
+
* method and what that method applies -- a deterministic row's command +
|
|
78
|
+
* normalized timeout (commitVerdictGateOf), any other method's whole config.
|
|
79
|
+
* Hashed, so it rides on gate_state; key order in the config does not change it.
|
|
80
|
+
* Two rows that apply the same gate share a key; a changed method, command,
|
|
81
|
+
* timeout or inspection config does not (verify/explicit-gate-outcome.ts). Pure.
|
|
82
|
+
*/
|
|
83
|
+
export declare function explicitGateKeyOf(method: string, config: Record<string, unknown> | null): string;
|
|
84
|
+
/**
|
|
85
|
+
* Record the verdict a deterministic run rendered for its commit, keyed by the
|
|
86
|
+
* gate the run APPLIED (result.appliedConfig -- for a default-on candidate,
|
|
87
|
+
* re-resolved from the checkout it ran), else by the gate the verification
|
|
88
|
+
* carries. A no-op without a recorder, without a product + focus to key it by, or
|
|
89
|
+
* when the run rendered no verdict.
|
|
90
|
+
*/
|
|
91
|
+
export declare function recordCommitVerdictFor(v: Pick<PendingVerification, 'productId' | 'focusId' | 'deliveryId' | 'verificationConfig'>, result: StrategyResult, instrumentFault: boolean, record: CommitVerdictRecorder | undefined): void;
|
|
92
|
+
/**
|
|
93
|
+
* The StrategyResult a delivery judged on an already-judged commit takes instead
|
|
94
|
+
* of running the gate: the recorded outcome with its attribution, never a
|
|
95
|
+
* timeout or unavailable flag (a record is only ever written for a real verdict).
|
|
96
|
+
*/
|
|
97
|
+
export declare function strategyResultFromVerdict(verdict: CommitVerdict): StrategyResult;
|
|
98
|
+
//# sourceMappingURL=commit-verdict-record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-verdict-record.d.ts","sourceRoot":"","sources":["../../src/verify/commit-verdict-record.ts"],"names":[],"mappings":"AAyDA,OAAO,EAAmC,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAKtE,oFAAoF;AACpF,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC7B,iDAAiD;IACjD,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,+FAA+F;IAC/F,gBAAgB,EAAE,MAAM,CAAC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