@telora/daemon 0.24.25 → 0.24.26
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 +9 -3
- package/dist/audit/audit-prompt.d.ts.map +1 -1
- package/dist/audit/audit-prompt.js +15 -0
- package/dist/audit/audit-prompt.js.map +1 -1
- package/dist/completion/completion-event/event.d.ts +4 -3
- package/dist/completion/completion-event/event.d.ts.map +1 -1
- package/dist/completion/completion-event/event.js.map +1 -1
- package/dist/completion/review-cycle-budget/review-cycle-cap.d.ts +19 -11
- package/dist/completion/review-cycle-budget/review-cycle-cap.d.ts.map +1 -1
- package/dist/completion/review-cycle-budget/review-cycle-cap.js +36 -36
- package/dist/completion/review-cycle-budget/review-cycle-cap.js.map +1 -1
- package/dist/completion/review-cycle-budget/review-loop-detection.d.ts +101 -0
- package/dist/completion/review-cycle-budget/review-loop-detection.d.ts.map +1 -0
- package/dist/completion/review-cycle-budget/review-loop-detection.js +105 -0
- package/dist/completion/review-cycle-budget/review-loop-detection.js.map +1 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.d.ts +70 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.d.ts.map +1 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.js +98 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.js.map +1 -0
- package/dist/completion/review-exit/review-defect-detector.d.ts +71 -49
- package/dist/completion/review-exit/review-defect-detector.d.ts.map +1 -1
- package/dist/completion/review-exit/review-defect-detector.js +75 -69
- package/dist/completion/review-exit/review-defect-detector.js.map +1 -1
- package/dist/completion/review-exit/review-exit-attribution.d.ts +1 -1
- package/dist/completion/review-exit/review-exit-attribution.js +1 -1
- package/dist/completion/review-exit/review-exit-deps.d.ts +5 -2
- package/dist/completion/review-exit/review-exit-deps.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-deps.js +1 -1
- package/dist/completion/review-exit/review-exit-evidence.d.ts +10 -1
- package/dist/completion/review-exit/review-exit-evidence.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-evidence.js +17 -14
- package/dist/completion/review-exit/review-exit-evidence.js.map +1 -1
- package/dist/completion/review-exit/review-exit-foreign-findings.d.ts +1 -1
- package/dist/completion/review-exit/review-exit-foreign-findings.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-phase.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-phase.js +12 -8
- package/dist/completion/review-exit/review-exit-phase.js.map +1 -1
- package/dist/completion/state-cascade/review-next-step.d.ts +12 -3
- package/dist/completion/state-cascade/review-next-step.d.ts.map +1 -1
- package/dist/completion/state-cascade/review-next-step.js +10 -1
- package/dist/completion/state-cascade/review-next-step.js.map +1 -1
- package/dist/completion/state-cascade/standing-approval-convergence.d.ts +1 -1
- package/dist/completion/state-cascade/standing-approval-convergence.d.ts.map +1 -1
- package/dist/completion/state-cascade/standing-approval-convergence.js +10 -4
- package/dist/completion/state-cascade/standing-approval-convergence.js.map +1 -1
- package/dist/completion/state-cascade/state-cascade.d.ts +3 -0
- package/dist/completion/state-cascade/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade/state-cascade.js +16 -1
- package/dist/completion/state-cascade/state-cascade.js.map +1 -1
- package/dist/completion/team-exit/status-advance-phase.d.ts +1 -1
- package/dist/completion/team-exit/status-advance-phase.d.ts.map +1 -1
- package/dist/completion/team-exit/status-advance-phase.js +6 -4
- package/dist/completion/team-exit/status-advance-phase.js.map +1 -1
- package/dist/completion/team-outcome/apply-turn.d.ts.map +1 -1
- package/dist/completion/team-outcome/apply-turn.js +9 -4
- package/dist/completion/team-outcome/apply-turn.js.map +1 -1
- package/dist/completion/team-outcome/decide-turn-entry-rows.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide-turn-entry-rows.js +28 -3
- package/dist/completion/team-outcome/decide-turn-entry-rows.js.map +1 -1
- package/dist/completion/team-outcome/decide.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide.js +1 -0
- package/dist/completion/team-outcome/decide.js.map +1 -1
- package/dist/completion/team-outcome/exit-limits.d.ts +6 -0
- package/dist/completion/team-outcome/exit-limits.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-limits.js +6 -0
- package/dist/completion/team-outcome/exit-limits.js.map +1 -1
- package/dist/completion/team-outcome/exit-pipeline-state.d.ts +5 -0
- package/dist/completion/team-outcome/exit-pipeline-state.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-pipeline-state.js.map +1 -1
- package/dist/completion/team-teardown/session-hold-bounds.d.ts +10 -1
- package/dist/completion/team-teardown/session-hold-bounds.d.ts.map +1 -1
- package/dist/completion/team-teardown/session-hold-bounds.js +11 -0
- package/dist/completion/team-teardown/session-hold-bounds.js.map +1 -1
- package/dist/completion/team-teardown/session-hold.d.ts.map +1 -1
- package/dist/completion/team-teardown/session-hold.js +2 -0
- package/dist/completion/team-teardown/session-hold.js.map +1 -1
- package/dist/composition/engine-start-context.d.ts.map +1 -1
- package/dist/composition/engine-start-context.js +9 -1
- package/dist/composition/engine-start-context.js.map +1 -1
- package/dist/composition/execution-spawn-context.d.ts.map +1 -1
- package/dist/composition/execution-spawn-context.js +2 -0
- package/dist/composition/execution-spawn-context.js.map +1 -1
- package/dist/composition/judgement-contexts.d.ts.map +1 -1
- package/dist/composition/judgement-contexts.js +8 -2
- package/dist/composition/judgement-contexts.js.map +1 -1
- package/dist/composition/review-exit-context.d.ts.map +1 -1
- package/dist/composition/review-exit-context.js +2 -0
- package/dist/composition/review-exit-context.js.map +1 -1
- package/dist/composition/review-loop-context.d.ts +28 -0
- package/dist/composition/review-loop-context.d.ts.map +1 -0
- package/dist/composition/review-loop-context.js +147 -0
- package/dist/composition/review-loop-context.js.map +1 -0
- package/dist/composition/runtime-heartbeat-context.d.ts.map +1 -1
- package/dist/composition/runtime-heartbeat-context.js +8 -2
- package/dist/composition/runtime-heartbeat-context.js.map +1 -1
- package/dist/composition/spawn-pass-deps.d.ts.map +1 -1
- package/dist/composition/spawn-pass-deps.js +3 -0
- package/dist/composition/spawn-pass-deps.js.map +1 -1
- package/dist/composition/state-cascade-context.d.ts.map +1 -1
- package/dist/composition/state-cascade-context.js +3 -1
- package/dist/composition/state-cascade-context.js.map +1 -1
- package/dist/composition/tower-escalation-context.d.ts +12 -0
- package/dist/composition/tower-escalation-context.d.ts.map +1 -0
- package/dist/composition/tower-escalation-context.js +109 -0
- package/dist/composition/tower-escalation-context.js.map +1 -0
- package/dist/composition/workstation-intervals-context.d.ts +3 -0
- package/dist/composition/workstation-intervals-context.d.ts.map +1 -0
- package/dist/composition/workstation-intervals-context.js +33 -0
- package/dist/composition/workstation-intervals-context.js.map +1 -0
- package/dist/daemon-state/awaiting-slot.d.ts +18 -1
- package/dist/daemon-state/awaiting-slot.d.ts.map +1 -1
- package/dist/daemon-state/awaiting-slot.js +7 -0
- package/dist/daemon-state/awaiting-slot.js.map +1 -1
- package/dist/delivery/delivery-reconciler.d.ts +7 -7
- package/dist/delivery/recorded-concerns.d.ts +63 -28
- package/dist/delivery/recorded-concerns.d.ts.map +1 -1
- package/dist/delivery/recorded-concerns.js +72 -28
- package/dist/delivery/recorded-concerns.js.map +1 -1
- package/dist/directive/directive-queue.d.ts +8 -0
- package/dist/directive/directive-queue.d.ts.map +1 -1
- package/dist/directive/directive-queue.js +1 -1
- package/dist/directive/directive-queue.js.map +1 -1
- package/dist/focus/control-state.d.ts +6 -4
- package/dist/focus/control-state.d.ts.map +1 -1
- package/dist/focus/control-state.js +6 -4
- package/dist/focus/control-state.js.map +1 -1
- package/dist/focus/daemon-contexts-judgement.d.ts +6 -0
- package/dist/focus/daemon-contexts-judgement.d.ts.map +1 -1
- package/dist/focus/daemon-contexts.d.ts +6 -0
- package/dist/focus/daemon-contexts.d.ts.map +1 -1
- package/dist/focus/daemon-contexts.js.map +1 -1
- package/dist/focus/focus-engine.d.ts.map +1 -1
- package/dist/focus/focus-engine.js +3 -1
- package/dist/focus/focus-engine.js.map +1 -1
- package/dist/focus/focus-executor.d.ts.map +1 -1
- package/dist/focus/focus-executor.js +3 -2
- package/dist/focus/focus-executor.js.map +1 -1
- package/dist/focus/focus-loop-registry.d.ts.map +1 -1
- package/dist/focus/focus-loop-registry.js +42 -0
- package/dist/focus/focus-loop-registry.js.map +1 -1
- package/dist/focus/focus-poller-auto-advance.d.ts +4 -2
- package/dist/focus/focus-poller-auto-advance.d.ts.map +1 -1
- package/dist/focus/focus-poller-auto-advance.js +24 -18
- package/dist/focus/focus-poller-auto-advance.js.map +1 -1
- package/dist/focus/focus-poller-spawn.d.ts.map +1 -1
- package/dist/focus/focus-poller-spawn.js +8 -6
- package/dist/focus/focus-poller-spawn.js.map +1 -1
- package/dist/focus/heartbeat.d.ts +9 -2
- package/dist/focus/heartbeat.d.ts.map +1 -1
- package/dist/focus/heartbeat.js +9 -1
- package/dist/focus/heartbeat.js.map +1 -1
- package/dist/focus/pending-directive-gates.d.ts +14 -0
- package/dist/focus/pending-directive-gates.d.ts.map +1 -1
- package/dist/focus/pending-directive-gates.js +25 -1
- package/dist/focus/pending-directive-gates.js.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.d.ts +7 -0
- package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.d.ts +1 -1
- package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.js +2 -0
- package/dist/focus/pending-spawn-review-next-step.js.map +1 -1
- package/dist/focus/ready-focus-team-work.d.ts +9 -4
- package/dist/focus/ready-focus-team-work.d.ts.map +1 -1
- package/dist/focus/ready-focus-team-work.js +14 -3
- package/dist/focus/ready-focus-team-work.js.map +1 -1
- package/dist/focus/verify-open-issues.d.ts +3 -2
- package/dist/focus/verify-open-issues.d.ts.map +1 -1
- package/dist/focus/verify-open-issues.js +6 -4
- package/dist/focus/verify-open-issues.js.map +1 -1
- package/dist/focus/workstation-intervals.d.ts +83 -0
- package/dist/focus/workstation-intervals.d.ts.map +1 -0
- package/dist/focus/workstation-intervals.js +81 -0
- package/dist/focus/workstation-intervals.js.map +1 -0
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +5 -2
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.js +2 -2
- package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
- package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
- package/dist/prompt-sections/persona-sections.js +4 -1
- package/dist/prompt-sections/persona-sections.js.map +1 -1
- package/dist/prompt-sections/qa-author-section.d.ts.map +1 -1
- package/dist/prompt-sections/qa-author-section.js +18 -1
- package/dist/prompt-sections/qa-author-section.js.map +1 -1
- package/dist/prompt-sections/scoping-sections.d.ts +0 -12
- package/dist/prompt-sections/scoping-sections.d.ts.map +1 -1
- package/dist/prompt-sections/scoping-sections.js +16 -2
- package/dist/prompt-sections/scoping-sections.js.map +1 -1
- package/dist/prompts/bounded-universals.d.ts +13 -0
- package/dist/prompts/bounded-universals.d.ts.map +1 -0
- package/dist/prompts/bounded-universals.js +32 -0
- package/dist/prompts/bounded-universals.js.map +1 -0
- package/dist/queries/api-client/shared.d.ts +2 -1
- package/dist/queries/api-client/shared.d.ts.map +1 -1
- package/dist/queries/api-client/shared.js +31 -1
- package/dist/queries/api-client/shared.js.map +1 -1
- package/dist/queries/deliveries/issues.d.ts.map +1 -1
- package/dist/queries/deliveries/issues.js +1 -0
- package/dist/queries/deliveries/issues.js.map +1 -1
- package/dist/queries/escalations/escalation-consumption.d.ts +13 -0
- package/dist/queries/escalations/escalation-consumption.d.ts.map +1 -1
- package/dist/queries/escalations/escalation-consumption.js +12 -2
- package/dist/queries/escalations/escalation-consumption.js.map +1 -1
- package/dist/queries/escalations/tower-escalations.d.ts +82 -0
- package/dist/queries/escalations/tower-escalations.d.ts.map +1 -0
- package/dist/queries/escalations/tower-escalations.js +97 -0
- package/dist/queries/escalations/tower-escalations.js.map +1 -0
- package/dist/queries/focus-review/recorded-concern-ids.d.ts +48 -11
- package/dist/queries/focus-review/recorded-concern-ids.d.ts.map +1 -1
- package/dist/queries/focus-review/recorded-concern-ids.js +42 -12
- package/dist/queries/focus-review/recorded-concern-ids.js.map +1 -1
- package/dist/queries/focus-review/review-criterion-verdicts.d.ts +37 -0
- package/dist/queries/focus-review/review-criterion-verdicts.d.ts.map +1 -0
- package/dist/queries/focus-review/review-criterion-verdicts.js +64 -0
- package/dist/queries/focus-review/review-criterion-verdicts.js.map +1 -0
- package/dist/queries/focus-review/review-finding-facts.d.ts +18 -6
- package/dist/queries/focus-review/review-finding-facts.d.ts.map +1 -1
- package/dist/queries/focus-review/review-finding-facts.js +21 -8
- package/dist/queries/focus-review/review-finding-facts.js.map +1 -1
- package/dist/queries/focuses/ended-arm.d.ts +56 -13
- package/dist/queries/focuses/ended-arm.d.ts.map +1 -1
- package/dist/queries/focuses/ended-arm.js +40 -14
- package/dist/queries/focuses/ended-arm.js.map +1 -1
- package/dist/queries/focuses/focus-criteria-standing.d.ts +12 -0
- package/dist/queries/focuses/focus-criteria-standing.d.ts.map +1 -1
- package/dist/queries/focuses/focus-criteria-standing.js +13 -0
- package/dist/queries/focuses/focus-criteria-standing.js.map +1 -1
- package/dist/queries/focuses/focus-discovery.d.ts +14 -3
- package/dist/queries/focuses/focus-discovery.d.ts.map +1 -1
- package/dist/queries/focuses/focus-discovery.js +2 -19
- package/dist/queries/focuses/focus-discovery.js.map +1 -1
- package/dist/queries/focuses/focuses.d.ts +15 -12
- package/dist/queries/focuses/focuses.d.ts.map +1 -1
- package/dist/queries/focuses/focuses.js +15 -13
- package/dist/queries/focuses/focuses.js.map +1 -1
- package/dist/queries/sessions/sessions.d.ts.map +1 -1
- package/dist/queries/sessions/sessions.js +2 -1
- package/dist/queries/sessions/sessions.js.map +1 -1
- package/dist/queries/tower-decisions/tower-decisions.d.ts +103 -0
- package/dist/queries/tower-decisions/tower-decisions.d.ts.map +1 -0
- package/dist/queries/tower-decisions/tower-decisions.js +138 -0
- package/dist/queries/tower-decisions/tower-decisions.js.map +1 -0
- package/dist/queries/wire-schemas/schemas.d.ts +2 -0
- package/dist/queries/wire-schemas/schemas.d.ts.map +1 -1
- package/dist/queries/wire-schemas/schemas.js +8 -2
- package/dist/queries/wire-schemas/schemas.js.map +1 -1
- package/dist/queries/workstation-intervals/workstation-intervals.d.ts +52 -0
- package/dist/queries/workstation-intervals/workstation-intervals.d.ts.map +1 -0
- package/dist/queries/workstation-intervals/workstation-intervals.js +49 -0
- package/dist/queries/workstation-intervals/workstation-intervals.js.map +1 -0
- package/dist/resolvers/escalation-answers.d.ts +31 -0
- package/dist/resolvers/escalation-answers.d.ts.map +1 -1
- package/dist/resolvers/escalation-answers.js +31 -17
- package/dist/resolvers/escalation-answers.js.map +1 -1
- package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -1
- package/dist/resolvers/focus-criteria-standing.js +20 -0
- package/dist/resolvers/focus-criteria-standing.js.map +1 -1
- package/dist/shell/unified-engine-lifecycle.d.ts +11 -1
- package/dist/shell/unified-engine-lifecycle.d.ts.map +1 -1
- package/dist/shell/unified-engine-lifecycle.js +10 -1
- package/dist/shell/unified-engine-lifecycle.js.map +1 -1
- package/dist/spawn/directive-dispatch.d.ts.map +1 -1
- package/dist/spawn/directive-dispatch.js +1 -0
- package/dist/spawn/directive-dispatch.js.map +1 -1
- package/dist/spawn/lead-continuation.d.ts +4 -3
- package/dist/spawn/lead-continuation.d.ts.map +1 -1
- package/dist/spawn/lead-continuation.js.map +1 -1
- package/dist/spawn/live-answer-delivery.d.ts +53 -0
- package/dist/spawn/live-answer-delivery.d.ts.map +1 -0
- package/dist/spawn/live-answer-delivery.js +26 -0
- package/dist/spawn/live-answer-delivery.js.map +1 -0
- package/dist/spawn/routing-decider-spawn.d.ts +64 -2
- package/dist/spawn/routing-decider-spawn.d.ts.map +1 -1
- package/dist/spawn/routing-decider-spawn.js +65 -20
- package/dist/spawn/routing-decider-spawn.js.map +1 -1
- package/dist/spawn/worktree-session.d.ts +7 -5
- package/dist/spawn/worktree-session.d.ts.map +1 -1
- package/dist/spawn/worktree-session.js +11 -7
- package/dist/spawn/worktree-session.js.map +1 -1
- package/dist/supervision/review-cycle-cap-hold.d.ts +11 -5
- package/dist/supervision/review-cycle-cap-hold.d.ts.map +1 -1
- package/dist/supervision/review-cycle-cap-hold.js +29 -11
- package/dist/supervision/review-cycle-cap-hold.js.map +1 -1
- package/dist/supervision/review-loop-detector.d.ts +48 -0
- package/dist/supervision/review-loop-detector.d.ts.map +1 -0
- package/dist/supervision/review-loop-detector.js +13 -0
- package/dist/supervision/review-loop-detector.js.map +1 -0
- package/dist/supervision/review-loop-hold.d.ts +29 -0
- package/dist/supervision/review-loop-hold.d.ts.map +1 -0
- package/dist/supervision/review-loop-hold.js +99 -0
- package/dist/supervision/review-loop-hold.js.map +1 -0
- package/dist/supervision/stall-detector-config.d.ts +8 -0
- package/dist/supervision/stall-detector-config.d.ts.map +1 -1
- package/dist/supervision/stall-detector-config.js +14 -3
- package/dist/supervision/stall-detector-config.js.map +1 -1
- package/dist/supervision/stop-registry.d.ts +3 -0
- package/dist/supervision/stop-registry.d.ts.map +1 -1
- package/dist/supervision/stop-registry.js +3 -1
- package/dist/supervision/stop-registry.js.map +1 -1
- package/dist/supervision/stop-rows-review-loop.d.ts +35 -0
- package/dist/supervision/stop-rows-review-loop.d.ts.map +1 -0
- package/dist/supervision/stop-rows-review-loop.js +150 -0
- package/dist/supervision/stop-rows-review-loop.js.map +1 -0
- package/dist/supervision/stop-rows-team-session.d.ts +1 -1
- package/dist/supervision/stop-rows-team-session.d.ts.map +1 -1
- package/dist/supervision/stop-rows-team-session.js.map +1 -1
- package/dist/supervision/unreviewed-settle-detector.d.ts +7 -2
- package/dist/supervision/unreviewed-settle-detector.d.ts.map +1 -1
- package/dist/supervision/unreviewed-settle-detector.js +15 -2
- package/dist/supervision/unreviewed-settle-detector.js.map +1 -1
- package/dist/templates/agents-md.d.ts.map +1 -1
- package/dist/templates/agents-md.js +1 -0
- package/dist/templates/agents-md.js.map +1 -1
- package/dist/templates/claude-md.d.ts +1 -1
- package/dist/templates/claude-md.d.ts.map +1 -1
- package/dist/templates/claude-md.js +12 -0
- package/dist/templates/claude-md.js.map +1 -1
- package/dist/testing/fixtures/api-client.js +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/pending-spawn-world.d.ts +4 -0
- package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.js +15 -2
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
- package/dist/testing/fixtures/recording-api-client.js +1 -1
- package/dist/testing/fixtures/review-exit-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/review-exit-deps.js +3 -1
- package/dist/testing/fixtures/review-exit-deps.js.map +1 -1
- package/dist/testing/fixtures/review-loop.d.ts +19 -0
- package/dist/testing/fixtures/review-loop.d.ts.map +1 -0
- package/dist/testing/fixtures/review-loop.js +30 -0
- package/dist/testing/fixtures/review-loop.js.map +1 -0
- package/dist/testing/fixtures/shortfall-rework-hold-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/shortfall-rework-hold-deps.js +1 -0
- package/dist/testing/fixtures/shortfall-rework-hold-deps.js.map +1 -1
- package/dist/testing/fixtures/tower-loop.d.ts +28 -0
- package/dist/testing/fixtures/tower-loop.d.ts.map +1 -0
- package/dist/testing/fixtures/tower-loop.js +83 -0
- package/dist/testing/fixtures/tower-loop.js.map +1 -0
- package/dist/tower/tower-escalation-gather.d.ts +33 -0
- package/dist/tower/tower-escalation-gather.d.ts.map +1 -0
- package/dist/tower/tower-escalation-gather.js +38 -0
- package/dist/tower/tower-escalation-gather.js.map +1 -0
- package/dist/tower/tower-escalation-prompt.d.ts +62 -0
- package/dist/tower/tower-escalation-prompt.d.ts.map +1 -0
- package/dist/tower/tower-escalation-prompt.js +130 -0
- package/dist/tower/tower-escalation-prompt.js.map +1 -0
- package/dist/tower/tower-escalation-routing.d.ts +49 -0
- package/dist/tower/tower-escalation-routing.d.ts.map +1 -0
- package/dist/tower/tower-escalation-routing.js +53 -0
- package/dist/tower/tower-escalation-routing.js.map +1 -0
- package/dist/tower/tower-escalation-session.d.ts +149 -0
- package/dist/tower/tower-escalation-session.d.ts.map +1 -0
- package/dist/tower/tower-escalation-session.js +238 -0
- package/dist/tower/tower-escalation-session.js.map +1 -0
- package/dist/tower/tower-supervisor-history.d.ts +129 -0
- package/dist/tower/tower-supervisor-history.d.ts.map +1 -0
- package/dist/tower/tower-supervisor-history.js +217 -0
- package/dist/tower/tower-supervisor-history.js.map +1 -0
- package/dist/tower/tower-supervisor-prompt.d.ts +21 -0
- package/dist/tower/tower-supervisor-prompt.d.ts.map +1 -0
- package/dist/tower/tower-supervisor-prompt.js +205 -0
- package/dist/tower/tower-supervisor-prompt.js.map +1 -0
- package/dist/tower/tower-supervisor-session.d.ts +220 -0
- package/dist/tower/tower-supervisor-session.d.ts.map +1 -0
- package/dist/tower/tower-supervisor-session.js +307 -0
- package/dist/tower/tower-supervisor-session.js.map +1 -0
- package/dist/tower/tower-supervisor.d.ts +86 -0
- package/dist/tower/tower-supervisor.d.ts.map +1 -0
- package/dist/tower/tower-supervisor.js +8 -0
- package/dist/tower/tower-supervisor.js.map +1 -0
- package/dist/types/index.js +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts +4 -4
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.js +16 -6
- package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,98 @@
|
|
|
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-budget/review-cycle-churn-meter.test.ts,
|
|
3
|
+
// packages/daemon/src/completion/review-cycle-budget/spent-budget-release.test.ts
|
|
4
|
+
// PINNED-BY-END
|
|
5
|
+
/**
|
|
6
|
+
* The spent-budget release RETRY: a focus whose review_cycle_count stands at
|
|
7
|
+
* TELORA_REVIEW_CYCLE_CAP while its role is still assigned gets its arm
|
|
8
|
+
* released, with arm_ended_reason = 'review_budget_spent', on the next cascade
|
|
9
|
+
* poll -- and on every poll after until the write lands.
|
|
10
|
+
*
|
|
11
|
+
* WHY. The budget crossing (review-cycle-cap.ts) writes the count first and
|
|
12
|
+
* then releases the arm. When the release write fails, the count alone holds
|
|
13
|
+
* every spawn gate (supervision/review-cycle-cap-hold.ts) -- with the role still
|
|
14
|
+
* set and no reason recorded, a hold nobody can read. This pass gives the hold a
|
|
15
|
+
* writer behind it, so the held state is transient by construction. History:
|
|
16
|
+
* docs/daemon/history-team-lifecycle.md (review-cycle-cap.ts).
|
|
17
|
+
*
|
|
18
|
+
* The same condition also arises with no failed write at all -- the cap lowered
|
|
19
|
+
* below a focus's standing count -- and is the same spent budget, so it is
|
|
20
|
+
* released the same way.
|
|
21
|
+
*
|
|
22
|
+
* WHAT IT SENDS. The record the failed crossing composed (remembered in this
|
|
23
|
+
* process, together with whether that crossing meant to close the review
|
|
24
|
+
* window), so the end names the findings the exit counted. With no remembered
|
|
25
|
+
* record (a daemon restart in between, or a lowered cap) it sends the count and
|
|
26
|
+
* the cap with `findingsBasis: 'not_measured'` -- the empty finding lists are an
|
|
27
|
+
* absence, not a reading -- and leaves the review window as it is (nothing
|
|
28
|
+
* read whether a gate verdict needs it).
|
|
29
|
+
*
|
|
30
|
+
* The decision is the stop registry's review_budget_spent row, read through
|
|
31
|
+
* isReviewCycleCapHeld -- but only on a READ count: an unreadable count holds
|
|
32
|
+
* every gate (fail closed) and releases nothing, because ending a run needs the
|
|
33
|
+
* fact, not its absence.
|
|
34
|
+
*
|
|
35
|
+
* @module completion/review-cycle-budget/spent-budget-release
|
|
36
|
+
*/
|
|
37
|
+
import { ARM_ENDED_REVIEW_BUDGET_SPENT, } from '../../queries/focuses/ended-arm.js';
|
|
38
|
+
import { isReviewCycleCapHeld } from '../../supervision/review-cycle-cap-hold.js';
|
|
39
|
+
import { createLogger } from '../../log/daemon-log.js';
|
|
40
|
+
const log = createLogger({ module: 'focus-executor' });
|
|
41
|
+
/** Per-process: focus id -> the release its crossing could not land. */
|
|
42
|
+
const pendingReleases = new Map();
|
|
43
|
+
/** Remember a release the crossing could not land, for the next cascade poll to retry. */
|
|
44
|
+
export function rememberPendingSpentBudgetRelease(focusId, pending) {
|
|
45
|
+
pendingReleases.set(focusId, pending);
|
|
46
|
+
}
|
|
47
|
+
/** Test seam: drop every remembered release. */
|
|
48
|
+
export function __resetPendingSpentBudgetReleases() {
|
|
49
|
+
pendingReleases.clear();
|
|
50
|
+
}
|
|
51
|
+
/** Test/diagnostic read: the release remembered for a focus, if any. */
|
|
52
|
+
export function pendingSpentBudgetRelease(focusId) {
|
|
53
|
+
return pendingReleases.get(focusId);
|
|
54
|
+
}
|
|
55
|
+
/** Pure: the record a retry sends when no crossing record was remembered. */
|
|
56
|
+
export function unmeasuredSpentBudgetRecord(reviewCycleCount, cap) {
|
|
57
|
+
return {
|
|
58
|
+
reason: ARM_ENDED_REVIEW_BUDGET_SPENT,
|
|
59
|
+
detail: { reviewCycleCount, cap, openBlockingFindings: [], openConcerns: [], findingsBasis: 'not_measured' },
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Release a still-armed focus whose review budget is spent. Never throws: a
|
|
64
|
+
* failed write stays pending and is re-attempted on the next poll.
|
|
65
|
+
*/
|
|
66
|
+
export async function releaseArmUnderSpentBudget(facts, deps) {
|
|
67
|
+
if (facts.assignedAgentRoleId === null) {
|
|
68
|
+
// Released (by this path, the crossing, an operator, or the lifecycle clear): nothing owed.
|
|
69
|
+
pendingReleases.delete(facts.focusId);
|
|
70
|
+
return 'not_armed';
|
|
71
|
+
}
|
|
72
|
+
const cap = deps.resolveReviewCycleCap();
|
|
73
|
+
if (facts.reviewCycleCount === null || !isReviewCycleCapHeld({ reviewCycleCount: facts.reviewCycleCount, cap })) {
|
|
74
|
+
// A re-arm reset the count (or it was never spent): a remembered release is stale.
|
|
75
|
+
if (facts.reviewCycleCount !== null)
|
|
76
|
+
pendingReleases.delete(facts.focusId);
|
|
77
|
+
return 'not_spent';
|
|
78
|
+
}
|
|
79
|
+
const pending = pendingReleases.get(facts.focusId);
|
|
80
|
+
const record = pending?.record ?? unmeasuredSpentBudgetRecord(facts.reviewCycleCount, cap);
|
|
81
|
+
try {
|
|
82
|
+
await deps.releaseFocusArm(facts.focusId, record, { closeReviewWindow: pending?.closeReviewWindow ?? false });
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
log.warn(`[spent-budget-release] "${facts.focusName}" is still armed with its review budget spent ` +
|
|
86
|
+
`(cycles=${facts.reviewCycleCount} >= cap=${cap}) and the release failed again: ${err.message}. ` +
|
|
87
|
+
`Re-attempting next poll.`);
|
|
88
|
+
return 'failed';
|
|
89
|
+
}
|
|
90
|
+
pendingReleases.delete(facts.focusId);
|
|
91
|
+
log.warn(`[spent-budget-release] "${facts.focusName}" was still armed with its review budget spent ` +
|
|
92
|
+
`(cycles=${facts.reviewCycleCount} >= cap=${cap}): the armed run has ENDED -- un-armed with ` +
|
|
93
|
+
`arm_ended_reason='${ARM_ENDED_REVIEW_BUDGET_SPENT}'` +
|
|
94
|
+
(pending ? ' (the record the crossing measured).' : " (findings not measured: findingsBasis='not_measured').") +
|
|
95
|
+
' Only a new arm grants further cycles.');
|
|
96
|
+
return 'released';
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=spent-budget-release.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spent-budget-release.js","sourceRoot":"","sources":["../../../src/completion/review-cycle-budget/spent-budget-release.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,kGAAkG;AAClG,oFAAoF;AACpF,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,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35,12 @@ export declare function _resetAllRemediationCyclesForTest(): void;
|
|
|
35
35
|
* - It has a non-null created_by_role_id (excludes human/UI creates).
|
|
36
36
|
* - Its created_at is later than the focus's review_requested_at.
|
|
37
37
|
* - Its status is open (To Do / In Progress / Blocked).
|
|
38
|
+
* - It is not a daemon-filed rework Bug (recorded-concern-ids.ts
|
|
39
|
+
* isDaemonReworkIssue), which is owed work whatever filed it.
|
|
38
40
|
*/
|
|
39
|
-
export declare function isReviewFiledIssue(issue: Pick<FocusIssueInfo, 'createdByRoleId' | 'createdAt' | 'status'
|
|
41
|
+
export declare function isReviewFiledIssue(issue: Pick<FocusIssueInfo, 'createdByRoleId' | 'createdAt' | 'status'> & {
|
|
42
|
+
title?: string | null;
|
|
43
|
+
}, reviewRequestedAt: string | null): boolean;
|
|
40
44
|
/**
|
|
41
45
|
* Filter a focus's issues to only those that were filed during the most
|
|
42
46
|
* recent review pass and are still open.
|
|
@@ -47,57 +51,55 @@ export declare function filterReviewFiledIssues(issues: FocusIssueInfo[], review
|
|
|
47
51
|
* since the most recent review pass.
|
|
48
52
|
*/
|
|
49
53
|
export declare function reviewFiledIssueExists(issues: FocusIssueInfo[], reviewRequestedAt: string | null): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Whether a priority label is an explicit, low (deferrable) severity. Null,
|
|
52
|
-
* empty, P0, and P1 are all NOT deferrable.
|
|
53
|
-
*
|
|
54
|
-
* This is the FALLBACK of isBlockingReviewFinding only, for a finding with no
|
|
55
|
-
* recorded class. Do not call it to decide whether a review finding blocks --
|
|
56
|
-
* call isBlockingReviewFinding (pinned by review-finding-blocking-predicate.test.ts,
|
|
57
|
-
* which fails on any non-test caller outside this module).
|
|
58
|
-
*/
|
|
59
|
-
export declare function isLowPriority(priority: string | null | undefined): boolean;
|
|
60
54
|
/**
|
|
61
55
|
* Recorded finding classes keyed by issue id. An issue ABSENT from the map has
|
|
62
|
-
* no recorded
|
|
63
|
-
*
|
|
56
|
+
* no recorded class (an older edge's link-less review, or a failed read); under
|
|
57
|
+
* the one rule it does not block.
|
|
64
58
|
*/
|
|
65
59
|
export type ReviewFindingClasses = ReadonlyMap<string, ReviewFindingClass>;
|
|
66
|
-
/** No recorded finding classes:
|
|
60
|
+
/** No recorded finding classes: no review finding blocks. */
|
|
67
61
|
export declare const NO_RECORDED_CLASSES: ReviewFindingClasses;
|
|
68
62
|
/**
|
|
69
|
-
* THE blocking predicate for a review-filed finding
|
|
70
|
-
* decides whether a review finding may hold its delivery
|
|
71
|
-
* verify_failed, target it with a gaps_found verdict, keep the
|
|
72
|
-
* count climbing). Every such decision -- the review exit's
|
|
73
|
-
* (review-exit-evidence.ts), the verify routing it tags for the
|
|
74
|
-
* (delivery-reconciler.ts `deferrable`), the review-cycle cap's
|
|
75
|
-
* finding" (
|
|
76
|
-
*
|
|
77
|
-
* (review-exit-foreign-findings.ts) -- reads it; none reads priority
|
|
63
|
+
* THE blocking predicate for a review-filed finding at the review exit -- the
|
|
64
|
+
* ONE place this path decides whether a review finding may hold its delivery
|
|
65
|
+
* (route it to verify_failed, target it with a gaps_found verdict, keep the
|
|
66
|
+
* review-cycle count climbing). Every such decision -- the review exit's
|
|
67
|
+
* evidence (review-exit-evidence.ts), the verify routing it tags for the
|
|
68
|
+
* reconciler (delivery-reconciler.ts `deferrable`), the review-cycle cap's
|
|
69
|
+
* "open blocking finding" (fed openBlockingFindings), delivery attribution
|
|
70
|
+
* (review-exit-attribution.ts) and foreign-finding location
|
|
71
|
+
* (review-exit-foreign-findings.ts) -- reads it; none reads priority.
|
|
78
72
|
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
73
|
+
* It is the daemon mirror of the one rule (recorded-concern-ids.ts
|
|
74
|
+
* isBlockingFinding, pinned to supabase/functions/_shared/review-finding-class.ts):
|
|
75
|
+
* a finding blocks ONLY when a not_met criterion names it -- its recorded class
|
|
76
|
+
* is `blocking`. A recorded `concern`, and a finding with no recorded class (an
|
|
77
|
+
* older edge's link-less review, a review that never stamped, a failed read),
|
|
78
|
+
* do not block, whatever priority the reviewer typed. Until 2026-10-20 the
|
|
79
|
+
* no-class case fell back to priority here while the live writers counted it
|
|
80
|
+
* as owed work (docs/DECISIONS.md 2026-10-20, "A review concern never holds its
|
|
81
|
+
* delivery out of done").
|
|
84
82
|
*
|
|
85
|
-
* It classifies
|
|
83
|
+
* It classifies the finding only; whether the issue is review-filed and open is
|
|
86
84
|
* the caller's filter (isReviewFiledIssue / isReviewFiledComplete).
|
|
87
85
|
*/
|
|
88
|
-
export declare function isBlockingReviewFinding(issue: Pick<FocusIssueInfo, 'id'
|
|
86
|
+
export declare function isBlockingReviewFinding(issue: Pick<FocusIssueInfo, 'id'>, findingClasses: ReviewFindingClasses): boolean;
|
|
89
87
|
/**
|
|
90
88
|
* Whether an issue is a DEFERRABLE review note: a review-filed, still-open
|
|
91
|
-
* issue (per isReviewFiledIssue) that
|
|
92
|
-
*
|
|
93
|
-
*
|
|
89
|
+
* issue (per isReviewFiledIssue) that a review RECORDED (it carries a class)
|
|
90
|
+
* and that is NOT a blocking finding (isBlockingReviewFinding -- no not_met
|
|
91
|
+
* criterion names it). A deferrable note must NOT route a verify delivery to
|
|
94
92
|
* verify_failed -- the review should converge (approve) and leave the note
|
|
95
93
|
* tracked.
|
|
96
94
|
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
95
|
+
* A filing no review recorded (window-matched, no class) is not a recorded
|
|
96
|
+
* concern -- nothing records it for the human -- so it is owed work, exactly as
|
|
97
|
+
* the live writers count it. Any other open work (pre-existing coding work) is
|
|
98
|
+
* owed too. Deferrability is a property of recorded review findings only.
|
|
99
99
|
*/
|
|
100
|
-
export declare function isDeferrableReviewNote(issue: Pick<FocusIssueInfo, 'id' | 'createdByRoleId' | 'createdAt' | 'status'
|
|
100
|
+
export declare function isDeferrableReviewNote(issue: Pick<FocusIssueInfo, 'id' | 'createdByRoleId' | 'createdAt' | 'status'> & {
|
|
101
|
+
title?: string | null;
|
|
102
|
+
}, reviewRequestedAt: string | null, findingClasses: ReviewFindingClasses): boolean;
|
|
101
103
|
/**
|
|
102
104
|
* Filter a focus's issues to the open, review-filed notes that are deferrable
|
|
103
105
|
* (not blocking). The caller uses the ids to mark the matching reconciler
|
|
@@ -107,33 +109,53 @@ export declare function isDeferrableReviewNote(issue: Pick<FocusIssueInfo, 'id'
|
|
|
107
109
|
export declare function filterDeferrableReviewNotes(issues: FocusIssueInfo[], reviewRequestedAt: string | null, findingClasses: ReviewFindingClasses): FocusIssueInfo[];
|
|
108
110
|
/**
|
|
109
111
|
* Returns true when there is at least one BLOCKING review-filed issue since the
|
|
110
|
-
* most recent review pass -- a review-filed, still-open issue that is a
|
|
111
|
-
*
|
|
112
|
-
* review_missing_report notice: a review
|
|
113
|
-
* converged cleanly and must not raise the
|
|
114
|
-
* escalation.
|
|
112
|
+
* most recent review pass -- a review-filed, still-open issue that is not a
|
|
113
|
+
* deferrable note (a recorded blocking finding, or a filing no review
|
|
114
|
+
* recorded). This is the gate for the review_missing_report notice: a review
|
|
115
|
+
* that filed ONLY recorded concerns converged cleanly and must not raise the
|
|
116
|
+
* "review skipped its outcome" escalation.
|
|
115
117
|
*/
|
|
116
118
|
export declare function blockingReviewFiledIssueExists(issues: FocusIssueInfo[], reviewRequestedAt: string | null, findingClasses: ReviewFindingClasses): boolean;
|
|
117
119
|
/**
|
|
118
120
|
* Time-independent review-filed test: the issue is a member of the focus's
|
|
119
|
-
* review-filed id union AND is still open.
|
|
121
|
+
* review-filed id union AND is still open AND is no daemon rework Bug.
|
|
120
122
|
*/
|
|
121
|
-
export declare function isReviewFiledById(issue: Pick<FocusIssueInfo, 'id' | 'status'
|
|
123
|
+
export declare function isReviewFiledById(issue: Pick<FocusIssueInfo, 'id' | 'status'> & {
|
|
124
|
+
title?: string | null;
|
|
125
|
+
}, reviewFiledIds: ReadonlySet<string>): boolean;
|
|
122
126
|
/** Review-filed via the non-lossy id set OR the legacy review-window heuristic. */
|
|
123
|
-
export declare function isReviewFiledComplete(issue: Pick<FocusIssueInfo, 'id' | 'createdByRoleId' | 'createdAt' | 'status'
|
|
127
|
+
export declare function isReviewFiledComplete(issue: Pick<FocusIssueInfo, 'id' | 'createdByRoleId' | 'createdAt' | 'status'> & {
|
|
128
|
+
title?: string | null;
|
|
129
|
+
}, reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null): boolean;
|
|
124
130
|
/** Complete-set counterpart of reviewFiledIssueExists. */
|
|
125
131
|
export declare function reviewFiledIssueExistsComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* THE review-exit classification of one issue against the complete set:
|
|
134
|
+
* - a RECORDED finding (in the review-filed id set) blocks only when a not_met
|
|
135
|
+
* criterion names it (isBlockingReviewFinding); otherwise it is a concern --
|
|
136
|
+
* deferrable;
|
|
137
|
+
* - a filing NO review recorded (matched by the review window only) is owed
|
|
138
|
+
* work: nothing records it as a concern for the human, so it routes like
|
|
139
|
+
* any open work, exactly as the live writers count it;
|
|
140
|
+
* - anything else is not review-filed (null).
|
|
141
|
+
* The membership is the live writers' membership (recorded = in the id set),
|
|
142
|
+
* so the review exit and the live writers never disagree about one issue.
|
|
143
|
+
*/
|
|
144
|
+
export declare function reviewExitFindingClass(issue: Pick<FocusIssueInfo, 'id' | 'createdByRoleId' | 'createdAt' | 'status'> & {
|
|
145
|
+
title?: string | null;
|
|
146
|
+
}, reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null, findingClasses: ReviewFindingClasses): 'blocking' | 'concern' | 'unrecorded' | null;
|
|
126
147
|
/** Complete-set counterpart of blockingReviewFiledIssueExists. */
|
|
127
148
|
export declare function blockingReviewFiledIssueExistsComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null, findingClasses: ReviewFindingClasses): boolean;
|
|
128
149
|
/**
|
|
129
150
|
* Complete-set counterpart of blockingReviewFiledIssueExists returning the LIST
|
|
130
|
-
* (not just existence): the OPEN
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
151
|
+
* (not just existence): the OPEN review-filed issues on the focus that hold
|
|
152
|
+
* their delivery (reviewExitFindingClass blocking or unrecorded). Used by the
|
|
153
|
+
* hand-off breaker to ENUMERATE the outstanding findings in its escalation --
|
|
154
|
+
* so an operator can tell whether the focus carries outstanding review findings
|
|
155
|
+
* without opening the daemon log, rather than reading the breaker's old
|
|
134
156
|
* untested "there was no work left to route" assertion.
|
|
135
157
|
*/
|
|
136
158
|
export declare function filterBlockingReviewFiledComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null, findingClasses: ReviewFindingClasses): FocusIssueInfo[];
|
|
137
|
-
/** Complete-set counterpart of filterDeferrableReviewNotes. */
|
|
159
|
+
/** Complete-set counterpart of filterDeferrableReviewNotes: the RECORDED concerns. */
|
|
138
160
|
export declare function filterDeferrableReviewNotesComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null, findingClasses: ReviewFindingClasses): FocusIssueInfo[];
|
|
139
161
|
//# sourceMappingURL=review-defect-detector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-defect-detector.d.ts","sourceRoot":"","sources":["../../../src/completion/review-exit/review-defect-detector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"review-defect-detector.d.ts","sourceRoot":"","sources":["../../../src/completion/review-exit/review-defect-detector.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAK7F;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,MACU,CAAC;AAYlD,wBAAgB,oBAAoB,CAAC,OAA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AAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAC1G,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,EACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,cAAc,EAAE,oBAAoB,GACnC,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,IAAI,CAK9C;AAaD,kEAAkE;AAClE,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,cAAc,EAAE,EACxB,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,EACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,cAAc,EAAE,oBAAoB,GACnC,OAAO,CAET;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,cAAc,EAAE,EACxB,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,EACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,cAAc,EAAE,oBAAoB,GACnC,cAAc,EAAE,CAElB;AAED,sFAAsF;AACtF,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,cAAc,EAAE,EACxB,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,EACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,cAAc,EAAE,oBAAoB,GACnC,cAAc,EAAE,CAElB"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
2
|
// Pinned by: packages/daemon/src/completion/review-exit/review-defect-loop.test.ts,
|
|
3
3
|
// packages/daemon/src/completion/review-exit/review-deferrable-classification.test.ts,
|
|
4
|
-
// packages/daemon/src/completion/review-exit/review-exit-foreign-findings.test.ts,
|
|
5
|
-
// packages/daemon/src/completion/review-exit/review-exit-foreign-focus-regression.test.ts,
|
|
6
4
|
// packages/daemon/src/completion/review-exit/review-finding-blocking-predicate.test.ts
|
|
7
5
|
// PINNED-BY-END
|
|
8
6
|
import { OPEN_ISSUE_STATUSES } from '../../types/issue-status.js';
|
|
9
7
|
import { loadEnvConfig } from '@telora/daemon-core';
|
|
8
|
+
import { isBlockingFinding, isDaemonReworkIssue } from '../../queries/focus-review/recorded-concern-ids.js';
|
|
10
9
|
// ── Configuration ────────────────────────────────────────────────────────
|
|
11
10
|
/**
|
|
12
11
|
* Cap on remediation cycles before escalation. Sourced from the typed
|
|
@@ -44,10 +43,14 @@ export function _resetAllRemediationCyclesForTest() {
|
|
|
44
43
|
* - It has a non-null created_by_role_id (excludes human/UI creates).
|
|
45
44
|
* - Its created_at is later than the focus's review_requested_at.
|
|
46
45
|
* - Its status is open (To Do / In Progress / Blocked).
|
|
46
|
+
* - It is not a daemon-filed rework Bug (recorded-concern-ids.ts
|
|
47
|
+
* isDaemonReworkIssue), which is owed work whatever filed it.
|
|
47
48
|
*/
|
|
48
49
|
export function isReviewFiledIssue(issue, reviewRequestedAt) {
|
|
49
50
|
if (!issue.createdByRoleId)
|
|
50
51
|
return false;
|
|
52
|
+
if (isDaemonReworkIssue(issue))
|
|
53
|
+
return false;
|
|
51
54
|
if (!OPEN_ISSUE_STATUSES.has(issue.status))
|
|
52
55
|
return false;
|
|
53
56
|
if (!reviewRequestedAt)
|
|
@@ -81,72 +84,51 @@ export function reviewFiledIssueExists(issues, reviewRequestedAt) {
|
|
|
81
84
|
}
|
|
82
85
|
return false;
|
|
83
86
|
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Priority labels that mark a review-filed note as DEFERRABLE when NO finding
|
|
87
|
-
* class is recorded for it (the fallback inside isBlockingReviewFinding -- a
|
|
88
|
-
* recorded blocking/concern fact always wins). The blocking set is everything
|
|
89
|
-
* else -- P0/P1 AND a null/unset priority. The asymmetry is deliberate: the
|
|
90
|
-
* control loop moves reality toward intent and never lowers the bar, so an
|
|
91
|
-
* unprioritized note is treated as BLOCKING (route to verify_failed), not
|
|
92
|
-
* silently converged. Only an EXPLICIT low priority makes a note deferrable.
|
|
93
|
-
*/
|
|
94
|
-
const DEFERRABLE_PRIORITIES = new Set(['P2', 'P3']);
|
|
95
|
-
/**
|
|
96
|
-
* Whether a priority label is an explicit, low (deferrable) severity. Null,
|
|
97
|
-
* empty, P0, and P1 are all NOT deferrable.
|
|
98
|
-
*
|
|
99
|
-
* This is the FALLBACK of isBlockingReviewFinding only, for a finding with no
|
|
100
|
-
* recorded class. Do not call it to decide whether a review finding blocks --
|
|
101
|
-
* call isBlockingReviewFinding (pinned by review-finding-blocking-predicate.test.ts,
|
|
102
|
-
* which fails on any non-test caller outside this module).
|
|
103
|
-
*/
|
|
104
|
-
export function isLowPriority(priority) {
|
|
105
|
-
if (!priority)
|
|
106
|
-
return false;
|
|
107
|
-
return DEFERRABLE_PRIORITIES.has(priority.trim().toUpperCase());
|
|
108
|
-
}
|
|
109
|
-
/** No recorded finding classes: every finding is classified by its priority alone. */
|
|
87
|
+
/** No recorded finding classes: no review finding blocks. */
|
|
110
88
|
export const NO_RECORDED_CLASSES = new Map();
|
|
111
89
|
/**
|
|
112
|
-
* THE blocking predicate for a review-filed finding
|
|
113
|
-
* decides whether a review finding may hold its delivery
|
|
114
|
-
* verify_failed, target it with a gaps_found verdict, keep the
|
|
115
|
-
* count climbing). Every such decision -- the review exit's
|
|
116
|
-
* (review-exit-evidence.ts), the verify routing it tags for the
|
|
117
|
-
* (delivery-reconciler.ts `deferrable`), the review-cycle cap's
|
|
118
|
-
* finding" (
|
|
119
|
-
*
|
|
120
|
-
* (review-exit-foreign-findings.ts) -- reads it; none reads priority
|
|
90
|
+
* THE blocking predicate for a review-filed finding at the review exit -- the
|
|
91
|
+
* ONE place this path decides whether a review finding may hold its delivery
|
|
92
|
+
* (route it to verify_failed, target it with a gaps_found verdict, keep the
|
|
93
|
+
* review-cycle count climbing). Every such decision -- the review exit's
|
|
94
|
+
* evidence (review-exit-evidence.ts), the verify routing it tags for the
|
|
95
|
+
* reconciler (delivery-reconciler.ts `deferrable`), the review-cycle cap's
|
|
96
|
+
* "open blocking finding" (fed openBlockingFindings), delivery attribution
|
|
97
|
+
* (review-exit-attribution.ts) and foreign-finding location
|
|
98
|
+
* (review-exit-foreign-findings.ts) -- reads it; none reads priority.
|
|
121
99
|
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
100
|
+
* It is the daemon mirror of the one rule (recorded-concern-ids.ts
|
|
101
|
+
* isBlockingFinding, pinned to supabase/functions/_shared/review-finding-class.ts):
|
|
102
|
+
* a finding blocks ONLY when a not_met criterion names it -- its recorded class
|
|
103
|
+
* is `blocking`. A recorded `concern`, and a finding with no recorded class (an
|
|
104
|
+
* older edge's link-less review, a review that never stamped, a failed read),
|
|
105
|
+
* do not block, whatever priority the reviewer typed. Until 2026-10-20 the
|
|
106
|
+
* no-class case fell back to priority here while the live writers counted it
|
|
107
|
+
* as owed work (docs/DECISIONS.md 2026-10-20, "A review concern never holds its
|
|
108
|
+
* delivery out of done").
|
|
127
109
|
*
|
|
128
|
-
* It classifies
|
|
110
|
+
* It classifies the finding only; whether the issue is review-filed and open is
|
|
129
111
|
* the caller's filter (isReviewFiledIssue / isReviewFiledComplete).
|
|
130
112
|
*/
|
|
131
113
|
export function isBlockingReviewFinding(issue, findingClasses) {
|
|
132
|
-
|
|
133
|
-
if (recorded !== undefined)
|
|
134
|
-
return recorded === 'blocking';
|
|
135
|
-
return !isLowPriority(issue.priority);
|
|
114
|
+
return isBlockingFinding(issue.id, findingClasses);
|
|
136
115
|
}
|
|
137
116
|
/**
|
|
138
117
|
* Whether an issue is a DEFERRABLE review note: a review-filed, still-open
|
|
139
|
-
* issue (per isReviewFiledIssue) that
|
|
140
|
-
*
|
|
141
|
-
*
|
|
118
|
+
* issue (per isReviewFiledIssue) that a review RECORDED (it carries a class)
|
|
119
|
+
* and that is NOT a blocking finding (isBlockingReviewFinding -- no not_met
|
|
120
|
+
* criterion names it). A deferrable note must NOT route a verify delivery to
|
|
142
121
|
* verify_failed -- the review should converge (approve) and leave the note
|
|
143
122
|
* tracked.
|
|
144
123
|
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
124
|
+
* A filing no review recorded (window-matched, no class) is not a recorded
|
|
125
|
+
* concern -- nothing records it for the human -- so it is owed work, exactly as
|
|
126
|
+
* the live writers count it. Any other open work (pre-existing coding work) is
|
|
127
|
+
* owed too. Deferrability is a property of recorded review findings only.
|
|
147
128
|
*/
|
|
148
129
|
export function isDeferrableReviewNote(issue, reviewRequestedAt, findingClasses) {
|
|
149
|
-
return isReviewFiledIssue(issue, reviewRequestedAt) &&
|
|
130
|
+
return isReviewFiledIssue(issue, reviewRequestedAt) && findingClasses.has(issue.id)
|
|
131
|
+
&& !isBlockingReviewFinding(issue, findingClasses);
|
|
150
132
|
}
|
|
151
133
|
/**
|
|
152
134
|
* Filter a focus's issues to the open, review-filed notes that are deferrable
|
|
@@ -159,14 +141,14 @@ export function filterDeferrableReviewNotes(issues, reviewRequestedAt, findingCl
|
|
|
159
141
|
}
|
|
160
142
|
/**
|
|
161
143
|
* Returns true when there is at least one BLOCKING review-filed issue since the
|
|
162
|
-
* most recent review pass -- a review-filed, still-open issue that is a
|
|
163
|
-
*
|
|
164
|
-
* review_missing_report notice: a review
|
|
165
|
-
* converged cleanly and must not raise the
|
|
166
|
-
* escalation.
|
|
144
|
+
* most recent review pass -- a review-filed, still-open issue that is not a
|
|
145
|
+
* deferrable note (a recorded blocking finding, or a filing no review
|
|
146
|
+
* recorded). This is the gate for the review_missing_report notice: a review
|
|
147
|
+
* that filed ONLY recorded concerns converged cleanly and must not raise the
|
|
148
|
+
* "review skipped its outcome" escalation.
|
|
167
149
|
*/
|
|
168
150
|
export function blockingReviewFiledIssueExists(issues, reviewRequestedAt, findingClasses) {
|
|
169
|
-
return issues.some(i => isReviewFiledIssue(i, reviewRequestedAt) &&
|
|
151
|
+
return issues.some(i => isReviewFiledIssue(i, reviewRequestedAt) && !isDeferrableReviewNote(i, reviewRequestedAt, findingClasses));
|
|
170
152
|
}
|
|
171
153
|
// ── Non-lossy (complete-set) classification ───────────────────────────────
|
|
172
154
|
//
|
|
@@ -186,10 +168,10 @@ export function blockingReviewFiledIssueExists(issues, reviewRequestedAt, findin
|
|
|
186
168
|
// stable across passes (the fix for the deferrable-note-re-blocked loop).
|
|
187
169
|
/**
|
|
188
170
|
* Time-independent review-filed test: the issue is a member of the focus's
|
|
189
|
-
* review-filed id union AND is still open.
|
|
171
|
+
* review-filed id union AND is still open AND is no daemon rework Bug.
|
|
190
172
|
*/
|
|
191
173
|
export function isReviewFiledById(issue, reviewFiledIds) {
|
|
192
|
-
return reviewFiledIds.has(issue.id) && OPEN_ISSUE_STATUSES.has(issue.status);
|
|
174
|
+
return reviewFiledIds.has(issue.id) && OPEN_ISSUE_STATUSES.has(issue.status) && !isDaemonReworkIssue(issue);
|
|
193
175
|
}
|
|
194
176
|
/** Review-filed via the non-lossy id set OR the legacy review-window heuristic. */
|
|
195
177
|
export function isReviewFiledComplete(issue, reviewFiledIds, reviewRequestedAt) {
|
|
@@ -199,23 +181,47 @@ export function isReviewFiledComplete(issue, reviewFiledIds, reviewRequestedAt)
|
|
|
199
181
|
export function reviewFiledIssueExistsComplete(issues, reviewFiledIds, reviewRequestedAt) {
|
|
200
182
|
return issues.some(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt));
|
|
201
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* THE review-exit classification of one issue against the complete set:
|
|
186
|
+
* - a RECORDED finding (in the review-filed id set) blocks only when a not_met
|
|
187
|
+
* criterion names it (isBlockingReviewFinding); otherwise it is a concern --
|
|
188
|
+
* deferrable;
|
|
189
|
+
* - a filing NO review recorded (matched by the review window only) is owed
|
|
190
|
+
* work: nothing records it as a concern for the human, so it routes like
|
|
191
|
+
* any open work, exactly as the live writers count it;
|
|
192
|
+
* - anything else is not review-filed (null).
|
|
193
|
+
* The membership is the live writers' membership (recorded = in the id set),
|
|
194
|
+
* so the review exit and the live writers never disagree about one issue.
|
|
195
|
+
*/
|
|
196
|
+
export function reviewExitFindingClass(issue, reviewFiledIds, reviewRequestedAt, findingClasses) {
|
|
197
|
+
if (isReviewFiledById(issue, reviewFiledIds)) {
|
|
198
|
+
return isBlockingReviewFinding(issue, findingClasses) ? 'blocking' : 'concern';
|
|
199
|
+
}
|
|
200
|
+
return isReviewFiledIssue(issue, reviewRequestedAt) ? 'unrecorded' : null;
|
|
201
|
+
}
|
|
202
|
+
/** Whether an issue is open review-filed work that holds its delivery: a named finding, or an unrecorded filing. */
|
|
203
|
+
function holdsAsReviewFiled(issue, reviewFiledIds, reviewRequestedAt, findingClasses) {
|
|
204
|
+
const cls = reviewExitFindingClass(issue, reviewFiledIds, reviewRequestedAt, findingClasses);
|
|
205
|
+
return cls === 'blocking' || cls === 'unrecorded';
|
|
206
|
+
}
|
|
202
207
|
/** Complete-set counterpart of blockingReviewFiledIssueExists. */
|
|
203
208
|
export function blockingReviewFiledIssueExistsComplete(issues, reviewFiledIds, reviewRequestedAt, findingClasses) {
|
|
204
|
-
return issues.some(i =>
|
|
209
|
+
return issues.some(i => holdsAsReviewFiled(i, reviewFiledIds, reviewRequestedAt, findingClasses));
|
|
205
210
|
}
|
|
206
211
|
/**
|
|
207
212
|
* Complete-set counterpart of blockingReviewFiledIssueExists returning the LIST
|
|
208
|
-
* (not just existence): the OPEN
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
213
|
+
* (not just existence): the OPEN review-filed issues on the focus that hold
|
|
214
|
+
* their delivery (reviewExitFindingClass blocking or unrecorded). Used by the
|
|
215
|
+
* hand-off breaker to ENUMERATE the outstanding findings in its escalation --
|
|
216
|
+
* so an operator can tell whether the focus carries outstanding review findings
|
|
217
|
+
* without opening the daemon log, rather than reading the breaker's old
|
|
212
218
|
* untested "there was no work left to route" assertion.
|
|
213
219
|
*/
|
|
214
220
|
export function filterBlockingReviewFiledComplete(issues, reviewFiledIds, reviewRequestedAt, findingClasses) {
|
|
215
|
-
return issues.filter(i =>
|
|
221
|
+
return issues.filter(i => holdsAsReviewFiled(i, reviewFiledIds, reviewRequestedAt, findingClasses));
|
|
216
222
|
}
|
|
217
|
-
/** Complete-set counterpart of filterDeferrableReviewNotes. */
|
|
223
|
+
/** Complete-set counterpart of filterDeferrableReviewNotes: the RECORDED concerns. */
|
|
218
224
|
export function filterDeferrableReviewNotesComplete(issues, reviewFiledIds, reviewRequestedAt, findingClasses) {
|
|
219
|
-
return issues.filter(i =>
|
|
225
|
+
return issues.filter(i => reviewExitFindingClass(i, reviewFiledIds, reviewRequestedAt, findingClasses) === 'concern');
|
|
220
226
|
}
|
|
221
227
|
//# sourceMappingURL=review-defect-detector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-defect-detector.js","sourceRoot":"","sources":["../../../src/completion/review-exit/review-defect-detector.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oFAAoF;AACpF,yFAAyF;AACzF,
|
|
1
|
+
{"version":3,"file":"review-defect-detector.js","sourceRoot":"","sources":["../../../src/completion/review-exit/review-defect-detector.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oFAAoF;AACpF,yFAAyF;AACzF,yFAAyF;AACzF,gBAAgB;AAsBhB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAE5G,4EAA4E;AAE5E;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GACnC,aAAa,EAAE,CAAC,+BAA+B,CAAC;AAElD,wEAAwE;AAExE;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEpD,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,OAAO,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,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BAAiB,EAAE,cAAc,CAAC,KAAK,SAAS,CAAC,CAAC;AACxH,CAAC"}
|
|
@@ -23,7 +23,7 @@ export type GapsAttribution = 'targeted' | 'not_targeted' | 'unresolvable';
|
|
|
23
23
|
* each issue's delivery). A closed or non-blocking note does not target its
|
|
24
24
|
* delivery -- only an actionable open gap does. Blocking is
|
|
25
25
|
* isBlockingReviewFinding over the findings' recorded classes (a recorded
|
|
26
|
-
* concern never targets, a recorded blocking always does; no
|
|
26
|
+
* concern never targets, a recorded blocking always does; no class -> concern).
|
|
27
27
|
*/
|
|
28
28
|
export declare function resolveAttributedDeliveryIds(focusIssues: FocusIssueInfo[], createdIssueIds: ReadonlySet<string>, findingClasses: ReviewFindingClasses): Set<string>;
|
|
29
29
|
/**
|
|
@@ -9,7 +9,7 @@ import { isBlockingReviewFinding } from './review-defect-detector.js';
|
|
|
9
9
|
* each issue's delivery). A closed or non-blocking note does not target its
|
|
10
10
|
* delivery -- only an actionable open gap does. Blocking is
|
|
11
11
|
* isBlockingReviewFinding over the findings' recorded classes (a recorded
|
|
12
|
-
* concern never targets, a recorded blocking always does; no
|
|
12
|
+
* concern never targets, a recorded blocking always does; no class -> concern).
|
|
13
13
|
*/
|
|
14
14
|
export function resolveAttributedDeliveryIds(focusIssues, createdIssueIds, findingClasses) {
|
|
15
15
|
const attributed = new Set();
|
|
@@ -17,7 +17,8 @@ import type { ReviewWindowCommit } from '../../git/review-window-commits.js';
|
|
|
17
17
|
import type { getActiveFocuses } from '../../queries/focuses/focus-discovery.js';
|
|
18
18
|
import type { hasPendingSpawnDirective } from '../../directive/directive-queue.js';
|
|
19
19
|
import type { emitLoopTrigger } from '../../loops/index.js';
|
|
20
|
-
import type { getFocusDeliveries, getFocusIssues, clearReviewRequestedAt,
|
|
20
|
+
import type { getFocusDeliveries, getFocusIssues, clearReviewRequestedAt, setReviewCycleCount, setReviewHandoffCount, getFocusReviewReportForSession } from '../../queries/focuses/focuses.js';
|
|
21
|
+
import type { SpentBudgetRelease } from '../review-cycle-budget/spent-budget-release.js';
|
|
21
22
|
import type { getFocusReviewFindingFacts } from '../../queries/focus-review/review-finding-facts.js';
|
|
22
23
|
import type { resolveReviewCycleCap, resolveReviewHandoffCap } from '../../supervision/stall-detector-config.js';
|
|
23
24
|
import type { getDeliveryIssues, rehomeIssueToDelivery } from '../../queries/deliveries/issues.js';
|
|
@@ -31,6 +32,7 @@ import type { CommitGateSeams } from '../../verify/gate-config/commit-gate-confi
|
|
|
31
32
|
import type { ReviewAutoApproval } from '../../merge/review-auto-approval-record.js';
|
|
32
33
|
import type { ReviewCensus } from './review-census-record.js';
|
|
33
34
|
import type { ReopeningFalsifierResult } from './review-exit-falsifiers.js';
|
|
35
|
+
import type { ReviewLoopDetectionDeps } from '../review-cycle-budget/review-loop-detection.js';
|
|
34
36
|
/**
|
|
35
37
|
* Dependencies for runReviewExitHandler. Every member is required: production
|
|
36
38
|
* wires them at the composition root, and a test names every collaborator it
|
|
@@ -65,8 +67,9 @@ export interface ReviewExitDeps {
|
|
|
65
67
|
setReviewedThroughSha: (focusId: string, sha: string) => Promise<void>;
|
|
66
68
|
setReviewCycleCount: typeof setReviewCycleCount;
|
|
67
69
|
resolveReviewCycleCap: typeof resolveReviewCycleCap;
|
|
68
|
-
releaseFocusArm:
|
|
70
|
+
releaseFocusArm: SpentBudgetRelease;
|
|
69
71
|
isShuttingDown: () => boolean;
|
|
72
|
+
reviewLoop: ReviewLoopDetectionDeps;
|
|
70
73
|
setReviewHandoffCount: typeof setReviewHandoffCount;
|
|
71
74
|
resolveReviewHandoffCap: typeof resolveReviewHandoffCap;
|
|
72
75
|
resolveHandoffExhaustedHold: (focusId: string, notes: string) => Promise<number>;
|