@telora/daemon 0.22.132 → 0.22.136
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 +6 -3
- package/dist/audit/audit-hooks.d.ts +6 -2
- package/dist/audit/audit-hooks.d.ts.map +1 -1
- package/dist/audit/audit-hooks.js +12 -5
- package/dist/audit/audit-hooks.js.map +1 -1
- package/dist/audit/audit-phase.js +1 -1
- package/dist/audit/audit-phase.js.map +1 -1
- package/dist/backends/index.d.ts.map +1 -1
- package/dist/backends/index.js +1 -0
- package/dist/backends/index.js.map +1 -1
- package/dist/completion/completion-phase-registry.d.ts +4 -0
- package/dist/completion/completion-phase-registry.d.ts.map +1 -1
- package/dist/completion/completion-phase-registry.js +63 -18
- package/dist/completion/completion-phase-registry.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/review-approved-head-gate.d.ts +53 -0
- package/dist/completion/review-approved-head-gate.d.ts.map +1 -0
- package/dist/completion/review-approved-head-gate.js +124 -0
- package/dist/completion/review-approved-head-gate.js.map +1 -0
- package/dist/completion/review-census-record.d.ts +52 -0
- package/dist/completion/review-census-record.d.ts.map +1 -0
- package/dist/completion/review-census-record.js +145 -0
- package/dist/completion/review-census-record.js.map +1 -0
- package/dist/completion/review-exit-deps.d.ts +5 -1
- package/dist/completion/review-exit-deps.d.ts.map +1 -1
- package/dist/completion/review-exit-deps.js +7 -2
- package/dist/completion/review-exit-deps.js.map +1 -1
- package/dist/completion/review-exit-phase.d.ts.map +1 -1
- package/dist/completion/review-exit-phase.js +29 -16
- package/dist/completion/review-exit-phase.js.map +1 -1
- package/dist/completion/review-exit-progress.d.ts +8 -0
- package/dist/completion/review-exit-progress.d.ts.map +1 -1
- package/dist/completion/review-exit-progress.js +14 -0
- package/dist/completion/review-exit-progress.js.map +1 -1
- package/dist/completion/review-exit-shortfall-park.d.ts +14 -0
- package/dist/completion/review-exit-shortfall-park.d.ts.map +1 -0
- package/dist/completion/review-exit-shortfall-park.js +52 -0
- package/dist/completion/review-exit-shortfall-park.js.map +1 -0
- package/dist/completion/review-exit-shortfall.js +1 -1
- package/dist/completion/review-exit-shortfall.js.map +1 -1
- package/dist/completion/review-exit-verdict-gate.d.ts +58 -0
- package/dist/completion/review-exit-verdict-gate.d.ts.map +1 -1
- package/dist/completion/review-exit-verdict-gate.js +68 -8
- package/dist/completion/review-exit-verdict-gate.js.map +1 -1
- package/dist/completion/review-next-step.d.ts +15 -3
- package/dist/completion/review-next-step.d.ts.map +1 -1
- package/dist/completion/review-next-step.js +7 -2
- package/dist/completion/review-next-step.js.map +1 -1
- package/dist/completion/standing-approval-convergence.d.ts +68 -0
- package/dist/completion/standing-approval-convergence.d.ts.map +1 -0
- package/dist/completion/standing-approval-convergence.js +230 -0
- package/dist/completion/standing-approval-convergence.js.map +1 -0
- package/dist/completion/standing-approval-deps.d.ts +5 -0
- package/dist/completion/standing-approval-deps.d.ts.map +1 -0
- package/dist/completion/standing-approval-deps.js +37 -0
- package/dist/completion/standing-approval-deps.js.map +1 -0
- package/dist/completion/state-cascade.d.ts +11 -0
- package/dist/completion/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade.js +40 -1
- package/dist/completion/state-cascade.js.map +1 -1
- package/dist/completion/team-lifecycle.d.ts +14 -2
- package/dist/completion/team-lifecycle.d.ts.map +1 -1
- package/dist/completion/team-lifecycle.js +36 -36
- package/dist/completion/team-lifecycle.js.map +1 -1
- package/dist/completion/terminated-work-reconcile.d.ts +3 -1
- package/dist/completion/terminated-work-reconcile.d.ts.map +1 -1
- package/dist/completion/terminated-work-reconcile.js +24 -11
- package/dist/completion/terminated-work-reconcile.js.map +1 -1
- package/dist/delivery/delivery-advance-block.d.ts +6 -0
- package/dist/delivery/delivery-advance-block.d.ts.map +1 -1
- package/dist/delivery/delivery-advance-block.js +29 -3
- package/dist/delivery/delivery-advance-block.js.map +1 -1
- package/dist/delivery/delivery-reconciler.d.ts.map +1 -1
- package/dist/delivery/delivery-reconciler.js +4 -1
- package/dist/delivery/delivery-reconciler.js.map +1 -1
- package/dist/delivery/operator-hold.d.ts.map +1 -1
- package/dist/delivery/operator-hold.js +3 -1
- package/dist/delivery/operator-hold.js.map +1 -1
- package/dist/directive/directive-executor.d.ts.map +1 -1
- package/dist/directive/directive-executor.js +6 -0
- package/dist/directive/directive-executor.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 +20 -0
- package/dist/directive/directive-queue.js.map +1 -1
- package/dist/directive/phase-sync.d.ts +5 -0
- package/dist/directive/phase-sync.d.ts.map +1 -1
- package/dist/directive/phase-sync.js +11 -1
- package/dist/directive/phase-sync.js.map +1 -1
- package/dist/directive/stranded-review-reroute.d.ts +37 -0
- package/dist/directive/stranded-review-reroute.d.ts.map +1 -0
- package/dist/directive/stranded-review-reroute.js +150 -0
- package/dist/directive/stranded-review-reroute.js.map +1 -0
- package/dist/focus/focus-engine.d.ts.map +1 -1
- package/dist/focus/focus-engine.js +15 -3
- 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 +9 -65
- package/dist/focus/focus-executor.js.map +1 -1
- package/dist/focus/focus-lifecycle.d.ts +12 -0
- package/dist/focus/focus-lifecycle.d.ts.map +1 -1
- package/dist/focus/focus-lifecycle.js +66 -37
- 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 +6 -0
- package/dist/focus/focus-phase.js.map +1 -1
- package/dist/focus/focus-spawn-decision.d.ts.map +1 -1
- package/dist/focus/focus-spawn-decision.js +1 -0
- package/dist/focus/focus-spawn-decision.js.map +1 -1
- package/dist/focus/focus-team-state.d.ts +10 -0
- package/dist/focus/focus-team-state.d.ts.map +1 -1
- package/dist/focus/focus-team-state.js +19 -1
- package/dist/focus/focus-team-state.js.map +1 -1
- package/dist/focus/listener-auto-advance.d.ts.map +1 -1
- package/dist/focus/listener-auto-advance.js +1 -0
- package/dist/focus/listener-auto-advance.js.map +1 -1
- package/dist/focus/listener-spawn.d.ts +10 -0
- package/dist/focus/listener-spawn.d.ts.map +1 -1
- package/dist/focus/listener-spawn.js +46 -4
- 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 +11 -1
- package/dist/focus/listener-state.js.map +1 -1
- package/dist/focus/listener.d.ts +42 -0
- package/dist/focus/listener.d.ts.map +1 -1
- package/dist/focus/listener.js +62 -33
- package/dist/focus/listener.js.map +1 -1
- package/dist/focus/pending-review-approved-head.d.ts +41 -0
- package/dist/focus/pending-review-approved-head.d.ts.map +1 -0
- package/dist/focus/pending-review-approved-head.js +198 -0
- package/dist/focus/pending-review-approved-head.js.map +1 -0
- package/dist/focus/pending-spawn-pass-deps.d.ts +5 -0
- package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.js +2 -1
- package/dist/focus/pending-spawn-pass-deps.js.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.js +26 -4
- package/dist/focus/pending-spawn-review-next-step.js.map +1 -1
- package/dist/focus/review-spawn-coverage.d.ts +87 -0
- package/dist/focus/review-spawn-coverage.d.ts.map +1 -0
- package/dist/focus/review-spawn-coverage.js +104 -0
- package/dist/focus/review-spawn-coverage.js.map +1 -0
- package/dist/focus/session-health.d.ts +5 -2
- package/dist/focus/session-health.d.ts.map +1 -1
- package/dist/focus/session-health.js +2 -1
- package/dist/focus/session-health.js.map +1 -1
- package/dist/focus/session-process-reap.d.ts +50 -0
- package/dist/focus/session-process-reap.d.ts.map +1 -0
- package/dist/focus/session-process-reap.js +77 -0
- package/dist/focus/session-process-reap.js.map +1 -0
- package/dist/focus/unchanged-reviewed-head.d.ts +40 -0
- package/dist/focus/unchanged-reviewed-head.d.ts.map +1 -0
- package/dist/focus/unchanged-reviewed-head.js +84 -0
- package/dist/focus/unchanged-reviewed-head.js.map +1 -0
- package/dist/focus/verify-open-issues.d.ts +4 -19
- package/dist/focus/verify-open-issues.d.ts.map +1 -1
- package/dist/focus/verify-open-issues.js +83 -41
- package/dist/focus/verify-open-issues.js.map +1 -1
- package/dist/git/focus-integration-sync.d.ts +61 -0
- package/dist/git/focus-integration-sync.d.ts.map +1 -0
- package/dist/git/focus-integration-sync.js +73 -0
- package/dist/git/focus-integration-sync.js.map +1 -0
- package/dist/git/focus-own-delta.d.ts +38 -0
- package/dist/git/focus-own-delta.d.ts.map +1 -0
- package/dist/git/focus-own-delta.js +193 -0
- package/dist/git/focus-own-delta.js.map +1 -0
- package/dist/git/index.d.ts +2 -0
- package/dist/git/index.d.ts.map +1 -1
- package/dist/git/index.js +4 -0
- package/dist/git/index.js.map +1 -1
- package/dist/git/merge.d.ts.map +1 -1
- package/dist/git/merge.js +11 -1
- package/dist/git/merge.js.map +1 -1
- package/dist/git/resolution-restore.d.ts +66 -0
- package/dist/git/resolution-restore.d.ts.map +1 -0
- package/dist/git/resolution-restore.js +331 -0
- package/dist/git/resolution-restore.js.map +1 -0
- package/dist/loops/engine.d.ts.map +1 -1
- package/dist/loops/engine.js.map +1 -1
- package/dist/merge/abandoned-merge-recovery.d.ts +72 -0
- package/dist/merge/abandoned-merge-recovery.d.ts.map +1 -0
- package/dist/merge/abandoned-merge-recovery.js +117 -0
- package/dist/merge/abandoned-merge-recovery.js.map +1 -0
- package/dist/merge/focus-merge.d.ts +19 -0
- package/dist/merge/focus-merge.d.ts.map +1 -1
- package/dist/merge/focus-merge.js +136 -99
- package/dist/merge/focus-merge.js.map +1 -1
- package/dist/merge/merge-back-activity.d.ts +11 -0
- package/dist/merge/merge-back-activity.d.ts.map +1 -0
- package/dist/merge/merge-back-activity.js +57 -0
- package/dist/merge/merge-back-activity.js.map +1 -0
- package/dist/merge/merge-back-conflict.d.ts +119 -0
- package/dist/merge/merge-back-conflict.d.ts.map +1 -0
- package/dist/merge/merge-back-conflict.js +178 -0
- package/dist/merge/merge-back-conflict.js.map +1 -0
- package/dist/merge/merge-back-followup.d.ts +109 -0
- package/dist/merge/merge-back-followup.d.ts.map +1 -0
- package/dist/merge/merge-back-followup.js +316 -0
- package/dist/merge/merge-back-followup.js.map +1 -0
- package/dist/merge/merge-back-loop.d.ts +2 -0
- package/dist/merge/merge-back-loop.d.ts.map +1 -1
- package/dist/merge/merge-back-loop.js +14 -15
- package/dist/merge/merge-back-loop.js.map +1 -1
- package/dist/merge/merge-conflict-escalation.d.ts +12 -0
- package/dist/merge/merge-conflict-escalation.d.ts.map +1 -1
- package/dist/merge/merge-conflict-escalation.js +37 -2
- package/dist/merge/merge-conflict-escalation.js.map +1 -1
- package/dist/merge/merge-gate-coverage.d.ts.map +1 -1
- package/dist/merge/merge-gate-coverage.js +1 -0
- package/dist/merge/merge-gate-coverage.js.map +1 -1
- package/dist/prompt/prompt-listing.d.ts +5 -0
- package/dist/prompt/prompt-listing.d.ts.map +1 -1
- package/dist/prompt/prompt-listing.js +35 -0
- package/dist/prompt/prompt-listing.js.map +1 -1
- package/dist/prompt-sections/routing-decider-sections.d.ts.map +1 -1
- package/dist/prompt-sections/routing-decider-sections.js +2 -0
- package/dist/prompt-sections/routing-decider-sections.js.map +1 -1
- package/dist/prompt-sections/shortfall-park-section.d.ts +43 -0
- package/dist/prompt-sections/shortfall-park-section.d.ts.map +1 -0
- package/dist/prompt-sections/shortfall-park-section.js +36 -0
- package/dist/prompt-sections/shortfall-park-section.js.map +1 -0
- package/dist/queries/agent-resolvable-promotion.d.ts +16 -2
- package/dist/queries/agent-resolvable-promotion.d.ts.map +1 -1
- package/dist/queries/agent-resolvable-promotion.js +30 -3
- package/dist/queries/agent-resolvable-promotion.js.map +1 -1
- package/dist/queries/cause-key.d.ts +17 -22
- package/dist/queries/cause-key.d.ts.map +1 -1
- package/dist/queries/cause-key.js +50 -1
- package/dist/queries/cause-key.js.map +1 -1
- package/dist/queries/commit-attributions.d.ts +18 -0
- package/dist/queries/commit-attributions.d.ts.map +1 -0
- package/dist/queries/commit-attributions.js +39 -0
- package/dist/queries/commit-attributions.js.map +1 -0
- package/dist/queries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries.js +3 -1
- package/dist/queries/deliveries.js.map +1 -1
- package/dist/queries/delivery-gate-state.d.ts +21 -5
- package/dist/queries/delivery-gate-state.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state.js +35 -9
- package/dist/queries/delivery-gate-state.js.map +1 -1
- package/dist/queries/escalation-consumption.d.ts.map +1 -1
- package/dist/queries/escalation-consumption.js +2 -1
- package/dist/queries/escalation-consumption.js.map +1 -1
- package/dist/queries/escalation-field-bounds.d.ts +48 -0
- package/dist/queries/escalation-field-bounds.d.ts.map +1 -0
- package/dist/queries/escalation-field-bounds.js +83 -0
- package/dist/queries/escalation-field-bounds.js.map +1 -0
- package/dist/queries/escalation-refusal.d.ts +88 -0
- package/dist/queries/escalation-refusal.d.ts.map +1 -0
- package/dist/queries/escalation-refusal.js +217 -0
- package/dist/queries/escalation-refusal.js.map +1 -0
- package/dist/queries/escalation-suppression.d.ts +6 -0
- package/dist/queries/escalation-suppression.d.ts.map +1 -1
- package/dist/queries/escalation-suppression.js +4 -13
- package/dist/queries/escalation-suppression.js.map +1 -1
- package/dist/queries/escalations.d.ts +5 -13
- package/dist/queries/escalations.d.ts.map +1 -1
- package/dist/queries/escalations.js +25 -30
- package/dist/queries/escalations.js.map +1 -1
- package/dist/queries/filing-observation.d.ts.map +1 -1
- package/dist/queries/filing-observation.js +3 -1
- package/dist/queries/filing-observation.js.map +1 -1
- package/dist/queries/focus-review-approval.d.ts +2 -0
- package/dist/queries/focus-review-approval.d.ts.map +1 -1
- package/dist/queries/focus-review-approval.js +7 -2
- package/dist/queries/focus-review-approval.js.map +1 -1
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +2 -1
- package/dist/queries/focuses.js.map +1 -1
- package/dist/queries/incident-correlation.d.ts.map +1 -1
- package/dist/queries/incident-correlation.js +4 -1
- package/dist/queries/incident-correlation.js.map +1 -1
- package/dist/queries/misattributed-commits-record.d.ts +26 -0
- package/dist/queries/misattributed-commits-record.d.ts.map +1 -0
- package/dist/queries/misattributed-commits-record.js +5 -0
- package/dist/queries/misattributed-commits-record.js.map +1 -0
- package/dist/queries/reality-tree.d.ts.map +1 -1
- package/dist/queries/reality-tree.js +2 -1
- package/dist/queries/reality-tree.js.map +1 -1
- package/dist/queries/schemas.d.ts +3 -0
- package/dist/queries/schemas.d.ts.map +1 -1
- package/dist/queries/schemas.js +1 -0
- package/dist/queries/schemas.js.map +1 -1
- package/dist/queries/shared.js +1 -1
- package/dist/queries/shortfall-park-record.d.ts +48 -0
- package/dist/queries/shortfall-park-record.d.ts.map +1 -0
- package/dist/queries/shortfall-park-record.js +31 -0
- package/dist/queries/shortfall-park-record.js.map +1 -0
- package/dist/queries/shortfall-rulings.d.ts +71 -0
- package/dist/queries/shortfall-rulings.d.ts.map +1 -0
- package/dist/queries/shortfall-rulings.js +53 -0
- package/dist/queries/shortfall-rulings.js.map +1 -0
- package/dist/queries/verification.d.ts +20 -1
- package/dist/queries/verification.d.ts.map +1 -1
- package/dist/queries/verification.js +48 -8
- package/dist/queries/verification.js.map +1 -1
- package/dist/resolvers/index.d.ts +2 -2
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +1 -1
- package/dist/resolvers/index.js.map +1 -1
- package/dist/resolvers/shared/delivery-trailer.d.ts +99 -0
- package/dist/resolvers/shared/delivery-trailer.d.ts.map +1 -0
- package/dist/resolvers/shared/delivery-trailer.js +103 -0
- package/dist/resolvers/shared/delivery-trailer.js.map +1 -0
- package/dist/resolvers/shared/git-diff.d.ts +11 -84
- package/dist/resolvers/shared/git-diff.d.ts.map +1 -1
- package/dist/resolvers/shared/git-diff.js +17 -84
- package/dist/resolvers/shared/git-diff.js.map +1 -1
- package/dist/resolvers/shared/review-window-commits.d.ts.map +1 -1
- package/dist/resolvers/shared/review-window-commits.js +1 -0
- package/dist/resolvers/shared/review-window-commits.js.map +1 -1
- package/dist/session/session-lineage.d.ts.map +1 -1
- package/dist/session/session-lineage.js +1 -0
- package/dist/session/session-lineage.js.map +1 -1
- package/dist/shell/config.d.ts +2 -1
- package/dist/shell/config.d.ts.map +1 -1
- package/dist/shell/config.js +21 -4
- package/dist/shell/config.js.map +1 -1
- package/dist/shell/crash-recovery.d.ts +3 -7
- package/dist/shell/crash-recovery.d.ts.map +1 -1
- package/dist/shell/crash-recovery.js +28 -31
- package/dist/shell/crash-recovery.js.map +1 -1
- package/dist/shell/orphan-capture.d.ts +42 -0
- package/dist/shell/orphan-capture.d.ts.map +1 -0
- package/dist/shell/orphan-capture.js +53 -0
- package/dist/shell/orphan-capture.js.map +1 -0
- package/dist/shell/worker-pidfile.d.ts +22 -4
- package/dist/shell/worker-pidfile.d.ts.map +1 -1
- package/dist/shell/worker-pidfile.js +51 -13
- package/dist/shell/worker-pidfile.js.map +1 -1
- package/dist/spawn/helpers.d.ts +3 -0
- package/dist/spawn/helpers.d.ts.map +1 -1
- package/dist/spawn/helpers.js +28 -9
- package/dist/spawn/helpers.js.map +1 -1
- package/dist/spawn/lead-launch.d.ts +34 -0
- package/dist/spawn/lead-launch.d.ts.map +1 -0
- package/dist/spawn/lead-launch.js +34 -0
- package/dist/spawn/lead-launch.js.map +1 -0
- package/dist/spawn/lead-process-ownership.d.ts +91 -0
- package/dist/spawn/lead-process-ownership.d.ts.map +1 -0
- package/dist/spawn/lead-process-ownership.js +120 -0
- package/dist/spawn/lead-process-ownership.js.map +1 -0
- package/dist/spawn/lifecycle.d.ts +43 -3
- package/dist/spawn/lifecycle.d.ts.map +1 -1
- package/dist/spawn/lifecycle.js +75 -44
- package/dist/spawn/lifecycle.js.map +1 -1
- package/dist/spawn/liveness.d.ts.map +1 -1
- package/dist/spawn/liveness.js +5 -1
- package/dist/spawn/liveness.js.map +1 -1
- package/dist/spawn/one-shot-process-ownership.d.ts +48 -0
- package/dist/spawn/one-shot-process-ownership.d.ts.map +1 -0
- package/dist/spawn/one-shot-process-ownership.js +44 -0
- package/dist/spawn/one-shot-process-ownership.js.map +1 -0
- package/dist/spawn/process-group-kill.d.ts +79 -0
- package/dist/spawn/process-group-kill.d.ts.map +1 -0
- package/dist/spawn/process-group-kill.js +210 -0
- package/dist/spawn/process-group-kill.js.map +1 -0
- package/dist/spawn/process-spawn.d.ts +18 -1
- package/dist/spawn/process-spawn.d.ts.map +1 -1
- package/dist/spawn/process-spawn.js +51 -20
- package/dist/spawn/process-spawn.js.map +1 -1
- package/dist/spawn/resolution-budget.d.ts +38 -0
- package/dist/spawn/resolution-budget.d.ts.map +1 -0
- package/dist/spawn/resolution-budget.js +87 -0
- package/dist/spawn/resolution-budget.js.map +1 -0
- package/dist/spawn/review-hold-park.d.ts.map +1 -1
- package/dist/spawn/review-hold-park.js +37 -5
- 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 +9 -0
- package/dist/spawn/spawn-cooldown.js.map +1 -1
- package/dist/spawn/untracked-lead-sweep.d.ts +29 -0
- package/dist/spawn/untracked-lead-sweep.d.ts.map +1 -0
- package/dist/spawn/untracked-lead-sweep.js +100 -0
- package/dist/spawn/untracked-lead-sweep.js.map +1 -0
- package/dist/spawn/worker-registry.d.ts.map +1 -1
- package/dist/spawn/worker-registry.js +4 -1
- package/dist/spawn/worker-registry.js.map +1 -1
- package/dist/spawn/worktree-session.d.ts.map +1 -1
- package/dist/spawn/worktree-session.js +8 -6
- package/dist/spawn/worktree-session.js.map +1 -1
- package/dist/testing/fixtures/exit-capture-verify.d.ts +41 -0
- package/dist/testing/fixtures/exit-capture-verify.d.ts.map +1 -0
- package/dist/testing/fixtures/exit-capture-verify.js +152 -0
- package/dist/testing/fixtures/exit-capture-verify.js.map +1 -0
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/pending-spawn-world.d.ts +7 -0
- package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.js +21 -1
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
- package/dist/testing/fixtures/stubborn-lead-process.d.ts +22 -0
- package/dist/testing/fixtures/stubborn-lead-process.d.ts.map +1 -0
- package/dist/testing/fixtures/stubborn-lead-process.js +68 -0
- package/dist/testing/fixtures/stubborn-lead-process.js.map +1 -0
- package/dist/types/config.d.ts +13 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/focus.d.ts +7 -0
- package/dist/types/focus.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/verify/commit-verdict-record.d.ts +13 -3
- package/dist/verify/commit-verdict-record.d.ts.map +1 -1
- package/dist/verify/commit-verdict-record.js +45 -25
- package/dist/verify/commit-verdict-record.js.map +1 -1
- package/dist/verify/credit-rearm.d.ts +18 -0
- package/dist/verify/credit-rearm.d.ts.map +1 -0
- package/dist/verify/credit-rearm.js +69 -0
- package/dist/verify/credit-rearm.js.map +1 -0
- package/dist/verify/delivery-commit-set.d.ts +10 -0
- package/dist/verify/delivery-commit-set.d.ts.map +1 -0
- package/dist/verify/delivery-commit-set.js +82 -0
- package/dist/verify/delivery-commit-set.js.map +1 -0
- package/dist/verify/explicit-rearm.d.ts.map +1 -1
- package/dist/verify/explicit-rearm.js +2 -0
- package/dist/verify/explicit-rearm.js.map +1 -1
- package/dist/verify/failure-signature.d.ts.map +1 -1
- package/dist/verify/failure-signature.js +1 -0
- package/dist/verify/failure-signature.js.map +1 -1
- package/dist/verify/gate-run-registry.d.ts.map +1 -1
- package/dist/verify/gate-run-registry.js +3 -0
- package/dist/verify/gate-run-registry.js.map +1 -1
- package/dist/verify/injection-stamp.d.ts +29 -0
- package/dist/verify/injection-stamp.d.ts.map +1 -0
- package/dist/verify/injection-stamp.js +139 -0
- package/dist/verify/injection-stamp.js.map +1 -0
- package/dist/verify/misattributed-commits-read.d.ts +31 -0
- package/dist/verify/misattributed-commits-read.d.ts.map +1 -0
- package/dist/verify/misattributed-commits-read.js +47 -0
- package/dist/verify/misattributed-commits-read.js.map +1 -0
- package/dist/verify/misattributed-commits.d.ts +52 -0
- package/dist/verify/misattributed-commits.d.ts.map +1 -0
- package/dist/verify/misattributed-commits.js +148 -0
- package/dist/verify/misattributed-commits.js.map +1 -0
- package/dist/verify/no-own-delta-verdict.d.ts +47 -0
- package/dist/verify/no-own-delta-verdict.d.ts.map +1 -0
- package/dist/verify/no-own-delta-verdict.js +74 -0
- package/dist/verify/no-own-delta-verdict.js.map +1 -0
- package/dist/verify/shortfall-park-escalation.d.ts +41 -0
- package/dist/verify/shortfall-park-escalation.d.ts.map +1 -0
- package/dist/verify/shortfall-park-escalation.js +177 -0
- package/dist/verify/shortfall-park-escalation.js.map +1 -0
- package/dist/verify/shortfall-park.d.ts +109 -0
- package/dist/verify/shortfall-park.d.ts.map +1 -0
- package/dist/verify/shortfall-park.js +208 -0
- package/dist/verify/shortfall-park.js.map +1 -0
- package/dist/verify/shortfall-repeat.d.ts +47 -16
- package/dist/verify/shortfall-repeat.d.ts.map +1 -1
- package/dist/verify/shortfall-repeat.js +77 -23
- package/dist/verify/shortfall-repeat.js.map +1 -1
- package/dist/verify/shortfall-rulings.d.ts +106 -0
- package/dist/verify/shortfall-rulings.d.ts.map +1 -0
- package/dist/verify/shortfall-rulings.js +118 -0
- package/dist/verify/shortfall-rulings.js.map +1 -0
- package/dist/verify/stall-detectors.d.ts.map +1 -1
- package/dist/verify/stall-detectors.js +10 -4
- package/dist/verify/stall-detectors.js.map +1 -1
- package/dist/verify/verification-attribution-base.d.ts +26 -0
- package/dist/verify/verification-attribution-base.d.ts.map +1 -0
- package/dist/verify/verification-attribution-base.js +127 -0
- package/dist/verify/verification-attribution-base.js.map +1 -0
- package/dist/verify/verification-attribution-deps.d.ts +32 -0
- package/dist/verify/verification-attribution-deps.d.ts.map +1 -0
- package/dist/verify/verification-attribution-deps.js +209 -0
- package/dist/verify/verification-attribution-deps.js.map +1 -0
- package/dist/verify/verification-baseline.d.ts +6 -0
- package/dist/verify/verification-baseline.d.ts.map +1 -1
- package/dist/verify/verification-baseline.js +27 -11
- package/dist/verify/verification-baseline.js.map +1 -1
- package/dist/verify/verification-commit-sharing.d.ts.map +1 -1
- package/dist/verify/verification-commit-sharing.js +30 -8
- package/dist/verify/verification-commit-sharing.js.map +1 -1
- package/dist/verify/verification-config.d.ts.map +1 -1
- package/dist/verify/verification-config.js +2 -0
- package/dist/verify/verification-config.js.map +1 -1
- package/dist/verify/verification-default-on.d.ts +3 -0
- package/dist/verify/verification-default-on.d.ts.map +1 -1
- package/dist/verify/verification-default-on.js +5 -1
- 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 +61 -120
- package/dist/verify/verification-deps-default.js.map +1 -1
- package/dist/verify/verification-deps.d.ts +26 -4
- package/dist/verify/verification-deps.d.ts.map +1 -1
- package/dist/verify/verification-deterministic.d.ts +15 -0
- package/dist/verify/verification-deterministic.d.ts.map +1 -1
- package/dist/verify/verification-deterministic.js +1 -12
- package/dist/verify/verification-deterministic.js.map +1 -1
- package/dist/verify/verification-engine.d.ts +9 -6
- package/dist/verify/verification-engine.d.ts.map +1 -1
- package/dist/verify/verification-engine.js +43 -62
- package/dist/verify/verification-engine.js.map +1 -1
- package/dist/verify/verification-evidence-unavailable-feedback.d.ts +2 -1
- package/dist/verify/verification-evidence-unavailable-feedback.d.ts.map +1 -1
- package/dist/verify/verification-evidence-unavailable-feedback.js +19 -1
- package/dist/verify/verification-evidence-unavailable-feedback.js.map +1 -1
- package/dist/verify/verification-failure-parser.d.ts +57 -1
- package/dist/verify/verification-failure-parser.d.ts.map +1 -1
- package/dist/verify/verification-failure-parser.js +116 -10
- package/dist/verify/verification-failure-parser.js.map +1 -1
- package/dist/verify/verification-feedback.d.ts +60 -43
- package/dist/verify/verification-feedback.d.ts.map +1 -1
- package/dist/verify/verification-feedback.js +115 -120
- package/dist/verify/verification-feedback.js.map +1 -1
- package/dist/verify/verification-history-reset.d.ts +2 -1
- package/dist/verify/verification-history-reset.d.ts.map +1 -1
- package/dist/verify/verification-history-reset.js +4 -2
- package/dist/verify/verification-history-reset.js.map +1 -1
- package/dist/verify/verification-rework-issue.d.ts +87 -0
- package/dist/verify/verification-rework-issue.d.ts.map +1 -0
- package/dist/verify/verification-rework-issue.js +212 -0
- package/dist/verify/verification-rework-issue.js.map +1 -0
- package/dist/verify/verification-rework-messages.d.ts.map +1 -1
- package/dist/verify/verification-rework-messages.js +10 -0
- package/dist/verify/verification-rework-messages.js.map +1 -1
- package/dist/verify/verify-gate-stall.d.ts +2 -0
- package/dist/verify/verify-gate-stall.d.ts.map +1 -1
- package/dist/verify/verify-gate-stall.js +35 -9
- package/dist/verify/verify-gate-stall.js.map +1 -1
- package/dist/verify/verify-restatement.d.ts.map +1 -1
- package/dist/verify/verify-restatement.js +9 -2
- package/dist/verify/verify-restatement.js.map +1 -1
- package/dist/worktree/capture-attribution-read.d.ts +47 -0
- package/dist/worktree/capture-attribution-read.d.ts.map +1 -0
- package/dist/worktree/capture-attribution-read.js +98 -0
- package/dist/worktree/capture-attribution-read.js.map +1 -0
- package/dist/worktree/capture-attribution.d.ts +26 -0
- package/dist/worktree/capture-attribution.d.ts.map +1 -0
- package/dist/worktree/capture-attribution.js +111 -0
- package/dist/worktree/capture-attribution.js.map +1 -0
- package/dist/worktree/index.d.ts.map +1 -1
- package/dist/worktree/index.js +2 -1
- package/dist/worktree/index.js.map +1 -1
- package/dist/worktree/provision.d.ts.map +1 -1
- package/dist/worktree/provision.js +23 -6
- package/dist/worktree/provision.js.map +1 -1
- package/dist/worktree/safety.d.ts +14 -4
- package/dist/worktree/safety.d.ts.map +1 -1
- package/dist/worktree/safety.js +37 -7
- package/dist/worktree/safety.js.map +1 -1
- package/dist/worktree/scratch-guard.d.ts +53 -2
- package/dist/worktree/scratch-guard.d.ts.map +1 -1
- package/dist/worktree/scratch-guard.js +115 -30
- package/dist/worktree/scratch-guard.js.map +1 -1
- package/dist/worktree/unmerged-capture-escalation.d.ts +52 -0
- package/dist/worktree/unmerged-capture-escalation.d.ts.map +1 -0
- package/dist/worktree/unmerged-capture-escalation.js +64 -0
- package/dist/worktree/unmerged-capture-escalation.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/verify/misattributed-commits.test.ts
|
|
3
|
+
// PINNED-BY-END
|
|
4
|
+
/**
|
|
5
|
+
* Commits in a focus's recorded batches that may hold a held delivery's work
|
|
6
|
+
* without being attributed to it.
|
|
7
|
+
*
|
|
8
|
+
* Verify judges a delivery on its OWN commits: those whose Telora-Delivery
|
|
9
|
+
* trailer names it. A commit trailered `none` (housekeeping), `unattributed` (a
|
|
10
|
+
* daemon capture whose delivery was unknown) or not trailered at all belongs to
|
|
11
|
+
* no delivery's evidence. When such a commit holds a delivery's implementation,
|
|
12
|
+
* verify reports "the diff lacks the work" on every pass while the work sits one
|
|
13
|
+
* commit away (Tinker Tailor 1bc76c8e: a 51-file exit capture stamped `none`,
|
|
14
|
+
* iteration 23). This module finds those commits so a shortfall hold can name
|
|
15
|
+
* them, making misattributed work distinguishable from missing work.
|
|
16
|
+
*
|
|
17
|
+
* Scope -- "the files a held node concerns" -- is the union of the shortfall's
|
|
18
|
+
* cited diff file, the delivery's issues' completion-artifact files and tests,
|
|
19
|
+
* and its Context Groups' relevantFiles. When none of those name a file the
|
|
20
|
+
* scope is `unscoped` and every candidate commit is named, labelled unscoped --
|
|
21
|
+
* never silently nothing. An unattributed capture is named whatever it touches:
|
|
22
|
+
* it is delivery work by declaration.
|
|
23
|
+
*/
|
|
24
|
+
import { runGitSync } from '../git/index.js';
|
|
25
|
+
import { classifyTrailerValue, DELIVERY_TRAILER_KEY } from '../resolvers/shared/delivery-trailer.js';
|
|
26
|
+
import { compilePathPattern } from '../worktree/capture-attribution.js';
|
|
27
|
+
import { completionFilesOf } from '../worktree/capture-attribution-read.js';
|
|
28
|
+
/** Bound on commits named, and files listed per commit, in a hold. */
|
|
29
|
+
const MAX_NAMED_COMMITS = 20;
|
|
30
|
+
const MAX_FILES_PER_COMMIT = 10;
|
|
31
|
+
/** Commits per `git show` invocation when reading the batch. */
|
|
32
|
+
const READ_CHUNK = 100;
|
|
33
|
+
const FIELD = '\x1f';
|
|
34
|
+
const RECORD = '\x1e';
|
|
35
|
+
/**
|
|
36
|
+
* Read and classify every distinct commit in the focus's recorded batches. A
|
|
37
|
+
* commit git cannot read is skipped. `overrides` (sha -> delivery id) replaces a
|
|
38
|
+
* commit's trailer classification with a delivery attribution.
|
|
39
|
+
*/
|
|
40
|
+
export function readFocusCommitRecords(cwd, batches, overrides = new Map()) {
|
|
41
|
+
const shas = [...new Set(batches.flatMap((b) => b ?? []).map((s) => s.trim()).filter((s) => /^[0-9a-f]{7,64}$/i.test(s)))];
|
|
42
|
+
const records = [];
|
|
43
|
+
for (let i = 0; i < shas.length; i += READ_CHUNK) {
|
|
44
|
+
const chunk = shas.slice(i, i + READ_CHUNK);
|
|
45
|
+
const res = runGitSync(['show', '-s', '--ignore-missing',
|
|
46
|
+
`--format=%H${FIELD}%P${FIELD}%s${FIELD}%(trailers:key=${DELIVERY_TRAILER_KEY},valueonly,separator=%x2c)${RECORD}`,
|
|
47
|
+
...chunk], cwd);
|
|
48
|
+
if (!res.success)
|
|
49
|
+
continue;
|
|
50
|
+
for (const raw of res.output.split(RECORD)) {
|
|
51
|
+
const [sha = '', parents = '', subject = '', trailers = ''] = raw.trim().split(FIELD);
|
|
52
|
+
if (!/^[0-9a-f]{40,64}$/i.test(sha))
|
|
53
|
+
continue;
|
|
54
|
+
const override = overrides.get(sha);
|
|
55
|
+
const firstTrailer = trailers.split(',').map((t) => t.trim()).find((t) => t !== '') ?? '';
|
|
56
|
+
records.push({
|
|
57
|
+
sha,
|
|
58
|
+
subject,
|
|
59
|
+
isMerge: parents.trim().split(/\s+/).filter(Boolean).length > 1,
|
|
60
|
+
attribution: override ? { kind: 'delivery', deliveryId: override } : classifyTrailerValue(firstTrailer),
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return records;
|
|
65
|
+
}
|
|
66
|
+
/** The files a commit changed (renames split), or null when git cannot read it. */
|
|
67
|
+
export function readCommitChangedFiles(cwd, sha) {
|
|
68
|
+
const res = runGitSync(['show', '--name-only', '--no-renames', '--format=', sha, '--'], cwd);
|
|
69
|
+
if (!res.success)
|
|
70
|
+
return null;
|
|
71
|
+
return res.output.split('\n').map((l) => l.trim()).filter((l) => l !== '');
|
|
72
|
+
}
|
|
73
|
+
/** The file named by a shortfall's diff citation ("path:line", "path @@ ..."), or null. */
|
|
74
|
+
export function citedFile(diffCitation) {
|
|
75
|
+
const token = (diffCitation ?? '').trim().split(/[\s:@(]/)[0] ?? '';
|
|
76
|
+
return /[./]/.test(token) ? token.replace(/^[ab]\//, '') : null;
|
|
77
|
+
}
|
|
78
|
+
/** Pure: the node's file scope from its shortfall citations and the delivery's issues. */
|
|
79
|
+
export function resolveNodeFileScope(diffCitations, deliveryIssues) {
|
|
80
|
+
const patterns = new Set();
|
|
81
|
+
for (const c of diffCitations) {
|
|
82
|
+
const f = citedFile(c);
|
|
83
|
+
if (f)
|
|
84
|
+
patterns.add(f);
|
|
85
|
+
}
|
|
86
|
+
for (const issue of deliveryIssues) {
|
|
87
|
+
for (const f of completionFilesOf(issue.completionArtifacts))
|
|
88
|
+
patterns.add(f);
|
|
89
|
+
for (const line of (issue.relevantFiles ?? '').split('\n')) {
|
|
90
|
+
if (line.trim() !== '')
|
|
91
|
+
patterns.add(line.trim());
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return patterns.size === 0 ? { kind: 'unscoped' } : { kind: 'files', patterns: [...patterns] };
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Pure: the commits a held node's work may live in -- every non-merge commit in
|
|
98
|
+
* the batches trailered `none`, `unattributed` or not at all whose changed files
|
|
99
|
+
* meet the node's scope (any, when unscoped). An unattributed capture is named
|
|
100
|
+
* whatever it touches. Commits attributed to a delivery -- this one or another --
|
|
101
|
+
* never are. Newest-batch order is kept; the list and each file list are bounded.
|
|
102
|
+
*/
|
|
103
|
+
export function findMisattributedCommits(commits, changedFilesOf, scope) {
|
|
104
|
+
const matchers = scope.kind === 'files'
|
|
105
|
+
? scope.patterns.map(compilePathPattern).filter((m) => m !== null)
|
|
106
|
+
: [];
|
|
107
|
+
const named = [];
|
|
108
|
+
for (const c of commits) {
|
|
109
|
+
if (named.length >= MAX_NAMED_COMMITS)
|
|
110
|
+
break;
|
|
111
|
+
const trailer = c.attribution.kind;
|
|
112
|
+
if (trailer === 'delivery' || c.isMerge)
|
|
113
|
+
continue;
|
|
114
|
+
const changed = changedFilesOf(c.sha) ?? [];
|
|
115
|
+
const inScope = scope.kind === 'unscoped' ? changed : changed.filter((f) => matchers.some((m) => m(f)));
|
|
116
|
+
if (inScope.length === 0 && trailer !== 'unattributed_capture')
|
|
117
|
+
continue;
|
|
118
|
+
named.push({ sha: c.sha, subject: c.subject, trailer, files: inScope.slice(0, MAX_FILES_PER_COMMIT) });
|
|
119
|
+
}
|
|
120
|
+
return { scope: scope.kind, commits: named };
|
|
121
|
+
}
|
|
122
|
+
const TRAILER_LABEL = {
|
|
123
|
+
sentinel: 'Telora-Delivery: none',
|
|
124
|
+
unattributed: 'no Telora-Delivery trailer',
|
|
125
|
+
unattributed_capture: 'Telora-Delivery: unattributed (daemon capture, delivery unknown)',
|
|
126
|
+
};
|
|
127
|
+
/** The lines a hold renders for a non-empty note; [] when there is nothing to name. */
|
|
128
|
+
export function renderMisattributedCommitLines(note) {
|
|
129
|
+
if (!note || note.commits.length === 0)
|
|
130
|
+
return [];
|
|
131
|
+
const lines = [
|
|
132
|
+
note.scope === 'files'
|
|
133
|
+
? `Possibly misattributed work (${note.commits.length}): these commits in the focus's merged batches touch ` +
|
|
134
|
+
`files this delivery concerns but are not attributed to it, so verify did not count them. The work ` +
|
|
135
|
+
`may already exist -- if a commit holds this delivery's work, credit it to the delivery instead of ` +
|
|
136
|
+
`re-writing it.`
|
|
137
|
+
: `Possibly misattributed work (${note.commits.length}, unscoped -- no file scope is recorded for this ` +
|
|
138
|
+
`delivery): these commits in the focus's merged batches are not attributed to any delivery, so verify ` +
|
|
139
|
+
`did not count them. If one holds this delivery's work, credit it to the delivery instead of re-writing it.`,
|
|
140
|
+
];
|
|
141
|
+
for (const c of note.commits) {
|
|
142
|
+
lines.push(`- ${c.sha.slice(0, 12)} "${c.subject}" (${TRAILER_LABEL[c.trailer]})`);
|
|
143
|
+
if (c.files.length > 0)
|
|
144
|
+
lines.push(` files: ${c.files.join(', ')}`);
|
|
145
|
+
}
|
|
146
|
+
return lines;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=misattributed-commits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"misattributed-commits.js","sourceRoot":"","sources":["../../src/verify/misattributed-commits.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,sEAAsE;AACtE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAA2B,MAAM,yCAAyC,CAAC;AAC9H,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AA+B5E,sEAAsE;AACtE,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,oBAAoB,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|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A focus commit that adds nothing of the focus's own is not judged again: it
|
|
3
|
+
* carries the verdict the focus's own commits already earned.
|
|
4
|
+
*
|
|
5
|
+
* When every commit on a focus branch is already on integration and the branch
|
|
6
|
+
* tip moved past the newest commit the gate judged ONLY by commits other foci own
|
|
7
|
+
* (git/focus-own-delta.ts isForeignOnlyExtension), a run at that tip would judge
|
|
8
|
+
* the integration tip in the focus's place -- the 2026-09-17 incident, where a
|
|
9
|
+
* sibling's failing tests were charged to a fast-forwarded focus. So no run
|
|
10
|
+
* starts: the verdict recorded for that newest judged ancestor is carried to the
|
|
11
|
+
* tip (recorded there, naming where it came from), and the delivery is routed on
|
|
12
|
+
* it exactly as on any recorded verdict -- its state follows from what its own
|
|
13
|
+
* commits earned, and it is never stranded waiting on a run that must not happen.
|
|
14
|
+
*
|
|
15
|
+
* Anything short of proof -- an own or unattributed commit since the judged
|
|
16
|
+
* ancestor, no judged ancestor within the search depth, an unreadable read --
|
|
17
|
+
* carries nothing, and the dispatch runs the gate as before.
|
|
18
|
+
*
|
|
19
|
+
* @module verify/no-own-delta-verdict
|
|
20
|
+
*/
|
|
21
|
+
import { isForeignOnlyExtension } from '../git/focus-own-delta.js';
|
|
22
|
+
import type { CommitVerdict, CommitVerdictGate, CommitVerdictReader } from './commit-verdict-record.js';
|
|
23
|
+
/** How many ancestors of the tip are searched for the newest judged one. */
|
|
24
|
+
export declare const CARRIED_VERDICT_SEARCH_DEPTH = 200;
|
|
25
|
+
/** The reads a carried verdict is resolved from. */
|
|
26
|
+
export interface CarriedVerdictDeps {
|
|
27
|
+
integrationBranch: string;
|
|
28
|
+
/** The focus worktree path, null when the focus has none. */
|
|
29
|
+
resolveWorktreePath: (focusId: string) => string | null;
|
|
30
|
+
/** The focus's delivery ids. May throw (then nothing is carried). */
|
|
31
|
+
listFocusDeliveryIds: (focusId: string) => Promise<readonly string[]>;
|
|
32
|
+
readCommitVerdict: CommitVerdictReader;
|
|
33
|
+
/** Ancestors of `tip`, newest first, excluding `tip`; null when unreadable. */
|
|
34
|
+
listAncestors?: (worktreePath: string, tip: string, depth: number) => string[] | null;
|
|
35
|
+
isForeignOnlyExtension?: typeof isForeignOnlyExtension;
|
|
36
|
+
}
|
|
37
|
+
/** A verdict carried to `head`, and the judged commit it came from. */
|
|
38
|
+
export interface CarriedVerdict {
|
|
39
|
+
verdict: CommitVerdict;
|
|
40
|
+
carriedFrom: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The verdict `head` carries from its newest judged ancestor when it adds nothing
|
|
44
|
+
* of the focus's own (module doc), or null.
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveCarriedVerdict(productId: string, focusId: string, head: string, gate: CommitVerdictGate, deps: CarriedVerdictDeps): Promise<CarriedVerdict | null>;
|
|
47
|
+
//# sourceMappingURL=no-own-delta-verdict.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-own-delta-verdict.d.ts","sourceRoot":"","sources":["../../src/verify/no-own-delta-verdict.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAExG,4EAA4E;AAC5E,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,mBAAmB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACxD,qEAAqE;IACrE,oBAAoB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IACtE,iBAAiB,EAAE,mBAAmB,CAAC;IACvC,+EAA+E;IAC/E,aAAa,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,EAAE,GAAG,IAAI,CAAC;IACtF,sBAAsB,CAAC,EAAE,OAAO,sBAAsB,CAAC;CACxD;AAQD,uEAAuE;AACvE,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,iBAAiB,EACvB,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CA8BhC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/integration/fully-merged-focus-sibling-red-scenario.test.ts,
|
|
3
|
+
// packages/daemon/src/verify/verification-commit-sharing.test.ts
|
|
4
|
+
// PINNED-BY-END
|
|
5
|
+
/**
|
|
6
|
+
* A focus commit that adds nothing of the focus's own is not judged again: it
|
|
7
|
+
* carries the verdict the focus's own commits already earned.
|
|
8
|
+
*
|
|
9
|
+
* When every commit on a focus branch is already on integration and the branch
|
|
10
|
+
* tip moved past the newest commit the gate judged ONLY by commits other foci own
|
|
11
|
+
* (git/focus-own-delta.ts isForeignOnlyExtension), a run at that tip would judge
|
|
12
|
+
* the integration tip in the focus's place -- the 2026-09-17 incident, where a
|
|
13
|
+
* sibling's failing tests were charged to a fast-forwarded focus. So no run
|
|
14
|
+
* starts: the verdict recorded for that newest judged ancestor is carried to the
|
|
15
|
+
* tip (recorded there, naming where it came from), and the delivery is routed on
|
|
16
|
+
* it exactly as on any recorded verdict -- its state follows from what its own
|
|
17
|
+
* commits earned, and it is never stranded waiting on a run that must not happen.
|
|
18
|
+
*
|
|
19
|
+
* Anything short of proof -- an own or unattributed commit since the judged
|
|
20
|
+
* ancestor, no judged ancestor within the search depth, an unreadable read --
|
|
21
|
+
* carries nothing, and the dispatch runs the gate as before.
|
|
22
|
+
*
|
|
23
|
+
* @module verify/no-own-delta-verdict
|
|
24
|
+
*/
|
|
25
|
+
import { isForeignOnlyExtension } from '../git/focus-own-delta.js';
|
|
26
|
+
import { runGitSync } from '../git/types.js';
|
|
27
|
+
/** How many ancestors of the tip are searched for the newest judged one. */
|
|
28
|
+
export const CARRIED_VERDICT_SEARCH_DEPTH = 200;
|
|
29
|
+
function defaultListAncestors(worktreePath, tip, depth) {
|
|
30
|
+
const r = runGitSync(['rev-list', '--topo-order', `--max-count=${depth}`, '--skip=1', tip], worktreePath);
|
|
31
|
+
if (!r.success)
|
|
32
|
+
return null;
|
|
33
|
+
return r.output.split('\n').map((l) => l.trim()).filter((l) => l !== '');
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The verdict `head` carries from its newest judged ancestor when it adds nothing
|
|
37
|
+
* of the focus's own (module doc), or null.
|
|
38
|
+
*/
|
|
39
|
+
export async function resolveCarriedVerdict(productId, focusId, head, gate, deps) {
|
|
40
|
+
const worktreePath = deps.resolveWorktreePath(focusId);
|
|
41
|
+
if (!worktreePath)
|
|
42
|
+
return null;
|
|
43
|
+
const ancestors = (deps.listAncestors ?? defaultListAncestors)(worktreePath, head, CARRIED_VERDICT_SEARCH_DEPTH);
|
|
44
|
+
if (!ancestors)
|
|
45
|
+
return null;
|
|
46
|
+
const judged = ancestors.find((sha) => deps.readCommitVerdict(productId, focusId, sha, gate) !== null);
|
|
47
|
+
if (!judged)
|
|
48
|
+
return null;
|
|
49
|
+
const recorded = deps.readCommitVerdict(productId, focusId, judged, gate);
|
|
50
|
+
if (!recorded)
|
|
51
|
+
return null;
|
|
52
|
+
let ids;
|
|
53
|
+
try {
|
|
54
|
+
ids = await deps.listFocusDeliveryIds(focusId);
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const foreignOnly = (deps.isForeignOnlyExtension ?? isForeignOnlyExtension)(worktreePath, deps.integrationBranch, judged, head, new Set(ids));
|
|
60
|
+
if (!foreignOnly)
|
|
61
|
+
return null;
|
|
62
|
+
const carriedWhy = `carried from ${judged.slice(0, 8)}: the focus has no unverified delta of its own -- every commit `
|
|
63
|
+
+ `since is another focus's, already on integration`;
|
|
64
|
+
return {
|
|
65
|
+
carriedFrom: judged,
|
|
66
|
+
verdict: {
|
|
67
|
+
...recorded,
|
|
68
|
+
sha: head,
|
|
69
|
+
recordedAt: new Date().toISOString(),
|
|
70
|
+
rationale: recorded.rationale ? `${carriedWhy}; ${recorded.rationale}` : carriedWhy,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=no-own-delta-verdict.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-own-delta-verdict.js","sourceRoot":"","sources":["../../src/verify/no-own-delta-verdict.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8FAA8F;AAC9F,mEAAmE;AACnE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAehD,SAAS,oBAAoB,CAAC,YAAoB,EAAE,GAAW,EAAE,KAAa;IAC5E,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,UAAU,EAAE,cAAc,EAAE,eAAe,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,YAAY,CAAC,CAAC;IAC1G,IAAI,CAAC,CAAC,CAAC,OAAO;QAAE,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AAC,IAAI,CAAC,sBAAsB,IAAI,sBAAsB,CAAC,CACzE,YAAY,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC,CACjE,CAAC;IACF,IAAI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IAC9B,MAAM,UAAU,GAAG,gBAAgB,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,iEAAiE;UAClH,kDAAkD,CAAC;IACvD,OAAO;QACL,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE;YACP,GAAG,QAAQ;YACX,GAAG,EAAE,IAAI;YACT,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,UAAU,KAAK,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU;SACpF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { FileEscalationIdempotentParams, FileEscalationIdempotentResult } from '../queries/escalation-suppression.js';
|
|
2
|
+
import type { HumanAct } from '../queries/filing-observation.js';
|
|
3
|
+
import type { MisattributedCommitsRecord, ShortfallReconciliationDetail } from '../queries/delivery-gate-state.js';
|
|
4
|
+
import type { PendingVerification } from '../queries/verification.js';
|
|
5
|
+
import { type ShortfallPark } from './shortfall-park.js';
|
|
6
|
+
import type { ShortfallRepeat } from './shortfall-repeat.js';
|
|
7
|
+
import type { TargetShortfall } from './verify-restatement.js';
|
|
8
|
+
/**
|
|
9
|
+
* The MCP tool and action an operator rules a shortfall node met or excused with.
|
|
10
|
+
* ONE definition: the operator-rulings delivery aligns its action name to this
|
|
11
|
+
* constant, and the filing's proposed human act names it.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SHORTFALL_RULING_TOOL = "telora_product_delivery";
|
|
14
|
+
export declare const SHORTFALL_RULING_ACTION = "shortfall_rule";
|
|
15
|
+
/**
|
|
16
|
+
* escalation_kind of the park filing: the existing verify_gate_unclearable (see
|
|
17
|
+
* the module header for why reuse, and why its self-report exclusion is right).
|
|
18
|
+
*/
|
|
19
|
+
export declare const SHORTFALL_PARK_ESCALATION_KIND = "verify_gate_unclearable";
|
|
20
|
+
/** metadata.diagnosis of the park filing. */
|
|
21
|
+
export declare const SHORTFALL_PARK_DIAGNOSIS = "shortfall_park";
|
|
22
|
+
/** Pure: the park a filing is about -- the standing record, or one read off the repeat when none was passed. */
|
|
23
|
+
export declare function shortfallParkOf(shortfalls: readonly TargetShortfall[], repeat: ShortfallRepeat, park: ShortfallPark | undefined, at: string): ShortfallPark;
|
|
24
|
+
/** Pure: the human act a park proposes -- rule the named nodes, or correct their tree claim. */
|
|
25
|
+
export declare function shortfallParkHumanAct(deliveryName: string, nodeIds: readonly string[]): HumanAct;
|
|
26
|
+
/** Pure: the park filing's body -- every repeated node, the count and limit, the commit-set fact, what releases it. */
|
|
27
|
+
export declare function buildShortfallParkEscalation(deliveryName: string, shortfalls: readonly TargetShortfall[], park: ShortfallPark, limit?: number, misattributed?: MisattributedCommitsRecord): {
|
|
28
|
+
description: string;
|
|
29
|
+
whatWasTried: string;
|
|
30
|
+
helpNeeded: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* File the park's ONE escalation through the cause-keyed idempotent gate (see the
|
|
34
|
+
* module header). Returns whether the filing call completed (filed, suppressed as
|
|
35
|
+
* the same standing park, or correlated onto the delivery's open incident row).
|
|
36
|
+
* Best-effort: a failure is logged, never thrown.
|
|
37
|
+
*/
|
|
38
|
+
export declare function fileShortfallParkEscalation(v: Pick<PendingVerification, 'deliveryId' | 'deliveryName' | 'focusId' | 'productId'>, shortfalls: readonly TargetShortfall[], park: ShortfallPark, organizationId: string, fileEscalation: (params: FileEscalationIdempotentParams) => Promise<FileEscalationIdempotentResult>, limit?: number, misattributed?: MisattributedCommitsRecord): Promise<boolean>;
|
|
39
|
+
/** Pure: the message a live coding team is sent when its delivery is parked. */
|
|
40
|
+
export declare function buildShortfallParkInjectMessage(deliveryName: string, park: ShortfallPark, detail: ShortfallReconciliationDetail): string;
|
|
41
|
+
//# sourceMappingURL=shortfall-park-escalation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortfall-park-escalation.d.ts","sourceRoot":"","sources":["../../src/verify/shortfall-park-escalation.ts"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EACV,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AACnH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI/D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,4BAA4B,CAAC;AAC/D,eAAO,MAAM,uBAAuB,mBAAmB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,8BAA8B,4BAA4B,CAAC;AAExE,6CAA6C;AAC7C,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AAEzD,gHAAgH;AAChH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,SAAS,eAAe,EAAE,EACtC,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,aAAa,GAAG,SAAS,EAC/B,EAAE,EAAE,MAAM,GACT,aAAa,CAQf;AAED,gGAAgG;AAChG,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,QAAQ,CAQhG;AAED,uHAAuH;AACvH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,SAAS,eAAe,EAAE,EACtC,IAAI,EAAE,aAAa,EACnB,KAAK,GAAE,MAAoC,EAC3C,aAAa,CAAC,EAAE,0BAA0B,GACzC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAuCnE;AAED;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,YAAY,GAAG,cAAc,GAAG,SAAS,GAAG,WAAW,CAAC,EACrF,UAAU,EAAE,SAAS,eAAe,EAAE,EACtC,IAAI,EAAE,aAAa,EACnB,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,OAAO,CAAC,8BAA8B,CAAC,EACnG,KAAK,GAAE,MAAoC,EAC3C,aAAa,CAAC,EAAE,0BAA0B,GACzC,OAAO,CAAC,OAAO,CAAC,CAiDlB;AAED,gFAAgF;AAChF,wBAAgB,+BAA+B,CAC7C,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,6BAA6B,GACpC,MAAM,CAQR"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/verify/shortfall-park-escalation.test.ts
|
|
3
|
+
// PINNED-BY-END
|
|
4
|
+
/**
|
|
5
|
+
* The ONE filing a shortfall PARK makes, and the message a live team gets when a
|
|
6
|
+
* park lands.
|
|
7
|
+
*
|
|
8
|
+
* Why (reality tree injection #13): a delivery looping on an identical verify
|
|
9
|
+
* shortfall stopped only when an operator disarmed its focus. The park
|
|
10
|
+
* (verify/shortfall-park.ts) now stops the loop on its own; this module is how a
|
|
11
|
+
* human learns of it. The act that ends a park is not a coding act: either the
|
|
12
|
+
* named nodes are ruled met or excused on the delivery (a recorded, attributed
|
|
13
|
+
* lowering of the bar -- an operator's, never a team's) or the tree claim for them
|
|
14
|
+
* is corrected. So the filing NAMES that act as its proposed human act, names
|
|
15
|
+
* every repeated node with its declared/achieved/reason, and states what releases
|
|
16
|
+
* the park.
|
|
17
|
+
*
|
|
18
|
+
* Routing (queries/filing-observation.ts): the daemon files no human-facing row.
|
|
19
|
+
* The filing lands as a machine-lane observation carrying proposed_disposition
|
|
20
|
+
* needs_operator and the proposed act; the promotion sweep hands it to a routing
|
|
21
|
+
* decider IMMEDIATELY on the delivery_parked basis (queries/agent-resolvable-promotion.ts
|
|
22
|
+
* isDeliveryParkObservation, keyed on this filing's cause key), which is what
|
|
23
|
+
* makes it the one human-facing escalation.
|
|
24
|
+
*
|
|
25
|
+
* Exactly one: the cause key (queries/cause-key.ts shortfallParkCauseKey) is the
|
|
26
|
+
* delivery plus the park's subject (repeated signature + commit set), filed
|
|
27
|
+
* through the idempotent gate. A re-judgement of the same park re-holds and is
|
|
28
|
+
* suppressed by the open (or dismissed) row; a NEW park (new commits, or another
|
|
29
|
+
* shortfall) is a new key -- and while the delivery's earlier row is still open,
|
|
30
|
+
* the incident reducer attaches it there as a symptom rather than filing a second
|
|
31
|
+
* row. The kind is the existing verify_gate_unclearable (admitted by the DB CHECK;
|
|
32
|
+
* a new kind would need a CHECK migration), and its self-report exclusion from the
|
|
33
|
+
* operator-hold predicate (queries/holds.ts) is right for a park: the durable park
|
|
34
|
+
* record, not this row, is what holds the delivery, so a ruling that releases the
|
|
35
|
+
* park is not also blocked on the row being closed.
|
|
36
|
+
*
|
|
37
|
+
* @module verify/shortfall-park-escalation
|
|
38
|
+
*/
|
|
39
|
+
import { ESCALATION_DISPOSITIONS, ESCALATION_REASONS, withRetry } from '@telora/daemon-core';
|
|
40
|
+
import { shortfallParkCauseKey } from '../queries/cause-key.js';
|
|
41
|
+
import { buildShortfallParkLines, SHORTFALL_PARK_HEADING } from '../prompt-sections/shortfall-park-section.js';
|
|
42
|
+
import { createLogger } from '../shell/log.js';
|
|
43
|
+
import { SHORTFALL_PARK_REPEAT_LIMIT } from './shortfall-park.js';
|
|
44
|
+
import { renderMisattributedCommitLines } from './misattributed-commits.js';
|
|
45
|
+
const log = createLogger({ module: 'verification' });
|
|
46
|
+
/**
|
|
47
|
+
* The MCP tool and action an operator rules a shortfall node met or excused with.
|
|
48
|
+
* ONE definition: the operator-rulings delivery aligns its action name to this
|
|
49
|
+
* constant, and the filing's proposed human act names it.
|
|
50
|
+
*/
|
|
51
|
+
export const SHORTFALL_RULING_TOOL = 'telora_product_delivery';
|
|
52
|
+
export const SHORTFALL_RULING_ACTION = 'shortfall_rule';
|
|
53
|
+
/**
|
|
54
|
+
* escalation_kind of the park filing: the existing verify_gate_unclearable (see
|
|
55
|
+
* the module header for why reuse, and why its self-report exclusion is right).
|
|
56
|
+
*/
|
|
57
|
+
export const SHORTFALL_PARK_ESCALATION_KIND = 'verify_gate_unclearable';
|
|
58
|
+
/** metadata.diagnosis of the park filing. */
|
|
59
|
+
export const SHORTFALL_PARK_DIAGNOSIS = 'shortfall_park';
|
|
60
|
+
/** Pure: the park a filing is about -- the standing record, or one read off the repeat when none was passed. */
|
|
61
|
+
export function shortfallParkOf(shortfalls, repeat, park, at) {
|
|
62
|
+
return park ?? {
|
|
63
|
+
signature: repeat.signature,
|
|
64
|
+
commitSet: repeat.commitSet ?? null,
|
|
65
|
+
nodeIds: [...new Set(shortfalls.map((s) => s.nodeId))].sort(),
|
|
66
|
+
count: repeat.count,
|
|
67
|
+
parkedAt: at,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/** Pure: the human act a park proposes -- rule the named nodes, or correct their tree claim. */
|
|
71
|
+
export function shortfallParkHumanAct(deliveryName, nodeIds) {
|
|
72
|
+
return {
|
|
73
|
+
kind: 'unreachable_capability',
|
|
74
|
+
act: `Rule the repeated shortfall node(s) ${nodeIds.join(', ')} on delivery "${deliveryName}" met or excused ` +
|
|
75
|
+
`(${SHORTFALL_RULING_TOOL} action ${SHORTFALL_RULING_ACTION}, with a rationale), or correct the tree claim ` +
|
|
76
|
+
`for those nodes.`,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/** Pure: the park filing's body -- every repeated node, the count and limit, the commit-set fact, what releases it. */
|
|
80
|
+
export function buildShortfallParkEscalation(deliveryName, shortfalls, park, limit = SHORTFALL_PARK_REPEAT_LIMIT, misattributed) {
|
|
81
|
+
// Unattributed commits touching the delivery's files make an unchanged commit set
|
|
82
|
+
// doubtful evidence: the work may exist and merely be uncredited. Say so first.
|
|
83
|
+
const misattributedLines = renderMisattributedCommitLines(misattributed);
|
|
84
|
+
const misattributedBlock = misattributedLines.length > 0
|
|
85
|
+
? `BEFORE ruling or correcting the tree, check attribution: ${misattributedLines.join('\n')}\n\n`
|
|
86
|
+
: '';
|
|
87
|
+
const nodeLines = shortfalls.map((s) => `- tree node ${s.nodeId}\n` +
|
|
88
|
+
` declared (the outcome the injection claims): ${s.declaredStatement}\n` +
|
|
89
|
+
` achieved (what the diff actually produced): ${s.achievedStatement}\n` +
|
|
90
|
+
` reason: ${s.reason}`);
|
|
91
|
+
const commitFact = park.commitSet !== null
|
|
92
|
+
? `No new delivery-trailered commits since the last judgement: every one of those judgements saw the same ` +
|
|
93
|
+
`delivery commit set (fingerprint ${park.commitSet}).`
|
|
94
|
+
: `The delivery's commit set could not be read, so the park counted identical judgements alone.`;
|
|
95
|
+
return {
|
|
96
|
+
description: `Delivery "${deliveryName}" is PARKED on a repeating verify shortfall naming node(s) ${park.nodeIds.join(', ')}.\n\n` +
|
|
97
|
+
`The identical shortfall has held on ${park.count} consecutive verify judgements (the park limit is ${limit}). ` +
|
|
98
|
+
`${commitFact} Re-coding the same diff cannot change the verdict, so the daemon has stopped sending the ` +
|
|
99
|
+
`delivery back to coding and holds it in verify (parked at ${park.parkedAt}).\n\n` +
|
|
100
|
+
`Repeated shortfall node(s):\n${nodeLines.join('\n')}\n\n` +
|
|
101
|
+
misattributedBlock +
|
|
102
|
+
`What releases the park:\n` +
|
|
103
|
+
`- genuinely new delivery commits (Telora-Delivery trailer) that change the judged commit set -- the next ` +
|
|
104
|
+
`verify judges them fresh; or\n` +
|
|
105
|
+
`- a ruling on the named node(s): ${SHORTFALL_RULING_TOOL} action ${SHORTFALL_RULING_ACTION}, met or excused, ` +
|
|
106
|
+
`with a rationale; or\n` +
|
|
107
|
+
`- a tree correction (telora_reality_tree_*) so the declared claim is one this delivery's diff can produce.`,
|
|
108
|
+
whatWasTried: `The delivery re-entered verify_failed re-work and was judged ${park.count} times; the identical shortfall ` +
|
|
109
|
+
`reproduced on an unchanged commit set each time, so further re-work was stopped.`,
|
|
110
|
+
helpNeeded: `Rule the named node(s) met or excused on the delivery (${SHORTFALL_RULING_ACTION}, with a rationale), or ` +
|
|
111
|
+
`correct the tree claim for them. The delivery stays parked in verify -- NOT re-queued for re-work -- until ` +
|
|
112
|
+
`one of those lands or new delivery commits change the outcome.`,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* File the park's ONE escalation through the cause-keyed idempotent gate (see the
|
|
117
|
+
* module header). Returns whether the filing call completed (filed, suppressed as
|
|
118
|
+
* the same standing park, or correlated onto the delivery's open incident row).
|
|
119
|
+
* Best-effort: a failure is logged, never thrown.
|
|
120
|
+
*/
|
|
121
|
+
export async function fileShortfallParkEscalation(v, shortfalls, park, organizationId, fileEscalation, limit = SHORTFALL_PARK_REPEAT_LIMIT, misattributed) {
|
|
122
|
+
const body = buildShortfallParkEscalation(v.deliveryName, shortfalls, park, limit, misattributed);
|
|
123
|
+
try {
|
|
124
|
+
const result = await withRetry(() => fileEscalation({
|
|
125
|
+
causeKey: shortfallParkCauseKey(v.deliveryId, park.signature, park.commitSet),
|
|
126
|
+
organizationId,
|
|
127
|
+
sessionId: '',
|
|
128
|
+
issueId: null,
|
|
129
|
+
reasonType: ESCALATION_REASONS.ERROR_ENCOUNTERED,
|
|
130
|
+
disposition: ESCALATION_DISPOSITIONS.NEEDS_OPERATOR,
|
|
131
|
+
// Lowering the bar on a declared node is an authority act no agent session
|
|
132
|
+
// holds; the chokepoint carries it as the observation's proposed_human_act.
|
|
133
|
+
humanAct: shortfallParkHumanAct(v.deliveryName, park.nodeIds),
|
|
134
|
+
anchor: {
|
|
135
|
+
deliveryId: v.deliveryId,
|
|
136
|
+
...(v.focusId ? { focusId: v.focusId } : {}),
|
|
137
|
+
...(v.productId ? { productId: v.productId } : {}),
|
|
138
|
+
},
|
|
139
|
+
escalationKind: SHORTFALL_PARK_ESCALATION_KIND,
|
|
140
|
+
description: body.description,
|
|
141
|
+
whatWasTried: body.whatWasTried,
|
|
142
|
+
helpNeeded: body.helpNeeded,
|
|
143
|
+
metadata: {
|
|
144
|
+
cause: SHORTFALL_PARK_ESCALATION_KIND,
|
|
145
|
+
diagnosis: SHORTFALL_PARK_DIAGNOSIS,
|
|
146
|
+
deliveryName: v.deliveryName,
|
|
147
|
+
nodeIds: park.nodeIds,
|
|
148
|
+
repeatCount: park.count,
|
|
149
|
+
repeatLimit: limit,
|
|
150
|
+
commitSet: park.commitSet,
|
|
151
|
+
signature: park.signature,
|
|
152
|
+
parkedAt: park.parkedAt,
|
|
153
|
+
rulingAction: SHORTFALL_RULING_ACTION,
|
|
154
|
+
},
|
|
155
|
+
}), { maxAttempts: 3, label: `escalation-shortfall-park-${v.deliveryId}` });
|
|
156
|
+
if (result.filed) {
|
|
157
|
+
log.info(`[verification] Parked delivery "${v.deliveryName}" on a repeating shortfall (x${park.count}, nodes ` +
|
|
158
|
+
`${park.nodeIds.join(', ')}); filed its one escalation.`);
|
|
159
|
+
}
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
catch (err) {
|
|
163
|
+
log.warn(`failed to file shortfall-park escalation for delivery ${v.deliveryId}:`, err.message);
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/** Pure: the message a live coding team is sent when its delivery is parked. */
|
|
168
|
+
export function buildShortfallParkInjectMessage(deliveryName, park, detail) {
|
|
169
|
+
return [
|
|
170
|
+
`VERIFY PARKED for delivery "${deliveryName}".`,
|
|
171
|
+
'',
|
|
172
|
+
`**${SHORTFALL_PARK_HEADING}:**`,
|
|
173
|
+
...buildShortfallParkLines(park, detail.shortfalls),
|
|
174
|
+
...renderMisattributedCommitLines(detail.misattributed).map((l) => `- ${l}`),
|
|
175
|
+
].join('\n');
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=shortfall-park-escalation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortfall-park-escalation.js","sourceRoot":"","sources":["../../src/verify/shortfall-park-escalation.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0EAA0E;AAC1E,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAK7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAC/G,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAsB,MAAM,qBAAqB,CAAC;AAEtF,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAG5E,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AAC/D,MAAM,CAAC,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;AAExE,6CAA6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,EAAE,6BAA6B,CAAC,CAAC,UAAU,EAAE,EAAE,CACvE,CAAC;QACF,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACjB,GAAG,CAAC,IAAI,CACN,mCAAmC,CAAC,CAAC,YAAY,gCAAgC,IAAI,CAAC,KAAK,UAAU;gBACrG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,8BAA8B,CACzD,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC,UAAU,GAAG,EAAG,GAAa,CAAC,OAAO,CAAC,CAAC;QAC3G,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,+BAA+B,CAC7C,YAAoB,EACpB,IAAmB,EACnB,MAAqC;IAErC,OAAO;QACL,+BAA+B,YAAY,IAAI;QAC/C,EAAE;QACF,KAAK,sBAAsB,KAAK;QAChC,GAAG,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC;QACnD,GAAG,8BAA8B,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;KAC7E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { type DeliveryGateState, type ShortfallPark, type ShortfallRepeatRecord } from '../queries/delivery-gate-state.js';
|
|
2
|
+
import type { TargetShortfall } from './verify-restatement.js';
|
|
3
|
+
export { SHORTFALL_PARK_REPEAT_LIMIT } from './shortfall-repeat.js';
|
|
4
|
+
export type { ShortfallPark } from '../queries/delivery-gate-state.js';
|
|
5
|
+
/**
|
|
6
|
+
* Order-independent fingerprint of a delivery's commit set. The input is the set
|
|
7
|
+
* of commit IDENTITIES the resolver read (verify/delivery-commit-set.ts: patch ids,
|
|
8
|
+
* so a rebase that re-shas unchanged commits is not "new work"); trimmed,
|
|
9
|
+
* lowercased, deduped and sorted before hashing, so the same set in any order or
|
|
10
|
+
* with repeats fingerprints identically. The empty set has a fingerprint too: a
|
|
11
|
+
* delivery with no commits of its own is a known, unchanging set. Pure.
|
|
12
|
+
*/
|
|
13
|
+
export declare function commitSetFingerprint(ids: readonly string[]): string;
|
|
14
|
+
/** The standing park a gate_state carries, or null (none, malformed, or a verify pass dropped it). Pure. */
|
|
15
|
+
export declare function readShortfallPark(gateState: unknown): ShortfallPark | null;
|
|
16
|
+
/**
|
|
17
|
+
* The park that makes a delivery NON-REWORKABLE: a standing park on a delivery
|
|
18
|
+
* that sits in verify, or null. The ONE predicate every daemon writer and spawn
|
|
19
|
+
* gate reads before sending a verify delivery back to coding (the review exit's
|
|
20
|
+
* verify_failed route, the live open-issues pass, the review-next-step decision,
|
|
21
|
+
* the review park), so none of them can disagree about a parked delivery.
|
|
22
|
+
*
|
|
23
|
+
* The park is AUTHORITATIVE in those readers: they neither release nor replace
|
|
24
|
+
* it. VERIFY is its single releaser -- a verify re-judgement on a changed
|
|
25
|
+
* delivery commit set (a new focus HEAD re-arms every delivery in verify) routes
|
|
26
|
+
* the delivery to re-work and drops the park (routeShortfallOutcome ->
|
|
27
|
+
* withShortfallPark(..., null)); a pass drops it (clearVerificationHistory); an
|
|
28
|
+
* operator ruling releases it through isShortfallParkReleased, which re-arms that
|
|
29
|
+
* re-judgement at an unchanged focus HEAD (verify/shortfall-rulings.ts). A reader that cannot know the current commit set therefore holds.
|
|
30
|
+
*
|
|
31
|
+
* Only a delivery IN VERIFY is refused: a park carried onto another status (the
|
|
32
|
+
* Nexus hand-back of a declined request moves a verify delivery to re-plan on a
|
|
33
|
+
* new external fact, once) is not a verify re-judgement loop, and the park still
|
|
34
|
+
* re-holds at its first unchanged re-judgement. Literal 'verify' (mock-safe). Pure.
|
|
35
|
+
*/
|
|
36
|
+
export declare function shortfallParkRefusingRework(delivery: {
|
|
37
|
+
executionStatus?: string | null;
|
|
38
|
+
gateState?: unknown;
|
|
39
|
+
}): ShortfallPark | null;
|
|
40
|
+
/** What a reader knows NOW about the facts that release a park. */
|
|
41
|
+
export interface ShortfallParkReleaseFacts {
|
|
42
|
+
/** The delivery's current commit-set fingerprint; null when it could not be read. */
|
|
43
|
+
commitSet: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* The fingerprint of the operator rulings recorded on the delivery now
|
|
46
|
+
* (queries/shortfall-rulings.ts). Absent or null means the reader has no ruling facts.
|
|
47
|
+
*/
|
|
48
|
+
rulingsFingerprint?: string | null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Whether a standing park is RELEASED -- the delivery may be judged and sent to
|
|
52
|
+
* coding again. Released when:
|
|
53
|
+
* - a KNOWN current commit set differs from the park's known set (someone
|
|
54
|
+
* committed new delivery work since the park); or
|
|
55
|
+
* - a non-empty current rulings fingerprint differs from the park's (a ruling
|
|
56
|
+
* was recorded since the park; verify/shortfall-rulings.ts re-arms verify on
|
|
57
|
+
* it at an unchanged focus HEAD).
|
|
58
|
+
* An unreadable current set, or a park recorded without one, releases nothing by
|
|
59
|
+
* commit set: a read failure must not respawn a parked loop. Pure.
|
|
60
|
+
*/
|
|
61
|
+
export declare function isShortfallParkReleased(park: ShortfallPark, current: ShortfallParkReleaseFacts): boolean;
|
|
62
|
+
/** The outcome of classifying one shortfall judgement. */
|
|
63
|
+
export interface ShortfallParkClassification {
|
|
64
|
+
/** The repeat record to persist (live on the written gate), carrying the commit set when known. */
|
|
65
|
+
repeat: ShortfallRepeatRecord;
|
|
66
|
+
/** True when the delivery is (or stays) parked: do NOT send it back to coding. */
|
|
67
|
+
parked: boolean;
|
|
68
|
+
/** The park record to carry when parked (the original parkedAt kept on a re-hold); null otherwise. */
|
|
69
|
+
park: ShortfallPark | null;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Classify this judgement's shortfall set against the delivery's prior gate_state
|
|
73
|
+
* and the commit set it was judged on (see the module header for the count rule).
|
|
74
|
+
*
|
|
75
|
+
* A standing, unreleased park for the SAME signature keeps the delivery parked
|
|
76
|
+
* even when the live repeat record was displaced by another writer: the count
|
|
77
|
+
* continues from the larger of the two, and the park keeps its original parkedAt.
|
|
78
|
+
* The count keeps climbing on every re-hold (it reports how many identical
|
|
79
|
+
* judgements the park has absorbed; it is never used as a cap). When the current
|
|
80
|
+
* set is unknown, the last KNOWN set is carried forward, so the next readable
|
|
81
|
+
* judgement still compares against real history.
|
|
82
|
+
*
|
|
83
|
+
* OPERATOR RULINGS (verify/shortfall-rulings.ts) are applied before this runs: a
|
|
84
|
+
* ruled node is no longer in `shortfalls`. `rulingsFingerprint` is the fingerprint
|
|
85
|
+
* of the rulings that judgement applied (null when they could not be read). Two
|
|
86
|
+
* rules follow:
|
|
87
|
+
* - the park records it (null keeps the standing park's), so a park re-held by
|
|
88
|
+
* the judgement a ruling re-armed is no longer released by that ruling -- the
|
|
89
|
+
* re-judgement happens once per new ruling, not on every tick;
|
|
90
|
+
* - a NEW ruling that disposed of SOME of the parked nodes on an unchanged
|
|
91
|
+
* commit set narrows the park to the rest instead of ending it: those nodes
|
|
92
|
+
* already repeated unchanged, so sending them back to coding would restart the
|
|
93
|
+
* loop the park stopped. The narrowed park keeps its parkedAt; its changed
|
|
94
|
+
* signature files its own escalation naming the nodes still held.
|
|
95
|
+
* A ruling that disposes of every node leaves no shortfall to classify: the
|
|
96
|
+
* verify passes and the pass reset drops the park.
|
|
97
|
+
*
|
|
98
|
+
* Pure -- the caller supplies the prior gate_state (read once), the current commit
|
|
99
|
+
* fingerprint (or null), `now` for a first park's parkedAt, and the applied
|
|
100
|
+
* rulings fingerprint (or null).
|
|
101
|
+
*/
|
|
102
|
+
export declare function classifyShortfallPark(priorGateState: DeliveryGateState | null | undefined, shortfalls: readonly TargetShortfall[], commitSet: string | null, limit?: number, now?: string, rulingsFingerprint?: string | null): ShortfallParkClassification;
|
|
103
|
+
/**
|
|
104
|
+
* `gateState` with its shortfall park REPLACED: set to `park`, or removed when
|
|
105
|
+
* null (a shortfall routed back to re-work is not parked). The rest of the
|
|
106
|
+
* history is untouched; an emptied history key is dropped. Pure.
|
|
107
|
+
*/
|
|
108
|
+
export declare function withShortfallPark(gateState: DeliveryGateState, park: ShortfallPark | null): DeliveryGateState;
|
|
109
|
+
//# sourceMappingURL=shortfall-park.d.ts.map
|