@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
|
@@ -31,7 +31,9 @@
|
|
|
31
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;AACH,SAAS,aAAa,CACpB,SAAwB,EACxB,cAAsB,EACtB,KAAqB,EACrB,MAAiC;IAEjC,MAAM,UAAU,GAAG,MAAM;SACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,OAAO,IAAI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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AACzG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,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AEtC,4EAA4E;AAC5E,MAAM,WAAW,4BAA4B;IAC3C,cAAc,EAAE,OAAO,uBAAuB,CAAC;IAC/C,gDAAgD;IAChD,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9D,WAAW,EAAE,MAAM,oBAAoB,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAChF;AAED;;;;;;;;GAQG;AACH,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,4BAA4B;AAClC,6FAA6F;AAC7F,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CA+DpD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,YAAY;AACpB,4FAA4F;AAC5F,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,GACrD,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAKtD;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,YAAY;AACpB,4EAA4E;AAC5E,mBAAmB,EAAE,MAAM,EAC3B,QAAQ,EAAE,4BAA4B,GACrC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAEpD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
2
|
// Pinned by: packages/daemon/src/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":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AAM,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,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,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAKlF,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,mCAAmC,CAAC;AAO3C,wGAAwG;AACxG,eAAO,MAAM,0BAA0B,QAAc,CAAC;AAEtD,+FAA+F;AAC/F,eAAO,MAAM,uCAAuC,QAAc,CAAC;AAEnE,kHAAkH;AAClH,eAAO,MAAM,sCAAsC,QAAc,CAAC;AAElE,kFAAkF;AAClF,eAAO,MAAM,6BAA6B,yCAAyC,CAAC;AAEpF,gEAAgE;AAChE,eAAO,MAAM,iCAAiC,iDAAiD,CAAC;AAEhG;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,yDAAyD;AACzD,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gFAAgF;AAChF,MAAM,MAAM,wBAAwB,GAAG,CAAC,MAAM,EAAE,sBAAsB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAE5F;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,gGAAgG;IAChG,YAAY,EAAE,mBAAmB,CAAC;IAClC,oCAAoC;IACpC,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB;;;;OAIG;IACH,kBAAkB,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,oEAAoE;IACpE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2HAA2H;IAC3H,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,yFAAyF;AACzF,MAAM,WAAW,+BAAgC,SAAQ,gBAAgB;IACvE,UAAU,EAAE,MAAM,CAAC;CACpB;AAuCD,8CAA8C;AAC9C,wBAAgB,oCAAoC,IAAI,IAAI,CAE3D;AAMD;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,wBAAwB,GAAG,sBAAsB,CAkC1G;AAED;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,wBAAwB,EAChC,IAAI,EAAE;IAAE,gBAAgB,EAAE,wBAAwB,CAAA;CAAE,GACnD,OAAO,CAAC,IAAI,CAAC,CAEf;AAmKD;;;;;;;;GAQG;AACH,wBAAsB,oCAAoC,CACxD,KAAK,EAAE,+BAA+B,EACtC,IAAI,EAAE,8BAA8B,GACnC,OAAO,CAAC,OAAO,CAAC,CAgBlB"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by: packages/daemon/src/completion/state-cascade/
|
|
2
|
+
// Pinned by: packages/daemon/src/completion/state-cascade/focus-next-step-agreement.test.ts,
|
|
3
3
|
// packages/daemon/src/focus/gaps-found-hands-to-coding.test.ts,
|
|
4
4
|
// packages/daemon/src/focus/held-review-window-not-stranded.test.ts,
|
|
5
5
|
// packages/daemon/src/focus/parked-shortfall-spawn.test.ts,
|
|
6
6
|
// packages/daemon/src/focus/pending-review-approved-head.test.ts,
|
|
7
7
|
// packages/daemon/src/focus/pending-spawn-review-next-step.test.ts,
|
|
8
8
|
// packages/daemon/src/focus/unchanged-reviewed-head.test.ts,
|
|
9
|
-
// packages/daemon/src/focus/uncommitted-work-backstop.test.ts,
|
|
10
9
|
// packages/daemon/src/integration/approved-head-gate-failure-respawn-regression.test.ts,
|
|
11
10
|
// packages/daemon/src/integration/approved-head-hold-release-no-directive-regression.test.ts,
|
|
12
11
|
// packages/daemon/src/integration/approved-head-hold-release-regression.test.ts,
|
|
@@ -16,40 +15,29 @@
|
|
|
16
15
|
// packages/daemon/src/spawn/review-hold-park-shortfall.test.ts
|
|
17
16
|
// PINNED-BY-END
|
|
18
17
|
/**
|
|
19
|
-
* Pending-spawn gate: a queued NON-review spawn directive
|
|
20
|
-
* focus's next
|
|
18
|
+
* Pending-spawn gate: a queued NON-review spawn directive spawns only when the
|
|
19
|
+
* focus's ONE next step (supervision/focus-next-step.ts, read by
|
|
20
|
+
* completion/state-cascade/focus-next-step-read.ts) is a coding team. Any other
|
|
21
|
+
* answer -- a review, a gate run at HEAD, a hold, a merge, done -- drops it.
|
|
21
22
|
*
|
|
22
23
|
* processPendingSpawnFocuses (focus/focus-poller-spawn.ts) spawns a team from any
|
|
23
24
|
* queued directive. A coding directive stashed by the directive executor's
|
|
24
25
|
* no-active-team fallback can outlive the coding it was for: by the time it is
|
|
25
26
|
* consumed, every delivery is in verify with no open work. The coding lead it
|
|
26
27
|
* spawns has nothing to do, holds the focus's single team slot, and the review
|
|
27
|
-
* the cascade requests a second later cannot spawn. The
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* the cascade requests a second later cannot spawn. The state cascade's review
|
|
29
|
+
* request and verify's run selection act on the same decision, so the three never
|
|
30
|
+
* name different steps for one state: a parked shortfall (no truthful commit for a
|
|
31
|
+
* coding lead until verify releases the park), a gate owed or re-run at HEAD, and
|
|
32
|
+
* uncommitted work in the worktree (a coding team: the review judges a HEAD the
|
|
33
|
+
* work is not in) are all answered there, not here.
|
|
31
34
|
*
|
|
32
|
-
* A
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* ruling) and releases the park.
|
|
39
|
-
*
|
|
40
|
-
* The coding respawn the daemon itself queues to finish a teamless armed focus's
|
|
41
|
-
* UNCOMMITTED work (directive/directive-queue.ts queueDaemonCodingRespawn, purpose
|
|
42
|
-
* 'uncommitted_work'; focus/uncommitted-work-backstop.ts) is never dropped here
|
|
43
|
-
* either: a review judges the HEAD, and the work is not in it -- the next step is
|
|
44
|
-
* the coding lead that commits it, whatever the deliveries' statuses say.
|
|
45
|
-
*
|
|
46
|
-
* A REVIEW-lineage directive is never dropped here: it is the next step. When the
|
|
47
|
-
* deliveries or issues cannot be read, the directive is DEFERRED: it stays queued
|
|
48
|
-
* and nothing spawns this poll. Spawning the coding lead on an unreadable state
|
|
49
|
-
* would diverge from the cascade, which opens the review window on the delivery
|
|
50
|
-
* census when the issue read fails -- the same mutual wait this gate exists to
|
|
51
|
-
* prevent. Usually the deferral ends on its own: the state reads again, or the
|
|
52
|
-
* review directive the cascade's window triggers replaces the queued entry.
|
|
35
|
+
* A REVIEW-lineage directive is never dropped here: the review is the next step,
|
|
36
|
+
* or the review gates its own spawn. When the focus state cannot be read, the
|
|
37
|
+
* directive is DEFERRED: it stays queued and nothing spawns this poll -- spawning
|
|
38
|
+
* on an unknown state is what this gate exists to prevent. Usually the deferral
|
|
39
|
+
* ends on its own: the state reads again, or the review directive the cascade's
|
|
40
|
+
* window triggers replaces the queued entry.
|
|
53
41
|
*
|
|
54
42
|
* The deferral is BOUNDED like every other hold on a queued directive
|
|
55
43
|
* (completion/team-teardown/session-hold.ts). Its clock belongs to the queued directive
|
|
@@ -93,8 +81,7 @@ import { NO_HUMAN_ACT } from '../queries/escalations/filing-observation.js';
|
|
|
93
81
|
import { computeCauseKey } from '../queries/escalations/cause-key.js';
|
|
94
82
|
import { spoolEscalation } from '../supervision/escalation-spool.js';
|
|
95
83
|
import { FAIL_STOP_EXIT_CODE } from '../daemon-state/fail-stop.js';
|
|
96
|
-
import {
|
|
97
|
-
import { deriveFocusDeliveryAggregatePhase } from '../supervision/focus-delivery-aggregate-phase.js';
|
|
84
|
+
import { describeFocusNextStep, } from '../supervision/focus-next-step.js';
|
|
98
85
|
import { liveDaemonConfig as pollerConfig } from '../config/live-daemon-config.js';
|
|
99
86
|
import { createLogger } from '../log/daemon-log.js';
|
|
100
87
|
import { evaluateStop } from '../supervision/stop-registry.js';
|
|
@@ -130,34 +117,6 @@ export function __resetUnreadableDeferralsForTesting() {
|
|
|
130
117
|
function asError(err) {
|
|
131
118
|
return err instanceof Error ? err : new Error(String(err));
|
|
132
119
|
}
|
|
133
|
-
/** Read the shared review-next-step decision for the focus. */
|
|
134
|
-
async function readReviewNextStep(focus, deps) {
|
|
135
|
-
let deliveries;
|
|
136
|
-
try {
|
|
137
|
-
deliveries = await deps.getFocusDeliveries(focus.focus_id);
|
|
138
|
-
}
|
|
139
|
-
catch (err) {
|
|
140
|
-
return { next: 'unreadable', what: 'deliveries', error: asError(err) };
|
|
141
|
-
}
|
|
142
|
-
const decision = await resolveReviewNextStep({
|
|
143
|
-
// State, not stamp: review_requested_at is deliberately not an input.
|
|
144
|
-
phase: deriveFocusDeliveryAggregatePhase({
|
|
145
|
-
deliveries: deliveries.map((d) => ({ executionStatus: d.executionStatus ?? null })),
|
|
146
|
-
reviewRequestedAt: null,
|
|
147
|
-
}),
|
|
148
|
-
deliveries,
|
|
149
|
-
pipelineConfig: focus.pipeline_config,
|
|
150
|
-
readIssues: () => deps.getFocusIssues(focus.focus_id),
|
|
151
|
-
readConcernIds: () => deps.readRecordedConcernIds(focus.focus_id),
|
|
152
|
-
});
|
|
153
|
-
if (decision.step === 'issues_unreadable')
|
|
154
|
-
return { next: 'unreadable', what: 'issues', error: decision.error };
|
|
155
|
-
if (decision.step === 'concerns_unreadable')
|
|
156
|
-
return { next: 'unreadable', what: 'concerns', error: decision.error };
|
|
157
|
-
if (decision.step === 'review' || decision.step === 'parked')
|
|
158
|
-
return { next: decision.step };
|
|
159
|
-
return { next: 'coding' };
|
|
160
|
-
}
|
|
161
120
|
/**
|
|
162
121
|
* The ONE escalation an expired unreadable-state deferral owes. Restoring the
|
|
163
122
|
* focus-state read and re-queuing coding work are agent work (read the daemon log,
|
|
@@ -187,7 +146,7 @@ export function buildUnreadableDeferralEscalation(expiry) {
|
|
|
187
146
|
max_ms: UNREADABLE_DEFERRAL_MAX_MS,
|
|
188
147
|
},
|
|
189
148
|
description: `A queued ${expiry.sessionType} spawn directive for focus "${expiry.focusName}" was deferred for ${elapsedSec}s ` +
|
|
190
|
-
`because its ${expiry.what} could not be read to decide
|
|
149
|
+
`because its ${expiry.what} could not be read to decide the focus's next step ` +
|
|
191
150
|
`(${expiry.error.message}). The ${Math.round(UNREADABLE_DEFERRAL_MAX_MS / 1000)}s bound lapsed, so the directive ` +
|
|
192
151
|
`is dropped, rather than spawned onto an unknown state, once this escalation is durable (recorded, or spooled ` +
|
|
193
152
|
`locally while the escalation writer was unavailable).\n\n` +
|
|
@@ -322,7 +281,7 @@ async function deferOrExpire(focus, pending, read, deps) {
|
|
|
322
281
|
if (hold.action === 'expire')
|
|
323
282
|
return fireDeferralEscalation(focus, pending, clock, read, nowMs, deps);
|
|
324
283
|
log.warn(`[focus-poller] Deferring queued ${pending.sessionType} directive for "${focus.focus_name}" -- could not read ` +
|
|
325
|
-
`${read.what} to decide
|
|
284
|
+
`${read.what} to decide the focus's next step (${read.error.message}); it stays queued and is ` +
|
|
326
285
|
`re-read next poll (deferred ${Math.round(elapsedMs / 1000)}s of a ${Math.round(UNREADABLE_DEFERRAL_MAX_MS / 1000)}s bound)`);
|
|
327
286
|
return true;
|
|
328
287
|
}
|
|
@@ -337,25 +296,20 @@ async function deferOrExpire(focus, pending, read, deps) {
|
|
|
337
296
|
*/
|
|
338
297
|
export async function pendingCodingSpawnSupersededByReview(focus, deps) {
|
|
339
298
|
const pending = getPendingSpawnDirective(focus.focus_id);
|
|
340
|
-
|
|
341
|
-
if (!pending || pending.lineage === 'review' || pending.purpose === 'uncommitted_work')
|
|
299
|
+
if (!pending || pending.lineage === 'review')
|
|
342
300
|
return false;
|
|
343
|
-
const read = await
|
|
344
|
-
if (read.
|
|
301
|
+
const read = await deps.readNextStep(focus);
|
|
302
|
+
if (!read.readable)
|
|
345
303
|
return deferOrExpire(focus, pending, read, deps);
|
|
346
304
|
deferralClocks.delete(pending); // a readable poll ends this directive's deferral
|
|
347
305
|
const hold = evaluateStop('review_next_step_spawn_hold', {
|
|
348
|
-
nextStep: read.next, deferredMs: 0, maxMs: UNREADABLE_DEFERRAL_MAX_MS,
|
|
306
|
+
nextStep: read.next.step, deferredMs: 0, maxMs: UNREADABLE_DEFERRAL_MAX_MS,
|
|
349
307
|
});
|
|
350
308
|
if (hold.action === 'spawn')
|
|
351
309
|
return false;
|
|
352
310
|
clearPendingSpawnDirective(focus.focus_id);
|
|
353
|
-
log.info(
|
|
354
|
-
|
|
355
|
-
`parked on a repeating verify shortfall and no unparked one owes work; a coding lead has nothing truthful to commit ` +
|
|
356
|
-
`until verify releases the park`
|
|
357
|
-
: `[focus-poller] Dropping queued ${pending.sessionType} directive for "${focus.focus_name}" -- every delivery is in ` +
|
|
358
|
-
`verify with no open work and review is enabled; the next actionable step is a review pass, not a coding lead`);
|
|
311
|
+
log.info(`[focus-poller] Dropping queued ${pending.sessionType} directive for "${focus.focus_name}" -- the focus's next step is ` +
|
|
312
|
+
`${describeFocusNextStep(read.next)}, not a coding lead`);
|
|
359
313
|
return true;
|
|
360
314
|
}
|
|
361
315
|
//# sourceMappingURL=pending-spawn-review-next-step.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-spawn-review-next-step.js","sourceRoot":"","sources":["../../src/focus/pending-spawn-review-next-step.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"pending-spawn-review-next-step.js","sourceRoot":"","sources":["../../src/focus/pending-spawn-review-next-step.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,6FAA6F;AAC7F,kEAAkE;AAClE,uEAAuE;AACvE,8DAA8D;AAC9D,oEAAoE;AACpE,sEAAsE;AACtE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oC,CACxD,KAAsC,EACtC,IAAoC;IAEpC,MAAM,OAAO,GAAG,wBAAwB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzD,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC3D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC5C,IAAI,CAAC,IAAI,CAAC,QAAQ;QAAE,OAAO,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACrE,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,iDAAiD;IACjF,MAAM,IAAI,GAAG,YAAY,CAAC,6BAA6B,EAAE;QACvD,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,0BAA0B;KAC3E,CAAC,CAAC;IACH,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IAC1C,0BAA0B,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3C,GAAG,CAAC,IAAI,CACN,kCAAkC,OAAO,CAAC,WAAW,mBAAmB,KAAK,CAAC,UAAU,gCAAgC;QACxH,GAAG,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CACzD,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FocusNextStepReader, NextStepFocusRow } from '../supervision/focus-next-step.js';
|
|
2
|
+
/** The re-fire gate's reads (the root's `reviewRefire` binding). */
|
|
3
|
+
export interface ReviewRefireDeps {
|
|
4
|
+
/** The focus's deliveries with their gate_state: the gate-verdict hold read. */
|
|
5
|
+
getFocusDeliveries: (focusId: string) => Promise<ReadonlyArray<{
|
|
6
|
+
id: string;
|
|
7
|
+
executionStatus?: string | null;
|
|
8
|
+
gateState?: unknown;
|
|
9
|
+
}>>;
|
|
10
|
+
readNextStep: FocusNextStepReader;
|
|
11
|
+
}
|
|
12
|
+
/** The focus slice the gate reads. */
|
|
13
|
+
export interface ReviewRefireFocus extends NextStepFocusRow {
|
|
14
|
+
focus_name: string;
|
|
15
|
+
operator_stopped_at?: string | null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The gate-verdict hold read, tri-state: 'held' when some verify delivery carries
|
|
19
|
+
* the commit-verdict hold marker the review exit wrote (delivery/commit-verdict-hold.ts),
|
|
20
|
+
* 'clear' when the deliveries read and none does, 'unreadable' when the read failed.
|
|
21
|
+
*/
|
|
22
|
+
export declare function readReviewWindowGateHold(focus: Pick<ReviewRefireFocus, 'focus_id' | 'focus_name'>, deps: Pick<ReviewRefireDeps, 'getFocusDeliveries'>): Promise<'held' | 'clear' | 'unreadable'>;
|
|
23
|
+
/** True = re-fire the review directive (module header). Never throws. */
|
|
24
|
+
export declare function reviewMayRefire(focus: ReviewRefireFocus, stageName: string | undefined, hasActiveTeam: boolean, deps: ReviewRefireDeps): Promise<boolean>;
|
|
25
|
+
//# sourceMappingURL=review-refire-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-refire-gate.d.ts","sourceRoot":"","sources":["../../src/focus/review-refire-gate.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAK/F,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,gFAAgF;IAChF,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IACtI,YAAY,EAAE,mBAAmB,CAAC;CACnC;AAED,sCAAsC;AACtC,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,YAAY,CAAC,EACzD,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,oBAAoB,CAAC,GACjD,OAAO,CAAC,MAAM,GAAG,OAAO,GAAG,YAAY,CAAC,CAO1C;AAED,yEAAyE;AACzE,wBAAsB,eAAe,CACnC,KAAK,EAAE,iBAAiB,EACxB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,aAAa,EAAE,OAAO,EACtB,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,OAAO,CAAC,CAelB"}
|