@telora/daemon 0.24.42 → 0.24.56
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 +11 -3
- package/dist/completion/completion-event/unfinished-work.d.ts +3 -3
- package/dist/completion/review-cycle-budget/review-loop-detection.d.ts.map +1 -1
- package/dist/completion/review-cycle-budget/review-loop-detection.js +2 -1
- package/dist/completion/review-cycle-budget/review-loop-detection.js.map +1 -1
- package/dist/completion/review-exit-holds/review-exit-verdict-gate.d.ts +1 -1
- package/dist/completion/review-exit-holds/review-exit-verdict-gate.d.ts.map +1 -1
- package/dist/completion/review-exit-holds/review-exit-verdict-gate.js +2 -3
- package/dist/completion/review-exit-holds/review-exit-verdict-gate.js.map +1 -1
- package/dist/completion/state-cascade/focus-next-step-read.d.ts +38 -0
- package/dist/completion/state-cascade/focus-next-step-read.d.ts.map +1 -0
- package/dist/completion/state-cascade/focus-next-step-read.js +188 -0
- package/dist/completion/state-cascade/focus-next-step-read.js.map +1 -0
- package/dist/completion/state-cascade/review-request-gate.d.ts.map +1 -1
- package/dist/completion/state-cascade/review-request-gate.js +1 -0
- package/dist/completion/state-cascade/review-request-gate.js.map +1 -1
- package/dist/completion/state-cascade/review-request-next-step.d.ts +56 -0
- package/dist/completion/state-cascade/review-request-next-step.d.ts.map +1 -0
- package/dist/completion/state-cascade/review-request-next-step.js +47 -0
- package/dist/completion/state-cascade/review-request-next-step.js.map +1 -0
- package/dist/completion/state-cascade/review-verify-judgment-gate.d.ts +1 -1
- package/dist/completion/state-cascade/review-verify-judgment-gate.d.ts.map +1 -1
- package/dist/completion/state-cascade/review-verify-judgment-gate.js +1 -0
- package/dist/completion/state-cascade/review-verify-judgment-gate.js.map +1 -1
- package/dist/completion/state-cascade/state-cascade.d.ts +12 -7
- package/dist/completion/state-cascade/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade/state-cascade.js +36 -105
- package/dist/completion/state-cascade/state-cascade.js.map +1 -1
- package/dist/composition/commit-gate-context.d.ts.map +1 -1
- package/dist/composition/commit-gate-context.js +1 -0
- package/dist/composition/commit-gate-context.js.map +1 -1
- package/dist/composition/daemon-contexts.js +1 -1
- package/dist/composition/execution-migrations-context.d.ts.map +1 -1
- package/dist/composition/execution-migrations-context.js +3 -1
- package/dist/composition/execution-migrations-context.js.map +1 -1
- package/dist/composition/execution-process-context.js +1 -1
- package/dist/composition/execution-recovery-context.d.ts +4 -3
- package/dist/composition/execution-recovery-context.d.ts.map +1 -1
- package/dist/composition/execution-recovery-context.js +6 -3
- package/dist/composition/execution-recovery-context.js.map +1 -1
- package/dist/composition/execution-worktree-context.js +1 -1
- package/dist/composition/focus-next-step-context.d.ts +19 -0
- package/dist/composition/focus-next-step-context.d.ts.map +1 -0
- package/dist/composition/focus-next-step-context.js +51 -0
- package/dist/composition/focus-next-step-context.js.map +1 -0
- package/dist/composition/runtime-contexts.d.ts.map +1 -1
- package/dist/composition/runtime-contexts.js +6 -18
- package/dist/composition/runtime-contexts.js.map +1 -1
- package/dist/composition/runtime-poll-context.d.ts +8 -53
- package/dist/composition/runtime-poll-context.d.ts.map +1 -1
- package/dist/composition/runtime-poll-context.js +35 -94
- package/dist/composition/runtime-poll-context.js.map +1 -1
- package/dist/composition/runtime-prd-context.d.ts +8 -0
- package/dist/composition/runtime-prd-context.d.ts.map +1 -1
- package/dist/composition/runtime-prd-context.js +32 -0
- package/dist/composition/runtime-prd-context.js.map +1 -1
- package/dist/composition/runtime-spawn-pass-context.d.ts.map +1 -1
- package/dist/composition/runtime-spawn-pass-context.js +2 -3
- package/dist/composition/runtime-spawn-pass-context.js.map +1 -1
- package/dist/composition/state-cascade-context.d.ts +2 -0
- package/dist/composition/state-cascade-context.d.ts.map +1 -1
- package/dist/composition/state-cascade-context.js +9 -0
- package/dist/composition/state-cascade-context.js.map +1 -1
- package/dist/composition/verification-context.d.ts.map +1 -1
- package/dist/composition/verification-context.js +15 -3
- package/dist/composition/verification-context.js.map +1 -1
- package/dist/config/live-daemon-config.js +1 -1
- package/dist/daemon-state/branch-removal-record.d.ts +30 -0
- package/dist/daemon-state/branch-removal-record.d.ts.map +1 -0
- package/dist/daemon-state/branch-removal-record.js +103 -0
- package/dist/daemon-state/branch-removal-record.js.map +1 -0
- package/dist/delivery/advance-hold.d.ts +8 -19
- package/dist/delivery/advance-hold.d.ts.map +1 -1
- package/dist/delivery/advance-hold.js +11 -36
- package/dist/delivery/advance-hold.js.map +1 -1
- package/dist/delivery/commit-verdict-hold.d.ts +1 -1
- package/dist/delivery/commit-verdict-hold.js +1 -1
- package/dist/delivery/recorded-concerns.d.ts.map +1 -1
- package/dist/delivery/recorded-concerns.js +0 -2
- package/dist/delivery/recorded-concerns.js.map +1 -1
- package/dist/directive/directive-queue.d.ts +4 -16
- package/dist/directive/directive-queue.d.ts.map +1 -1
- package/dist/directive/directive-queue.js +5 -13
- package/dist/directive/directive-queue.js.map +1 -1
- package/dist/directive/phase-sync.d.ts +1 -1
- package/dist/directive/phase-sync.js +1 -1
- package/dist/focus/crash-recovery.d.ts +10 -32
- package/dist/focus/crash-recovery.d.ts.map +1 -1
- package/dist/focus/crash-recovery.js +55 -150
- package/dist/focus/crash-recovery.js.map +1 -1
- package/dist/focus/daemon-contexts-runtime.d.ts +3 -3
- package/dist/focus/daemon-contexts-runtime.d.ts.map +1 -1
- package/dist/focus/daemon-contexts.js +1 -1
- package/dist/focus/directive-executor.d.ts.map +1 -1
- package/dist/focus/directive-executor.js +3 -7
- package/dist/focus/directive-executor.js.map +1 -1
- package/dist/focus/failed-head-rework-start.d.ts +61 -0
- package/dist/focus/failed-head-rework-start.d.ts.map +1 -0
- package/dist/focus/failed-head-rework-start.js +52 -0
- package/dist/focus/failed-head-rework-start.js.map +1 -0
- package/dist/focus/focus-activity-record.d.ts +4 -2
- package/dist/focus/focus-activity-record.d.ts.map +1 -1
- package/dist/focus/focus-activity-record.js +4 -2
- package/dist/focus/focus-activity-record.js.map +1 -1
- package/dist/focus/focus-liveness-pass.d.ts +62 -0
- package/dist/focus/focus-liveness-pass.d.ts.map +1 -0
- package/dist/focus/focus-liveness-pass.js +197 -0
- package/dist/focus/focus-liveness-pass.js.map +1 -0
- package/dist/focus/focus-poller-spawn.js +1 -1
- package/dist/focus/focus-poller-state.js +1 -1
- package/dist/focus/live-branch-preservation.d.ts +123 -0
- package/dist/focus/live-branch-preservation.d.ts.map +1 -0
- package/dist/focus/live-branch-preservation.js +192 -0
- package/dist/focus/live-branch-preservation.js.map +1 -0
- package/dist/focus/migration-claim-pass.d.ts +2 -0
- package/dist/focus/migration-claim-pass.d.ts.map +1 -1
- package/dist/focus/migration-claim-pass.js +57 -22
- package/dist/focus/migration-claim-pass.js.map +1 -1
- package/dist/focus/migration-held-set-publish.d.ts +28 -2
- package/dist/focus/migration-held-set-publish.d.ts.map +1 -1
- package/dist/focus/migration-held-set-publish.js +14 -0
- package/dist/focus/migration-held-set-publish.js.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.d.ts +5 -11
- package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.js +26 -72
- package/dist/focus/pending-spawn-review-next-step.js.map +1 -1
- package/dist/focus/review-refire-gate.d.ts +25 -0
- package/dist/focus/review-refire-gate.d.ts.map +1 -0
- package/dist/focus/review-refire-gate.js +68 -0
- package/dist/focus/review-refire-gate.js.map +1 -0
- package/dist/focus/verify-routing-passes.d.ts +8 -11
- package/dist/focus/verify-routing-passes.d.ts.map +1 -1
- package/dist/focus/verify-routing-passes.js +1 -2
- package/dist/focus/verify-routing-passes.js.map +1 -1
- package/dist/git/types.js +1 -1
- package/dist/prd/arm-refusal-streak.d.ts +102 -0
- package/dist/prd/arm-refusal-streak.d.ts.map +1 -0
- package/dist/prd/arm-refusal-streak.js +136 -0
- package/dist/prd/arm-refusal-streak.js.map +1 -0
- package/dist/prd/arm-refusal.d.ts.map +1 -1
- package/dist/prd/arm-refusal.js +7 -4
- package/dist/prd/arm-refusal.js.map +1 -1
- package/dist/prd/controller-shared.d.ts +47 -12
- package/dist/prd/controller-shared.d.ts.map +1 -1
- package/dist/prd/controller-shared.js +30 -19
- package/dist/prd/controller-shared.js.map +1 -1
- package/dist/prd/controller.d.ts.map +1 -1
- package/dist/prd/controller.js +3 -1
- package/dist/prd/controller.js.map +1 -1
- package/dist/prd/frontier-arming.d.ts +10 -2
- package/dist/prd/frontier-arming.d.ts.map +1 -1
- package/dist/prd/frontier-arming.js +91 -7
- package/dist/prd/frontier-arming.js.map +1 -1
- package/dist/prd/scoping-prompt.d.ts +8 -0
- package/dist/prd/scoping-prompt.d.ts.map +1 -1
- package/dist/prd/scoping-prompt.js +18 -0
- package/dist/prd/scoping-prompt.js.map +1 -1
- package/dist/prompt-sections/qa-failure-section.d.ts.map +1 -1
- package/dist/prompt-sections/qa-failure-section.js +3 -1
- package/dist/prompt-sections/qa-failure-section.js.map +1 -1
- package/dist/queries/api-client/shared.js +1 -1
- package/dist/queries/deliveries/deliveries.js +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-holds.d.ts +4 -3
- package/dist/queries/delivery-gate-state/delivery-gate-holds.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-state.js +1 -1
- package/dist/queries/escalations/escalations.d.ts.map +1 -1
- package/dist/queries/escalations/escalations.js +0 -1
- package/dist/queries/escalations/escalations.js.map +1 -1
- package/dist/queries/escalations/incident-record.d.ts.map +1 -1
- package/dist/queries/escalations/incident-record.js +1 -0
- package/dist/queries/escalations/incident-record.js.map +1 -1
- package/dist/queries/focus-review/review-criterion-verdicts.d.ts.map +1 -1
- package/dist/queries/focus-review/review-criterion-verdicts.js +1 -0
- package/dist/queries/focus-review/review-criterion-verdicts.js.map +1 -1
- package/dist/queries/migrations/live-focus-branches.d.ts +23 -0
- package/dist/queries/migrations/live-focus-branches.d.ts.map +1 -1
- package/dist/queries/migrations/live-focus-branches.js +32 -1
- package/dist/queries/migrations/live-focus-branches.js.map +1 -1
- package/dist/queries/prd/prd.d.ts.map +1 -1
- package/dist/queries/prd/prd.js +1 -16
- package/dist/queries/prd/prd.js.map +1 -1
- package/dist/queries/qa-packets/focus-qa-failure.d.ts +18 -0
- package/dist/queries/qa-packets/focus-qa-failure.d.ts.map +1 -1
- package/dist/queries/qa-packets/focus-qa-failure.js +14 -1
- package/dist/queries/qa-packets/focus-qa-failure.js.map +1 -1
- package/dist/queries/tower/tower-state.d.ts +2 -0
- package/dist/queries/tower/tower-state.d.ts.map +1 -1
- package/dist/queries/tower/tower-state.js +6 -0
- package/dist/queries/tower/tower-state.js.map +1 -1
- package/dist/queries/tower-decisions/tower-decisions.d.ts.map +1 -1
- package/dist/queries/tower-decisions/tower-decisions.js +1 -0
- package/dist/queries/tower-decisions/tower-decisions.js.map +1 -1
- package/dist/queries/verification/verification.d.ts +10 -0
- package/dist/queries/verification/verification.d.ts.map +1 -1
- package/dist/queries/verification/verification.js +1 -1
- package/dist/queries/verification/verification.js.map +1 -1
- package/dist/supervision/escalation-suppression.js +1 -1
- package/dist/supervision/failed-head-rerun.d.ts +7 -0
- package/dist/supervision/failed-head-rerun.d.ts.map +1 -0
- package/dist/supervision/failed-head-rerun.js +41 -0
- package/dist/supervision/failed-head-rerun.js.map +1 -0
- package/dist/supervision/focus-delivery-aggregate-phase.js +1 -1
- package/dist/supervision/focus-delivery-aggregate-phase.js.map +1 -1
- package/dist/supervision/focus-liveness.d.ts +89 -0
- package/dist/supervision/focus-liveness.d.ts.map +1 -0
- package/dist/supervision/focus-liveness.js +94 -0
- package/dist/supervision/focus-liveness.js.map +1 -0
- package/dist/supervision/focus-next-step.d.ts +175 -0
- package/dist/supervision/focus-next-step.d.ts.map +1 -0
- package/dist/supervision/focus-next-step.js +129 -0
- package/dist/supervision/focus-next-step.js.map +1 -0
- package/dist/supervision/prd-frontier-rule.d.ts +52 -0
- package/dist/supervision/prd-frontier-rule.d.ts.map +1 -0
- package/dist/supervision/prd-frontier-rule.js +51 -0
- package/dist/supervision/prd-frontier-rule.js.map +1 -0
- package/dist/supervision/prt-frontier.d.ts +22 -7
- package/dist/supervision/prt-frontier.d.ts.map +1 -1
- package/dist/supervision/prt-frontier.js +17 -7
- package/dist/supervision/prt-frontier.js.map +1 -1
- package/dist/supervision/review-loop-detector.d.ts.map +1 -1
- package/dist/supervision/review-loop-detector.js +2 -1
- package/dist/supervision/review-loop-detector.js.map +1 -1
- package/dist/supervision/spawn-cooldown.js +1 -1
- package/dist/supervision/stop-registry.d.ts +1 -0
- package/dist/supervision/stop-registry.d.ts.map +1 -1
- package/dist/supervision/stop-rows-focus-health.d.ts +14 -0
- package/dist/supervision/stop-rows-focus-health.d.ts.map +1 -1
- package/dist/supervision/stop-rows-focus-health.js +32 -0
- package/dist/supervision/stop-rows-focus-health.js.map +1 -1
- package/dist/supervision/stop-rows-spawn.d.ts +3 -2
- package/dist/supervision/stop-rows-spawn.d.ts.map +1 -1
- package/dist/supervision/stop-rows-spawn.js +9 -6
- package/dist/supervision/stop-rows-spawn.js.map +1 -1
- package/dist/supervision/team-work.js +1 -1
- package/dist/supervision/team-work.js.map +1 -1
- package/dist/testing/fixtures/api-client.js +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/migration-namespace-repo.d.ts.map +1 -1
- package/dist/testing/fixtures/migration-namespace-repo.js +1 -0
- package/dist/testing/fixtures/migration-namespace-repo.js.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.d.ts +24 -0
- package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.js +46 -19
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
- package/dist/testing/fixtures/recording-api-client.js +1 -1
- package/dist/testing/fixtures/verification-deps.d.ts +27 -0
- package/dist/testing/fixtures/verification-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/verification-deps.js +77 -1
- package/dist/testing/fixtures/verification-deps.js.map +1 -1
- package/dist/testing/fixtures/vitest-failure-log.d.ts.map +1 -1
- package/dist/testing/fixtures/vitest-failure-log.js +1 -0
- package/dist/testing/fixtures/vitest-failure-log.js.map +1 -1
- package/dist/tower/focus-landed.d.ts +32 -1
- package/dist/tower/focus-landed.d.ts.map +1 -1
- package/dist/tower/focus-landed.js +67 -12
- package/dist/tower/focus-landed.js.map +1 -1
- package/dist/tower/tower-graph.d.ts +6 -2
- package/dist/tower/tower-graph.d.ts.map +1 -1
- package/dist/tower/tower-graph.js +8 -5
- package/dist/tower/tower-graph.js.map +1 -1
- package/dist/tower/tower-supervisor-history.d.ts.map +1 -1
- package/dist/tower/tower-supervisor-history.js +2 -1
- package/dist/tower/tower-supervisor-history.js.map +1 -1
- package/dist/tower/tower-supervisor-prompt.d.ts.map +1 -1
- package/dist/tower/tower-supervisor-prompt.js +40 -8
- package/dist/tower/tower-supervisor-prompt.js.map +1 -1
- package/dist/tower/tower-supervisor-session.d.ts.map +1 -1
- package/dist/tower/tower-supervisor-session.js +1 -0
- package/dist/tower/tower-supervisor-session.js.map +1 -1
- package/dist/tower/tower-verdicts.d.ts.map +1 -1
- package/dist/tower/tower-verdicts.js +2 -1
- package/dist/tower/tower-verdicts.js.map +1 -1
- package/dist/types/issue-status.d.ts.map +1 -1
- package/dist/types/issue-status.js +6 -1
- package/dist/types/issue-status.js.map +1 -1
- package/dist/verify/attribution/code-failure-evidence.d.ts +77 -0
- package/dist/verify/attribution/code-failure-evidence.d.ts.map +1 -0
- package/dist/verify/attribution/code-failure-evidence.js +92 -0
- package/dist/verify/attribution/code-failure-evidence.js.map +1 -0
- package/dist/verify/attribution/verification-attribution.d.ts +18 -0
- package/dist/verify/attribution/verification-attribution.d.ts.map +1 -1
- package/dist/verify/attribution/verification-attribution.js +49 -2
- package/dist/verify/attribution/verification-attribution.js.map +1 -1
- package/dist/verify/attribution/verification-baseline.d.ts.map +1 -1
- package/dist/verify/attribution/verification-baseline.js +1 -0
- package/dist/verify/attribution/verification-baseline.js.map +1 -1
- package/dist/verify/attribution/verification-diagnostics.d.ts +10 -0
- package/dist/verify/attribution/verification-diagnostics.d.ts.map +1 -1
- package/dist/verify/attribution/verification-diagnostics.js +39 -10
- package/dist/verify/attribution/verification-diagnostics.js.map +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.d.ts +19 -0
- package/dist/verify/deterministic-gate/verification-deterministic.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.js +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.js.map +1 -1
- package/dist/verify/engine/verification-commit-sharing.d.ts.map +1 -1
- package/dist/verify/engine/verification-commit-sharing.js +36 -4
- package/dist/verify/engine/verification-commit-sharing.js.map +1 -1
- package/dist/verify/engine/verification-deps.d.ts +7 -0
- package/dist/verify/engine/verification-deps.d.ts.map +1 -1
- package/dist/verify/engine/verification-engine.d.ts.map +1 -1
- package/dist/verify/engine/verification-engine.js +6 -3
- package/dist/verify/engine/verification-engine.js.map +1 -1
- package/dist/verify/escaped-tests/escaped-test-run.d.ts +5 -1
- package/dist/verify/escaped-tests/escaped-test-run.d.ts.map +1 -1
- package/dist/verify/escaped-tests/escaped-test-run.js +24 -2
- package/dist/verify/escaped-tests/escaped-test-run.js.map +1 -1
- package/dist/verify/failing-test-rerun/failing-test-retry.d.ts +4 -1
- package/dist/verify/failing-test-rerun/failing-test-retry.d.ts.map +1 -1
- package/dist/verify/failing-test-rerun/failing-test-retry.js.map +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js.map +1 -1
- package/dist/verify/gate-verdicts/no-verdict-record.d.ts +27 -3
- package/dist/verify/gate-verdicts/no-verdict-record.d.ts.map +1 -1
- package/dist/verify/gate-verdicts/no-verdict-record.js +36 -6
- package/dist/verify/gate-verdicts/no-verdict-record.js.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.js +5 -4
- package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
- package/dist/verify/run-selection/default-on-guards.d.ts +15 -4
- package/dist/verify/run-selection/default-on-guards.d.ts.map +1 -1
- package/dist/verify/run-selection/default-on-guards.js +14 -4
- package/dist/verify/run-selection/default-on-guards.js.map +1 -1
- package/dist/verify/run-selection/explicit-next-step-gate.d.ts +39 -0
- package/dist/verify/run-selection/explicit-next-step-gate.d.ts.map +1 -0
- package/dist/verify/run-selection/explicit-next-step-gate.js +70 -0
- package/dist/verify/run-selection/explicit-next-step-gate.js.map +1 -0
- package/dist/verify/run-selection/pre-review-gate-dispatch.d.ts +0 -9
- package/dist/verify/run-selection/pre-review-gate-dispatch.d.ts.map +1 -1
- package/dist/verify/run-selection/pre-review-gate-dispatch.js +21 -62
- package/dist/verify/run-selection/pre-review-gate-dispatch.js.map +1 -1
- package/dist/verify/run-selection/reselection-log-line.d.ts +1 -1
- package/dist/verify/run-selection/reselection-log-line.d.ts.map +1 -1
- package/dist/verify/run-selection/reselection-log-line.js +2 -0
- package/dist/verify/run-selection/reselection-log-line.js.map +1 -1
- package/dist/verify/run-selection/verification-default-on.d.ts +32 -4
- package/dist/verify/run-selection/verification-default-on.d.ts.map +1 -1
- package/dist/verify/run-selection/verification-default-on.js +83 -19
- package/dist/verify/run-selection/verification-default-on.js.map +1 -1
- package/dist/verify/shortfalls/shortfall-park.js +1 -1
- package/dist/worktree/focus-worktree-state.js +1 -1
- package/dist/worktree/focus-worktree-state.js.map +1 -1
- package/docs/runbook-tower.md +26 -5
- package/package.json +3 -3
- package/dist/completion/state-cascade/review-next-step.d.ts +0 -107
- package/dist/completion/state-cascade/review-next-step.d.ts.map +0 -1
- package/dist/completion/state-cascade/review-next-step.js +0 -90
- package/dist/completion/state-cascade/review-next-step.js.map +0 -1
- package/dist/focus/failed-head-wedge.d.ts +0 -124
- package/dist/focus/failed-head-wedge.d.ts.map +0 -1
- package/dist/focus/failed-head-wedge.js +0 -120
- package/dist/focus/failed-head-wedge.js.map +0 -1
- package/dist/focus/stranded-review-reroute.d.ts +0 -70
- package/dist/focus/stranded-review-reroute.d.ts.map +0 -1
- package/dist/focus/stranded-review-reroute.js +0 -193
- package/dist/focus/stranded-review-reroute.js.map +0 -1
- package/dist/focus/uncommitted-work-backstop.d.ts +0 -115
- package/dist/focus/uncommitted-work-backstop.d.ts.map +0 -1
- package/dist/focus/uncommitted-work-backstop.js +0 -259
- package/dist/focus/uncommitted-work-backstop.js.map +0 -1
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import type { PipelineConfig } from '../../types/index.js';
|
|
2
|
-
import type { FocusDeliveryAggregatePhase } from '../../supervision/focus-delivery-aggregate-phase.js';
|
|
3
|
-
/** The delivery slice the review-next-step question reads (structural). */
|
|
4
|
-
export interface ReviewNextStepDelivery {
|
|
5
|
-
id: string;
|
|
6
|
-
executionStatus?: string | null;
|
|
7
|
-
/** The delivery's gate_state, read for a shortfall park; absent reads as not parked. */
|
|
8
|
-
gateState?: unknown;
|
|
9
|
-
}
|
|
10
|
-
/** The issue slice the review-next-step question reads (structural). */
|
|
11
|
-
export interface ReviewNextStepIssue {
|
|
12
|
-
/** Keys the recorded-concern exclusion; an issue without one is always open work. */
|
|
13
|
-
id?: string;
|
|
14
|
-
deliveryId: string;
|
|
15
|
-
status: string;
|
|
16
|
-
issueType: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The complete review-next-step decision.
|
|
20
|
-
* - not_converged -- the focus is not in phase 'verifying' (nothing active,
|
|
21
|
-
* at least one verify): no review window opens here.
|
|
22
|
-
* - parked -- converged, and a verify delivery is parked on a
|
|
23
|
-
* repeating verify shortfall (verify/shortfalls/shortfall-park.ts)
|
|
24
|
-
* while no UNPARKED one owes open work: neither a coding pass
|
|
25
|
-
* nor a review is next -- verify re-judging a changed commit
|
|
26
|
-
* set (or a ruling) is. No window opens and no coding
|
|
27
|
-
* directive spawns. This holds when only SOME are parked,
|
|
28
|
-
* too: a review opened for the unparked siblings would
|
|
29
|
-
* approve the very head the parked delivery FAILED (or, once
|
|
30
|
-
* a sibling moved the head, has no judgment for at all), and
|
|
31
|
-
* one head would carry a review approval and a verify failure
|
|
32
|
-
* for the same delivery. The park's own escalation
|
|
33
|
-
* (verify/shortfalls/shortfall-park-escalation.ts, handed to a
|
|
34
|
-
* routing decider at once) names the ruling that releases it;
|
|
35
|
-
* the siblings' review waits for that release. When EVERY
|
|
36
|
-
* verify delivery is parked the answer is 'parked' before
|
|
37
|
-
* enablement or issues are read.
|
|
38
|
-
* - review_disabled -- converged, but pipeline_config.review.enabled === false:
|
|
39
|
-
* the verify deliveries reach done with no verdict (a parked
|
|
40
|
-
* one stays held in verify by its park).
|
|
41
|
-
* - open_work -- converged and review-enabled, but an UNPARKED verify
|
|
42
|
-
* delivery carries an open Task/Bug (To Do / In Progress /
|
|
43
|
-
* Blocked): a coding pass, not a review, is next. Open
|
|
44
|
-
* work on a parked delivery is not coding work: nothing
|
|
45
|
-
* may route it back to coding until verify releases it.
|
|
46
|
-
* A RECORDED CONCERN (delivery/recorded-concerns.ts) is
|
|
47
|
-
* not open work: it is not owed, so a verify delivery
|
|
48
|
-
* whose only open work is concerns is ready for review.
|
|
49
|
-
* - issues_unreadable -- converged and review-enabled, but the issue read
|
|
50
|
-
* failed: the decision is unknown; each site fails open
|
|
51
|
-
* to its own pre-decision behaviour.
|
|
52
|
-
* - concerns_unreadable -- open issues on the verify deliveries, but their
|
|
53
|
-
* review-finding classes could not be read: neither
|
|
54
|
-
* coding nor review is next until they are -- no window
|
|
55
|
-
* opens and no coding pass spawns on a concern.
|
|
56
|
-
* - review -- converged, review-enabled, no open work: a review pass
|
|
57
|
-
* is the next actionable step.
|
|
58
|
-
* The issue list is read ONLY past the convergence + enablement checks, so an
|
|
59
|
-
* unconverged or review-disabled focus costs no issue fetch.
|
|
60
|
-
*/
|
|
61
|
-
export type ReviewNextStep<D extends ReviewNextStepDelivery> = {
|
|
62
|
-
step: 'not_converged';
|
|
63
|
-
} | {
|
|
64
|
-
step: 'parked';
|
|
65
|
-
verifyDeliveries: D[];
|
|
66
|
-
parkedDeliveries: D[];
|
|
67
|
-
} | {
|
|
68
|
-
step: 'review_disabled';
|
|
69
|
-
verifyDeliveries: D[];
|
|
70
|
-
} | {
|
|
71
|
-
step: 'open_work';
|
|
72
|
-
verifyDeliveries: D[];
|
|
73
|
-
openIssueCount: number;
|
|
74
|
-
} | {
|
|
75
|
-
step: 'issues_unreadable';
|
|
76
|
-
verifyDeliveries: D[];
|
|
77
|
-
error: Error;
|
|
78
|
-
} | {
|
|
79
|
-
step: 'concerns_unreadable';
|
|
80
|
-
verifyDeliveries: D[];
|
|
81
|
-
error: Error;
|
|
82
|
-
} | {
|
|
83
|
-
step: 'review';
|
|
84
|
-
verifyDeliveries: D[];
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* Resolve the review-next-step decision for a focus.
|
|
88
|
-
*
|
|
89
|
-
* `phase` is the caller's derived focus execution phase. The pending-spawn gate
|
|
90
|
-
* derives it with review_requested_at deliberately null (state, not stamp); the
|
|
91
|
-
* cascade passes the phase it already derived, whose only difference is that an
|
|
92
|
-
* already-stamped window reads 'reviewing' (not_converged: the window is open).
|
|
93
|
-
*/
|
|
94
|
-
export declare function resolveReviewNextStep<D extends ReviewNextStepDelivery>(input: {
|
|
95
|
-
phase: FocusDeliveryAggregatePhase;
|
|
96
|
-
deliveries: readonly D[];
|
|
97
|
-
pipelineConfig: PipelineConfig | null | undefined;
|
|
98
|
-
readIssues: () => Promise<readonly ReviewNextStepIssue[]>;
|
|
99
|
-
/**
|
|
100
|
-
* The focus's recorded concern ids (delivery/recorded-concerns.ts). Read only when
|
|
101
|
-
* open work is found, so a clean focus costs no read; a read that throws answers
|
|
102
|
-
* concerns_unreadable (the decision waits). Both production sites pass it;
|
|
103
|
-
* absent => no concerns (every open issue is work).
|
|
104
|
-
*/
|
|
105
|
-
readConcernIds?: () => Promise<ReadonlySet<string>>;
|
|
106
|
-
}): Promise<ReviewNextStep<D>>;
|
|
107
|
-
//# sourceMappingURL=review-next-step.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"review-next-step.d.ts","sourceRoot":"","sources":["../../../src/completion/state-cascade/review-next-step.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qDAAqD,CAAC;AAMvG,2EAA2E;AAC3E,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,wFAAwF;IACxF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wEAAwE;AACxE,MAAM,WAAW,mBAAmB;IAClC,qFAAqF;IACrF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,sBAAsB,IACvD;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC;IAAC,gBAAgB,EAAE,CAAC,EAAE,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,gBAAgB,EAAE,CAAC,EAAE,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GACpE;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GAClE;IAAE,IAAI,EAAE,qBAAqB,CAAC;IAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GACpE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,gBAAgB,EAAE,CAAC,EAAE,CAAA;CAAE,CAAC;AAa9C;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,SAAS,sBAAsB,EAAE,KAAK,EAAE;IACnF,KAAK,EAAE,2BAA2B,CAAC;IACnC,UAAU,EAAE,SAAS,CAAC,EAAE,CAAC;IACzB,cAAc,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;IAClD,UAAU,EAAE,MAAM,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAAC;IAC1D;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;CACrD,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CA+B7B"}
|
|
@@ -1,90 +0,0 @@
|
|
|
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/state-cascade/review-next-step.test.ts,
|
|
3
|
-
// packages/daemon/src/focus/parked-shortfall-spawn.test.ts
|
|
4
|
-
// PINNED-BY-END
|
|
5
|
-
/**
|
|
6
|
-
* "Is the next actionable step on this focus a review pass?" -- keyed on delivery
|
|
7
|
-
* and issue STATE, never on review_requested_at.
|
|
8
|
-
*
|
|
9
|
-
* Two sites ask the same question and must not drift:
|
|
10
|
-
* - the state cascade (completion/state-cascade/state-cascade.ts checkAutoReview), which OPENS
|
|
11
|
-
* the review window when the focus converges on verify; and
|
|
12
|
-
* - the pending-spawn pass (focus/pending-spawn-review-next-step.ts), which must
|
|
13
|
-
* not spawn a CODING lead into that same state -- a coding lead there has no
|
|
14
|
-
* work, holds the focus's single team slot, and deadlocks the review.
|
|
15
|
-
*
|
|
16
|
-
* Why state and not the stamp: a spawn decision can run BEFORE the cascade stamps
|
|
17
|
-
* review_requested_at, while the delivery aggregate that makes the cascade stamp
|
|
18
|
-
* the window is already true.
|
|
19
|
-
*
|
|
20
|
-
* Both sites consume ONE complete decision, resolveReviewNextStep: convergence on
|
|
21
|
-
* verify, review enablement, AND the open-work issue matrix -- so a verify
|
|
22
|
-
* delivery with a freshly opened Bug reads "coding is next" at both sites. Each
|
|
23
|
-
* site maps the outcome onto its own action (and its own fail-open reading of an
|
|
24
|
-
* unreadable issue list); the decision itself is here.
|
|
25
|
-
*
|
|
26
|
-
* History: docs/daemon/history-team-lifecycle.md (completion/state-cascade/review-next-step.ts).
|
|
27
|
-
*/
|
|
28
|
-
import { DELIVERY_STATUS } from '@telora/daemon-core';
|
|
29
|
-
import { isReviewEnabled } from '../../workflow/pipeline-config.js';
|
|
30
|
-
import { CONTEXT_GROUP_TYPE } from '../../types/issue-status.js';
|
|
31
|
-
import { shortfallParkRefusingRework } from '../../verify/shortfalls/shortfall-park.js';
|
|
32
|
-
import { NO_RECORDED_CONCERNS, splitOpenWork } from '../../delivery/recorded-concerns.js';
|
|
33
|
-
/**
|
|
34
|
-
* The work issues (Task/Bug) sitting on the given deliveries, keyed for the owed-work
|
|
35
|
-
* split (delivery/recorded-concerns.ts splitOpenWork); an issue without an id never
|
|
36
|
-
* matches a recorded concern, so it is owed whenever it is open.
|
|
37
|
-
*/
|
|
38
|
-
function workIssuesOn(verifyIds, issues) {
|
|
39
|
-
return issues
|
|
40
|
-
.filter((i) => verifyIds.has(i.deliveryId) && i.issueType !== CONTEXT_GROUP_TYPE)
|
|
41
|
-
.map((i) => ({ ...i, id: i.id ?? '' }));
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Resolve the review-next-step decision for a focus.
|
|
45
|
-
*
|
|
46
|
-
* `phase` is the caller's derived focus execution phase. The pending-spawn gate
|
|
47
|
-
* derives it with review_requested_at deliberately null (state, not stamp); the
|
|
48
|
-
* cascade passes the phase it already derived, whose only difference is that an
|
|
49
|
-
* already-stamped window reads 'reviewing' (not_converged: the window is open).
|
|
50
|
-
*/
|
|
51
|
-
export async function resolveReviewNextStep(input) {
|
|
52
|
-
if (input.phase !== 'verifying')
|
|
53
|
-
return { step: 'not_converged' };
|
|
54
|
-
const verifyDeliveries = input.deliveries.filter((d) => d.executionStatus === DELIVERY_STATUS.VERIFY);
|
|
55
|
-
if (verifyDeliveries.length === 0)
|
|
56
|
-
return { step: 'not_converged' };
|
|
57
|
-
const parkedDeliveries = verifyDeliveries.filter((d) => shortfallParkRefusingRework(d) !== null);
|
|
58
|
-
const unparked = verifyDeliveries.filter((d) => !parkedDeliveries.includes(d));
|
|
59
|
-
if (unparked.length === 0)
|
|
60
|
-
return { step: 'parked', verifyDeliveries, parkedDeliveries };
|
|
61
|
-
if (!isReviewEnabled(input.pipelineConfig))
|
|
62
|
-
return { step: 'review_disabled', verifyDeliveries };
|
|
63
|
-
let issues;
|
|
64
|
-
try {
|
|
65
|
-
issues = await input.readIssues();
|
|
66
|
-
}
|
|
67
|
-
catch (err) {
|
|
68
|
-
return { step: 'issues_unreadable', verifyDeliveries, error: err instanceof Error ? err : new Error(String(err)) };
|
|
69
|
-
}
|
|
70
|
-
const work = workIssuesOn(new Set(unparked.map((d) => d.id)), issues);
|
|
71
|
-
const anyOpen = splitOpenWork(work, NO_RECORDED_CONCERNS).open.length > 0;
|
|
72
|
-
let concernIds = NO_RECORDED_CONCERNS;
|
|
73
|
-
if (anyOpen && input.readConcernIds) {
|
|
74
|
-
try {
|
|
75
|
-
concernIds = await input.readConcernIds();
|
|
76
|
-
}
|
|
77
|
-
catch (err) {
|
|
78
|
-
// Open issues whose class is unknown: neither coding nor review is next yet (recorded-concerns.ts).
|
|
79
|
-
return { step: 'concerns_unreadable', verifyDeliveries, error: err instanceof Error ? err : new Error(String(err)) };
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const openIssueCount = splitOpenWork(work, concernIds).owed.length;
|
|
83
|
-
if (openIssueCount > 0)
|
|
84
|
-
return { step: 'open_work', verifyDeliveries, openIssueCount };
|
|
85
|
-
// A parked sibling's failure stands at this head: no review may approve it (the 'parked' step above).
|
|
86
|
-
if (parkedDeliveries.length > 0)
|
|
87
|
-
return { step: 'parked', verifyDeliveries, parkedDeliveries };
|
|
88
|
-
return { step: 'review', verifyDeliveries };
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=review-next-step.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"review-next-step.js","sourceRoot":"","sources":["../../../src/completion/state-cascade/review-next-step.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oFAAoF;AACpF,6DAA6D;AAC7D,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAuE1F;;;;GAIG;AACH,SAAS,YAAY,CAAC,SAA8B,EAAE,MAAsC;IAC1F,OAAO,MAAM;SACV,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,kBAAkB,CAAC;SAChF,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAmC,KAY7E;IACC,IAAI,KAAK,CAA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GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1E,IAAI,UAAU,GAAwB,oBAAoB,CAAC;IAC3D,IAAI,OAAO,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;QACpC,IAAI,CAAC;YACH,UAAU,GAAG,MAAM,KAAK,CAAC,cAAc,EAAE,CAAC;QAC5C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,oGAAoG;YACpG,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACvH,CAAC;IACH,CAAC;IACD,MAAM,cAAc,GAAG,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IACnE,IAAI,cAAc,GAAG,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;IACvF,sGAAsG;IACtG,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;IAC/F,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A failed gate at an armed focus's head never sits idle: the backstop that makes
|
|
3
|
-
* it work when every path that should have did not.
|
|
4
|
-
*
|
|
5
|
-
* THE WEDGE. An armed focus (assigned_agent_role_id set, not operator-stopped)
|
|
6
|
-
* whose worktree HEAD carries a FAILED gate verdict, with no review window open
|
|
7
|
-
* (review_requested_at null), no live team, and no rework Bug for that commit on
|
|
8
|
-
* any of its deliveries. Every red verdict at the head owes exactly one such Bug,
|
|
9
|
-
* keyed on the commit -- unrelated open work, even owed work, does not stand in for
|
|
10
|
-
* it, because it names nothing about the red. Nothing else files it in that state:
|
|
11
|
-
* no review re-fires (no window), and no team is live to be told. Every path that
|
|
12
|
-
* routes a failed verdict -- the verification feedback filing, the review exit
|
|
13
|
-
* (review-exit-verdict-gate.ts closeFailedVerdictExit), the declined-head path and
|
|
14
|
-
* the stranded-review reroute -- files its rework Bug before the window closes; this
|
|
15
|
-
* pass is the backstop for any of them dropping it.
|
|
16
|
-
*
|
|
17
|
-
* WHAT IT DOES. It files the rework Bug for the head's failed verdict through the
|
|
18
|
-
* SAME filing those paths use (verify/outcome-routing/verification-rework-issue.ts
|
|
19
|
-
* fileReworkForFailedVerdict: deduped per commit across the focus, attributed to
|
|
20
|
-
* one owner), and logs that the wedge was found and what the filing did. The owner
|
|
21
|
-
* is chosen from every non-cancelled delivery of the focus, whatever status it holds
|
|
22
|
-
* at the instant of reading -- a reconciler walk through verify_failed -> coding ->
|
|
23
|
-
* verify can leave verify empty for a second, and a done or paused owner is re-opened
|
|
24
|
-
* with its Bug. The Bug is owed work, so its delivery is routed on and the next
|
|
25
|
-
* coding pass fixes the failure.
|
|
26
|
-
*
|
|
27
|
-
* A FILED BUG ON A DELIVERY NOTHING ROUTES. The re-open of a done or paused owner is
|
|
28
|
-
* a second write after the Bug's create, and the filing settles on the create: a
|
|
29
|
-
* re-open that failed leaves the head's Bug OPEN on a done or paused delivery, which
|
|
30
|
-
* no pass routes and no spawn reads as work. So a head Bug found open on a done or
|
|
31
|
-
* paused delivery is not "filed" here -- its re-open is still owed, and this pass
|
|
32
|
-
* retries it (the same re-open, verify/outcome-routing/gate-rework-reopen.ts) every
|
|
33
|
-
* FAILED_HEAD_WEDGE_RETRY_MS, naming each attempt, until the delivery leaves done or
|
|
34
|
-
* paused. Nothing is filed again: the Bug exists.
|
|
35
|
-
*
|
|
36
|
-
* WHAT IT NEVER DOES. File on an unarmed or operator-stopped focus (an arm is the
|
|
37
|
-
* go-signal for spending a coding pass), on a read-only focus (no gate runs there),
|
|
38
|
-
* while a review window is open or a team is live (those own the next step), or
|
|
39
|
-
* when the head's commit already carries its rework Bug on the focus (it re-opens
|
|
40
|
-
* that Bug's settled carrier instead, above).
|
|
41
|
-
*
|
|
42
|
-
* Cost: the verdict read is a local file; delivery and issue reads happen only for a
|
|
43
|
-
* focus whose head verdict FAILED. Per (focus, head) the filing is attempted at most
|
|
44
|
-
* once per FAILED_HEAD_WEDGE_RETRY_MS, and never again once it is filed or found
|
|
45
|
-
* already filed (in memory; a restart re-arms it, and the per-commit dedupe holds).
|
|
46
|
-
* Best-effort: every failure is logged and the next poll retries.
|
|
47
|
-
*
|
|
48
|
-
* @module focus/failed-head-wedge
|
|
49
|
-
*/
|
|
50
|
-
import type { CommitVerdict } from '../verify/gate-verdicts/commit-verdict-record.js';
|
|
51
|
-
import { type FailedVerdictReworkResult } from '../verify/outcome-routing/verification-rework-issue.js';
|
|
52
|
-
import { type ReworkDeliveryRow } from '../verify/attribution/rework-attribution.js';
|
|
53
|
-
import type { GateReworkReopen } from '../verify/outcome-routing/gate-rework-reopen.js';
|
|
54
|
-
/** Minimum spacing of filing attempts for one (focus, head) the filing did not settle. */
|
|
55
|
-
export declare const FAILED_HEAD_WEDGE_RETRY_MS = 60000;
|
|
56
|
-
/** The focus slice the pass reads (queries/focuses/focus-discovery.ts ActiveFocusRow). */
|
|
57
|
-
export interface WedgeFocusRow {
|
|
58
|
-
focus_id: string;
|
|
59
|
-
focus_name: string;
|
|
60
|
-
assigned_agent_role_id: string | null;
|
|
61
|
-
operator_stopped_at?: string | null;
|
|
62
|
-
review_requested_at: string | null;
|
|
63
|
-
read_only?: boolean | null;
|
|
64
|
-
}
|
|
65
|
-
/** The pass's collaborators, every one REQUIRED (composition/runtime-poll-context.ts binds them). */
|
|
66
|
-
export interface FailedHeadWedgeDeps {
|
|
67
|
-
getActiveFocuses: (organizationId: string, productId: string) => Promise<readonly WedgeFocusRow[]>;
|
|
68
|
-
/** Whether a team process is live for the focus on this host (daemon-state getActiveTeams). */
|
|
69
|
-
hasLiveTeam: (focusId: string) => boolean;
|
|
70
|
-
/** The focus worktree HEAD, or null when unreadable. */
|
|
71
|
-
resolveJudgedCommit: (focusId: string) => string | null;
|
|
72
|
-
readCommitVerdict: (productId: string, focusId: string, sha: string) => CommitVerdict | null;
|
|
73
|
-
getFocusDeliveries: (focusId: string) => Promise<ReadonlyArray<{
|
|
74
|
-
id: string;
|
|
75
|
-
executionStatus?: string | null;
|
|
76
|
-
}>>;
|
|
77
|
-
getDeliveryIssues: (deliveryId: string) => Promise<ReadonlyArray<{
|
|
78
|
-
id: string;
|
|
79
|
-
title: string;
|
|
80
|
-
status: string;
|
|
81
|
-
issueType: string;
|
|
82
|
-
}>>;
|
|
83
|
-
/** The per-focus rework filing every failed-verdict path uses (fileReworkForFailedVerdict). */
|
|
84
|
-
fileReworkForFailedVerdict: (focusId: string, verdict: CommitVerdict) => Promise<FailedVerdictReworkResult>;
|
|
85
|
-
/** The re-open the filing owes a done or paused Bug carrier (gate-rework-reopen.ts reopenForGateRework). */
|
|
86
|
-
reopenForRework: (delivery: ReworkDeliveryRow) => Promise<GateReworkReopen>;
|
|
87
|
-
now: () => number;
|
|
88
|
-
}
|
|
89
|
-
/** Test seam: forget every attempt. */
|
|
90
|
-
export declare function __resetFailedHeadWedgeForTests(): void;
|
|
91
|
-
/**
|
|
92
|
-
* Why a focus is not in the wedge, or the failed verdict that wedges it -- with
|
|
93
|
-
* `reopenOwed` when its Bug is filed but sits open on a done or paused delivery
|
|
94
|
-
* whose re-open never landed. Never throws.
|
|
95
|
-
*/
|
|
96
|
-
export type WedgeReading = {
|
|
97
|
-
wedged: false;
|
|
98
|
-
why: 'unarmed' | 'read_only' | 'review_window' | 'live_team' | 'no_head' | 'head_not_failed' | 'rework_filed' | 'unreadable';
|
|
99
|
-
} | {
|
|
100
|
-
wedged: true;
|
|
101
|
-
head: string;
|
|
102
|
-
verdict: CommitVerdict;
|
|
103
|
-
reopenOwed?: undefined;
|
|
104
|
-
} | {
|
|
105
|
-
wedged: true;
|
|
106
|
-
head: string;
|
|
107
|
-
verdict: CommitVerdict;
|
|
108
|
-
reopenOwed: ReworkDeliveryRow;
|
|
109
|
-
};
|
|
110
|
-
/** Read whether one focus is in the failed-head wedge (module header). Never throws. */
|
|
111
|
-
export declare function readFailedHeadWedge(focus: WedgeFocusRow, productId: string, deps: FailedHeadWedgeDeps): Promise<WedgeReading>;
|
|
112
|
-
/**
|
|
113
|
-
* The backstop pass over one product's active focuses (module header). Returns the
|
|
114
|
-
* filing result per focus it filed for (a retried re-open files nothing, and is
|
|
115
|
-
* logged). Never throws.
|
|
116
|
-
*/
|
|
117
|
-
export declare function fileReworkForFailedHeadWedges(config: {
|
|
118
|
-
organizationId: string;
|
|
119
|
-
productId: string;
|
|
120
|
-
}, deps: FailedHeadWedgeDeps): Promise<Array<{
|
|
121
|
-
focusId: string;
|
|
122
|
-
result: FailedVerdictReworkResult;
|
|
123
|
-
}>>;
|
|
124
|
-
//# sourceMappingURL=failed-head-wedge.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"failed-head-wedge.d.ts","sourceRoot":"","sources":["../../src/focus/failed-head-wedge.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AACvG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iD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|
-
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by: packages/daemon/src/focus/failed-head-wedge.test.ts,
|
|
3
|
-
// packages/daemon/src/integration/red-head-integration-merge-rework-regression.test.ts
|
|
4
|
-
// PINNED-BY-END
|
|
5
|
-
import { describeFailedVerdictRework, } from '../verify/outcome-routing/verification-rework-issue.js';
|
|
6
|
-
import { reopensForRework } from '../verify/attribution/rework-attribution.js';
|
|
7
|
-
import { filterWorkIssues, REWORK_ISSUE_TITLE_PREFIX } from '../types/issue-status.js';
|
|
8
|
-
import { NO_RECORDED_CONCERNS, splitOpenWork } from '../delivery/recorded-concerns.js';
|
|
9
|
-
import { createLogger } from '../log/daemon-log.js';
|
|
10
|
-
const log = createLogger({ module: 'focus-poller' });
|
|
11
|
-
/** Minimum spacing of filing attempts for one (focus, head) the filing did not settle. */
|
|
12
|
-
export const FAILED_HEAD_WEDGE_RETRY_MS = 60_000;
|
|
13
|
-
/** `${focusId}@${sha}` -> settled (filed / already filed) or the last attempt time. */
|
|
14
|
-
const attempts = new Map();
|
|
15
|
-
/** Test seam: forget every attempt. */
|
|
16
|
-
export function __resetFailedHeadWedgeForTests() {
|
|
17
|
-
attempts.clear();
|
|
18
|
-
}
|
|
19
|
-
/** Read whether one focus is in the failed-head wedge (module header). Never throws. */
|
|
20
|
-
export async function readFailedHeadWedge(focus, productId, deps) {
|
|
21
|
-
if (!focus.assigned_agent_role_id || focus.operator_stopped_at)
|
|
22
|
-
return { wedged: false, why: 'unarmed' };
|
|
23
|
-
if (focus.read_only === true)
|
|
24
|
-
return { wedged: false, why: 'read_only' };
|
|
25
|
-
if (focus.review_requested_at)
|
|
26
|
-
return { wedged: false, why: 'review_window' };
|
|
27
|
-
if (deps.hasLiveTeam(focus.focus_id))
|
|
28
|
-
return { wedged: false, why: 'live_team' };
|
|
29
|
-
try {
|
|
30
|
-
const head = deps.resolveJudgedCommit(focus.focus_id);
|
|
31
|
-
if (!head)
|
|
32
|
-
return { wedged: false, why: 'no_head' };
|
|
33
|
-
const verdict = deps.readCommitVerdict(productId, focus.focus_id, head);
|
|
34
|
-
if (verdict?.outcome !== 'failed')
|
|
35
|
-
return { wedged: false, why: 'head_not_failed' };
|
|
36
|
-
// The head commit's rework Bug, open or closed, anywhere on the focus: filed already --
|
|
37
|
-
// unless it sits open on a done or paused delivery, whose owed re-open never landed.
|
|
38
|
-
const commitPrefix = `${REWORK_ISSUE_TITLE_PREFIX} ${head.slice(0, 12)}:`;
|
|
39
|
-
for (const delivery of await deps.getFocusDeliveries(focus.focus_id)) {
|
|
40
|
-
const bugs = filterWorkIssues([...await deps.getDeliveryIssues(delivery.id)]).filter((i) => i.title.startsWith(commitPrefix));
|
|
41
|
-
if (bugs.length === 0)
|
|
42
|
-
continue;
|
|
43
|
-
// Owed as work is the one definition; a gate rework Bug is never a recorded concern.
|
|
44
|
-
if (reopensForRework(delivery.executionStatus) && splitOpenWork(bugs, NO_RECORDED_CONCERNS).owed.length > 0) {
|
|
45
|
-
return { wedged: true, head, verdict, reopenOwed: { id: delivery.id, executionStatus: delivery.executionStatus ?? null } };
|
|
46
|
-
}
|
|
47
|
-
return { wedged: false, why: 'rework_filed' };
|
|
48
|
-
}
|
|
49
|
-
return { wedged: true, head, verdict };
|
|
50
|
-
}
|
|
51
|
-
catch (err) {
|
|
52
|
-
log.warn(`[focus-poller] failed-head wedge check unreadable for "${focus.focus_name}" (retried next poll): ${err.message}`);
|
|
53
|
-
return { wedged: false, why: 'unreadable' };
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Retry the re-open a filed Bug's done or paused carrier is owed (module header),
|
|
58
|
-
* naming what it did. Never throws: a failure is retried after the spacing.
|
|
59
|
-
*/
|
|
60
|
-
async function retryOwedReopen(focus, head, carrier, deps) {
|
|
61
|
-
const what = `"${focus.focus_name}": the rework Bug for its FAILED head ${head.slice(0, 12)} sits open on `
|
|
62
|
-
+ `${carrier.executionStatus} delivery ${carrier.id}, which was never re-opened (no team routes it)`;
|
|
63
|
-
try {
|
|
64
|
-
const outcome = await deps.reopenForRework(carrier);
|
|
65
|
-
log.warn(`[focus-poller] ${what} -- re-open retried: ${outcome}`);
|
|
66
|
-
}
|
|
67
|
-
catch (err) {
|
|
68
|
-
log.warn(`[focus-poller] ${what} -- re-open failed again (retried in ${FAILED_HEAD_WEDGE_RETRY_MS / 1000}s): ${err.message}`);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* The backstop pass over one product's active focuses (module header). Returns the
|
|
73
|
-
* filing result per focus it filed for (a retried re-open files nothing, and is
|
|
74
|
-
* logged). Never throws.
|
|
75
|
-
*/
|
|
76
|
-
export async function fileReworkForFailedHeadWedges(config, deps) {
|
|
77
|
-
const acted = [];
|
|
78
|
-
let focuses;
|
|
79
|
-
try {
|
|
80
|
-
focuses = await deps.getActiveFocuses(config.organizationId, config.productId);
|
|
81
|
-
}
|
|
82
|
-
catch (err) {
|
|
83
|
-
log.warn(`[focus-poller] failed-head wedge pass: active focuses unreadable (retried next poll): ${err.message}`);
|
|
84
|
-
return acted;
|
|
85
|
-
}
|
|
86
|
-
for (const focus of focuses) {
|
|
87
|
-
const reading = await readFailedHeadWedge(focus, config.productId, deps);
|
|
88
|
-
if (!reading.wedged)
|
|
89
|
-
continue;
|
|
90
|
-
const now = deps.now();
|
|
91
|
-
if (reading.reopenOwed) {
|
|
92
|
-
// Spaced, never settled: the carrier leaving done or paused is what ends it.
|
|
93
|
-
const reopenKey = `${focus.focus_id}@${reading.head}#reopen`;
|
|
94
|
-
const last = attempts.get(reopenKey);
|
|
95
|
-
if (last && now - last.at < FAILED_HEAD_WEDGE_RETRY_MS)
|
|
96
|
-
continue;
|
|
97
|
-
attempts.set(reopenKey, { settled: false, at: now });
|
|
98
|
-
await retryOwedReopen(focus, reading.head, reading.reopenOwed, deps);
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
const key = `${focus.focus_id}@${reading.head}`;
|
|
102
|
-
const prior = attempts.get(key);
|
|
103
|
-
if (prior?.settled || (prior && now - prior.at < FAILED_HEAD_WEDGE_RETRY_MS))
|
|
104
|
-
continue;
|
|
105
|
-
try {
|
|
106
|
-
const result = await deps.fileReworkForFailedVerdict(focus.focus_id, reading.verdict);
|
|
107
|
-
const settled = result.kind === 'offered' && (result.outcome.filed || result.outcome.reason === 'already_filed');
|
|
108
|
-
attempts.set(key, { settled, at: now });
|
|
109
|
-
acted.push({ focusId: focus.focus_id, result });
|
|
110
|
-
log.warn(`[focus-poller] "${focus.focus_name}" was WEDGED: armed, FAILED gate verdict at its head ${reading.head.slice(0, 12)}, ` +
|
|
111
|
-
`no review window, no live team, no rework Bug for it yet -- ${describeFailedVerdictRework(result)}`);
|
|
112
|
-
}
|
|
113
|
-
catch (err) {
|
|
114
|
-
attempts.set(key, { settled: false, at: now });
|
|
115
|
-
log.warn(`[focus-poller] "${focus.focus_name}": failed-head wedge rework filing failed (retried): ${err.message}`);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return acted;
|
|
119
|
-
}
|
|
120
|
-
//# sourceMappingURL=failed-head-wedge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"failed-head-wedge.js","sourceRoot":"","sources":["../../src/focus/failed-head-wedge.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,kEAAkE;AAClE,yFAAyF;AACzF,gBAAgB;AAqDhB,OAAO,EACL,2BAA2B,GAE5B,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAA0B,MAAM,6CAA6C,CAAC;AAEvG,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,GAAG,GAAG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Q,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;YACxC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YAChD,GAAG,CAAC,IAAI,CACN,mBAAmB,KAAK,CAAC,UAAU,wDAAwD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI;gBACxH,+DAA+D,2BAA2B,CAAC,MAAM,CAAC,EAAE,CACrG,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;YAC/C,GAAG,CAAC,IAAI,CAAC,mBAAmB,KAAK,CAAC,UAAU,wDAAyD,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAChI,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { createEscalation } from '../supervision/escalation-filing.js';
|
|
2
|
-
import type { CommitVerdict } from '../verify/gate-verdicts/commit-verdict-record.js';
|
|
3
|
-
import { type FailedVerdictReworkDeps } from '../verify/outcome-routing/verification-rework-issue.js';
|
|
4
|
-
/** Re-fires of one unchanged (window, HEAD, verdict) before the reroute. */
|
|
5
|
-
export declare const STRANDED_REVIEW_REFIRE_BOUND = 3;
|
|
6
|
-
/** escalation_kind of the observation a non-failed reroute files. */
|
|
7
|
-
export declare const STRANDED_REVIEW_REROUTED_KIND = "stranded_review_rerouted";
|
|
8
|
-
/** The focus slice the bound reads. */
|
|
9
|
-
export interface StrandedReviewFocus {
|
|
10
|
-
focus_id: string;
|
|
11
|
-
focus_name: string;
|
|
12
|
-
review_requested_at: string | null;
|
|
13
|
-
}
|
|
14
|
-
/** The bound's own reads and writes (with the rework filing, the root's `strandedReviewReroute` binding). */
|
|
15
|
-
export interface StrandedReviewRerouteOwnDeps {
|
|
16
|
-
resolveJudgedCommit: (focusId: string) => string | null;
|
|
17
|
-
readCommitVerdict: (productId: string, focusId: string, sha: string) => CommitVerdict | null;
|
|
18
|
-
clearPendingSpawnDirective: (focusId: string) => void;
|
|
19
|
-
clearReviewRequestedAt: (focusId: string) => Promise<void>;
|
|
20
|
-
createEscalation: typeof createEscalation;
|
|
21
|
-
hasOpenFocusEscalation: (focusId: string, escalationKind: string) => Promise<boolean>;
|
|
22
|
-
}
|
|
23
|
-
/** Everything the bound acts through: its own collaborators plus the rework filing. */
|
|
24
|
-
export interface StrandedReviewRerouteDeps extends Omit<FailedVerdictReworkDeps, 'getFocusDeliveries'>, StrandedReviewRerouteOwnDeps {
|
|
25
|
-
/** The focus's deliveries with their gate_state: the rework filing's read, and the gate-verdict hold read. */
|
|
26
|
-
getFocusDeliveries: (focusId: string) => Promise<ReadonlyArray<{
|
|
27
|
-
id: string;
|
|
28
|
-
executionStatus?: string | null;
|
|
29
|
-
gateState?: unknown;
|
|
30
|
-
}>>;
|
|
31
|
-
}
|
|
32
|
-
/** Test seam: forget every count. */
|
|
33
|
-
export declare function __resetStrandedReviewRefiresForTests(): void;
|
|
34
|
-
/**
|
|
35
|
-
* The gate-verdict hold read, tri-state: 'held' when some verify delivery carries
|
|
36
|
-
* the commit-verdict hold marker the review exit wrote (delivery/commit-verdict-hold.ts,
|
|
37
|
-
* the same read the review park uses), 'clear' when the deliveries read and none
|
|
38
|
-
* does, 'unreadable' when the read failed.
|
|
39
|
-
*/
|
|
40
|
-
export declare function readStrandedReviewGateHold(focus: StrandedReviewFocus, deps: Pick<StrandedReviewRerouteDeps, 'getFocusDeliveries'>): Promise<'held' | 'clear' | 'unreadable'>;
|
|
41
|
-
/**
|
|
42
|
-
* Whether the stranded-review re-fire must leave this window alone because it may
|
|
43
|
-
* be held open for a gate verdict. Such a window is the release pass's to route,
|
|
44
|
-
* not a strand to re-fire (directive/phase-sync.ts shouldRefireStrandedReview).
|
|
45
|
-
* FAIL-CLOSED: an unreadable hold answers true -- re-firing on a guess queued the
|
|
46
|
-
* review that re-judged the held commit -- so the re-fire waits a poll and re-reads;
|
|
47
|
-
* a readable window with no hold is a genuine strand and answers false.
|
|
48
|
-
*/
|
|
49
|
-
export declare function strandedReviewAwaitsGateVerdict(focus: StrandedReviewFocus, deps: Pick<StrandedReviewRerouteDeps, 'getFocusDeliveries'>): Promise<boolean>;
|
|
50
|
-
/**
|
|
51
|
-
* The stranded-review re-fire decision checkDirectives (focus/directive-executor.ts)
|
|
52
|
-
* takes for a focus whose current stage was already processed: the pure
|
|
53
|
-
* shouldRefireStrandedReview over the live team / operator-stop facts and the
|
|
54
|
-
* fail-closed gate-verdict hold read above. True = re-fire the review directive.
|
|
55
|
-
*/
|
|
56
|
-
export declare function strandedReviewMayRefire(focus: StrandedReviewFocus & {
|
|
57
|
-
operator_stopped_at?: string | null;
|
|
58
|
-
}, stageName: string | undefined, hasActiveTeam: boolean, deps: Pick<StrandedReviewRerouteDeps, 'getFocusDeliveries'>): Promise<boolean>;
|
|
59
|
-
/** What the bound decided for one re-fire. */
|
|
60
|
-
export type StrandedReviewRefireDecision = 'refire' | 'rerouted';
|
|
61
|
-
/**
|
|
62
|
-
* Count a stranded-review re-fire the caller is about to make, or -- once the
|
|
63
|
-
* same key has been re-fired STRANDED_REVIEW_REFIRE_BOUND times -- reroute instead
|
|
64
|
-
* (module header). Never throws.
|
|
65
|
-
*/
|
|
66
|
-
export declare function boundStrandedReviewRefire(focus: StrandedReviewFocus, ctx: {
|
|
67
|
-
productId: string;
|
|
68
|
-
organizationId: string;
|
|
69
|
-
}, deps: StrandedReviewRerouteDeps): Promise<StrandedReviewRefireDecision>;
|
|
70
|
-
//# sourceMappingURL=stranded-review-reroute.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stranded-review-reroute.d.ts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