@telora/daemon 0.24.40 → 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/tower-pass-context.d.ts +6 -1
- package/dist/composition/tower-pass-context.d.ts.map +1 -1
- package/dist/composition/tower-pass-context.js +12 -2
- package/dist/composition/tower-pass-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/awaiting-slot.d.ts.map +1 -1
- package/dist/daemon-state/awaiting-slot.js +2 -0
- package/dist/daemon-state/awaiting-slot.js.map +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/daemon-state/focus-team-state.js +1 -1
- 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 +4 -12
- 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 +2 -2
- package/dist/focus/focus-poller-spawn.js.map +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-pass-deps.d.ts.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.js +2 -0
- package/dist/focus/pending-spawn-pass-deps.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/ready-focus-spawn-action.d.ts.map +1 -1
- package/dist/focus/ready-focus-spawn-action.js +2 -2
- package/dist/focus/ready-focus-spawn-action.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/focuses/focus-discovery.js +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/spawn/spawn-decision.d.ts.map +1 -1
- package/dist/spawn/spawn-decision.js +1 -18
- package/dist/spawn/spawn-decision.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 +47 -20
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
- package/dist/testing/fixtures/recording-api-client.js +1 -1
- package/dist/testing/fixtures/review-loop.d.ts.map +1 -1
- package/dist/testing/fixtures/review-loop.js +2 -0
- package/dist/testing/fixtures/review-loop.js.map +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-admission.d.ts +46 -9
- package/dist/tower/tower-admission.d.ts.map +1 -1
- package/dist/tower/tower-admission.js +59 -9
- package/dist/tower/tower-admission.js.map +1 -1
- package/dist/tower/tower-graph.d.ts.map +1 -1
- package/dist/tower/tower-graph.js +2 -1
- package/dist/tower/tower-graph.js.map +1 -1
- package/dist/tower/tower-heartbeat-status.d.ts +1 -1
- package/dist/tower/tower-heartbeat-status.d.ts.map +1 -1
- package/dist/tower/tower-heartbeat-status.js.map +1 -1
- package/dist/tower/tower-pass-standing.d.ts +11 -0
- package/dist/tower/tower-pass-standing.d.ts.map +1 -1
- package/dist/tower/tower-pass-standing.js +33 -1
- package/dist/tower/tower-pass-standing.js.map +1 -1
- package/dist/tower/tower-pass.d.ts +28 -4
- package/dist/tower/tower-pass.d.ts.map +1 -1
- package/dist/tower/tower-pass.js +60 -18
- package/dist/tower/tower-pass.js.map +1 -1
- package/dist/tower/tower-spawn-intent.d.ts.map +1 -1
- package/dist/tower/tower-spawn-intent.js +3 -2
- package/dist/tower/tower-spawn-intent.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/docs/runbook-tower.md +33 -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
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/focus/crash-recovery.test.ts,
|
|
3
|
+
// packages/daemon/src/integration/finished-merged-active-focus-restart-regression.test.ts
|
|
4
|
+
// PINNED-BY-END
|
|
5
|
+
import { runGitSync } from '../git/types.js';
|
|
6
|
+
import { branchHasUnmergedCommits } from '../worktree/safety.js';
|
|
7
|
+
import { createLogger } from '../log/daemon-log.js';
|
|
8
|
+
const log = createLogger({ module: 'crash-recovery' });
|
|
9
|
+
/**
|
|
10
|
+
* Extract the focus ID prefix (last 8 hex chars) from a worktree directory name.
|
|
11
|
+
* Focus worktree directories follow: agent-{role}-{name}-{8-char-id}
|
|
12
|
+
*/
|
|
13
|
+
export function extractFocusIdPrefix(dirName) {
|
|
14
|
+
const match = dirName.match(/-([0-9a-f]{8})$/);
|
|
15
|
+
return match ? match[1] : null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Extract the 8-char focus-key suffix from an agent BRANCH name.
|
|
19
|
+
* Branch format: agent/<role>/<slug>-<8hexfocuskey>. The final path segment
|
|
20
|
+
* carries the same -<8hex> suffix that extractFocusIdPrefix parses off the
|
|
21
|
+
* worktree DIRECTORY name, so this is the branch-name analogue used to anchor a
|
|
22
|
+
* residual signal back to the owning focus.
|
|
23
|
+
*/
|
|
24
|
+
export function extractFocusKeyFromBranch(branchName) {
|
|
25
|
+
const lastSegment = branchName.split('/').pop() ?? branchName;
|
|
26
|
+
return extractFocusIdPrefix(lastSegment);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Parse `git worktree list --porcelain` to build a map of
|
|
30
|
+
* worktree path -> branch name for all registered worktrees.
|
|
31
|
+
*/
|
|
32
|
+
export function parseWorktreeList(repoPath) {
|
|
33
|
+
const result = runGitSync(['worktree', 'list', '--porcelain'], repoPath);
|
|
34
|
+
const map = new Map();
|
|
35
|
+
if (!result.success)
|
|
36
|
+
return map;
|
|
37
|
+
let currentPath = null;
|
|
38
|
+
for (const line of result.output.split('\n')) {
|
|
39
|
+
if (line.startsWith('worktree ')) {
|
|
40
|
+
currentPath = line.slice('worktree '.length);
|
|
41
|
+
}
|
|
42
|
+
else if (line.startsWith('branch refs/heads/') && currentPath) {
|
|
43
|
+
map.set(currentPath, line.slice('branch refs/heads/'.length));
|
|
44
|
+
currentPath = null;
|
|
45
|
+
}
|
|
46
|
+
else if (line === '') {
|
|
47
|
+
currentPath = null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return map;
|
|
51
|
+
}
|
|
52
|
+
/** Read the population recovery preserves. Never throws: a failed read is `known: false`. */
|
|
53
|
+
export async function readLiveFocusPopulation(config, deps) {
|
|
54
|
+
const population = { focusIdPrefixes: new Set(), branches: new Set(), liveFocuses: [], known: false };
|
|
55
|
+
if (config.productId) {
|
|
56
|
+
try {
|
|
57
|
+
for (const live of await deps.listLiveFocusBranches(config.productId)) {
|
|
58
|
+
population.focusIdPrefixes.add(live.focusId.slice(0, 8));
|
|
59
|
+
population.branches.add(live.branchName);
|
|
60
|
+
population.liveFocuses.push(live);
|
|
61
|
+
}
|
|
62
|
+
population.known = true;
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
log.warn(`[crash-recovery] Failed to read the live focus branches: ${err instanceof Error ? err.message : String(err)}. ` +
|
|
66
|
+
`No focus worktree or agent branch will be removed this pass.`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
log.warn('[crash-recovery] No product in config: the live focus branches cannot be read, so nothing a focus owns is removed.');
|
|
71
|
+
}
|
|
72
|
+
for (const focusId of deps.listPendingCompletionFocusIds(config.productId)) {
|
|
73
|
+
population.focusIdPrefixes.add(focusId.slice(0, 8));
|
|
74
|
+
}
|
|
75
|
+
return population;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* List all local branches matching the agent/* pattern.
|
|
79
|
+
*/
|
|
80
|
+
function listAgentBranches(repoPath) {
|
|
81
|
+
const result = runGitSync(['branch', '--list', 'agent/*'], repoPath);
|
|
82
|
+
if (!result.success)
|
|
83
|
+
return [];
|
|
84
|
+
return result.output
|
|
85
|
+
.split('\n')
|
|
86
|
+
.map((line) => line.replace(/^[*+]?\s+/, '').trim())
|
|
87
|
+
.filter(Boolean);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Why the population keeps a branch (or the worktree carrying `idPrefix`), or
|
|
91
|
+
* null when it does not. A LIVE focus is named with the status that makes it
|
|
92
|
+
* live, so a log reader sees the rule -- not complete or cancelled, armed or
|
|
93
|
+
* not -- rather than having to infer it; a pending completion merge is a
|
|
94
|
+
* different reason and says so.
|
|
95
|
+
*/
|
|
96
|
+
export function keepReason(population, idPrefix, branchName) {
|
|
97
|
+
const live = population.liveFocuses.find((f) => f.branchName === branchName || (idPrefix !== null && f.focusId.startsWith(idPrefix)));
|
|
98
|
+
if (live) {
|
|
99
|
+
return `focus ${live.focusId} is live (status '${live.status}', not complete or cancelled), so its branch ` +
|
|
100
|
+
'is kept merged or not -- the migration allocator requires it in every held set';
|
|
101
|
+
}
|
|
102
|
+
if (idPrefix !== null && population.focusIdPrefixes.has(idPrefix)) {
|
|
103
|
+
return `focus-key ${idPrefix} has a pending completion merge on this host`;
|
|
104
|
+
}
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Whether the live population keeps a REGISTERED worktree: its directory
|
|
109
|
+
* carries a live (or pending-completion) focus's id prefix, or its branch is
|
|
110
|
+
* one a live focus names -- merged or not, since its focus can still commit and
|
|
111
|
+
* the allocator requires the branch in every held set. When the population
|
|
112
|
+
* could not be read every worktree is kept: whether it is live is unknown, and
|
|
113
|
+
* it is not removed on a guess.
|
|
114
|
+
*/
|
|
115
|
+
export function populationKeepsWorktree(population, dirName, worktreePath, branchName) {
|
|
116
|
+
const reason = keepReason(population, extractFocusIdPrefix(dirName), branchName);
|
|
117
|
+
if (reason) {
|
|
118
|
+
log.info(`[crash-recovery] Keeping worktree and branch: ${reason}: ${worktreePath} [${branchName}]`);
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
if (!population.known) {
|
|
122
|
+
log.warn(`[crash-recovery] Keeping worktree (live focus branches unknown this pass): ${worktreePath} [${branchName}]`);
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Prune stale agent branches that have no worktree, no unmerged commits, and
|
|
129
|
+
* that NO LIVE FOCUS NAMES.
|
|
130
|
+
*
|
|
131
|
+
* A merged branch is not a dead one: a finished focus that is still active
|
|
132
|
+
* (awaiting QA, its arm cleared at run end) has a branch fully contained in
|
|
133
|
+
* integration, and the migration allocator still requires it in every held
|
|
134
|
+
* set. So the live population (`LiveFocusPopulation`, the same rule the
|
|
135
|
+
* allocator reads) is consulted before anything is deleted, and an unknown
|
|
136
|
+
* population prunes nothing.
|
|
137
|
+
*
|
|
138
|
+
* Same housekeeping policy as the orphaned-worktree path: a branch with
|
|
139
|
+
* unmerged commits is PRESERVED and LOGGED (the commits are recoverable from
|
|
140
|
+
* the ref), never escalated. A merged branch with no worktree is safe to delete.
|
|
141
|
+
* No path here files a needs_operator escalation -- branch-only orphans are
|
|
142
|
+
* reality-side housekeeping the daemon owns.
|
|
143
|
+
*/
|
|
144
|
+
export function pruneStaleAgentBranches(config, livePopulation) {
|
|
145
|
+
const { repoPath, integrationBranch } = config;
|
|
146
|
+
const branches = listAgentBranches(repoPath);
|
|
147
|
+
const pruned = [];
|
|
148
|
+
const preserved = [];
|
|
149
|
+
if (branches.length === 0) {
|
|
150
|
+
log.info('No stale agent branches found');
|
|
151
|
+
return { pruned, preserved };
|
|
152
|
+
}
|
|
153
|
+
if (!livePopulation.known) {
|
|
154
|
+
log.warn(`[crash-recovery] Branch pruning skipped: the live focus branches are unknown this pass (${branches.length} agent branch(es) kept)`);
|
|
155
|
+
return { pruned, preserved };
|
|
156
|
+
}
|
|
157
|
+
// Get set of branches that have active worktrees
|
|
158
|
+
const worktreeMap = parseWorktreeList(repoPath);
|
|
159
|
+
const worktreeBranches = new Set(worktreeMap.values());
|
|
160
|
+
for (const branch of branches) {
|
|
161
|
+
// Skip branches with active worktrees
|
|
162
|
+
if (worktreeBranches.has(branch))
|
|
163
|
+
continue;
|
|
164
|
+
// A branch a live focus names is never pruned, merged or not; nor is the
|
|
165
|
+
// branch of a pending completion merge.
|
|
166
|
+
const focusKey = extractFocusKeyFromBranch(branch);
|
|
167
|
+
const keep = keepReason(livePopulation, focusKey, branch);
|
|
168
|
+
if (keep) {
|
|
169
|
+
log.info(`[crash-recovery] Keeping branch: ${keep}: ${branch}`);
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
// Check for unmerged commits
|
|
173
|
+
if (branchHasUnmergedCommits(branch, integrationBranch, repoPath)) {
|
|
174
|
+
log.info(`[crash-recovery] Housekeeping: preserving stale branch with unmerged commits: ${branch}` +
|
|
175
|
+
(focusKey ? ` (focus-key ${focusKey})` : ''));
|
|
176
|
+
preserved.push(branch);
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
// Safe to delete
|
|
180
|
+
const deleteResult = runGitSync(['branch', '-D', branch], repoPath);
|
|
181
|
+
if (deleteResult.success) {
|
|
182
|
+
log.info(`Pruned stale branch: ${branch}`);
|
|
183
|
+
pruned.push(branch);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
log.warn(`Failed to prune branch ${branch}: ${deleteResult.error}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
log.info(`[crash-recovery] Branch pruning: ${pruned.length} pruned, ${preserved.length} preserved with unmerged work`);
|
|
190
|
+
return { pruned, preserved };
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=live-branch-preservation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-branch-preservation.js","source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,CAAC,CAAC;QACpE,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YACzB,GAAG,CAAC,IAAI,CAAC,wBAAwB,MAAM,EAAE,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,0BAA0B,MAAM,KAAK,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;IAED,GAAG,CAAC,IAAI,CACN,oCAAoC,MAAM,CAAC,MAAM,YAAY,SAAS,CAAC,MAAM,+BAA+B,CAC7G,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -30,6 +30,8 @@ export interface MigrationClaimPassResult {
|
|
|
30
30
|
skippedUnchanged: number;
|
|
31
31
|
/** Focuses whose branch could not be read: nothing was applied for them. */
|
|
32
32
|
unreadable: number;
|
|
33
|
+
/** Focuses whose unclaimed-file record or clear write failed: retried next tick. */
|
|
34
|
+
recordFailed: number;
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* Run the confirm / release / unclaimed-file passes for one product.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-claim-pass.d.ts","sourceRoot":"","sources":["../../src/focus/migration-claim-pass.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migration-claim-pass.d.ts","sourceRoot":"","sources":["../../src/focus/migration-claim-pass.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAMrF,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EAEzB,MAAM,+DAA+D,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,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
31
|
* so a throw here would take the tick and every phase after it down. Nothing
|
|
32
32
|
* downstream is gated on this pass -- a number is granted correctly whether or
|
|
33
33
|
* not it ever runs -- so its correct failure mode is to log and let the tick
|
|
34
|
-
* carry on.
|
|
34
|
+
* carry on. One level down, a failed unclaimed-file record or clear is contained
|
|
35
|
+
* to its own focus's turn (`applyUnclaimedRecord`): it is a report, not claim
|
|
36
|
+
* state, so it must never stop the confirms and releases of the foci after it.
|
|
35
37
|
*
|
|
36
38
|
* @module migration-claim-pass
|
|
37
39
|
*/
|
|
@@ -52,7 +54,7 @@ export function resetMigrationClaimTipCache() {
|
|
|
52
54
|
tipCache.clear();
|
|
53
55
|
}
|
|
54
56
|
const EMPTY = {
|
|
55
|
-
confirmed: 0, released: 0, recordedUnclaimed: 0, skippedUnchanged: 0, unreadable: 0,
|
|
57
|
+
confirmed: 0, released: 0, recordedUnclaimed: 0, skippedUnchanged: 0, unreadable: 0, recordFailed: 0,
|
|
56
58
|
};
|
|
57
59
|
/**
|
|
58
60
|
* What must be re-read for this focus, condensed to one string.
|
|
@@ -111,6 +113,52 @@ async function runBranchlessFocus(ctx, focus, claims) {
|
|
|
111
113
|
await ctx.deps.release(ctx.productId, branchless.release);
|
|
112
114
|
ctx.result.released += branchless.release.length;
|
|
113
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Write -- or clear -- this focus's unclaimed-file record, CONTAINED to the turn.
|
|
118
|
+
*
|
|
119
|
+
* WHY THE CATCH IS HERE AND NOT ONLY AROUND THE PASS. The record is the one
|
|
120
|
+
* write in a turn that reports rather than decides: the confirms and releases
|
|
121
|
+
* before it are the claim state, and they have already landed when it runs.
|
|
122
|
+
* Letting its throw escape ended the pass for EVERY focus of the product -- the
|
|
123
|
+
* foci after this one never confirmed or released anything -- and it did so on
|
|
124
|
+
* every tick, because nothing was cached and the write failed the same way
|
|
125
|
+
* again. Daemon 0.24.42 met a server that refused the section kind and the
|
|
126
|
+
* whole claim lifecycle stood still for hours (Tinker Tailor, 2026-10-24 and
|
|
127
|
+
* 2026-10-26).
|
|
128
|
+
*
|
|
129
|
+
* Answers whether the write landed, so the caller leaves an unwritten record
|
|
130
|
+
* uncached and the next tick retries it.
|
|
131
|
+
*/
|
|
132
|
+
async function applyUnclaimedRecord(ctx, focus, branchName, decision) {
|
|
133
|
+
try {
|
|
134
|
+
if (decision.unclaimed.length > 0) {
|
|
135
|
+
await ctx.deps.recordUnclaimed({
|
|
136
|
+
focusId: focus.focusId,
|
|
137
|
+
focusName: focus.focusName,
|
|
138
|
+
branchName,
|
|
139
|
+
files: decision.unclaimed,
|
|
140
|
+
detectedAt: ctx.deps.now(),
|
|
141
|
+
});
|
|
142
|
+
ctx.result.recordedUnclaimed += decision.unclaimed.length;
|
|
143
|
+
}
|
|
144
|
+
else if (decision.clearUnclaimed) {
|
|
145
|
+
// RESOLVED, positively: every named ordinal is covered by a claim or gone
|
|
146
|
+
// from the branch AND from integration. Never merely "the detection went
|
|
147
|
+
// quiet" -- a branch that merged, or was pruned after merging, leaves its
|
|
148
|
+
// unclaimed file on integration, and clearing there would report a success
|
|
149
|
+
// nobody earned.
|
|
150
|
+
await ctx.deps.clearUnclaimed(focus.focusId);
|
|
151
|
+
}
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
catch (err) {
|
|
155
|
+
ctx.result.recordFailed += 1;
|
|
156
|
+
log.warn(`[migration-claims] unclaimed-file ${decision.unclaimed.length > 0 ? 'record' : 'clear'} failed `
|
|
157
|
+
+ `for focus ${focus.focusId} (${focus.focusName}): ${String(err?.message ?? err)} `
|
|
158
|
+
+ '-- its confirms and releases stand; the record is retried next tick');
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
114
162
|
/** One focus's turn: read its branch, decide, apply. */
|
|
115
163
|
async function runFocusTurn(ctx, focus, claims) {
|
|
116
164
|
const branchName = focus.branchName;
|
|
@@ -139,24 +187,7 @@ async function runFocusTurn(ctx, focus, claims) {
|
|
|
139
187
|
await ctx.deps.release(ctx.productId, decision.release);
|
|
140
188
|
ctx.result.confirmed += decision.confirm.length;
|
|
141
189
|
ctx.result.released += decision.release.length;
|
|
142
|
-
|
|
143
|
-
await ctx.deps.recordUnclaimed({
|
|
144
|
-
focusId: focus.focusId,
|
|
145
|
-
focusName: focus.focusName,
|
|
146
|
-
branchName,
|
|
147
|
-
files: decision.unclaimed,
|
|
148
|
-
detectedAt: ctx.deps.now(),
|
|
149
|
-
});
|
|
150
|
-
ctx.result.recordedUnclaimed += decision.unclaimed.length;
|
|
151
|
-
}
|
|
152
|
-
else if (decision.clearUnclaimed) {
|
|
153
|
-
// RESOLVED, positively: every named ordinal is covered by a claim or gone
|
|
154
|
-
// from the branch AND from integration. Never merely "the detection went
|
|
155
|
-
// quiet" -- a branch that merged, or was pruned after merging, leaves its
|
|
156
|
-
// unclaimed file on integration, and clearing there would report a success
|
|
157
|
-
// nobody earned.
|
|
158
|
-
await ctx.deps.clearUnclaimed(focus.focusId);
|
|
159
|
-
}
|
|
190
|
+
const recordWritten = await applyUnclaimedRecord(ctx, focus, branchName, decision);
|
|
160
191
|
// CACHE ONLY A COMPLETE READ.
|
|
161
192
|
//
|
|
162
193
|
// `decision.readable` speaks for the BRANCH alone. Integration is the other
|
|
@@ -170,7 +201,11 @@ async function runFocusTurn(ctx, focus, claims) {
|
|
|
170
201
|
// next tick the signature is identical, the focus is skipped, and it is
|
|
171
202
|
// skipped every tick after that. Ended claims stay unreleased and a resolved
|
|
172
203
|
// unclaimed record stays open -- for good, on a failure that lasted seconds.
|
|
173
|
-
|
|
204
|
+
//
|
|
205
|
+
// The same holds for a record write that failed: its retry is the next tick,
|
|
206
|
+
// and a cached signature would skip that tick and every one after it, so a
|
|
207
|
+
// server that recovers would never be handed the record.
|
|
208
|
+
if (recordWritten && !inventoryReadFailed(ctx.integration))
|
|
174
209
|
tipCache.set(cacheKey, signature);
|
|
175
210
|
}
|
|
176
211
|
/**
|
|
@@ -208,7 +243,7 @@ export async function runMigrationClaimPass(config, deps) {
|
|
|
208
243
|
}
|
|
209
244
|
catch (err) {
|
|
210
245
|
log.warn(`[migration-claims] pass failed for product ${config.productId} `
|
|
211
|
-
+ `(${String(err?.message ?? err)}) --
|
|
246
|
+
+ `(${String(err?.message ?? err)}) -- foci not yet reached were left untouched`);
|
|
212
247
|
}
|
|
213
248
|
return result;
|
|
214
249
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-claim-pass.js","sourceRoot":"","sources":["../../src/focus/migration-claim-pass.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,qEAAqE;AACrE,kEAAkE;AAClE,gBAAgB;AAEhB
|
|
1
|
+
{"version":3,"file":"migration-claim-pass.js","sourceRoot":"","sources":["../../src/focus/migration-claim-pass.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,qEAAqE;AACrE,kEAAkE;AAClE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EACL,oBAAoB,GAGrB,MAAM,4CAA4C,CAAC;AAMpD,OAAO,EAGL,qBAAqB,GACtB,MAAM,+DAA+D,CAAC;AAIvE,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,CAAC,CAAC;AAmB7D;;;;;;GAMG;AACH,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE3C,sFAAsF;AACtF,MAAM,UAAU,2BAA2B;IACzC,QAAQ,CAAC,KAAK,EAAE,CAAC;AACnB,CAAC;AAeD,MAAM,KAAK,GAA6B;IACtC,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC;CACrG,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;A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CAAE,GAAa,EAAE,OAAO,IAAI,GAAG,CAAC,+CAA+C,CAC5F,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
*
|
|
25
25
|
* WHAT IS PUBLISHED, AND WHAT IS NOT
|
|
26
26
|
* ----------------------------------
|
|
27
|
-
* The ordinals, the scheme, whether the reading was COMPLETE, when it was taken
|
|
28
|
-
*
|
|
27
|
+
* The ordinals, the scheme, whether the reading was COMPLETE, when it was taken,
|
|
28
|
+
* the per-ref tips, and each requested ref that does not exist with what is
|
|
29
|
+
* known of why (so a not-covered refusal can name the cause). Not the tags, not the file paths: the grant needs to
|
|
29
30
|
* know which numbers are taken, and a payload that grows with the migration
|
|
30
31
|
* history is a payload that eventually stops being sent.
|
|
31
32
|
*
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
import type { computeMigrationHeldSet, MigrationHeldSetDeps } from '../migrations/migration-held-set.js';
|
|
50
51
|
import type { MigrationScheme } from '../migrations/migration-manifest.js';
|
|
51
52
|
import type { DaemonConfig } from '../types/index.js';
|
|
53
|
+
import type { BranchRemoval, BranchRemovalKind } from '../daemon-state/branch-removal-record.js';
|
|
52
54
|
/** One product's entry in `metadata.migrationHeldSets`. */
|
|
53
55
|
export type PublishedMigrationHeldSet = {
|
|
54
56
|
status: 'held';
|
|
@@ -66,6 +68,13 @@ export type PublishedMigrationHeldSet = {
|
|
|
66
68
|
ref: string;
|
|
67
69
|
reason: string;
|
|
68
70
|
}>;
|
|
71
|
+
/**
|
|
72
|
+
* Refs that were asked for and do not exist in the repository, with why --
|
|
73
|
+
* so a claim refused because one of them is uncovered can say WHY the
|
|
74
|
+
* branch is missing instead of only that it is. Additive: a handler that
|
|
75
|
+
* predates it reads the tips and ignores this.
|
|
76
|
+
*/
|
|
77
|
+
absent: PublishedAbsentRef[];
|
|
69
78
|
/**
|
|
70
79
|
* THE LEASE: how long this reading may be granted against, from `readAt`.
|
|
71
80
|
*
|
|
@@ -93,6 +102,17 @@ export type PublishedMigrationHeldSet = {
|
|
|
93
102
|
| {
|
|
94
103
|
status: 'undeclared';
|
|
95
104
|
};
|
|
105
|
+
/** A ref the reading asked for that does not exist, and what is known about why. */
|
|
106
|
+
export interface PublishedAbsentRef {
|
|
107
|
+
ref: string;
|
|
108
|
+
/** The ref did not exist in the daemon's repository when the reading was taken. */
|
|
109
|
+
reason: 'ref_absent';
|
|
110
|
+
/** Set when this host's crash recovery recorded deleting the branch (daemon-state/branch-removal-record.ts). */
|
|
111
|
+
removedByCrashRecovery?: {
|
|
112
|
+
at: number;
|
|
113
|
+
kind: BranchRemovalKind;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
96
116
|
/** Which refs a product's held set is read from. */
|
|
97
117
|
export interface ProductMigrationRefs {
|
|
98
118
|
/** The product's integration branch. */
|
|
@@ -115,6 +135,12 @@ export interface MigrationHeldSetProducerDeps {
|
|
|
115
135
|
/** Resolve the refs to read for one product. */
|
|
116
136
|
getRefs: (productId: string) => Promise<ProductMigrationRefs>;
|
|
117
137
|
heldSetDeps: () => MigrationHeldSetDeps;
|
|
138
|
+
/**
|
|
139
|
+
* The latest recorded crash-recovery deletion per branch for one product.
|
|
140
|
+
* Omitted, an absent ref is published with no removal (the refusal then says
|
|
141
|
+
* only that the ref was absent).
|
|
142
|
+
*/
|
|
143
|
+
readBranchRemovals?: (productId: string) => ReadonlyMap<string, BranchRemoval>;
|
|
118
144
|
}
|
|
119
145
|
/**
|
|
120
146
|
* Build `{ [productId]: PublishedMigrationHeldSet }` for every configured
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-held-set-publish.d.ts","sourceRoot":"","sources":["../../src/focus/migration-held-set-publish.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migration-held-set-publish.d.ts","sourceRoot":"","sources":["../../src/focus/migration-held-set-publish.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;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-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
2
|
// Pinned by: packages/daemon/src/focus/migration-held-set-publish.test.ts,
|
|
3
|
+
// packages/daemon/src/integration/finished-merged-active-focus-restart-regression.test.ts,
|
|
3
4
|
// packages/daemon/src/migrations/claim-end-to-end.test.ts,
|
|
4
5
|
// packages/daemon/src/migrations/claim-production-wiring.test.ts
|
|
5
6
|
// PINNED-BY-END
|
|
@@ -45,12 +46,24 @@ leaseMs) {
|
|
|
45
46
|
}
|
|
46
47
|
const tips = {};
|
|
47
48
|
const unreadable = [];
|
|
49
|
+
const absent = [];
|
|
50
|
+
const removals = result.heldSet.readings.some((r) => r.outcome === 'absent')
|
|
51
|
+
? deps.readBranchRemovals?.(product.id)
|
|
52
|
+
: undefined;
|
|
48
53
|
for (const reading of result.heldSet.readings) {
|
|
49
54
|
if (reading.tip !== null)
|
|
50
55
|
tips[reading.ref] = reading.tip;
|
|
51
56
|
if (reading.outcome === 'unreadable') {
|
|
52
57
|
unreadable.push({ ref: reading.ref, reason: reading.reason ?? 'unreadable' });
|
|
53
58
|
}
|
|
59
|
+
if (reading.outcome === 'absent') {
|
|
60
|
+
const removal = removals?.get(reading.ref);
|
|
61
|
+
absent.push({
|
|
62
|
+
ref: reading.ref,
|
|
63
|
+
reason: 'ref_absent',
|
|
64
|
+
...(removal ? { removedByCrashRecovery: { at: removal.at, kind: removal.kind } } : {}),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
54
67
|
}
|
|
55
68
|
byProduct[product.id] = {
|
|
56
69
|
status: 'held',
|
|
@@ -60,6 +73,7 @@ leaseMs) {
|
|
|
60
73
|
readAt: result.heldSet.readAt,
|
|
61
74
|
tips,
|
|
62
75
|
unreadable,
|
|
76
|
+
absent,
|
|
63
77
|
staleAfterMs: leaseMs,
|
|
64
78
|
};
|
|
65
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-held-set-publish.js","sourceRoot":"","sources":["../../src/focus/migration-held-set-publish.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,2EAA2E;AAC3E,6DAA6D;AAC7D,mEAAmE;AACnE,gBAAgB;
|
|
1
|
+
{"version":3,"file":"migration-held-set-publish.js","sourceRoot":"","sources":["../../src/focus/migration-held-set-publish.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,2EAA2E;AAC3E,6FAA6F;AAC7F,6DAA6D;AAC7D,mEAAmE;AACnE,gBAAgB;AAuDhB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAkEvD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAgBtC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,MAAoB,EACpB,IAAkC;AAClC,6FAA6F;AAC7F,OAAe;IAEf,MAAM,SAAS,GAA8C,EAAE,CAAC;IAEhE,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACtC,IAAI,CAAC;YACH,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACxD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAChC,aAAa,CAAC,QAAQ,EACtB,CAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,EAC/C,IAAI,CAAC,WAAW,EAAE,CACnB,CAAC;YAEF,IAAI,MAAM,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;gBACjC,mEAAmE;gBACnE,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;gBACjD,SAAS;YACX,CAAC;YAED,IAAI,MAAM,CAAC,IAAI,KAAK,uBAAuB,EAAE,CAAC;gB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AE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;qBACvF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG;gBACtB,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM;gBAC7B,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;gBACzB,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ;gBACjC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM;gBAC7B,IAAI;gBACJ,UAAU;gBACV,MAAM;gBACN,YAAY,EAAE,OAAO;aACtB,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC,CAAC,4CAA4C,CAAC,CAAC;IAC1D,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,yBAAyB,CACvC,MAAoB;AACpB,4FAA4F;AAC5F,YAAsD;IAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAC3B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;QAC3C,aAAa,EAAE,MAAM,YAAY,CAAC,SAAS,CAAC;KAC7C,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kCAAkC,CAChD,MAAoB;AACpB,4EAA4E;AAC5E,mBAA2B,EAC3B,QAAsC;IAEtC,OAAO,+BAA+B,CAAC,MAAM,EAAE,QAAQ,EAAE,mBAAmB,GAAG,oBAAoB,CAAC,CAAC;AACvG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-spawn-pass-deps.d.ts","sourceRoot":"","sources":["../../src/focus/pending-spawn-pass-deps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pending-spawn-pass-deps.d.ts","sourceRo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IAC1B,8FAA8F;IAC9F,SAAS,EAAE,YAAY,CAAC;CACzB;AAED,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB;IACnC,oEAAoE;IACpE,gBAAgB,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAC5F,0FAA0F;IAC1F,cAAc,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,2EAA2E;IAC3E,YAAY,EAAE,gBAAgB,CAAC;IAC/B,mGAAmG;IACnG,cAAc,EAAE,8BAA8B,CAAC;IAC/C,kFAAkF;IAClF,cAAc,EAAE,kBAAkB,CAAC;IACnC,mGAAmG;IACnG,kBAAkB,EAAE,6BAA6B,CAAC;IAClD,wFAAwF;IACxF,UAAU,EAAE,iBAAiB,CAAC;IAC9B,wFAAwF;IACxF,kBAAkB,EAAE,sBAAsB,CAAC;IAC3C,uFAAuF;IACvF,eAAe,EAAE,wBAAwB,CAAC;IAC1C,mGAAmG;IACnG,cAAc,EAAE,kBAAkB,CAAC;IACnC,oFAAoF;IACpF,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,8GAA8G;IAC9G,sBAAsB,EAAE,0BAA0B,CAAC;IACnD,qFAAqF;IACrF,KAAK,EAAE,kBAAkB,CAAC;IAC1B,8FAA8F;IAC9F,SAAS,EAAE,YAAY,CAAC;CACzB"}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
// packages/daemon/src/focus/pending-review-approved-head.test.ts,
|
|
6
6
|
// packages/daemon/src/focus/ready-focus-no-work-spawn.test.ts,
|
|
7
7
|
// packages/daemon/src/focus/unclaimed-notice-coding-precedence.test.ts,
|
|
8
|
+
// packages/daemon/src/tower/tower-arm-admission.test.ts,
|
|
9
|
+
// packages/daemon/src/tower/tower-depends-on-admission.test.ts,
|
|
8
10
|
// packages/daemon/src/tower/tower-entrypoints.test.ts, packages/daemon/src/tower/tower-prd-arm.test.ts,
|
|
9
11
|
// packages/daemon/src/tower/tower-ready-row-ingestion.test.ts,
|
|
10
12
|
// packages/daemon/src/tower/tower-spawn-modes.test.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-spawn-pass-deps.js","sourceRoot":"","sources":["../../src/focus/pending-spawn-pass-deps.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,gHAAgH;AAChH,qDAAqD;AACrD,kEAAkE;AAClE,oEAAoE;AACpE,iEAAiE;AACjE,0EAA0E;AAC1E,0GAA0G;AAC1G,iEAAiE;AACjE,wDAAwD;AACxD,gBAAgB"}
|
|
1
|
+
{"version":3,"file":"pending-spawn-pass-deps.js","sourceRoot":"","sources":["../../src/focus/pending-spawn-pass-deps.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,gHAAgH;AAChH,qDAAqD;AACrD,kEAAkE;AAClE,oEAAoE;AACpE,iEAAiE;AACjE,0EAA0E;AAC1E,2DAA2D;AAC3D,kEAAkE;AAClE,0GAA0G;AAC1G,iEAAiE;AACjE,wDAAwD;AACxD,gBAAgB"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { PipelineConfig } from '../types/index.js';
|
|
2
1
|
import type { CreateEscalationParams } from '../supervision/escalation-filing.js';
|
|
3
|
-
import { type
|
|
4
|
-
import type { RecordedConcernReader } from '../delivery/recorded-concerns.js';
|
|
2
|
+
import { type FocusNextStepReader, type NextStepFocusRow, type NextStepUnreadable } from '../supervision/focus-next-step.js';
|
|
5
3
|
/** Bound on deferring one queued coding directive while the review-next-step state stays unreadable. */
|
|
6
4
|
export declare const UNREADABLE_DEFERRAL_MAX_MS: number;
|
|
7
5
|
/** Bound on retrying the expiry escalation for one directive after its first failed filing. */
|
|
@@ -23,7 +21,7 @@ export interface UnreadableDeferralExpiry {
|
|
|
23
21
|
focusName: string;
|
|
24
22
|
sessionType: string;
|
|
25
23
|
elapsedMs: number;
|
|
26
|
-
what:
|
|
24
|
+
what: NextStepUnreadable;
|
|
27
25
|
error: Error;
|
|
28
26
|
}
|
|
29
27
|
/** The escalation writer the production filer calls (the filing chokepoint). */
|
|
@@ -33,10 +31,8 @@ export type DeferralEscalationWriter = (params: CreateEscalationParams) => Promi
|
|
|
33
31
|
* composition root's `reviewNextStep` context (composition/runtime-contexts.ts).
|
|
34
32
|
*/
|
|
35
33
|
export interface PendingSpawnReviewNextStepDeps {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/** The focus's recorded concern ids (delivery/recorded-concerns.ts): not open work, so they never mean "coding is next". */
|
|
39
|
-
readRecordedConcernIds: RecordedConcernReader;
|
|
34
|
+
/** The focus's one next step (composition/focus-next-step-context.ts readLiveFocusNextStep). */
|
|
35
|
+
readNextStep: FocusNextStepReader;
|
|
40
36
|
/** Clock for the deferral bound. */
|
|
41
37
|
now: () => number;
|
|
42
38
|
/**
|
|
@@ -51,10 +47,8 @@ export interface PendingSpawnReviewNextStepDeps {
|
|
|
51
47
|
failStop: (reason: string) => void;
|
|
52
48
|
}
|
|
53
49
|
/** The focus-row slice the gate reads (structural; getActiveFocuses rows satisfy it). */
|
|
54
|
-
export interface PendingSpawnReviewNextStepFocus {
|
|
55
|
-
focus_id: string;
|
|
50
|
+
export interface PendingSpawnReviewNextStepFocus extends NextStepFocusRow {
|
|
56
51
|
focus_name: string;
|
|
57
|
-
pipeline_config: PipelineConfig | null;
|
|
58
52
|
}
|
|
59
53
|
/** Test-only: forget every deferral clock. */
|
|
60
54
|
export declare function __resetUnreadableDeferralsForTesting(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-spawn-review-next-step.d.ts","sourceRoot":"","sources":["../../src/focus/pending-spawn-review-next-step.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pending-spawn-review-next-step.d.ts","sourceRoot":"","sources":["../../src/focus/pending-spawn-review-next-step.ts"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAAE,s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