@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 @@
|
|
|
1
|
+
{"version":3,"file":"shortfall-park.d.ts","sourceRoot":"","sources":["../../src/verify/shortfall-park.ts"],"names":[],"mappings":"AAuDA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAE3B,MAAM,mCAAmC,CAAC;AAO3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAK/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,YAAY,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAEvE;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAInE;AAED,4GAA4G;AAC5G,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,OAAO,GAAG,aAAa,GAAG,IAAI,CAE1E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE;IAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,aAAa,GAAG,IAAI,CAEpI;AAED,mEAAmE;AACnE,MAAM,WAAW,yBAAyB;IACxC,qFAAqF;IACrF,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAIxG;AAED,0DAA0D;AAC1D,MAAM,WAAW,2BAA2B;IAC1C,mGAAmG;IACnG,MAAM,EAAE,qBAAqB,CAAC;IAC9B,kFAAkF;IAClF,MAAM,EAAE,OAAO,CAAC;IAChB,sGAAsG;IACtG,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;CAC5B;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,EACpD,UAAU,EAAE,SAAS,eAAe,EAAE,EACtC,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,KAAK,GAAE,MAAoC,EAC3C,GAAG,GAAE,MAAiC,EACtC,kBAAkB,GAAE,MAAM,GAAG,IAAW,GACvC,2BAA2B,CAiC7B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI,GAAG,iBAAiB,CAO7G"}
|
|
@@ -0,0 +1,208 @@
|
|
|
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-approved-head-gate.test.ts,
|
|
3
|
+
// packages/daemon/src/completion/review-exit-shortfall-park.test.ts,
|
|
4
|
+
// packages/daemon/src/completion/standing-approval-convergence.test.ts,
|
|
5
|
+
// packages/daemon/src/focus/parked-shortfall-spawn.test.ts,
|
|
6
|
+
// packages/daemon/src/focus/verify-routing-passes.test.ts,
|
|
7
|
+
// packages/daemon/src/integration/shortfall-park-incident-regression.test.ts,
|
|
8
|
+
// packages/daemon/src/integration/shortfall-ruling-disposes-proposals-regression.test.ts,
|
|
9
|
+
// packages/daemon/src/integration/shortfall-ruling-release.test.ts,
|
|
10
|
+
// packages/daemon/src/prompt/prompt-listing.test.ts,
|
|
11
|
+
// packages/daemon/src/spawn/review-hold-park-shortfall.test.ts,
|
|
12
|
+
// packages/daemon/src/verify/delivery-commit-set.test.ts,
|
|
13
|
+
// packages/daemon/src/verify/shortfall-park-escalation.test.ts,
|
|
14
|
+
// packages/daemon/src/verify/shortfall-park.test.ts, packages/daemon/src/verify/shortfall-routing.test.ts,
|
|
15
|
+
// packages/daemon/src/verify/shortfall-rulings.test.ts
|
|
16
|
+
// PINNED-BY-END
|
|
17
|
+
/**
|
|
18
|
+
* The SHORTFALL PARK: a delivery whose identical verify shortfall re-holds on an
|
|
19
|
+
* UNCHANGED delivery-trailered commit set is parked, not sent back to coding.
|
|
20
|
+
*
|
|
21
|
+
* Why (reality tree injection #13): the repetition discriminator
|
|
22
|
+
* (verify/shortfall-repeat.ts) counted identical shortfalls, but its at-limit
|
|
23
|
+
* outcome was a live gate_state hold nothing else honoured -- the review exit
|
|
24
|
+
* rewrote the gate and routed verify_failed, a coding team respawned with nothing
|
|
25
|
+
* truthful to commit, stamped the work done, and fed the next identical verdict.
|
|
26
|
+
* One delivery reached iterationCount 23 and stopped only when an operator
|
|
27
|
+
* disarmed the focus. Re-judging the SAME commits cannot change the verdict, so
|
|
28
|
+
* once the identical judgement has stood SHORTFALL_PARK_REPEAT_LIMIT times on an
|
|
29
|
+
* unchanged commit set the delivery is parked: a DURABLE record in the
|
|
30
|
+
* verification history (queries/shortfall-park-record.ts) that every carrying
|
|
31
|
+
* gate_state writer keeps and only a verify pass drops. Readers that must refuse
|
|
32
|
+
* to send a parked delivery to coding read it through readShortfallPark and
|
|
33
|
+
* isShortfallParkReleased.
|
|
34
|
+
*
|
|
35
|
+
* The count is keyed on (signature, commit set):
|
|
36
|
+
* - identical signature AND unchanged commit set -> the count climbs;
|
|
37
|
+
* - a CHANGED commit set -> the team produced new work; it restarts at 1 and is
|
|
38
|
+
* judged fresh (a producing team is never cut short);
|
|
39
|
+
* - a changed signature (a different node or declared claim; a reworded,
|
|
40
|
+
* model-authored reason is NOT a change -- see shortfallSignature) ->
|
|
41
|
+
* restarts at 1 (a genuine, moving shortfall);
|
|
42
|
+
* - an UNKNOWN commit set (the read failed, or a legacy record carries none) ->
|
|
43
|
+
* exactly the signature-only count that predates the park. A read failure
|
|
44
|
+
* therefore never resets a real loop, and never manufactures a park either:
|
|
45
|
+
* a park still needs the limit's worth of identical judgements.
|
|
46
|
+
*
|
|
47
|
+
* SELF-CONTAINED and mock-safe like shortfall-repeat.ts: node:crypto plus the
|
|
48
|
+
* gate-state vocabulary, NO daemon-core value import. Pure and deterministic.
|
|
49
|
+
*
|
|
50
|
+
* @module verify/shortfall-park
|
|
51
|
+
*/
|
|
52
|
+
import { createHash } from 'node:crypto';
|
|
53
|
+
import { readVerificationHistory, } from '../queries/delivery-gate-state.js';
|
|
54
|
+
import { readPriorRepeat, sameShortfallSignature, shortfallSignature, SHORTFALL_PARK_REPEAT_LIMIT, } from './shortfall-repeat.js';
|
|
55
|
+
/** The delivery status a park refuses re-work in. Daemon-local literal (mock-safe: no daemon-core value import). */
|
|
56
|
+
const VERIFY_STATUS = 'verify';
|
|
57
|
+
export { SHORTFALL_PARK_REPEAT_LIMIT } from './shortfall-repeat.js';
|
|
58
|
+
/**
|
|
59
|
+
* Order-independent fingerprint of a delivery's commit set. The input is the set
|
|
60
|
+
* of commit IDENTITIES the resolver read (verify/delivery-commit-set.ts: patch ids,
|
|
61
|
+
* so a rebase that re-shas unchanged commits is not "new work"); trimmed,
|
|
62
|
+
* lowercased, deduped and sorted before hashing, so the same set in any order or
|
|
63
|
+
* with repeats fingerprints identically. The empty set has a fingerprint too: a
|
|
64
|
+
* delivery with no commits of its own is a known, unchanging set. Pure.
|
|
65
|
+
*/
|
|
66
|
+
export function commitSetFingerprint(ids) {
|
|
67
|
+
const unique = [...new Set(ids.map((id) => id.trim().toLowerCase()).filter((id) => id !== ''))].sort();
|
|
68
|
+
const digest = createHash('sha256').update(unique.join('\n')).digest('hex');
|
|
69
|
+
return `${unique.length}:${digest}`;
|
|
70
|
+
}
|
|
71
|
+
/** The standing park a gate_state carries, or null (none, malformed, or a verify pass dropped it). Pure. */
|
|
72
|
+
export function readShortfallPark(gateState) {
|
|
73
|
+
return readVerificationHistory(gateState).shortfallPark ?? null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The park that makes a delivery NON-REWORKABLE: a standing park on a delivery
|
|
77
|
+
* that sits in verify, or null. The ONE predicate every daemon writer and spawn
|
|
78
|
+
* gate reads before sending a verify delivery back to coding (the review exit's
|
|
79
|
+
* verify_failed route, the live open-issues pass, the review-next-step decision,
|
|
80
|
+
* the review park), so none of them can disagree about a parked delivery.
|
|
81
|
+
*
|
|
82
|
+
* The park is AUTHORITATIVE in those readers: they neither release nor replace
|
|
83
|
+
* it. VERIFY is its single releaser -- a verify re-judgement on a changed
|
|
84
|
+
* delivery commit set (a new focus HEAD re-arms every delivery in verify) routes
|
|
85
|
+
* the delivery to re-work and drops the park (routeShortfallOutcome ->
|
|
86
|
+
* withShortfallPark(..., null)); a pass drops it (clearVerificationHistory); an
|
|
87
|
+
* operator ruling releases it through isShortfallParkReleased, which re-arms that
|
|
88
|
+
* re-judgement at an unchanged focus HEAD (verify/shortfall-rulings.ts). A reader that cannot know the current commit set therefore holds.
|
|
89
|
+
*
|
|
90
|
+
* Only a delivery IN VERIFY is refused: a park carried onto another status (the
|
|
91
|
+
* Nexus hand-back of a declined request moves a verify delivery to re-plan on a
|
|
92
|
+
* new external fact, once) is not a verify re-judgement loop, and the park still
|
|
93
|
+
* re-holds at its first unchanged re-judgement. Literal 'verify' (mock-safe). Pure.
|
|
94
|
+
*/
|
|
95
|
+
export function shortfallParkRefusingRework(delivery) {
|
|
96
|
+
return delivery.executionStatus === VERIFY_STATUS ? readShortfallPark(delivery.gateState) : null;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Whether a standing park is RELEASED -- the delivery may be judged and sent to
|
|
100
|
+
* coding again. Released when:
|
|
101
|
+
* - a KNOWN current commit set differs from the park's known set (someone
|
|
102
|
+
* committed new delivery work since the park); or
|
|
103
|
+
* - a non-empty current rulings fingerprint differs from the park's (a ruling
|
|
104
|
+
* was recorded since the park; verify/shortfall-rulings.ts re-arms verify on
|
|
105
|
+
* it at an unchanged focus HEAD).
|
|
106
|
+
* An unreadable current set, or a park recorded without one, releases nothing by
|
|
107
|
+
* commit set: a read failure must not respawn a parked loop. Pure.
|
|
108
|
+
*/
|
|
109
|
+
export function isShortfallParkReleased(park, current) {
|
|
110
|
+
if (current.commitSet !== null && park.commitSet !== null && current.commitSet !== park.commitSet)
|
|
111
|
+
return true;
|
|
112
|
+
const rulings = current.rulingsFingerprint;
|
|
113
|
+
return typeof rulings === 'string' && rulings !== '' && rulings !== (park.rulingsFingerprint ?? '');
|
|
114
|
+
}
|
|
115
|
+
function sortedNodeIds(shortfalls) {
|
|
116
|
+
return [...new Set(shortfalls.map((s) => s.nodeId))].sort();
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Whether a NEW ruling (a non-empty fingerprint the park has not applied) left a
|
|
120
|
+
* strict, non-empty subset of the park's nodes short (see classifyShortfallPark).
|
|
121
|
+
* Node ids compare case-insensitively (the edge stores ruled ids lowercased). Pure.
|
|
122
|
+
*/
|
|
123
|
+
function narrowedByRuling(standing, shortfalls, rulingsFingerprint) {
|
|
124
|
+
if (rulingsFingerprint === null || !isShortfallParkReleased(standing, { commitSet: null, rulingsFingerprint }))
|
|
125
|
+
return false;
|
|
126
|
+
const parked = new Set(standing.nodeIds.map((id) => id.toLowerCase()));
|
|
127
|
+
const remaining = new Set(shortfalls.map((s) => s.nodeId.toLowerCase()));
|
|
128
|
+
return remaining.size > 0 && remaining.size < parked.size && [...remaining].every((id) => parked.has(id));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Classify this judgement's shortfall set against the delivery's prior gate_state
|
|
132
|
+
* and the commit set it was judged on (see the module header for the count rule).
|
|
133
|
+
*
|
|
134
|
+
* A standing, unreleased park for the SAME signature keeps the delivery parked
|
|
135
|
+
* even when the live repeat record was displaced by another writer: the count
|
|
136
|
+
* continues from the larger of the two, and the park keeps its original parkedAt.
|
|
137
|
+
* The count keeps climbing on every re-hold (it reports how many identical
|
|
138
|
+
* judgements the park has absorbed; it is never used as a cap). When the current
|
|
139
|
+
* set is unknown, the last KNOWN set is carried forward, so the next readable
|
|
140
|
+
* judgement still compares against real history.
|
|
141
|
+
*
|
|
142
|
+
* OPERATOR RULINGS (verify/shortfall-rulings.ts) are applied before this runs: a
|
|
143
|
+
* ruled node is no longer in `shortfalls`. `rulingsFingerprint` is the fingerprint
|
|
144
|
+
* of the rulings that judgement applied (null when they could not be read). Two
|
|
145
|
+
* rules follow:
|
|
146
|
+
* - the park records it (null keeps the standing park's), so a park re-held by
|
|
147
|
+
* the judgement a ruling re-armed is no longer released by that ruling -- the
|
|
148
|
+
* re-judgement happens once per new ruling, not on every tick;
|
|
149
|
+
* - a NEW ruling that disposed of SOME of the parked nodes on an unchanged
|
|
150
|
+
* commit set narrows the park to the rest instead of ending it: those nodes
|
|
151
|
+
* already repeated unchanged, so sending them back to coding would restart the
|
|
152
|
+
* loop the park stopped. The narrowed park keeps its parkedAt; its changed
|
|
153
|
+
* signature files its own escalation naming the nodes still held.
|
|
154
|
+
* A ruling that disposes of every node leaves no shortfall to classify: the
|
|
155
|
+
* verify passes and the pass reset drops the park.
|
|
156
|
+
*
|
|
157
|
+
* Pure -- the caller supplies the prior gate_state (read once), the current commit
|
|
158
|
+
* fingerprint (or null), `now` for a first park's parkedAt, and the applied
|
|
159
|
+
* rulings fingerprint (or null).
|
|
160
|
+
*/
|
|
161
|
+
export function classifyShortfallPark(priorGateState, shortfalls, commitSet, limit = SHORTFALL_PARK_REPEAT_LIMIT, now = new Date().toISOString(), rulingsFingerprint = null) {
|
|
162
|
+
const signature = shortfallSignature(shortfalls);
|
|
163
|
+
const prior = readPriorRepeat(priorGateState);
|
|
164
|
+
const priorSet = prior?.commitSet ?? null;
|
|
165
|
+
// New work is only ever evidenced by two KNOWN, differing sets.
|
|
166
|
+
const setChanged = commitSet !== null && priorSet !== null && commitSet !== priorSet;
|
|
167
|
+
const continues = prior !== null && sameShortfallSignature(prior.signature, signature) && !setChanged;
|
|
168
|
+
let count = continues ? prior.count + 1 : 1;
|
|
169
|
+
let knownSet = commitSet ?? (continues ? priorSet : null);
|
|
170
|
+
const standing = readShortfallPark(priorGateState);
|
|
171
|
+
const sameAsStanding = standing !== null && sameShortfallSignature(standing.signature, signature);
|
|
172
|
+
const holding = standing !== null && !setChanged && !isShortfallParkReleased(standing, { commitSet })
|
|
173
|
+
&& (sameAsStanding || narrowedByRuling(standing, shortfalls, rulingsFingerprint));
|
|
174
|
+
if (holding) {
|
|
175
|
+
count = Math.max(count, standing.count + 1);
|
|
176
|
+
knownSet = knownSet ?? standing.commitSet;
|
|
177
|
+
}
|
|
178
|
+
const repeat = { signature, count, ...(knownSet !== null ? { commitSet: knownSet } : {}) };
|
|
179
|
+
if (count < limit)
|
|
180
|
+
return { repeat, parked: false, park: null };
|
|
181
|
+
const applied = rulingsFingerprint ?? (holding ? standing.rulingsFingerprint : undefined);
|
|
182
|
+
const park = {
|
|
183
|
+
// A re-hold of the same shortfall keeps the standing park's signature text, so
|
|
184
|
+
// a park persisted in a legacy signature form keeps its escalation cause key.
|
|
185
|
+
signature: holding && sameAsStanding ? standing.signature : signature,
|
|
186
|
+
commitSet: knownSet,
|
|
187
|
+
nodeIds: sortedNodeIds(shortfalls),
|
|
188
|
+
count,
|
|
189
|
+
parkedAt: holding ? standing.parkedAt : now,
|
|
190
|
+
...(applied ? { rulingsFingerprint: applied } : {}),
|
|
191
|
+
};
|
|
192
|
+
return { repeat, parked: true, park };
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* `gateState` with its shortfall park REPLACED: set to `park`, or removed when
|
|
196
|
+
* null (a shortfall routed back to re-work is not parked). The rest of the
|
|
197
|
+
* history is untouched; an emptied history key is dropped. Pure.
|
|
198
|
+
*/
|
|
199
|
+
export function withShortfallPark(gateState, park) {
|
|
200
|
+
const history = { ...(gateState.verificationHistory ?? {}) };
|
|
201
|
+
delete history.shortfallPark;
|
|
202
|
+
if (park)
|
|
203
|
+
history.shortfallPark = park;
|
|
204
|
+
const next = { ...gateState };
|
|
205
|
+
delete next.verificationHistory;
|
|
206
|
+
return Object.keys(history).length > 0 ? { ...next, verificationHistory: history } : next;
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=shortfall-park.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortfall-park.js","sourceRoot":"","sources":["../../src/verify/shortfall-park.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+EAA+E;AAC/E,uEAAuE;AACvE,0EAA0E;AAC1E,8DAA8D;AAC9D,6DAA6D;AAC7D,gFAAgF;AAChF,4FAA4F;AAC5F,sEAAsE;AACtE,uDAAuD;AACvD,kEAAkE;AAClE,4DAA4D;AAC5D,kEAAkE;AAClE,6GAA6G;AAC7G,yDAAyD;AACzD,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACL,uBAAuB,GAKxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAG/B,oHAAoH;AACpH,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAGpE;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAsB;IACzD,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CA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C,CAAC,EAAE,GAAG,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5F,CAAC"}
|
|
@@ -33,39 +33,70 @@ export interface ShortfallRepeat {
|
|
|
33
33
|
signature: string;
|
|
34
34
|
/** How many CONSECUTIVE iterations this exact signature has stood. >= 1. */
|
|
35
35
|
count: number;
|
|
36
|
+
/** Fingerprint of the delivery-trailered commit set it was judged on (verify/shortfall-park.ts); absent when unread or legacy. */
|
|
37
|
+
commitSet?: string;
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
|
-
* How many consecutive identical shortfall
|
|
40
|
+
* How many consecutive identical shortfall judgements PARK a delivery -- the
|
|
41
|
+
* stated limit of the shortfall park (verify/shortfall-park.ts), re-exported
|
|
42
|
+
* there. One constant: the park REPLACES the old unclearable-claim hold as the
|
|
43
|
+
* at-limit outcome, so the two can never disagree.
|
|
39
44
|
*
|
|
40
45
|
* JUDGMENT CALL (recorded here rather than defaulted silently): too LOW and a team
|
|
41
46
|
* legitimately re-attempting the same area gets cut off before it can respond; too
|
|
42
|
-
* HIGH and the loop stays expensive. The Tinker Tailor case ran to iteration 10
|
|
43
|
-
*
|
|
44
|
-
*
|
|
47
|
+
* HIGH and the loop stays expensive. The Tinker Tailor case ran to iteration 10,
|
|
48
|
+
* the Telora case to 6, and the 2026-09 incident this park answers ran to
|
|
49
|
+
* iterationCount 23 -- a coding team respawned each time with nothing truthful to
|
|
50
|
+
* commit. 3 identical occurrences -- i.e. the shortfall survived TWO re-work
|
|
45
51
|
* responses unchanged -- is strong evidence the diff cannot move it, while still
|
|
46
|
-
* giving a responding team two full cycles to change something.
|
|
47
|
-
*
|
|
52
|
+
* giving a responding team two full cycles to change something. And the park
|
|
53
|
+
* counts only on an UNCHANGED delivery commit set: a team that commits new work
|
|
54
|
+
* restarts the count, so the limit never cuts short a team that is still
|
|
55
|
+
* producing. Reversible: a single constant, overridable per-call for tests. Kept a
|
|
48
56
|
* daemon-local constant (not a TELORA_* env var) deliberately -- adding an env var
|
|
49
57
|
* would require a daemon-core publish; promote it there only if operators need to
|
|
50
58
|
* tune it live.
|
|
51
59
|
*/
|
|
60
|
+
export declare const SHORTFALL_PARK_REPEAT_LIMIT = 3;
|
|
61
|
+
/** The former name of SHORTFALL_PARK_REPEAT_LIMIT, kept for existing importers. */
|
|
52
62
|
export declare const UNCLEARABLE_SHORTFALL_REPEAT_THRESHOLD = 3;
|
|
53
63
|
/**
|
|
54
64
|
* Compute a stable, order-independent signature of a shortfall set.
|
|
55
65
|
*
|
|
56
|
-
* Keyed on (nodeId, declaredStatement
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
66
|
+
* Keyed on (nodeId, declaredStatement) per targeted node -- the fields that
|
|
67
|
+
* define "the same gap" -- deduped and sorted. Both are STABLE across verify
|
|
68
|
+
* passes: nodeId is the tree node, and declaredStatement is read off that node
|
|
69
|
+
* (its preserved frt_statement, else its UDE statement: verify/verify-restatement.ts),
|
|
70
|
+
* so it changes only when someone edits the tree -- a genuine change of claim.
|
|
71
|
+
* DELIBERATELY EXCLUDES every MODEL-AUTHORED field, which the reconciler writes
|
|
72
|
+
* afresh on each pass:
|
|
73
|
+
* - reason: the divergence explanation. Kept on the shortfall as display detail
|
|
74
|
+
* only. When it was part of the key, an identical gap whose reason was merely
|
|
75
|
+
* reworded on a later pass reset the count to 1, so a park never came (or a
|
|
76
|
+
* standing park was dropped) and the coding loop resumed (injection #13, root
|
|
77
|
+
* cause #15);
|
|
78
|
+
* - achievedStatement: the authored-from-evidence side, reworded the same way;
|
|
60
79
|
* - diffCitation: cites the specific changed hunk, which churns every time the
|
|
61
|
-
* team edits ANYTHING
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* the
|
|
80
|
+
* team edits ANYTHING.
|
|
81
|
+
* So a genuinely different gap (a different node, or a different declared claim)
|
|
82
|
+
* produces a different signature and keeps routing as ordinary re-work; a team
|
|
83
|
+
* stuck against an impossible claim produces the same signature every time,
|
|
84
|
+
* however the model phrases it. A team that produces new work is still judged
|
|
85
|
+
* fresh: the park also keys on the delivery commit set (verify/shortfall-park.ts).
|
|
67
86
|
*/
|
|
68
87
|
export declare function shortfallSignature(shortfalls: readonly TargetShortfall[]): string;
|
|
88
|
+
/**
|
|
89
|
+
* A persisted signature in the CURRENT canonical form, for comparison. A record
|
|
90
|
+
* written before the reason was dropped from the key (a JSON array of
|
|
91
|
+
* {nodeId, declared, reason}) re-keys to the form shortfallSignature produces
|
|
92
|
+
* now, so a repeat count or standing park persisted before this change continues
|
|
93
|
+
* instead of resetting once on deploy (which would release a standing park back
|
|
94
|
+
* to coding). A current-form signature is returned unchanged; anything
|
|
95
|
+
* unparseable is returned as-is and so matches only itself. Pure.
|
|
96
|
+
*/
|
|
97
|
+
export declare function normalizeShortfallSignature(signature: string): string;
|
|
98
|
+
/** Whether two persisted signatures name the same shortfall set (legacy forms normalized). Pure. */
|
|
99
|
+
export declare function sameShortfallSignature(a: string, b: string): boolean;
|
|
69
100
|
/**
|
|
70
101
|
* Read the repeat state the previous shortfall iteration left on a delivery's
|
|
71
102
|
* gate_state. It is either LIVE (`shortfallReconciliation.repeat`, the gate is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortfall-repeat.d.ts","sourceRoot":"","sources":["../../src/verify/shortfall-repeat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shortfall-repeat.d.ts","sourceRoot":"","sources":["../../src/verify/shortfall-repeat.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,yFAAyF;AACzF,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd,kIAAkI;IAClI,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,mFAAmF;AACnF,eAAO,MAAM,sCAAsC,IAA8B,CAAC;AAmBlF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAEjF;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAerE;AAED,oGAAoG;AACpG,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,GAAG,eAAe,GAAG,IAAI,CAE5G;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,EACpD,UAAU,EAAE,SAAS,eAAe,EAAE,EACtC,SAAS,GAAE,MAAoC,GAC9C;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,CAKnD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
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/integration/verification-history-round-trip.test.ts,
|
|
3
|
+
// packages/daemon/src/verify/misattributed-hold.test.ts, packages/daemon/src/verify/shortfall-park.test.ts,
|
|
3
4
|
// packages/daemon/src/verify/shortfall-repeat.test.ts, packages/daemon/src/verify/shortfall-routing.test.ts
|
|
4
5
|
// PINNED-BY-END
|
|
5
6
|
/**
|
|
@@ -31,44 +32,97 @@
|
|
|
31
32
|
*/
|
|
32
33
|
import { readVerificationHistory } from '../queries/delivery-gate-state.js';
|
|
33
34
|
/**
|
|
34
|
-
* How many consecutive identical shortfall
|
|
35
|
+
* How many consecutive identical shortfall judgements PARK a delivery -- the
|
|
36
|
+
* stated limit of the shortfall park (verify/shortfall-park.ts), re-exported
|
|
37
|
+
* there. One constant: the park REPLACES the old unclearable-claim hold as the
|
|
38
|
+
* at-limit outcome, so the two can never disagree.
|
|
35
39
|
*
|
|
36
40
|
* JUDGMENT CALL (recorded here rather than defaulted silently): too LOW and a team
|
|
37
41
|
* legitimately re-attempting the same area gets cut off before it can respond; too
|
|
38
|
-
* HIGH and the loop stays expensive. The Tinker Tailor case ran to iteration 10
|
|
39
|
-
*
|
|
40
|
-
*
|
|
42
|
+
* HIGH and the loop stays expensive. The Tinker Tailor case ran to iteration 10,
|
|
43
|
+
* the Telora case to 6, and the 2026-09 incident this park answers ran to
|
|
44
|
+
* iterationCount 23 -- a coding team respawned each time with nothing truthful to
|
|
45
|
+
* commit. 3 identical occurrences -- i.e. the shortfall survived TWO re-work
|
|
41
46
|
* responses unchanged -- is strong evidence the diff cannot move it, while still
|
|
42
|
-
* giving a responding team two full cycles to change something.
|
|
43
|
-
*
|
|
47
|
+
* giving a responding team two full cycles to change something. And the park
|
|
48
|
+
* counts only on an UNCHANGED delivery commit set: a team that commits new work
|
|
49
|
+
* restarts the count, so the limit never cuts short a team that is still
|
|
50
|
+
* producing. Reversible: a single constant, overridable per-call for tests. Kept a
|
|
44
51
|
* daemon-local constant (not a TELORA_* env var) deliberately -- adding an env var
|
|
45
52
|
* would require a daemon-core publish; promote it there only if operators need to
|
|
46
53
|
* tune it live.
|
|
47
54
|
*/
|
|
48
|
-
export const
|
|
55
|
+
export const SHORTFALL_PARK_REPEAT_LIMIT = 3;
|
|
56
|
+
/** The former name of SHORTFALL_PARK_REPEAT_LIMIT, kept for existing importers. */
|
|
57
|
+
export const UNCLEARABLE_SHORTFALL_REPEAT_THRESHOLD = SHORTFALL_PARK_REPEAT_LIMIT;
|
|
49
58
|
function byId(a, b) {
|
|
50
59
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
51
60
|
}
|
|
61
|
+
function canonicalSignature(identities) {
|
|
62
|
+
const unique = new Map();
|
|
63
|
+
for (const i of identities)
|
|
64
|
+
unique.set(JSON.stringify([i.nodeId, i.declared]), { nodeId: i.nodeId, declared: i.declared });
|
|
65
|
+
const key = [...unique.values()].sort((a, b) => byId(a.nodeId, b.nodeId) || byId(a.declared, b.declared));
|
|
66
|
+
return JSON.stringify(key);
|
|
67
|
+
}
|
|
52
68
|
/**
|
|
53
69
|
* Compute a stable, order-independent signature of a shortfall set.
|
|
54
70
|
*
|
|
55
|
-
* Keyed on (nodeId, declaredStatement
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
71
|
+
* Keyed on (nodeId, declaredStatement) per targeted node -- the fields that
|
|
72
|
+
* define "the same gap" -- deduped and sorted. Both are STABLE across verify
|
|
73
|
+
* passes: nodeId is the tree node, and declaredStatement is read off that node
|
|
74
|
+
* (its preserved frt_statement, else its UDE statement: verify/verify-restatement.ts),
|
|
75
|
+
* so it changes only when someone edits the tree -- a genuine change of claim.
|
|
76
|
+
* DELIBERATELY EXCLUDES every MODEL-AUTHORED field, which the reconciler writes
|
|
77
|
+
* afresh on each pass:
|
|
78
|
+
* - reason: the divergence explanation. Kept on the shortfall as display detail
|
|
79
|
+
* only. When it was part of the key, an identical gap whose reason was merely
|
|
80
|
+
* reworded on a later pass reset the count to 1, so a park never came (or a
|
|
81
|
+
* standing park was dropped) and the coding loop resumed (injection #13, root
|
|
82
|
+
* cause #15);
|
|
83
|
+
* - achievedStatement: the authored-from-evidence side, reworded the same way;
|
|
59
84
|
* - diffCitation: cites the specific changed hunk, which churns every time the
|
|
60
|
-
* team edits ANYTHING
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* the
|
|
85
|
+
* team edits ANYTHING.
|
|
86
|
+
* So a genuinely different gap (a different node, or a different declared claim)
|
|
87
|
+
* produces a different signature and keeps routing as ordinary re-work; a team
|
|
88
|
+
* stuck against an impossible claim produces the same signature every time,
|
|
89
|
+
* however the model phrases it. A team that produces new work is still judged
|
|
90
|
+
* fresh: the park also keys on the delivery commit set (verify/shortfall-park.ts).
|
|
66
91
|
*/
|
|
67
92
|
export function shortfallSignature(shortfalls) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
93
|
+
return canonicalSignature(shortfalls.map((s) => ({ nodeId: s.nodeId, declared: s.declaredStatement })));
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A persisted signature in the CURRENT canonical form, for comparison. A record
|
|
97
|
+
* written before the reason was dropped from the key (a JSON array of
|
|
98
|
+
* {nodeId, declared, reason}) re-keys to the form shortfallSignature produces
|
|
99
|
+
* now, so a repeat count or standing park persisted before this change continues
|
|
100
|
+
* instead of resetting once on deploy (which would release a standing park back
|
|
101
|
+
* to coding). A current-form signature is returned unchanged; anything
|
|
102
|
+
* unparseable is returned as-is and so matches only itself. Pure.
|
|
103
|
+
*/
|
|
104
|
+
export function normalizeShortfallSignature(signature) {
|
|
105
|
+
let parsed;
|
|
106
|
+
try {
|
|
107
|
+
parsed = JSON.parse(signature);
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
return signature;
|
|
111
|
+
}
|
|
112
|
+
if (!Array.isArray(parsed))
|
|
113
|
+
return signature;
|
|
114
|
+
const identities = [];
|
|
115
|
+
for (const entry of parsed) {
|
|
116
|
+
const e = entry;
|
|
117
|
+
if (!e || typeof e.nodeId !== 'string' || typeof e.declared !== 'string')
|
|
118
|
+
return signature;
|
|
119
|
+
identities.push({ nodeId: e.nodeId, declared: e.declared });
|
|
120
|
+
}
|
|
121
|
+
return canonicalSignature(identities);
|
|
122
|
+
}
|
|
123
|
+
/** Whether two persisted signatures name the same shortfall set (legacy forms normalized). Pure. */
|
|
124
|
+
export function sameShortfallSignature(a, b) {
|
|
125
|
+
return a === b || normalizeShortfallSignature(a) === normalizeShortfallSignature(b);
|
|
72
126
|
}
|
|
73
127
|
/**
|
|
74
128
|
* Read the repeat state the previous shortfall iteration left on a delivery's
|
|
@@ -94,10 +148,10 @@ export function readPriorRepeat(priorGateState) {
|
|
|
94
148
|
* returned `repeat` back into the new gate_state so the next iteration compares
|
|
95
149
|
* against it.
|
|
96
150
|
*/
|
|
97
|
-
export function classifyShortfallRepeat(priorGateState, shortfalls, threshold =
|
|
151
|
+
export function classifyShortfallRepeat(priorGateState, shortfalls, threshold = SHORTFALL_PARK_REPEAT_LIMIT) {
|
|
98
152
|
const signature = shortfallSignature(shortfalls);
|
|
99
153
|
const prior = readPriorRepeat(priorGateState);
|
|
100
|
-
const count = prior && prior.signature
|
|
154
|
+
const count = prior && sameShortfallSignature(prior.signature, signature) ? prior.count + 1 : 1;
|
|
101
155
|
return { repeat: { signature, count }, unclearable: count >= threshold };
|
|
102
156
|
}
|
|
103
157
|
//# sourceMappingURL=shortfall-repeat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortfall-repeat.js","sourceRoot":"","sources":["../../src/verify/shortfall-repeat.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,sFAAsF;AACtF,8GAA8G;AAC9G,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,uBAAuB,EAA0B,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"shortfall-repeat.js","sourceRoot":"","sources":["../../src/verify/shortfall-repeat.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,sFAAsF;AACtF,8GAA8G;AAC9G,8GAA8G;AAC9G,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,uBAAuB,EAA0B,MAAM,mCAAmC,CAAC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AAoB,2BAA2B;IAE/C,MAAM,SAAS,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACjD,MAAM,KAAK,GAAG,eAAe,CAAC,cAAc,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,KAAK,IAAI,sBAAsB,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChG,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,IAAI,SAAS,EAAE,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verify honors OPERATOR SHORTFALL RULINGS: a node an operator ruled MET or
|
|
3
|
+
* EXCUSED on a delivery (queries/shortfall-rulings.ts) no longer holds its verify
|
|
4
|
+
* gate, and a ruling recorded since a shortfall park is a change verify re-judges.
|
|
5
|
+
*
|
|
6
|
+
* Why: before rulings were read, an operator's "these nodes are met, re-verify"
|
|
7
|
+
* lived only in an escalation's resolution notes. The next verify pass re-judged
|
|
8
|
+
* the same nodes short and re-held the delivery, and a delivery parked for a
|
|
9
|
+
* repeating shortfall (verify/shortfall-park.ts) stayed parked: nothing but a new
|
|
10
|
+
* commit re-armed its verify.
|
|
11
|
+
*
|
|
12
|
+
* APPLYING rulings (applyShortfallRulings, called by the verification engine
|
|
13
|
+
* between the reconciliation and the shortfall routing):
|
|
14
|
+
* - MET: the node counts as achieved. It leaves the shortfall set and joins the
|
|
15
|
+
* restatements the injection flip carries, as a `match` whose statement is the
|
|
16
|
+
* DECLARED desired effect -- the operator ruled that intent realized, and a
|
|
17
|
+
* match carries the declared effect forward unchanged. The ruling's rationale
|
|
18
|
+
* is stamped into the injection's evidence (withRulingEvidence), the only
|
|
19
|
+
* place a match's reason can land (the edge persists a reason only on a
|
|
20
|
+
* legitimate_divergence, and a divergence would also file inward drift
|
|
21
|
+
* against a claim the operator just upheld).
|
|
22
|
+
* - EXCUSED: the node stops holding, but it was NOT achieved, so the flip must
|
|
23
|
+
* not promote it as reality. It is WITHHELD from the flip (withheldNodeIds):
|
|
24
|
+
* queries/verification.ts sends it to reality_tree_verify_injection as a
|
|
25
|
+
* shortfall-classified entry, which the edge skips entirely -- no node_type
|
|
26
|
+
* flip, no statement, no classification -- so it stays an undesired effect
|
|
27
|
+
* the tree can target again. The declared effect is never softened.
|
|
28
|
+
* - Neither files inward shortfall drift: a ruled node leaves the shortfall set
|
|
29
|
+
* before the engine emits it.
|
|
30
|
+
* - A read FAILURE fails closed: no ruling is applied, the shortfalls stand as
|
|
31
|
+
* judged, and the fingerprint is unknown (null), so a park re-held on it keeps
|
|
32
|
+
* the fingerprint it had.
|
|
33
|
+
* Rulings are read only when the reconciliation found a shortfall: with none,
|
|
34
|
+
* there is nothing to rule and no park to record a fingerprint on.
|
|
35
|
+
*
|
|
36
|
+
* RE-JUDGING a park at an unchanged focus HEAD (withShortfallRulingRearm): a
|
|
37
|
+
* default-on verify is not re-selected while its run mark stands for the focus
|
|
38
|
+
* HEAD (verify/verification-default-on.ts), and a parked delivery stays in
|
|
39
|
+
* verify, so with no new commit verify never re-judged it -- a ruling alone could
|
|
40
|
+
* not release the park. The default-on scan therefore reads its deliveries
|
|
41
|
+
* through a reader that, for each delivery in verify carrying a park, reads its
|
|
42
|
+
* rulings and, when the fingerprint releases the park (isShortfallParkReleased),
|
|
43
|
+
* drops the delivery's run mark, so the same scan selects it again. Once per
|
|
44
|
+
* (delivery, fingerprint) in this process; durably, the re-judgement records the
|
|
45
|
+
* fingerprint it applied on any park it re-holds, so the ruling releases nothing
|
|
46
|
+
* further, even after a restart. The re-judgement runs no gate: the dispatch takes
|
|
47
|
+
* the verdict already recorded for that commit (verify/verification-commit-sharing.ts
|
|
48
|
+
* readReusableVerdict), and only the reconciliation runs again -- a focus commit
|
|
49
|
+
* is still run through the gate at most once. A read failure re-arms nothing.
|
|
50
|
+
* EXPLICIT-method rows need no re-arm: a shortfall records a failed outcome, which
|
|
51
|
+
* the edge nulls, so daemon_get_pending_verifications lists a parked explicit row
|
|
52
|
+
* again every tick and its next dispatch applies the rulings.
|
|
53
|
+
*
|
|
54
|
+
* @module verify/shortfall-rulings
|
|
55
|
+
*/
|
|
56
|
+
import type { getFocusDeliveries } from '../queries/focuses.js';
|
|
57
|
+
import type { DeliveryShortfallRulings, ShortfallRuling } from '../queries/shortfall-rulings.js';
|
|
58
|
+
import type { PendingVerification } from '../queries/verification.js';
|
|
59
|
+
import type { TargetRestatement, TargetShortfall } from './verify-restatement.js';
|
|
60
|
+
/** Read a delivery's active shortfall rulings (queries/shortfall-rulings.ts getDeliveryShortfallRulings). */
|
|
61
|
+
export type ShortfallRulingsReader = (deliveryId: string) => Promise<DeliveryShortfallRulings>;
|
|
62
|
+
/** A ruling that cleared one of this judgement's shortfalls. */
|
|
63
|
+
export type HonoredRuling = Pick<ShortfallRuling, 'nodeId' | 'verdict' | 'rationale'>;
|
|
64
|
+
/** A reconciliation with the delivery's rulings applied. */
|
|
65
|
+
export interface RuledReconciliation {
|
|
66
|
+
restatements: TargetRestatement[];
|
|
67
|
+
/** The shortfalls no ruling cleared: these still hold the gate. */
|
|
68
|
+
shortfalls: TargetShortfall[];
|
|
69
|
+
/** The fingerprint of the rulings read; null when none were read (no shortfall, no reader, or a failed read). */
|
|
70
|
+
rulingsFingerprint: string | null;
|
|
71
|
+
/** EXCUSED nodes: cleared, but withheld from the injection flip (never promoted as achieved). */
|
|
72
|
+
withheldNodeIds: string[];
|
|
73
|
+
/** Every ruling that cleared a shortfall, in shortfall order. */
|
|
74
|
+
honored: HonoredRuling[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Apply the delivery's active rulings to this judgement's reconciliation (see the
|
|
78
|
+
* module header). Never throws: a failed read applies nothing.
|
|
79
|
+
*/
|
|
80
|
+
export declare function applyShortfallRulings(v: Pick<PendingVerification, 'deliveryId' | 'deliveryName'>, reconciled: {
|
|
81
|
+
restatements: readonly TargetRestatement[];
|
|
82
|
+
shortfalls: readonly TargetShortfall[];
|
|
83
|
+
}, read: ShortfallRulingsReader | undefined): Promise<RuledReconciliation>;
|
|
84
|
+
/** The injection evidence with the honored rulings appended (unchanged when none were honored). Pure. */
|
|
85
|
+
export declare function withRulingEvidence(evidence: string, honored: readonly HonoredRuling[]): string;
|
|
86
|
+
/** The delivery fields the re-arm reads. */
|
|
87
|
+
type ParkedCandidate = Pick<Awaited<ReturnType<typeof getFocusDeliveries>>[number], 'id' | 'name' | 'executionStatus' | 'gateState' | 'verificationMethod'>;
|
|
88
|
+
/**
|
|
89
|
+
* For each delivery in verify carrying a shortfall park, drop its default-on run
|
|
90
|
+
* mark when its rulings release the park and it was not already re-armed on that
|
|
91
|
+
* fingerprint (module header). Returns the re-armed delivery ids. Never throws.
|
|
92
|
+
*/
|
|
93
|
+
export declare function rearmRuledShortfallParks(deliveries: readonly ParkedCandidate[], read: ShortfallRulingsReader): Promise<string[]>;
|
|
94
|
+
/**
|
|
95
|
+
* The scan deps with a delivery reader that re-arms ruling-released parks before
|
|
96
|
+
* the default-on scan selects from the deliveries it returns (module header).
|
|
97
|
+
* Unchanged when the deps carry no rulings reader.
|
|
98
|
+
*/
|
|
99
|
+
export declare function withShortfallRulingRearm<D extends {
|
|
100
|
+
getFocusDeliveries: typeof getFocusDeliveries;
|
|
101
|
+
readShortfallRulings?: ShortfallRulingsReader;
|
|
102
|
+
}>(deps: D): D;
|
|
103
|
+
/** Test seam: forget every re-arm this process made. */
|
|
104
|
+
export declare function __resetShortfallRulingRearmForTests(): void;
|
|
105
|
+
export {};
|
|
106
|
+
//# sourceMappingURL=shortfall-rulings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortfall-rulings.d.ts","sourceRoot":"","sources":["../../src/verify/shortfall-rulings.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;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