@telora/daemon 0.22.104 → 0.22.132
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/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/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 +151 -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.map +1 -1
- package/dist/queries/verification.js +1 -15
- 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/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.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/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 +79 -33
- package/dist/verify/verification-baseline.d.ts.map +1 -1
- package/dist/verify/verification-baseline.js +99 -106
- package/dist/verify/verification-baseline.js.map +1 -1
- package/dist/verify/verification-checkout.d.ts +13 -0
- package/dist/verify/verification-checkout.d.ts.map +1 -1
- package/dist/verify/verification-checkout.js +39 -2
- 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.map +1 -1
- package/dist/verify/verification-config.js +12 -2
- package/dist/verify/verification-config.js.map +1 -1
- package/dist/verify/verification-default-on.d.ts +27 -11
- package/dist/verify/verification-default-on.d.ts.map +1 -1
- package/dist/verify/verification-default-on.js +159 -29
- 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 +49 -42
- package/dist/verify/verification-deps-default.js.map +1 -1
- package/dist/verify/verification-deps.d.ts +69 -4
- package/dist/verify/verification-deps.d.ts.map +1 -1
- package/dist/verify/verification-deterministic.d.ts +15 -2
- package/dist/verify/verification-deterministic.d.ts.map +1 -1
- package/dist/verify/verification-deterministic.js +12 -3
- 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 +110 -92
- 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 +14 -4
- package/dist/verify/verification-evidence-unavailable-feedback.js.map +1 -1
- package/dist/verify/verification-failure-parser.d.ts +37 -3
- package/dist/verify/verification-failure-parser.d.ts.map +1 -1
- package/dist/verify/verification-failure-parser.js +66 -3
- package/dist/verify/verification-failure-parser.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 +2 -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/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,180 @@
|
|
|
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-cycle-cap-regression.test.ts,
|
|
3
|
+
// packages/daemon/src/completion/review-cycle-churn-meter.test.ts
|
|
4
|
+
// PINNED-BY-END
|
|
5
|
+
/**
|
|
6
|
+
* The review-cycle cap: count the review cycles a focus spends without
|
|
7
|
+
* converging, and at TELORA_REVIEW_CYCLE_CAP stop the loop.
|
|
8
|
+
*
|
|
9
|
+
* Replaces the churn METER that used to live in review-exit-escalations.ts. That
|
|
10
|
+
* meter filed one review_cycle_cap_exceeded observation and let the loop keep
|
|
11
|
+
* spawning; the hand-off breaker it deferred to never advances on a cycle that
|
|
12
|
+
* files a new finding, so a non-converging loop billed passes until an operator
|
|
13
|
+
* disarmed it (2026-09-15). Now the crossing holds every spawn gate
|
|
14
|
+
* (focus/review-cycle-cap-hold.ts).
|
|
15
|
+
*
|
|
16
|
+
* What the count measures (recordReviewCycleAndMaybeHold, on every routed exit of
|
|
17
|
+
* a REVIEW session -- a routed coding exit, e.g. the open-work self-heal, is not a
|
|
18
|
+
* review cycle and leaves the count, the window and the filings alone):
|
|
19
|
+
* - a CONVERGED cycle -- a delivery reached done, nothing re-opened to
|
|
20
|
+
* verify_failed, and no open blocking review-filed finding is left on the
|
|
21
|
+
* focus -- resets it to 0. The cap measures consecutive unconverged cycles,
|
|
22
|
+
* not lifetime cycles, so a focus shipping many deliveries one clean review at
|
|
23
|
+
* a time never nears it.
|
|
24
|
+
* - any other routed cycle increments it. Below the cap nothing else happens:
|
|
25
|
+
* the count's only reader is the hold, so cycling below the cap is unchanged.
|
|
26
|
+
* - at the cap: the count is written first (a failed filing still holds by
|
|
27
|
+
* count), the review window is closed, and ONE observation is filed
|
|
28
|
+
* enumerating the open blocking review-filed findings. Nothing closes those
|
|
29
|
+
* issues: they stay open work, and the observation carries them to the agent
|
|
30
|
+
* routing decision (the promotion sweep hands a held focus's observations to
|
|
31
|
+
* the routing decider). Once the observation is filed the count resets to 0,
|
|
32
|
+
* so resolving it -- or, once a routing decider made it human-facing,
|
|
33
|
+
* resolving that filing (focus/review-cycle-cap-hold.ts reads the lineage
|
|
34
|
+
* carrier) -- lifts the hold, and a fresh cap of cycles is needed to re-cross:
|
|
35
|
+
* the review_handoff_exhausted precedent.
|
|
36
|
+
*
|
|
37
|
+
* reconcileReviewCycleCapFiling is the failed-filing half: a focus whose count
|
|
38
|
+
* stands at or past the cap with no observation filed would otherwise be held
|
|
39
|
+
* with nothing for the routing decider to take. The cascade re-files each poll
|
|
40
|
+
* until the filing lands.
|
|
41
|
+
*
|
|
42
|
+
* @module completion/review-cycle-cap
|
|
43
|
+
*/
|
|
44
|
+
import { createEscalation, hasOpenFocusEscalation } from '../queries/escalations.js';
|
|
45
|
+
import { setReviewCycleCount, getFocusIssues, getFocusReviewFiledIssueIds } from '../queries/focuses.js';
|
|
46
|
+
import { resolveReviewCycleCap } from '../verify/stall-detector-config.js';
|
|
47
|
+
import { NO_HUMAN_ACT } from '../queries/filing-observation.js';
|
|
48
|
+
import { REVIEW_CYCLE_CAP_EXCEEDED_KIND } from '../focus/review-cycle-cap-hold.js';
|
|
49
|
+
import { fileDedupedFocusEscalation, } from './review-exit-escalations.js';
|
|
50
|
+
import { filterBlockingReviewFiledComplete } from './review-defect-detector.js';
|
|
51
|
+
import { createLogger } from '../shell/log.js';
|
|
52
|
+
const log = createLogger({ module: 'focus-executor' });
|
|
53
|
+
/** Pure: whether a routed review exit converged -- it resets the count instead of climbing it. */
|
|
54
|
+
export function reviewCycleConverged(outcome) {
|
|
55
|
+
return outcome.convergedAny && !outcome.anyReopenedToVerifyFailed && outcome.openBlockingFindings.length === 0;
|
|
56
|
+
}
|
|
57
|
+
/** Best-effort count write; returns whether it landed. */
|
|
58
|
+
async function writeCycleCount(setCount, ctx, count) {
|
|
59
|
+
try {
|
|
60
|
+
await setCount(ctx.focusId, count);
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
log.warn(`[focus-executor] setReviewCycleCount(${count}) failed for "${ctx.focusName}": ${err.message}`);
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Record one routed review cycle: reset on convergence, climb otherwise, and hold
|
|
70
|
+
* the focus at the cap. Best-effort -- never aborts the routing that already ran.
|
|
71
|
+
* A deps object without the count writer or the cap skips the whole cap.
|
|
72
|
+
*/
|
|
73
|
+
export async function recordReviewCycleAndMaybeHold(deps, ctx, priorCycleCount, outcome) {
|
|
74
|
+
if (!deps.setReviewCycleCount || !deps.resolveReviewCycleCap)
|
|
75
|
+
return;
|
|
76
|
+
// MEASURE, don't assume: only a review-session exit moves the count (ReviewCycleOutcome.sessionType).
|
|
77
|
+
if (outcome.sessionType && outcome.sessionType !== 'review') {
|
|
78
|
+
log.info(`[focus-executor] "${ctx.focusName}" ${outcome.sessionType} session exit routed -- not a review pass; ` +
|
|
79
|
+
`review-cycle count left at ${priorCycleCount}.`);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (reviewCycleConverged(outcome)) {
|
|
83
|
+
if (priorCycleCount > 0)
|
|
84
|
+
await writeCycleCount(deps.setReviewCycleCount, ctx, 0);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const cycleCount = priorCycleCount + 1;
|
|
88
|
+
const cap = deps.resolveReviewCycleCap();
|
|
89
|
+
// Durable first: if the filing below fails, count >= cap is what holds.
|
|
90
|
+
await writeCycleCount(deps.setReviewCycleCount, ctx, cycleCount);
|
|
91
|
+
if (cycleCount < cap)
|
|
92
|
+
return;
|
|
93
|
+
// Close the window (as the hand-off breaker does) unless a delivery awaits its
|
|
94
|
+
// gate verdict -- that replay converges without a spawn and needs the window.
|
|
95
|
+
if (!outcome.verdictHeldAny) {
|
|
96
|
+
try {
|
|
97
|
+
await deps.clearReviewRequestedAt(ctx.focusId);
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
log.warn(`[focus-executor] clearReviewRequestedAt (review-cycle cap) failed for "${ctx.focusName}": ${err.message}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const filed = await fileReviewCycleCapObservation(deps, ctx, { cycleCount, cap, openBlockingFindings: outcome.openBlockingFindings });
|
|
104
|
+
if (filed)
|
|
105
|
+
await writeCycleCount(deps.setReviewCycleCount, ctx, 0);
|
|
106
|
+
log.warn(`[focus-executor] "${ctx.focusName}" reached its review-cycle cap without converging (${cycleCount} >= cap ${cap}): ` +
|
|
107
|
+
`spawns held, review window ${outcome.verdictHeldAny ? 'left open for a pending gate verdict' : 'closed'}, ` +
|
|
108
|
+
(filed ? 'observation filed and count reset to 0.' : 'observation NOT filed -- the count holds and the cascade re-files it.'));
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* File the review_cycle_cap_exceeded observation (at most one open per focus).
|
|
112
|
+
* Returns whether one is now open (filed, or already open). NO_HUMAN_ACT: what the
|
|
113
|
+
* unconverged findings need -- route, re-scope, descope -- is planning work an
|
|
114
|
+
* agent performs; the hold is keyed on this observation's kind, not on an act.
|
|
115
|
+
*/
|
|
116
|
+
export async function fileReviewCycleCapObservation(deps, ctx, args) {
|
|
117
|
+
const findings = args.openBlockingFindings;
|
|
118
|
+
const findingsBlock = findings.length > 0
|
|
119
|
+
? `\n\nMEASURED: ${findings.length} open blocking review-filed finding(s) remain on this focus, still open ` +
|
|
120
|
+
`(the daemon closed none):\n` +
|
|
121
|
+
findings.map(f => ` - ${f.key} (${f.id}): ${f.title}${f.deliveryId ? ` (delivery ${f.deliveryId})` : ''}`).join('\n')
|
|
122
|
+
: `\n\nMEASURED: 0 open blocking review-filed findings on this focus at the capped exit -- the cycles ` +
|
|
123
|
+
`failed to converge for another reason (e.g. uninspected reviews or deliveries re-opening).`;
|
|
124
|
+
return fileDedupedFocusEscalation(deps, ctx, {
|
|
125
|
+
escalationKind: REVIEW_CYCLE_CAP_EXCEEDED_KIND,
|
|
126
|
+
label: 'review-cycle-cap',
|
|
127
|
+
description: `Focus "${ctx.focusName}" completed ${args.cycleCount} review cycle(s) without converging ` +
|
|
128
|
+
`(cap ${args.cap}, TELORA_REVIEW_CYCLE_CAP). The daemon has STOPPED its review loop: the review ` +
|
|
129
|
+
`window is closed and no coding or review pass spawns while this observation is open.` +
|
|
130
|
+
findingsBlock +
|
|
131
|
+
`\n\nDecide what the unconverged findings need -- route or re-scope them onto a delivery, descope ` +
|
|
132
|
+
`them, or re-scope the focus -- then resolve this observation. Resolving it lifts the hold and the ` +
|
|
133
|
+
`focus gets a fresh ${args.cap} review cycles; a focus that converges retires it automatically. ` +
|
|
134
|
+
`If what they need is an act only a human can perform, a filing made human-facing from this ` +
|
|
135
|
+
`observation (sourceEscalationId naming it) keeps the hold standing until THAT filing is resolved.`,
|
|
136
|
+
humanAct: NO_HUMAN_ACT,
|
|
137
|
+
metadata: {
|
|
138
|
+
review_cycle_count: args.cycleCount,
|
|
139
|
+
cap: args.cap,
|
|
140
|
+
routed_via: 'review_cycle_cap_hold',
|
|
141
|
+
holds_spawns: true,
|
|
142
|
+
open_blocking_review_filed_count: findings.length,
|
|
143
|
+
open_blocking_review_filed_findings: findings.map(f => ({ key: f.key, id: f.id, delivery_id: f.deliveryId })),
|
|
144
|
+
terminates_when: 'focus_converged',
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
const defaultReconcileDeps = {
|
|
149
|
+
createEscalation,
|
|
150
|
+
hasOpenFocusEscalation,
|
|
151
|
+
setReviewCycleCount,
|
|
152
|
+
resolveReviewCycleCap,
|
|
153
|
+
getFocusIssues,
|
|
154
|
+
getFocusReviewFiledIssueIds,
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* The failed-filing half, run by the cascade each poll: a focus whose count
|
|
158
|
+
* stands at or past the cap is held by count; file (or find) its observation and
|
|
159
|
+
* reset the count, so the routing decider has the observation to take and its
|
|
160
|
+
* resolution lifts the hold. A no-op below the cap (no read). Best-effort.
|
|
161
|
+
*/
|
|
162
|
+
export async function reconcileReviewCycleCapFiling(ctx, reviewCycleCount, deps = defaultReconcileDeps) {
|
|
163
|
+
const cap = (deps.resolveReviewCycleCap ?? resolveReviewCycleCap)();
|
|
164
|
+
if (reviewCycleCount < cap || !deps.setReviewCycleCount)
|
|
165
|
+
return;
|
|
166
|
+
let openBlockingFindings = [];
|
|
167
|
+
try {
|
|
168
|
+
const [issues, reviewFiledIds] = await Promise.all([deps.getFocusIssues(ctx.focusId), deps.getFocusReviewFiledIssueIds(ctx.focusId)]);
|
|
169
|
+
openBlockingFindings = filterBlockingReviewFiledComplete(issues, new Set(reviewFiledIds), null)
|
|
170
|
+
.map(i => ({ id: i.id, key: i.key, title: i.title, deliveryId: i.deliveryId ?? null, description: i.description ?? null }));
|
|
171
|
+
}
|
|
172
|
+
catch (err) {
|
|
173
|
+
log.warn(`[focus-executor] review-cycle cap re-file could not read findings for "${ctx.focusName}": ${err.message}`);
|
|
174
|
+
}
|
|
175
|
+
const filed = await fileReviewCycleCapObservation(deps, { ...ctx, sessionId: '' }, { cycleCount: reviewCycleCount, cap, openBlockingFindings });
|
|
176
|
+
if (filed && await writeCycleCount(deps.setReviewCycleCount, ctx, 0)) {
|
|
177
|
+
log.info(`[focus-executor] "${ctx.focusName}" review-cycle cap observation re-filed (count ${reviewCycleCount} >= cap ${cap}); count reset to 0.`);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=review-cycle-cap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-cycle-cap.js","sourceRoot":"","sources":["../../src/completion/review-cycle-cap.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,iFAAiF;AACjF,oEAAoE;AACpE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,2BAA2B,EAA+B,MAAM,uBAAuB,CAAC;AACtI,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EACL,0BAA0B,GAI3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAuBvD,kGAAkG;AAClG,MAAM,UAAU,oBAAoB,CAAC,OAAwG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E,UAAU,EAAE,gBAAgB,EAAE,GAAG,EAAE,oBAAoB,EAAE,CAAC,CAAC;IAChJ,IAAI,KAAK,IAAI,MAAM,eAAe,CAAC,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;QACrE,GAAG,CAAC,IAAI,CAAC,qBAAqB,GAAG,CAAC,SAAS,kDAAkD,gBAAgB,WAAW,GAAG,sBAAsB,CAAC,CAAC;IACrJ,CAAC;AACH,CAAC"}
|
|
@@ -10,16 +10,19 @@
|
|
|
10
10
|
* import-x/no-cycle. Bodies verbatim.
|
|
11
11
|
*/
|
|
12
12
|
import { fetchEffectiveWorkflow } from '../queries/workflows.js';
|
|
13
|
-
import { updateDeliveryStatus, markDeliveryAutoApproved } from '../queries/deliveries.js';
|
|
13
|
+
import { updateDeliveryStatus, markDeliveryAutoApproved, getIssueDelivery } from '../queries/deliveries.js';
|
|
14
|
+
import { type ReviewWindowCommit } from '../resolvers/shared/review-window-commits.js';
|
|
14
15
|
import { getActiveFocuses } from '../queries/focus-discovery.js';
|
|
15
16
|
import { hasPendingSpawnDirective } from '../directive/directive-queue.js';
|
|
16
17
|
import { emitLoopTrigger } from '../loops/index.js';
|
|
17
18
|
import { getFocusDeliveries, getFocusIssues, clearReviewRequestedAt, setReviewedThroughSha, setReviewCycleCount, setReviewHandoffCount, getFocusReviewReportForSession, getFocusReviewFiledIssueIds } from '../queries/focuses.js';
|
|
18
19
|
import { resolveReviewCycleCap, resolveReviewHandoffCap } from '../verify/stall-detector-config.js';
|
|
19
20
|
import { getDeliveryIssues, rehomeIssueToDelivery } from '../queries/issues.js';
|
|
20
|
-
import { createEscalation, hasOpenFocusEscalation } from '../queries/escalations.js';
|
|
21
|
+
import { createEscalation, hasOpenFocusEscalation, hasOpenEscalationForDelivery } from '../queries/escalations.js';
|
|
21
22
|
import { findOpenOperatorHoldForDelivery } from '../queries/holds.js';
|
|
22
23
|
import { listOpenShortfallProposalIds } from '../queries/reality-tree.js';
|
|
24
|
+
import type { CommitVerdictGateDeps } from './review-exit-verdict-gate.js';
|
|
25
|
+
import { type ReviewAutoApproval } from './review-auto-approval-record.js';
|
|
23
26
|
/**
|
|
24
27
|
* Dependencies for runReviewExitHandler. Defaults to real implementations;
|
|
25
28
|
* overridable in tests via the optional `deps` argument.
|
|
@@ -32,6 +35,7 @@ export interface ReviewExitDeps {
|
|
|
32
35
|
fetchEffectiveWorkflow: typeof fetchEffectiveWorkflow;
|
|
33
36
|
updateDeliveryStatus: typeof updateDeliveryStatus;
|
|
34
37
|
markDeliveryAutoApproved: typeof markDeliveryAutoApproved;
|
|
38
|
+
recordReviewAutoApproval?: (approval: ReviewAutoApproval) => boolean;
|
|
35
39
|
clearReviewRequestedAt: typeof clearReviewRequestedAt;
|
|
36
40
|
setReviewedThroughSha: typeof setReviewedThroughSha;
|
|
37
41
|
setReviewCycleCount?: typeof setReviewCycleCount;
|
|
@@ -43,7 +47,18 @@ export interface ReviewExitDeps {
|
|
|
43
47
|
hasOpenFocusEscalation?: typeof hasOpenFocusEscalation;
|
|
44
48
|
listOpenShortfallProposalIds?: typeof listOpenShortfallProposalIds;
|
|
45
49
|
findOpenOperatorHoldForDelivery?: typeof findOpenOperatorHoldForDelivery;
|
|
50
|
+
isCommitGateConfigured?: CommitVerdictGateDeps['isCommitGateConfigured'];
|
|
51
|
+
resolveCommitGate?: CommitVerdictGateDeps['resolveCommitGate'];
|
|
52
|
+
resolveJudgedCommit?: CommitVerdictGateDeps['resolveJudgedCommit'];
|
|
53
|
+
readCommitVerdict?: CommitVerdictGateDeps['readCommitVerdict'];
|
|
54
|
+
readDeliveryGateOutcome?: CommitVerdictGateDeps['readDeliveryGateOutcome'];
|
|
55
|
+
hasPendingGateRun?: CommitVerdictGateDeps['hasPendingGateRun'];
|
|
46
56
|
rehomeIssueToDelivery?: typeof rehomeIssueToDelivery;
|
|
57
|
+
listReviewWindowCommits?: (focusId: string, base: string, tip: string) => readonly ReviewWindowCommit[] | null;
|
|
58
|
+
blameLines?: (focusId: string, tip: string, file: string, start: number, end: number) => readonly string[] | null;
|
|
59
|
+
resolveDeliveryFocusId?: (deliveryId: string) => Promise<string | null>;
|
|
60
|
+
getIssueDelivery?: typeof getIssueDelivery;
|
|
61
|
+
hasOpenEscalationForDelivery?: typeof hasOpenEscalationForDelivery;
|
|
47
62
|
hasPendingSpawnDirective: typeof hasPendingSpawnDirective;
|
|
48
63
|
emitLoopTrigger: typeof emitLoopTrigger;
|
|
49
64
|
getFocusReviewReportForSession: typeof getFocusReviewReportForSession;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-deps.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-deps.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"review-exit-deps.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-deps.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAsB,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEhI,OAAO,EAA6C,KAAK,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClI,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,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D,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,8BAA8B,EAAE,OAAO,8BAA8B,CAAC;IAMtE,2BAA2B,CAAC,EAAE,OAAO,2BAA2B,CAAC;IACjE,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;CAC3C;AAED,eAAO,MAAM,qBAAqB,EAAE,cAuCnC,CAAC"}
|
|
@@ -13,16 +13,20 @@
|
|
|
13
13
|
* import-x/no-cycle. Bodies verbatim.
|
|
14
14
|
*/
|
|
15
15
|
import { fetchEffectiveWorkflow } from '../queries/workflows.js';
|
|
16
|
-
import { updateDeliveryStatus, markDeliveryAutoApproved } from '../queries/deliveries.js';
|
|
16
|
+
import { updateDeliveryStatus, markDeliveryAutoApproved, getDeliveryContext, getIssueDelivery } from '../queries/deliveries.js';
|
|
17
|
+
import { getFocusWorktree } from '../focus/focus-worktree-state.js';
|
|
18
|
+
import { blameLineCommits, listReviewWindowCommits } from '../resolvers/shared/review-window-commits.js';
|
|
17
19
|
import { getActiveFocuses } from '../queries/focus-discovery.js';
|
|
18
20
|
import { hasPendingSpawnDirective } from '../directive/directive-queue.js';
|
|
19
21
|
import { emitLoopTrigger } from '../loops/index.js';
|
|
20
22
|
import { getFocusDeliveries, getFocusIssues, clearReviewRequestedAt, setReviewedThroughSha, setReviewCycleCount, setReviewHandoffCount, getFocusReviewReportForSession, getFocusReviewFiledIssueIds, } from '../queries/focuses.js';
|
|
21
23
|
import { resolveReviewCycleCap, resolveReviewHandoffCap } from '../verify/stall-detector-config.js';
|
|
22
24
|
import { getDeliveryIssues, rehomeIssueToDelivery } from '../queries/issues.js';
|
|
23
|
-
import { createEscalation, hasOpenFocusEscalation, resolveOpenFocusEscalationsOfKind, resolveConvergedFocusEscalations } from '../queries/escalations.js';
|
|
25
|
+
import { createEscalation, hasOpenFocusEscalation, hasOpenEscalationForDelivery, resolveOpenFocusEscalationsOfKind, resolveConvergedFocusEscalations } from '../queries/escalations.js';
|
|
24
26
|
import { findOpenOperatorHoldForDelivery } from '../queries/holds.js';
|
|
25
27
|
import { listOpenShortfallProposalIds } from '../queries/reality-tree.js';
|
|
28
|
+
import { commitGateSeams } from '../verify/commit-gate-configured.js';
|
|
29
|
+
import { writeReviewAutoApproval } from './review-auto-approval-record.js';
|
|
26
30
|
export const defaultReviewExitDeps = {
|
|
27
31
|
getActiveFocuses,
|
|
28
32
|
getFocusDeliveries,
|
|
@@ -31,6 +35,7 @@ export const defaultReviewExitDeps = {
|
|
|
31
35
|
fetchEffectiveWorkflow,
|
|
32
36
|
updateDeliveryStatus,
|
|
33
37
|
markDeliveryAutoApproved,
|
|
38
|
+
recordReviewAutoApproval: (approval) => writeReviewAutoApproval(approval),
|
|
34
39
|
clearReviewRequestedAt,
|
|
35
40
|
setReviewedThroughSha,
|
|
36
41
|
setReviewCycleCount,
|
|
@@ -42,7 +47,19 @@ export const defaultReviewExitDeps = {
|
|
|
42
47
|
hasOpenFocusEscalation,
|
|
43
48
|
listOpenShortfallProposalIds,
|
|
44
49
|
findOpenOperatorHoldForDelivery,
|
|
50
|
+
...commitGateSeams,
|
|
45
51
|
rehomeIssueToDelivery,
|
|
52
|
+
listReviewWindowCommits: (focusId, base, tip) => {
|
|
53
|
+
const worktree = getFocusWorktree(focusId);
|
|
54
|
+
return worktree ? listReviewWindowCommits(worktree.worktreePath, base, tip) : null;
|
|
55
|
+
},
|
|
56
|
+
blameLines: (focusId, tip, file, start, end) => {
|
|
57
|
+
const worktree = getFocusWorktree(focusId);
|
|
58
|
+
return worktree ? blameLineCommits(worktree.worktreePath, tip, file, start, end) : null;
|
|
59
|
+
},
|
|
60
|
+
resolveDeliveryFocusId: async (deliveryId) => (await getDeliveryContext(deliveryId))?.focus?.id ?? null,
|
|
61
|
+
getIssueDelivery,
|
|
62
|
+
hasOpenEscalationForDelivery,
|
|
46
63
|
hasPendingSpawnDirective,
|
|
47
64
|
emitLoopTrigger,
|
|
48
65
|
getFocusReviewReportForSession,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-deps.js","sourceRoot":"","sources":["../../src/completion/review-exit-deps.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0FAA0F;AAC1F,gBAAgB;AAEhB;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"review-exit-deps.js","sourceRoot":"","sources":["../../src/completion/review-exit-deps.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0FAA0F;AAC1F,gBAAgB;AAEhB;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAChI,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAA2B,MAAM,8CAA8C,CAAC;AAClI,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,gCAAgC,EAAE,MAAM,2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,CAAC,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1F,CAAC;IACD,sBAAsB,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,MAAM,kBAAkB,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,IAAI;IACvG,gBAAgB;IAChB,4BAA4B;IAC5B,wBAAwB;IACxB,eAAe;IACf,8BAA8B;IAC9B,2BAA2B;IAC3B,gBAAgB;CACjB,CAAC"}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Escalation tail of the review-exit gate.
|
|
3
|
+
*
|
|
4
|
+
* Every notice in this module fires AFTER routing has already been decided --
|
|
5
|
+
* none of them gate a delivery transition. The delivery has moved toward intent
|
|
6
|
+
* (or been held) by the time any of these file; what they carry is the residue
|
|
7
|
+
* the routing decider or an agent reconciles: a hand-off that keeps routing
|
|
8
|
+
* nothing, a review whose coverage keeps falling behind the branch, a gaps_found
|
|
9
|
+
* verdict with nothing actionable filed, an agent that skipped review_complete.
|
|
10
|
+
* (The review-cycle cap, which DOES stop the loop, lives in review-cycle-cap.ts
|
|
11
|
+
* and files through fileDedupedFocusEscalation here.)
|
|
12
|
+
*
|
|
13
|
+
* Extracted from review-exit-phase.ts to keep that file under the daemon
|
|
14
|
+
* file-size limit -- sibling of review-exit-shortfall.ts, same seam. Bodies are
|
|
15
|
+
* verbatim; the one piece of new code is `fileDedupedFocusEscalation`, which
|
|
16
|
+
* the filers were hand-rolling identically.
|
|
17
|
+
*
|
|
18
|
+
* @module completion/review-exit-escalations
|
|
19
|
+
*/
|
|
20
|
+
import { ESCALATION_REASONS } from '@telora/daemon-core';
|
|
1
21
|
import type { createEscalation, hasOpenFocusEscalation } from '../queries/escalations.js';
|
|
2
22
|
import type { setReviewCycleCount, clearReviewRequestedAt, setReviewHandoffCount } from '../queries/focuses.js';
|
|
3
23
|
import type { resolveReviewCycleCap } from '../verify/stall-detector-config.js';
|
|
@@ -19,8 +39,9 @@ export interface ReviewExitEscalationContext {
|
|
|
19
39
|
}
|
|
20
40
|
/**
|
|
21
41
|
* A compact summary of one open, blocking, review-filed finding on a focus,
|
|
22
|
-
* enumerated in the hand-off-exhausted escalation
|
|
23
|
-
*
|
|
42
|
+
* enumerated in the hand-off-exhausted escalation and the review-cycle cap
|
|
43
|
+
* observation so whoever routes them sees the outstanding findings without
|
|
44
|
+
* opening the daemon log.
|
|
24
45
|
*/
|
|
25
46
|
export interface ReviewFiledFindingSummary {
|
|
26
47
|
/** The issue id -- carried so the re-homing pass can move the issue. */
|
|
@@ -32,30 +53,31 @@ export interface ReviewFiledFindingSummary {
|
|
|
32
53
|
description: string | null;
|
|
33
54
|
}
|
|
34
55
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* files ONE review_cycle_cap_exceeded escalation for visibility and lets the
|
|
40
|
-
* loop continue -- the terminating breaker is recordHandoffAndMaybeTerminate
|
|
41
|
-
* (the hand-off cap), which actually closes the review window. Keeping the two
|
|
42
|
-
* roles distinct is deliberate: this one is the "how many cycles has this focus
|
|
43
|
-
* burned" gauge; that one is the "stop" valve.
|
|
56
|
+
* File a focus-anchored needs_operator escalation, at most one open per
|
|
57
|
+
* (focus, kind). Each caller decides `humanAct`: a named act only a human can
|
|
58
|
+
* perform reaches the operator; NO_HUMAN_ACT files an observation the focus's
|
|
59
|
+
* next agent session decides (queries/filing-observation.ts).
|
|
44
60
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* and files nothing.
|
|
61
|
+
* Best-effort throughout: a dedup-probe failure files anyway (a duplicate
|
|
62
|
+
* notice is cheaper than a swallowed one), and a create failure is logged, not
|
|
63
|
+
* thrown -- none of these notices may abort an exit handler that has already
|
|
64
|
+
* written delivery state. Returns whether a row of the kind is now open (filed,
|
|
65
|
+
* or already open): the review-cycle cap (review-cycle-cap.ts) resets its count
|
|
66
|
+
* only once its observation exists.
|
|
52
67
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* no dedup call). Best-effort: a meter/escalation failure never aborts routing.
|
|
56
|
-
* A deps object that omits either half skips the meter entirely.
|
|
68
|
+
* `label` names the site in the warn lines so the pre-extraction log text
|
|
69
|
+
* survives verbatim.
|
|
57
70
|
*/
|
|
58
|
-
export declare function
|
|
71
|
+
export declare function fileDedupedFocusEscalation(deps: ReviewExitEscalationDeps, ctx: ReviewExitEscalationContext, args: {
|
|
72
|
+
escalationKind: string;
|
|
73
|
+
label: string;
|
|
74
|
+
description: string;
|
|
75
|
+
metadata: Record<string, unknown>;
|
|
76
|
+
/** Required so every site states its routing: a named act, or NO_HUMAN_ACT. */
|
|
77
|
+
humanAct: HumanAct | null;
|
|
78
|
+
reasonType?: typeof ESCALATION_REASONS[keyof typeof ESCALATION_REASONS];
|
|
79
|
+
onFiled?: () => void;
|
|
80
|
+
}): Promise<boolean>;
|
|
59
81
|
/**
|
|
60
82
|
* Drift persisted after the full-pass respawn -- an operator must look.
|
|
61
83
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-escalations.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-escalations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"review-exit-escalations.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-escalations.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,kBAAkB,EAA2B,MAAM,qBAAqB,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAChH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8B,CAClD,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,2BAA2B,EAChC,IAAI,EAAE;IACJ,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,uBAAuB,GAAG,gBAAgB,CAAC;IACrD,oBAAoB,CAAC,EAAE,yBAAyB,EAAE,CAAC;CACpD,GACA,OAAO,CAAC,IAAI,CAAC,CAgDf;AAED;;;;;;;;;GASG;AACH,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,2BAA2B,GAC/B,OAAO,CAAC,IAAI,CAAC,CAsBf;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,2BAA2B,GAC/B,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
|
|
@@ -6,16 +6,18 @@
|
|
|
6
6
|
* Escalation tail of the review-exit gate.
|
|
7
7
|
*
|
|
8
8
|
* Every notice in this module fires AFTER routing has already been decided --
|
|
9
|
-
* none of them gate a transition. The delivery has moved toward intent
|
|
10
|
-
* held) by the time any of these file; what they carry is the residue
|
|
11
|
-
*
|
|
12
|
-
* review whose coverage keeps falling behind the branch, a gaps_found
|
|
13
|
-
* with nothing actionable filed, an agent that skipped review_complete.
|
|
9
|
+
* none of them gate a delivery transition. The delivery has moved toward intent
|
|
10
|
+
* (or been held) by the time any of these file; what they carry is the residue
|
|
11
|
+
* the routing decider or an agent reconciles: a hand-off that keeps routing
|
|
12
|
+
* nothing, a review whose coverage keeps falling behind the branch, a gaps_found
|
|
13
|
+
* verdict with nothing actionable filed, an agent that skipped review_complete.
|
|
14
|
+
* (The review-cycle cap, which DOES stop the loop, lives in review-cycle-cap.ts
|
|
15
|
+
* and files through fileDedupedFocusEscalation here.)
|
|
14
16
|
*
|
|
15
17
|
* Extracted from review-exit-phase.ts to keep that file under the daemon
|
|
16
18
|
* file-size limit -- sibling of review-exit-shortfall.ts, same seam. Bodies are
|
|
17
19
|
* verbatim; the one piece of new code is `fileDedupedFocusEscalation`, which
|
|
18
|
-
*
|
|
20
|
+
* the filers were hand-rolling identically.
|
|
19
21
|
*
|
|
20
22
|
* @module completion/review-exit-escalations
|
|
21
23
|
*/
|
|
@@ -33,12 +35,14 @@ const log = createLogger({ module: 'focus-executor' });
|
|
|
33
35
|
* Best-effort throughout: a dedup-probe failure files anyway (a duplicate
|
|
34
36
|
* notice is cheaper than a swallowed one), and a create failure is logged, not
|
|
35
37
|
* thrown -- none of these notices may abort an exit handler that has already
|
|
36
|
-
* written delivery state.
|
|
38
|
+
* written delivery state. Returns whether a row of the kind is now open (filed,
|
|
39
|
+
* or already open): the review-cycle cap (review-cycle-cap.ts) resets its count
|
|
40
|
+
* only once its observation exists.
|
|
37
41
|
*
|
|
38
42
|
* `label` names the site in the warn lines so the pre-extraction log text
|
|
39
43
|
* survives verbatim.
|
|
40
44
|
*/
|
|
41
|
-
async function fileDedupedFocusEscalation(deps, ctx, args) {
|
|
45
|
+
export async function fileDedupedFocusEscalation(deps, ctx, args) {
|
|
42
46
|
const { focusId, focusName, organizationId, sessionId } = ctx;
|
|
43
47
|
let alreadyOpen = false;
|
|
44
48
|
if (deps.hasOpenFocusEscalation) {
|
|
@@ -52,7 +56,7 @@ async function fileDedupedFocusEscalation(deps, ctx, args) {
|
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
if (alreadyOpen)
|
|
55
|
-
return;
|
|
59
|
+
return true;
|
|
56
60
|
try {
|
|
57
61
|
await deps.createEscalation({
|
|
58
62
|
organizationId,
|
|
@@ -67,74 +71,11 @@ async function fileDedupedFocusEscalation(deps, ctx, args) {
|
|
|
67
71
|
metadata: args.metadata,
|
|
68
72
|
});
|
|
69
73
|
args.onFiled?.();
|
|
74
|
+
return true;
|
|
70
75
|
}
|
|
71
76
|
catch (err) {
|
|
72
77
|
log.warn(`createEscalation (${args.label}) failed for "${focusName}": ${err.message}`);
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Focus-level review-cycle churn METER (NOT a breaker), plus the one escalation
|
|
77
|
-
* it arms.
|
|
78
|
-
*
|
|
79
|
-
* This meters and SURFACES; it never halts. When the count crosses the cap it
|
|
80
|
-
* files ONE review_cycle_cap_exceeded escalation for visibility and lets the
|
|
81
|
-
* loop continue -- the terminating breaker is recordHandoffAndMaybeTerminate
|
|
82
|
-
* (the hand-off cap), which actually closes the review window. Keeping the two
|
|
83
|
-
* roles distinct is deliberate: this one is the "how many cycles has this focus
|
|
84
|
-
* burned" gauge; that one is the "stop" valve.
|
|
85
|
-
*
|
|
86
|
-
* Increments on EVERY completed review cycle (including auto-approve /
|
|
87
|
-
* no-report cycles the focus_reviews-row meter misses) so the take-turns-failing
|
|
88
|
-
* tail -- deliveries taking turns failing so no single delivery hits its
|
|
89
|
-
* per-delivery iteration cap while the focus cycles reviews forever -- becomes
|
|
90
|
-
* visible. When the count CROSSES the cap, file one needs_operator escalation
|
|
91
|
-
* per focus. Normal verify->review->requeue cycling below the cap is NOT a stall
|
|
92
|
-
* and files nothing.
|
|
93
|
-
*
|
|
94
|
-
* The crossing condition fires exactly once: monotonic and single-writer here,
|
|
95
|
-
* so this is a deterministic one-per-focus escalation without a DB probe (hence
|
|
96
|
-
* no dedup call). Best-effort: a meter/escalation failure never aborts routing.
|
|
97
|
-
* A deps object that omits either half skips the meter entirely.
|
|
98
|
-
*/
|
|
99
|
-
export async function recordReviewCycleAndMaybeEscalate(deps, ctx, priorCycleCount) {
|
|
100
|
-
if (!deps.setReviewCycleCount || !deps.resolveReviewCycleCap)
|
|
101
|
-
return;
|
|
102
|
-
const { focusId, focusName, organizationId, sessionId } = ctx;
|
|
103
|
-
const newCycleCount = priorCycleCount + 1;
|
|
104
|
-
try {
|
|
105
|
-
await deps.setReviewCycleCount(focusId, newCycleCount);
|
|
106
|
-
}
|
|
107
|
-
catch (err) {
|
|
108
|
-
log.warn(`[focus-executor] setReviewCycleCount failed for "${focusName}": ${err.message}`);
|
|
109
|
-
}
|
|
110
|
-
const reviewCycleCap = deps.resolveReviewCycleCap();
|
|
111
|
-
if (!(priorCycleCount < reviewCycleCap && newCycleCount >= reviewCycleCap))
|
|
112
|
-
return;
|
|
113
|
-
try {
|
|
114
|
-
await deps.createEscalation({
|
|
115
|
-
organizationId,
|
|
116
|
-
sessionId,
|
|
117
|
-
issueId: null,
|
|
118
|
-
reasonType: ESCALATION_REASONS.DECISION_NEEDED,
|
|
119
|
-
disposition: ESCALATION_DISPOSITIONS.NEEDS_OPERATOR,
|
|
120
|
-
// A METER, not a breaker: the loop keeps converging and nothing waits on a
|
|
121
|
-
// human. A named act would make this focus row a spawn gate, turning the
|
|
122
|
-
// gauge into a halt -- so it is an observation the next session reads.
|
|
123
|
-
humanAct: NO_HUMAN_ACT,
|
|
124
|
-
anchor: { focusId, sessionId },
|
|
125
|
-
description: `Focus "${focusName}" has completed ${newCycleCount} review cycle(s) ` +
|
|
126
|
-
`(cap: ${reviewCycleCap}) without converging. This counts auto-approve ` +
|
|
127
|
-
`and no-report cycles the focus_reviews meter misses -- the take-turns-` +
|
|
128
|
-
`failing tail. An operator must decide: descope remaining gaps, raise ` +
|
|
129
|
-
`TELORA_REVIEW_CYCLE_CAP, or close the focus.`,
|
|
130
|
-
escalationKind: 'review_cycle_cap_exceeded',
|
|
131
|
-
metadata: { review_cycle_count: newCycleCount, cap: reviewCycleCap, terminates_when: 'focus_converged' },
|
|
132
|
-
});
|
|
133
|
-
log.warn(`[focus-executor] review_cycle_cap_exceeded escalation filed for ` +
|
|
134
|
-
`"${focusName}" (cycles=${newCycleCount}, cap=${reviewCycleCap}).`);
|
|
135
|
-
}
|
|
136
|
-
catch (err) {
|
|
137
|
-
log.warn(`[focus-executor] createEscalation (review_cycle_cap) failed for "${focusName}": ${err.message}`);
|
|
78
|
+
return false;
|
|
138
79
|
}
|
|
139
80
|
}
|
|
140
81
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-escalations.js","sourceRoot":"","sources":["../../src/completion/review-exit-escalations.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8EAA8E;AAC9E,gEAAgE;AAChE,gBAAgB;AAEhB
|
|
1
|
+
{"version":3,"file":"review-exit-escalations.js","sourceRoot":"","sources":["../../src/completion/review-exit-escalations.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8EAA8E;AAC9E,gEAAgE;AAChE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAIlF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAiB,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAsCvD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,IAA8B,EAC9B,GAAgC,EAChC,IASC;IAED,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC;IAC9D,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAChC,IAAI,CAAC;YACH,4EAA4E;YAC5E,6EAA6E;YAC7E,WAAW,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/G,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,GAAG,CAAC,IAAI,CAAC,2BAA2B,IAAI,CAAC,KAAK,iBAAiB,SAAS,MAAO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CAC3C,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAA8B,EAC9B,GAAgC;IAEhC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC;IAC9D,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,gBAAgB,CAAC;YAC1B,cAAc;YACd,SAAS;YACT,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,kBAAkB,CAAC,mBAAmB;YAClD,0EAA0E;YAC1E,2EAA2E;YAC3E,WAAW,EAAE,uBAAuB,CAAC,cAAc;YACnD,QAAQ,EAAE,YAAY;YACtB,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;YAC9B,WAAW,EACT,sEAAsE;gBACtE,qEAAqE;gBACrE,qEAAqE;YACvE,cAAc,EAAE,uBAAuB;YACvC,sEAAsE;YACtE,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE;SAClE,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CACN,yEAAyE,SAAS,MAAO,GAAa,CAAC,OAAO,EAAE,CACjH,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReviewFiledFindingSummary } from './review-exit-escalations.js';
|
|
2
2
|
import type { ReviewExitDeps } from './review-exit-deps.js';
|
|
3
|
+
import type { FocusIssueInfo } from '../types/index.js';
|
|
3
4
|
/** The review-filed evidence bundle the routing decision tree consumes. */
|
|
4
5
|
export interface ReviewExitEvidence {
|
|
5
6
|
reportExists: boolean;
|
|
@@ -11,6 +12,14 @@ export interface ReviewExitEvidence {
|
|
|
11
12
|
attributedDeliveryIds: ReadonlySet<string>;
|
|
12
13
|
reviewFiledTargetDeliveryIds: ReadonlySet<string>;
|
|
13
14
|
openBlockingFindings: ReviewFiledFindingSummary[];
|
|
15
|
+
/**
|
|
16
|
+
* The focus issue read the signals above were derived from, and the review-filed
|
|
17
|
+
* id union they keyed on -- carried so the foreign-finding scope
|
|
18
|
+
* (review-exit-foreign-findings.ts) can re-derive the target sets without the
|
|
19
|
+
* findings it routed to another focus. Empty on a read failure.
|
|
20
|
+
*/
|
|
21
|
+
focusIssues: FocusIssueInfo[];
|
|
22
|
+
reviewFiledIds: ReadonlySet<string>;
|
|
14
23
|
}
|
|
15
24
|
/**
|
|
16
25
|
* Gather the review-exit evidence for a focus/session. Every read is best-effort:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-evidence.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-evidence.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"review-exit-evidence.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-evidence.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKxD,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,UAAU,GAAG,YAAY,GAAG,IAAI,CAAC;IAChD,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,wBAAwB,EAAE,OAAO,CAAC;IAClC,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3C,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClD,oBAAoB,EAAE,yBAAyB,EAAE,CAAC;IAClD;;;;;OAKG;IACH,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACrC;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAChG,OAAO,CAAC,kBAAkB,CAAC,CAgG7B"}
|