@telora/daemon 0.24.42 → 0.24.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-info.json +9 -3
- package/dist/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 +40 -1
- package/dist/prd/controller-shared.d.ts.map +1 -1
- package/dist/prd/controller-shared.js +28 -2
- 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-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/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/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/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
|
@@ -37,7 +37,7 @@ export declare function hasCommitVerdictHoldMarker(gateState: unknown): boolean;
|
|
|
37
37
|
* The verify deliveries whose review exit is held awaiting a gate verdict (a
|
|
38
38
|
* well-formed marker above). The ONE read of "this review window waits on a gate
|
|
39
39
|
* verdict": the review park (spawn/review-hold-park.ts) parks a queued review on
|
|
40
|
-
* it, and the stranded-review re-fire (focus/
|
|
40
|
+
* it, and the stranded-review re-fire (focus/review-refire-gate.ts) leaves
|
|
41
41
|
* such a window to the release pass instead of queuing a review.
|
|
42
42
|
*/
|
|
43
43
|
export declare function commitVerdictHeldDeliveryIds(deliveries: ReadonlyArray<{
|
|
@@ -75,7 +75,7 @@ export function hasCommitVerdictHoldMarker(gateState) {
|
|
|
75
75
|
* The verify deliveries whose review exit is held awaiting a gate verdict (a
|
|
76
76
|
* well-formed marker above). The ONE read of "this review window waits on a gate
|
|
77
77
|
* verdict": the review park (spawn/review-hold-park.ts) parks a queued review on
|
|
78
|
-
* it, and the stranded-review re-fire (focus/
|
|
78
|
+
* it, and the stranded-review re-fire (focus/review-refire-gate.ts) leaves
|
|
79
79
|
* such a window to the release pass instead of queuing a review.
|
|
80
80
|
*/
|
|
81
81
|
export function commitVerdictHeldDeliveryIds(deliveries) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorded-concerns.d.ts","sourceRoot":"","sources":["../../src/delivery/recorded-concerns.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recorded-concerns.d.ts","sourceRoot":"","sources":["../../src/delivery/recorded-concerns.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAE/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAOhE;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAEtF,6DAA6D;AAC7D,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAAqB,CAAC;AAE3E;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,KAAK;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM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,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,EACxE,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAC9B,eAAe,EAAE,CAInB"}
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Pinned by: packages/daemon/src/completion/state-cascade/standing-approval-convergence.test.ts,
|
|
3
3
|
// packages/daemon/src/completion/team-outcome/apply.test.ts,
|
|
4
4
|
// packages/daemon/src/delivery/recorded-concerns.test.ts,
|
|
5
|
-
// packages/daemon/src/focus/stranded-review-refire-bound.test.ts,
|
|
6
|
-
// packages/daemon/src/focus/stranded-review-reroute.test.ts,
|
|
7
5
|
// packages/daemon/src/integration/f114-review-concern-never-holds-done-regression.test.ts,
|
|
8
6
|
// packages/daemon/src/integration/failed-verdict-review-exit-respawn-regression.test.ts,
|
|
9
7
|
// packages/daemon/src/integration/failed-verdict-review-loop-regression.test.ts,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorded-concerns.js","sourceRoot":"","sources":["../../src/delivery/recorded-concerns.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,iGAAiG;AACjG,+DAA+D;AAC/D,4DAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"recorded-concerns.js","sourceRoot":"","sources":["../../src/delivery/recorded-concerns.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,iGAAiG;AACjG,+DAA+D;AAC/D,4DAA4D;AAC5D,6FAA6F;AAC7F,2FAA2F;AAC3F,mFAAmF;AACnF,0FAA0F;AAC1F,6EAA6E;AAC7E,yEAAyE;AACzE,iFAAiF;AACjF,gBAAgB;AAuChB,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAErF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO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
|
-
* Set ONLY on the coding respawn the daemon queues to finish a teamless armed
|
|
90
|
-
* focus's uncommitted work (queueDaemonCodingRespawn): no review pass supersedes
|
|
91
|
-
* it (focus/pending-spawn-review-next-step.ts), because a review judges a HEAD
|
|
92
|
-
* the uncommitted work is not in. Absent on every stage directive.
|
|
93
|
-
*/
|
|
94
|
-
purpose?: 'uncommitted_work';
|
|
95
88
|
}
|
|
96
89
|
/**
|
|
97
90
|
* Single shared instance of the pending spawn directive store. The executor
|
|
@@ -189,9 +182,10 @@ export declare function closeReviewWindowWith(clearWindow: (focusId: string) =>
|
|
|
189
182
|
export declare function __setPendingSpawnDirectiveForTesting(focusId: string, directive: PendingSpawnDirective): void;
|
|
190
183
|
/**
|
|
191
184
|
* Queue a CODING respawn the daemon itself asks for, with no stage directive
|
|
192
|
-
* behind it: the
|
|
193
|
-
*
|
|
194
|
-
*
|
|
185
|
+
* behind it: the liveness pass (focus/focus-liveness-pass.ts) starts the coding
|
|
186
|
+
* team an armed focus's next step names when none has started -- its own coding
|
|
187
|
+
* lineage, resumed, so the team that wrote the work keeps its context. Whether
|
|
188
|
+
* it spawns is the pending-spawn gate's call on the same next step. It never
|
|
195
189
|
* replaces a directive already queued -- that one spawns a team too. Returns
|
|
196
190
|
* whether this call queued.
|
|
197
191
|
*/
|
|
@@ -201,12 +195,6 @@ export declare function queueDaemonCodingRespawn(args: {
|
|
|
201
195
|
contentHash: string;
|
|
202
196
|
focusOverrideModel: string | null;
|
|
203
197
|
}): boolean;
|
|
204
|
-
/**
|
|
205
|
-
* Withdraw the daemon's uncommitted-work respawn for a focus, if that is what is
|
|
206
|
-
* queued (the worktree came clean before the team spawned). Any other directive is
|
|
207
|
-
* left alone. Returns whether one was withdrawn.
|
|
208
|
-
*/
|
|
209
|
-
export declare function withdrawDaemonCodingRespawn(focusId: string): boolean;
|
|
210
198
|
/**
|
|
211
199
|
* Check if a focus has a pending spawn directive.
|
|
212
200
|
* Used by the spawn guard to skip actionable-delivery checks.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directive-queue.d.ts","sourceRoot":"","sources":["../../src/directive/directive-queue.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIvE;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;;;;OAMG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACjC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;;;;;;;;OAWG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"directive-queue.d.ts","sourceRoot":"","sources":["../../src/directive/directive-queue.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIvE;;;;GAIG;AACH,MAAM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AC;IAC7C,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAEV;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACrD,cAAc,EAAE,OAAO,CAAC;IACxB,uBAAuB,EAAE,OAAO,CAAC;CAClC,GAAG,OAAO,CAGV;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAKV;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAM/D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
2
|
+
// Pinned by: 51 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/directive/directive-queue.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
/**
|
|
5
5
|
* Directive queue: the pending spawn-directive store + its identity/guard logic.
|
|
@@ -140,9 +140,10 @@ export function __setPendingSpawnDirectiveForTesting(focusId, directive) {
|
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
142
142
|
* Queue a CODING respawn the daemon itself asks for, with no stage directive
|
|
143
|
-
* behind it: the
|
|
144
|
-
*
|
|
145
|
-
*
|
|
143
|
+
* behind it: the liveness pass (focus/focus-liveness-pass.ts) starts the coding
|
|
144
|
+
* team an armed focus's next step names when none has started -- its own coding
|
|
145
|
+
* lineage, resumed, so the team that wrote the work keeps its context. Whether
|
|
146
|
+
* it spawns is the pending-spawn gate's call on the same next step. It never
|
|
146
147
|
* replaces a directive already queued -- that one spawns a team too. Returns
|
|
147
148
|
* whether this call queued.
|
|
148
149
|
*/
|
|
@@ -161,18 +162,9 @@ export function queueDaemonCodingRespawn(args) {
|
|
|
161
162
|
continuity: 'resume',
|
|
162
163
|
contentHash: args.contentHash,
|
|
163
164
|
originStageId: null,
|
|
164
|
-
purpose: 'uncommitted_work',
|
|
165
165
|
});
|
|
166
166
|
return true;
|
|
167
167
|
}
|
|
168
|
-
/**
|
|
169
|
-
* Withdraw the daemon's uncommitted-work respawn for a focus, if that is what is
|
|
170
|
-
* queued (the worktree came clean before the team spawned). Any other directive is
|
|
171
|
-
* left alone. Returns whether one was withdrawn.
|
|
172
|
-
*/
|
|
173
|
-
export function withdrawDaemonCodingRespawn(focusId) {
|
|
174
|
-
return pendingSpawnDirectives.get(focusId)?.purpose === 'uncommitted_work' && pendingSpawnDirectives.delete(focusId);
|
|
175
|
-
}
|
|
176
168
|
/**
|
|
177
169
|
* Check if a focus has a pending spawn directive.
|
|
178
170
|
* Used by the spawn guard to skip actionable-delivery checks.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directive-queue.js","sourceRoot":"","sources":["../../src/directive/directive-queue.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+GAA+G;AAC/G,gBAAgB;AAEhB;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"directive-queue.js","sourceRoot":"","sources":["../../src/directive/directive-queue.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+GAA+G;AAC/G,gBAAgB;AAEhB;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA6FzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAiC,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAAyB;IAC5D,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QAChD,MAAM,EAAE,SAAS,CAAC,MAAM,IA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AAC;IAChD,OAAO,CAAC,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC;IACzC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -104,7 +104,7 @@ export declare function resolveFocusStageName(input: {
|
|
|
104
104
|
* the verdict lands. Re-firing there queued a review that ran on the unchanged
|
|
105
105
|
* commit after the release had already routed the work to coding (67 same-commit
|
|
106
106
|
* re-reviews measured 2026-09-30). The caller reads the hold
|
|
107
|
-
* (focus/
|
|
107
|
+
* (focus/review-refire-gate.ts readReviewWindowGateHold).
|
|
108
108
|
*
|
|
109
109
|
* Pure and exported for unit testing.
|
|
110
110
|
*/
|
|
@@ -165,7 +165,7 @@ const REVIEW_STAGE_NAMES = new Set(['reviewing', 'review']);
|
|
|
165
165
|
* the verdict lands. Re-firing there queued a review that ran on the unchanged
|
|
166
166
|
* commit after the release had already routed the work to coding (67 same-commit
|
|
167
167
|
* re-reviews measured 2026-09-30). The caller reads the hold
|
|
168
|
-
* (focus/
|
|
168
|
+
* (focus/review-refire-gate.ts readReviewWindowGateHold).
|
|
169
169
|
*
|
|
170
170
|
* Pure and exported for unit testing.
|
|
171
171
|
*/
|
|
@@ -3,6 +3,8 @@ import { type OrphanCaptureDeps, type OrphanCaptureDisposition } from './orphan-
|
|
|
3
3
|
import { type SessionScope } from '../queries/sessions/sessions.js';
|
|
4
4
|
import { type RecoveryProbeSource } from '../daemon-state/daemon-instance.js';
|
|
5
5
|
import type { CreateEscalationParams } from '../supervision/escalation-filing.js';
|
|
6
|
+
import { type LiveBranchPreservationDeps, type LiveFocusPopulation } from './live-branch-preservation.js';
|
|
7
|
+
import type { BranchRemoval } from '../daemon-state/branch-removal-record.js';
|
|
6
8
|
export interface OrphanedWorktree {
|
|
7
9
|
/** Absolute path to the worktree directory. */
|
|
8
10
|
worktreePath: string;
|
|
@@ -36,6 +38,8 @@ export interface CleanupAction extends OrphanCaptureDisposition {
|
|
|
36
38
|
worktreeRemoved?: boolean;
|
|
37
39
|
/** True when the branch ref was preserved (kept, not deleted). */
|
|
38
40
|
branchPreserved?: boolean;
|
|
41
|
+
/** True when `git branch -d` deleted the branch ref (recorded for the held-set publisher). */
|
|
42
|
+
branchDeleted?: boolean;
|
|
39
43
|
/**
|
|
40
44
|
* The 8-char focus-key suffix parsed from the branch name
|
|
41
45
|
* (agent/<role>/<slug>-<8hexfocuskey>). Used to anchor any residual signal to
|
|
@@ -62,13 +66,10 @@ export interface RecoveryResult {
|
|
|
62
66
|
* host probes, worktree reaping and capture) is built at the composition root
|
|
63
67
|
* (composition/execution-recovery-context.ts).
|
|
64
68
|
*/
|
|
65
|
-
export interface RecoveryDeps extends Omit<OrphanCaptureDeps, 'resolveFocusByKeyPrefix'>, RecoveryProbeSource {
|
|
69
|
+
export interface RecoveryDeps extends Omit<OrphanCaptureDeps, 'resolveFocusByKeyPrefix'>, RecoveryProbeSource, LiveBranchPreservationDeps {
|
|
66
70
|
getActiveSessions: (scope: SessionScope) => Promise<AgentSession[]>;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
focus_name: string;
|
|
70
|
-
assigned_agent_role_id: string | null;
|
|
71
|
-
}>>;
|
|
71
|
+
/** Record branches recovery deleted, so a later not-covered claim refusal can say why (daemon-state/branch-removal-record.ts). */
|
|
72
|
+
recordBranchRemovals: (productId: string, removals: ReadonlyArray<BranchRemoval>) => void;
|
|
72
73
|
updateSession: (sessionId: string, updates: Record<string, unknown>) => Promise<unknown>;
|
|
73
74
|
createEscalation: (params: CreateEscalationParams) => Promise<{
|
|
74
75
|
escalationId: string | null;
|
|
@@ -92,13 +93,6 @@ export interface RecoveryDeps extends Omit<OrphanCaptureDeps, 'resolveFocusByKey
|
|
|
92
93
|
* removed.
|
|
93
94
|
*/
|
|
94
95
|
removeWorktreeDir: (repoPath: string, worktreePath: string) => boolean;
|
|
95
|
-
/**
|
|
96
|
-
* The focus ids this host holds a pending completion merge for
|
|
97
|
-
* (merge/completion-hold-record.ts). Their worktrees are NOT orphans even when
|
|
98
|
-
* the focus has left the active set: the completed work still has to reach
|
|
99
|
-
* integration, and the merge-back loop drives it from that worktree.
|
|
100
|
-
*/
|
|
101
|
-
listPendingCompletionFocusIds: (productId: string) => string[];
|
|
102
96
|
}
|
|
103
97
|
/**
|
|
104
98
|
* The focus-key resolver: scan the product's focuses and match the 8-char
|
|
@@ -110,34 +104,18 @@ export declare function resolveFocusByKeyPrefixFromFocuses(keyPrefix: string, pr
|
|
|
110
104
|
focusId: string;
|
|
111
105
|
productId: string | null;
|
|
112
106
|
} | null>;
|
|
113
|
-
/**
|
|
114
|
-
* Parse `git worktree list --porcelain` to build a map of
|
|
115
|
-
* worktree path -> branch name for all registered worktrees.
|
|
116
|
-
*/
|
|
117
|
-
export declare function parseWorktreeList(repoPath: string): Map<string, string>;
|
|
118
107
|
/**
|
|
119
108
|
* Scan the worktree directory and reconcile against active DB sessions
|
|
120
109
|
* to classify each worktree as active or orphaned.
|
|
121
110
|
*/
|
|
122
|
-
export declare function detectOrphanedWorktrees(config: DaemonConfig, deps: RecoveryDeps
|
|
111
|
+
export declare function detectOrphanedWorktrees(config: DaemonConfig, deps: RecoveryDeps,
|
|
112
|
+
/** What must not be removed (readLiveFocusPopulation): read once by recoverFromCrash and shared with the pruner. */
|
|
113
|
+
population: LiveFocusPopulation): Promise<OrphanedWorktree[]>;
|
|
123
114
|
/**
|
|
124
115
|
* Clean up all orphaned worktrees. Returns actions taken and
|
|
125
116
|
* any preserved orphans that need escalation.
|
|
126
117
|
*/
|
|
127
118
|
export declare function cleanupOrphanedWorktrees(orphans: OrphanedWorktree[], config: DaemonConfig, deps: RecoveryDeps): Promise<CleanupAction[]>;
|
|
128
|
-
/**
|
|
129
|
-
* Prune stale agent branches that have no worktree and no unmerged commits.
|
|
130
|
-
*
|
|
131
|
-
* Same housekeeping policy as the orphaned-worktree path: a branch with
|
|
132
|
-
* unmerged commits is PRESERVED and LOGGED (the commits are recoverable from
|
|
133
|
-
* the ref), never escalated. A merged branch with no worktree is safe to delete.
|
|
134
|
-
* No path here files a needs_operator escalation -- branch-only orphans are
|
|
135
|
-
* reality-side housekeeping the daemon owns.
|
|
136
|
-
*/
|
|
137
|
-
export declare function pruneStaleAgentBranches(config: DaemonConfig): {
|
|
138
|
-
pruned: string[];
|
|
139
|
-
preserved: string[];
|
|
140
|
-
};
|
|
141
119
|
/**
|
|
142
120
|
* Run full crash recovery: detect orphans, clean up, prune branches.
|
|
143
121
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crash-recovery.d.ts","sourceRoot":"","sources":["../../src/focus/crash-recovery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"crash-recovery.d.ts","sourceRoot":"","sources":["../../src/focus/crash-recovery.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGpE,OAAO,EAAqB,KAAK,iBAAiB,EAAE,KAAK,wBAAwB,EAA4B,MAAM,qBAAqB,CAAC;AAEzI,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAGlF,OAAO,EAOL,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAQ9E,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAc,SAAQ,wBAAwB;IAC7D,YAAY,EAAE,M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emon/src/focus/crash-recovery-session-scope.test.ts,
|
|
3
3
|
// packages/daemon/src/focus/crash-recovery.test.ts,
|
|
4
|
-
// packages/daemon/src/focus/safety-capture-entry-points.test.ts
|
|
4
|
+
// packages/daemon/src/focus/safety-capture-entry-points.test.ts,
|
|
5
|
+
// packages/daemon/src/integration/finished-merged-active-focus-restart-regression.test.ts
|
|
5
6
|
// PINNED-BY-END
|
|
6
7
|
/**
|
|
7
8
|
* Crash recovery: orphaned worktree cleanup and stale branch pruning.
|
|
@@ -22,6 +23,7 @@ import { ownedSessionScope } from '../queries/sessions/sessions.js';
|
|
|
22
23
|
import { reconcileOwnedSessions } from '../daemon-state/daemon-instance.js';
|
|
23
24
|
import { NO_HUMAN_ACT } from '../queries/escalations/filing-observation.js';
|
|
24
25
|
import { scanAllFocuses } from '../queries/focuses/focuses.js';
|
|
26
|
+
import { extractFocusIdPrefix, extractFocusKeyFromBranch, parseWorktreeList, pruneStaleAgentBranches, readLiveFocusPopulation, populationKeepsWorktree, } from './live-branch-preservation.js';
|
|
25
27
|
import { ESCALATION_REASONS, ESCALATION_DISPOSITIONS } from '@telora/daemon-core';
|
|
26
28
|
import { createLogger } from '../log/daemon-log.js';
|
|
27
29
|
const log = createLogger({ module: 'crash-recovery' });
|
|
@@ -44,85 +46,12 @@ export async function resolveFocusByKeyPrefixFromFocuses(keyPrefix, productId) {
|
|
|
44
46
|
return null;
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
|
-
// ── Helpers ──────────────────────────────────────────────────────
|
|
48
|
-
/**
|
|
49
|
-
* Extract the focus ID prefix (last 8 hex chars) from a worktree directory name.
|
|
50
|
-
* Focus worktree directories follow: agent-{role}-{name}-{8-char-id}
|
|
51
|
-
*/
|
|
52
|
-
function extractFocusIdPrefix(dirName) {
|
|
53
|
-
const match = dirName.match(/-([0-9a-f]{8})$/);
|
|
54
|
-
return match ? match[1] : null;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Extract the 8-char focus-key suffix from an agent BRANCH name.
|
|
58
|
-
* Branch format: agent/<role>/<slug>-<8hexfocuskey>. The final path segment
|
|
59
|
-
* carries the same -<8hex> suffix that extractFocusIdPrefix parses off the
|
|
60
|
-
* worktree DIRECTORY name, so this is the branch-name analogue used to anchor a
|
|
61
|
-
* residual signal back to the owning focus.
|
|
62
|
-
*/
|
|
63
|
-
function extractFocusKeyFromBranch(branchName) {
|
|
64
|
-
const lastSegment = branchName.split('/').pop() ?? branchName;
|
|
65
|
-
return extractFocusIdPrefix(lastSegment);
|
|
66
|
-
}
|
|
67
49
|
// ── Worktree scanning ────────────────────────────────────────────
|
|
68
|
-
/**
|
|
69
|
-
|
|
70
|
-
* worktree path -> branch name for all registered worktrees.
|
|
71
|
-
*/
|
|
72
|
-
export function parseWorktreeList(repoPath) {
|
|
73
|
-
const result = runGitSync(['worktree', 'list', '--porcelain'], repoPath);
|
|
74
|
-
const map = new Map();
|
|
75
|
-
if (!result.success)
|
|
76
|
-
return map;
|
|
77
|
-
let currentPath = null;
|
|
78
|
-
for (const line of result.output.split('\n')) {
|
|
79
|
-
if (line.startsWith('worktree ')) {
|
|
80
|
-
currentPath = line.slice('worktree '.length);
|
|
81
|
-
}
|
|
82
|
-
else if (line.startsWith('branch refs/heads/') && currentPath) {
|
|
83
|
-
map.set(currentPath, line.slice('branch refs/heads/'.length));
|
|
84
|
-
currentPath = null;
|
|
85
|
-
}
|
|
86
|
-
else if (line === '') {
|
|
87
|
-
currentPath = null;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return map;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* The 8-char focus-id prefixes whose worktrees are persistent, not orphaned:
|
|
94
|
-
* every ACTIVE focus, plus every focus this host holds a pending completion
|
|
95
|
-
* merge for (RecoveryDeps.listPendingCompletionFocusIds) -- its completed work
|
|
96
|
-
* still has to reach integration from that worktree.
|
|
97
|
-
*/
|
|
98
|
-
async function readPreservedFocusIdPrefixes(config, deps) {
|
|
99
|
-
const prefixes = new Set();
|
|
100
|
-
try {
|
|
101
|
-
const activeFocuses = await deps.getActiveFocuses(config.organizationId, config.productId);
|
|
102
|
-
for (const s of activeFocuses) {
|
|
103
|
-
prefixes.add(s.focus_id.slice(0, 8));
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
catch (err) {
|
|
107
|
-
log.warn(`[crash-recovery] Failed to query active focuses: ${err instanceof Error ? err.message : String(err)}. ` +
|
|
108
|
-
`Persistent focus worktrees may be incorrectly classified as orphaned.`);
|
|
109
|
-
}
|
|
110
|
-
for (const focusId of deps.listPendingCompletionFocusIds(config.productId)) {
|
|
111
|
-
prefixes.add(focusId.slice(0, 8));
|
|
112
|
-
}
|
|
113
|
-
return prefixes;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Scan the worktree directory and reconcile against active DB sessions
|
|
117
|
-
* to classify each worktree as active or orphaned.
|
|
118
|
-
*/
|
|
119
|
-
export async function detectOrphanedWorktrees(config, deps) {
|
|
120
|
-
const { worktreeDir, repoPath } = config;
|
|
121
|
-
// 1. Read all subdirectories in worktreeDir
|
|
50
|
+
/** The subdirectories of the worktree dir (none when it does not exist). */
|
|
51
|
+
function listWorktreeSubdirs(worktreeDir) {
|
|
122
52
|
if (!existsSync(worktreeDir))
|
|
123
53
|
return [];
|
|
124
|
-
|
|
125
|
-
const subdirs = entries.filter((entry) => {
|
|
54
|
+
return readdirSync(worktreeDir).filter((entry) => {
|
|
126
55
|
const fullPath = join(worktreeDir, entry);
|
|
127
56
|
try {
|
|
128
57
|
return statSync(fullPath).isDirectory();
|
|
@@ -132,6 +61,17 @@ export async function detectOrphanedWorktrees(config, deps) {
|
|
|
132
61
|
return false;
|
|
133
62
|
}
|
|
134
63
|
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Scan the worktree directory and reconcile against active DB sessions
|
|
67
|
+
* to classify each worktree as active or orphaned.
|
|
68
|
+
*/
|
|
69
|
+
export async function detectOrphanedWorktrees(config, deps,
|
|
70
|
+
/** What must not be removed (readLiveFocusPopulation): read once by recoverFromCrash and shared with the pruner. */
|
|
71
|
+
population) {
|
|
72
|
+
const { worktreeDir, repoPath } = config;
|
|
73
|
+
// 1. Read all subdirectories in worktreeDir
|
|
74
|
+
const subdirs = listWorktreeSubdirs(worktreeDir);
|
|
135
75
|
if (subdirs.length === 0)
|
|
136
76
|
return [];
|
|
137
77
|
// 2. Parse git worktree list to map paths -> branch names
|
|
@@ -157,8 +97,9 @@ export async function detectOrphanedWorktrees(config, deps) {
|
|
|
157
97
|
for (const session of activeSessions) {
|
|
158
98
|
branchToSession.set(session.branch_name, session);
|
|
159
99
|
}
|
|
160
|
-
// 3b.
|
|
161
|
-
|
|
100
|
+
// 3b. Live focuses (the migration branch population) and pending completion
|
|
101
|
+
// merges keep their persistent worktrees.
|
|
102
|
+
const activeFocusIdPrefixes = population.focusIdPrefixes;
|
|
162
103
|
// 4. Classify each worktree subdirectory
|
|
163
104
|
const orphans = [];
|
|
164
105
|
for (const subdir of subdirs) {
|
|
@@ -187,12 +128,9 @@ export async function detectOrphanedWorktrees(config, deps) {
|
|
|
187
128
|
log.info(`Worktree is active (has DB session): ${fullPath} [${branchName}]`);
|
|
188
129
|
continue;
|
|
189
130
|
}
|
|
190
|
-
//
|
|
191
|
-
|
|
192
|
-
if (idPrefix && activeFocusIdPrefixes.has(idPrefix)) {
|
|
193
|
-
log.info(`Worktree belongs to an active focus or a pending completion merge (persistent): ${fullPath} [${branchName}]`);
|
|
131
|
+
// A live focus's worktree is persistent, merged or not (and an unread population keeps everything).
|
|
132
|
+
if (populationKeepsWorktree(population, subdir, fullPath, branchName))
|
|
194
133
|
continue;
|
|
195
|
-
}
|
|
196
134
|
// No active session and no active focus — orphaned
|
|
197
135
|
const session = branchToSession.get(branchName) ?? null;
|
|
198
136
|
orphans.push({
|
|
@@ -283,6 +221,7 @@ function cleanupSingleOrphan(orphan, config, deps, capture) {
|
|
|
283
221
|
if (deleteResult.success) {
|
|
284
222
|
log.info(`Deleted merged branch: ${branchName}`);
|
|
285
223
|
}
|
|
224
|
+
const branchDeleted = deleteResult.success;
|
|
286
225
|
return {
|
|
287
226
|
worktreePath,
|
|
288
227
|
branchName,
|
|
@@ -291,6 +230,7 @@ function cleanupSingleOrphan(orphan, config, deps, capture) {
|
|
|
291
230
|
focusKey,
|
|
292
231
|
worktreeRemoved: true,
|
|
293
232
|
branchPreserved: false,
|
|
233
|
+
branchDeleted,
|
|
294
234
|
};
|
|
295
235
|
}
|
|
296
236
|
const unmergedCount = countUnmergedCommits(branchName, integrationBranch, repoPath);
|
|
@@ -460,64 +400,35 @@ export async function cleanupOrphanedWorktrees(orphans, config, deps) {
|
|
|
460
400
|
}
|
|
461
401
|
return actions;
|
|
462
402
|
}
|
|
463
|
-
// ── Stale branch pruning ─────────────────────────────────────────
|
|
464
403
|
/**
|
|
465
|
-
*
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
if (!result.success)
|
|
470
|
-
return [];
|
|
471
|
-
return result.output
|
|
472
|
-
.split('\n')
|
|
473
|
-
.map((line) => line.replace(/^[*+]?\s+/, '').trim())
|
|
474
|
-
.filter(Boolean);
|
|
475
|
-
}
|
|
476
|
-
/**
|
|
477
|
-
* Prune stale agent branches that have no worktree and no unmerged commits.
|
|
478
|
-
*
|
|
479
|
-
* Same housekeeping policy as the orphaned-worktree path: a branch with
|
|
480
|
-
* unmerged commits is PRESERVED and LOGGED (the commits are recoverable from
|
|
481
|
-
* the ref), never escalated. A merged branch with no worktree is safe to delete.
|
|
482
|
-
* No path here files a needs_operator escalation -- branch-only orphans are
|
|
483
|
-
* reality-side housekeeping the daemon owns.
|
|
404
|
+
* Step 3 of recovery: prune stale agent branches (keeping every branch the live
|
|
405
|
+
* population names), then record every branch the pass deleted -- merged orphans
|
|
406
|
+
* and pruned branches -- so a migration claim later refused for a missing branch
|
|
407
|
+
* can name what removed it (daemon-state/branch-removal-record.ts).
|
|
484
408
|
*/
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
return { pruned, preserved };
|
|
409
|
+
function pruneAndRecordRemovals(config, deps, livePopulation, result) {
|
|
410
|
+
let prunedBranches = [];
|
|
411
|
+
try {
|
|
412
|
+
const { pruned, preserved } = pruneStaleAgentBranches(config, livePopulation);
|
|
413
|
+
prunedBranches = pruned;
|
|
414
|
+
result.branchesPruned = pruned.length;
|
|
415
|
+
result.branchesPreserved = preserved.length;
|
|
493
416
|
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
// Skip branches with active worktrees
|
|
499
|
-
if (worktreeBranches.has(branch))
|
|
500
|
-
continue;
|
|
501
|
-
// Check for unmerged commits
|
|
502
|
-
if (branchHasUnmergedCommits(branch, integrationBranch, repoPath)) {
|
|
503
|
-
const focusKey = extractFocusKeyFromBranch(branch);
|
|
504
|
-
log.info(`[crash-recovery] Housekeeping: preserving stale branch with unmerged commits: ${branch}` +
|
|
505
|
-
(focusKey ? ` (focus-key ${focusKey})` : ''));
|
|
506
|
-
preserved.push(branch);
|
|
507
|
-
continue;
|
|
508
|
-
}
|
|
509
|
-
// Safe to delete
|
|
510
|
-
const deleteResult = runGitSync(['branch', '-D', branch], repoPath);
|
|
511
|
-
if (deleteResult.success) {
|
|
512
|
-
log.info(`Pruned stale branch: ${branch}`);
|
|
513
|
-
pruned.push(branch);
|
|
514
|
-
}
|
|
515
|
-
else {
|
|
516
|
-
log.warn(`Failed to prune branch ${branch}: ${deleteResult.error}`);
|
|
517
|
-
}
|
|
417
|
+
catch (err) {
|
|
418
|
+
const msg = `Failed during branch pruning: ${err instanceof Error ? err.message : String(err)}`;
|
|
419
|
+
log.error(`${msg}`);
|
|
420
|
+
result.errors.push(msg);
|
|
518
421
|
}
|
|
519
|
-
|
|
520
|
-
|
|
422
|
+
if (!config.productId)
|
|
423
|
+
return;
|
|
424
|
+
const at = Date.now();
|
|
425
|
+
const removals = [
|
|
426
|
+
...result.actions
|
|
427
|
+
.filter((a) => a.branchDeleted)
|
|
428
|
+
.map((a) => ({ branch: a.branchName, kind: 'merged_orphan', at })),
|
|
429
|
+
...prunedBranches.map((branch) => ({ branch, kind: 'stale_branch', at })),
|
|
430
|
+
];
|
|
431
|
+
deps.recordBranchRemovals(config.productId, removals);
|
|
521
432
|
}
|
|
522
433
|
// ── Main recovery orchestrator ───────────────────────────────────
|
|
523
434
|
/**
|
|
@@ -537,10 +448,13 @@ export async function recoverFromCrash(config, deps) {
|
|
|
537
448
|
actions: [],
|
|
538
449
|
errors: [],
|
|
539
450
|
};
|
|
451
|
+
// Step 0: Read the live focus population ONCE; the worktree classifier and the
|
|
452
|
+
// branch pruner both keep what it names (the migration allocator's rule).
|
|
453
|
+
const livePopulation = await readLiveFocusPopulation(config, deps);
|
|
540
454
|
// Step 1: Detect orphaned worktrees
|
|
541
455
|
let orphans;
|
|
542
456
|
try {
|
|
543
|
-
orphans = await detectOrphanedWorktrees(config, deps);
|
|
457
|
+
orphans = await detectOrphanedWorktrees(config, deps, livePopulation);
|
|
544
458
|
result.orphansDetected = orphans.length;
|
|
545
459
|
}
|
|
546
460
|
catch (err) {
|
|
@@ -576,17 +490,8 @@ export async function recoverFromCrash(config, deps) {
|
|
|
576
490
|
result.errors.push(msg);
|
|
577
491
|
}
|
|
578
492
|
}
|
|
579
|
-
// Step 3: Prune stale agent branches
|
|
580
|
-
|
|
581
|
-
const { pruned, preserved } = pruneStaleAgentBranches(config);
|
|
582
|
-
result.branchesPruned = pruned.length;
|
|
583
|
-
result.branchesPreserved = preserved.length;
|
|
584
|
-
}
|
|
585
|
-
catch (err) {
|
|
586
|
-
const msg = `Failed during branch pruning: ${err instanceof Error ? err.message : String(err)}`;
|
|
587
|
-
log.error(`${msg}`);
|
|
588
|
-
result.errors.push(msg);
|
|
589
|
-
}
|
|
493
|
+
// Step 3: Prune stale agent branches, then record every branch this pass deleted.
|
|
494
|
+
pruneAndRecordRemovals(config, deps, livePopulation, result);
|
|
590
495
|
// Step 4: Mark remaining active sessions failed (DB-driven reconciliation) -- ones left
|
|
591
496
|
// behind with no worktree. Every row this pass writes it stamps failed, so it reads only
|
|
592
497
|
// what we OWN and closes only what is provably STOPPED: see reconcileOwnedSessions.
|