@telora/daemon 0.23.1 → 0.23.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-info.json +6 -3
- package/dist/completion/review-exit/review-exit-deps.d.ts +2 -1
- package/dist/completion/review-exit/review-exit-deps.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-phase.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-phase.js +5 -4
- package/dist/completion/review-exit/review-exit-phase.js.map +1 -1
- package/dist/completion/review-exit-holds/review-exit-verdict-gate.d.ts +2 -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 +8 -5
- package/dist/completion/review-exit-holds/review-exit-verdict-gate.js.map +1 -1
- package/dist/completion/state-cascade/review-next-step.d.ts.map +1 -1
- package/dist/completion/state-cascade/review-next-step.js +15 -8
- package/dist/completion/state-cascade/review-next-step.js.map +1 -1
- package/dist/completion/team-exit/status-advance-phase.d.ts.map +1 -1
- package/dist/completion/team-exit/status-advance-phase.js +6 -6
- package/dist/completion/team-exit/status-advance-phase.js.map +1 -1
- package/dist/completion/team-liveness/supervision-firing-record.d.ts +6 -0
- package/dist/completion/team-liveness/supervision-firing-record.d.ts.map +1 -1
- package/dist/completion/team-liveness/supervision-firing-record.js +10 -1
- package/dist/completion/team-liveness/supervision-firing-record.js.map +1 -1
- package/dist/completion/team-outcome/decide-close-rows.d.ts +9 -0
- package/dist/completion/team-outcome/decide-close-rows.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide-close-rows.js +18 -4
- package/dist/completion/team-outcome/decide-close-rows.js.map +1 -1
- package/dist/composition/completion-event-context.js +2 -2
- package/dist/composition/completion-event-context.js.map +1 -1
- package/dist/composition/daemon-contexts.d.ts.map +1 -1
- package/dist/composition/daemon-contexts.js +5 -1
- package/dist/composition/daemon-contexts.js.map +1 -1
- package/dist/composition/engine-start-context.d.ts +3 -0
- package/dist/composition/engine-start-context.d.ts.map +1 -0
- package/dist/composition/engine-start-context.js +24 -0
- package/dist/composition/engine-start-context.js.map +1 -0
- package/dist/composition/execution-spawn-context.d.ts.map +1 -1
- package/dist/composition/execution-spawn-context.js +13 -1
- package/dist/composition/execution-spawn-context.js.map +1 -1
- package/dist/composition/runtime-delivery-advance-context.js +3 -3
- package/dist/composition/runtime-delivery-advance-context.js.map +1 -1
- package/dist/composition/runtime-heartbeat-context.d.ts.map +1 -1
- package/dist/composition/runtime-heartbeat-context.js +3 -0
- package/dist/composition/runtime-heartbeat-context.js.map +1 -1
- package/dist/composition/runtime-poll-context.d.ts +29 -2
- package/dist/composition/runtime-poll-context.d.ts.map +1 -1
- package/dist/composition/runtime-poll-context.js +51 -4
- package/dist/composition/runtime-poll-context.js.map +1 -1
- package/dist/composition/runtime-prd-context.d.ts.map +1 -1
- package/dist/composition/runtime-prd-context.js +25 -1
- package/dist/composition/runtime-prd-context.js.map +1 -1
- package/dist/composition/runtime-spawn-pass-context.js +1 -1
- package/dist/composition/runtime-spawn-pass-context.js.map +1 -1
- package/dist/composition/spawn-pass-deps.d.ts +1 -1
- package/dist/composition/spawn-pass-deps.d.ts.map +1 -1
- package/dist/composition/spawn-pass-deps.js +3 -0
- package/dist/composition/spawn-pass-deps.js.map +1 -1
- package/dist/composition/standing-approval-context.d.ts.map +1 -1
- package/dist/composition/standing-approval-context.js +2 -1
- package/dist/composition/standing-approval-context.js.map +1 -1
- package/dist/composition/state-cascade-context.js +1 -1
- package/dist/composition/state-cascade-context.js.map +1 -1
- package/dist/composition/tower-pass-context.d.ts +9 -0
- package/dist/composition/tower-pass-context.d.ts.map +1 -0
- package/dist/composition/tower-pass-context.js +53 -0
- package/dist/composition/tower-pass-context.js.map +1 -0
- package/dist/composition/verify-probe-context.d.ts.map +1 -1
- package/dist/composition/verify-probe-context.js +5 -4
- package/dist/composition/verify-probe-context.js.map +1 -1
- package/dist/composition/verify-rework-context.d.ts +26 -2
- package/dist/composition/verify-rework-context.d.ts.map +1 -1
- package/dist/composition/verify-rework-context.js +34 -10
- package/dist/composition/verify-rework-context.js.map +1 -1
- package/dist/config/live-daemon-config.d.ts.map +1 -1
- package/dist/config/live-daemon-config.js +1 -19
- package/dist/config/live-daemon-config.js.map +1 -1
- package/dist/daemon-state/awaiting-slot.d.ts.map +1 -1
- package/dist/daemon-state/awaiting-slot.js +2 -1
- package/dist/daemon-state/awaiting-slot.js.map +1 -1
- package/dist/daemon-state/focus-team-state.js +1 -1
- package/dist/daemon-state/intake-control.d.ts.map +1 -1
- package/dist/daemon-state/intake-control.js +2 -1
- package/dist/daemon-state/intake-control.js.map +1 -1
- package/dist/delivery/recorded-concerns.d.ts +19 -2
- package/dist/delivery/recorded-concerns.d.ts.map +1 -1
- package/dist/delivery/recorded-concerns.js +32 -6
- package/dist/delivery/recorded-concerns.js.map +1 -1
- package/dist/directive/directive-queue.js +1 -1
- package/dist/focus/closed-review-window.d.ts +12 -0
- package/dist/focus/closed-review-window.d.ts.map +1 -1
- package/dist/focus/closed-review-window.js +18 -0
- package/dist/focus/closed-review-window.js.map +1 -1
- package/dist/focus/control-state.d.ts +30 -26
- package/dist/focus/control-state.d.ts.map +1 -1
- package/dist/focus/control-state.js +60 -46
- package/dist/focus/control-state.js.map +1 -1
- package/dist/focus/daemon-contexts.d.ts +23 -0
- package/dist/focus/daemon-contexts.d.ts.map +1 -1
- package/dist/focus/daemon-contexts.js +1 -1
- package/dist/focus/daemon-contexts.js.map +1 -1
- package/dist/focus/engine-ready-pass.d.ts +11 -0
- package/dist/focus/engine-ready-pass.d.ts.map +1 -0
- package/dist/focus/engine-ready-pass.js +25 -0
- package/dist/focus/engine-ready-pass.js.map +1 -0
- package/dist/focus/failed-head-wedge.d.ts +95 -0
- package/dist/focus/failed-head-wedge.d.ts.map +1 -0
- package/dist/focus/failed-head-wedge.js +85 -0
- package/dist/focus/failed-head-wedge.js.map +1 -0
- package/dist/focus/focus-engine.d.ts.map +1 -1
- package/dist/focus/focus-engine.js +20 -20
- package/dist/focus/focus-engine.js.map +1 -1
- package/dist/focus/focus-loop-registry.d.ts.map +1 -1
- package/dist/focus/focus-loop-registry.js +2 -1
- package/dist/focus/focus-loop-registry.js.map +1 -1
- package/dist/focus/focus-poller-auto-advance.d.ts.map +1 -1
- package/dist/focus/focus-poller-auto-advance.js +4 -4
- package/dist/focus/focus-poller-auto-advance.js.map +1 -1
- package/dist/focus/focus-poller-spawn.d.ts +42 -49
- package/dist/focus/focus-poller-spawn.d.ts.map +1 -1
- package/dist/focus/focus-poller-spawn.js +129 -83
- package/dist/focus/focus-poller-spawn.js.map +1 -1
- package/dist/focus/focus-poller-state.d.ts.map +1 -1
- package/dist/focus/focus-poller-state.js +1 -19
- package/dist/focus/focus-poller-state.js.map +1 -1
- package/dist/focus/focus-poller.d.ts.map +1 -1
- package/dist/focus/focus-poller.js +2 -1
- package/dist/focus/focus-poller.js.map +1 -1
- package/dist/focus/focus-respawn-guard.d.ts +7 -0
- package/dist/focus/focus-respawn-guard.d.ts.map +1 -1
- package/dist/focus/focus-respawn-guard.js +20 -1
- package/dist/focus/focus-respawn-guard.js.map +1 -1
- package/dist/focus/focus-spawn-decision.d.ts +11 -3
- package/dist/focus/focus-spawn-decision.d.ts.map +1 -1
- package/dist/focus/focus-spawn-decision.js +3 -1
- package/dist/focus/focus-spawn-decision.js.map +1 -1
- package/dist/focus/heartbeat-metadata.d.ts +3 -0
- package/dist/focus/heartbeat-metadata.d.ts.map +1 -1
- package/dist/focus/heartbeat-metadata.js +6 -1
- package/dist/focus/heartbeat-metadata.js.map +1 -1
- package/dist/focus/heartbeat.d.ts.map +1 -1
- package/dist/focus/heartbeat.js +2 -0
- package/dist/focus/heartbeat.js.map +1 -1
- package/dist/focus/pending-directive-gates.d.ts +47 -0
- package/dist/focus/pending-directive-gates.d.ts.map +1 -0
- package/dist/focus/pending-directive-gates.js +76 -0
- package/dist/focus/pending-directive-gates.js.map +1 -0
- package/dist/focus/pending-review-approved-head.d.ts +2 -1
- package/dist/focus/pending-review-approved-head.d.ts.map +1 -1
- package/dist/focus/pending-review-approved-head.js +3 -4
- package/dist/focus/pending-review-approved-head.js.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.d.ts +5 -0
- package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.js +4 -1
- package/dist/focus/pending-spawn-pass-deps.js.map +1 -1
- package/dist/focus/pending-spawn-verify-hold.d.ts +13 -0
- package/dist/focus/pending-spawn-verify-hold.d.ts.map +1 -0
- package/dist/focus/pending-spawn-verify-hold.js +30 -0
- package/dist/focus/pending-spawn-verify-hold.js.map +1 -0
- package/dist/focus/ready-focus-spawn-action.d.ts +15 -2
- package/dist/focus/ready-focus-spawn-action.d.ts.map +1 -1
- package/dist/focus/ready-focus-spawn-action.js +25 -8
- package/dist/focus/ready-focus-spawn-action.js.map +1 -1
- package/dist/focus/spawn-demand-probe.d.ts +45 -0
- package/dist/focus/spawn-demand-probe.d.ts.map +1 -0
- package/dist/focus/spawn-demand-probe.js +74 -0
- package/dist/focus/spawn-demand-probe.js.map +1 -0
- package/dist/focus/stranded-review-reroute.d.ts.map +1 -1
- package/dist/focus/stranded-review-reroute.js +5 -3
- package/dist/focus/stranded-review-reroute.js.map +1 -1
- package/dist/focus/verify-routing-passes.d.ts +8 -3
- package/dist/focus/verify-routing-passes.d.ts.map +1 -1
- package/dist/focus/verify-routing-passes.js +1 -0
- package/dist/focus/verify-routing-passes.js.map +1 -1
- package/dist/git/focus-branch-containment.d.ts +39 -0
- package/dist/git/focus-branch-containment.d.ts.map +1 -0
- package/dist/git/focus-branch-containment.js +47 -0
- package/dist/git/focus-branch-containment.js.map +1 -0
- package/dist/git/types.d.ts.map +1 -1
- package/dist/git/types.js +2 -0
- package/dist/git/types.js.map +1 -1
- package/dist/poll-trigger.js +1 -1
- package/dist/poll-trigger.js.map +1 -1
- package/dist/prd/arm-readiness.d.ts.map +1 -1
- package/dist/prd/arm-readiness.js +2 -1
- package/dist/prd/arm-readiness.js.map +1 -1
- package/dist/prd/controller-shared.d.ts +32 -8
- package/dist/prd/controller-shared.d.ts.map +1 -1
- package/dist/prd/controller-shared.js +34 -18
- package/dist/prd/controller-shared.js.map +1 -1
- package/dist/prd/controller.d.ts.map +1 -1
- package/dist/prd/controller.js +3 -8
- package/dist/prd/controller.js.map +1 -1
- package/dist/prd/done-sweep.d.ts.map +1 -1
- package/dist/prd/done-sweep.js +2 -7
- package/dist/prd/done-sweep.js.map +1 -1
- package/dist/prd/frontier-arming.d.ts +13 -1
- package/dist/prd/frontier-arming.d.ts.map +1 -1
- package/dist/prd/frontier-arming.js +50 -2
- package/dist/prd/frontier-arming.js.map +1 -1
- package/dist/prd/index.d.ts.map +1 -1
- package/dist/prd/index.js +2 -1
- package/dist/prd/index.js.map +1 -1
- package/dist/queries/api-client/shared.d.ts +1 -0
- package/dist/queries/api-client/shared.d.ts.map +1 -1
- package/dist/queries/api-client/shared.js +16 -1
- package/dist/queries/api-client/shared.js.map +1 -1
- package/dist/queries/deliveries/issues.d.ts.map +1 -1
- package/dist/queries/deliveries/issues.js +3 -0
- package/dist/queries/deliveries/issues.js.map +1 -1
- package/dist/queries/focuses/focus-discovery.d.ts +15 -0
- package/dist/queries/focuses/focus-discovery.d.ts.map +1 -1
- package/dist/queries/focuses/focus-discovery.js +10 -1
- package/dist/queries/focuses/focus-discovery.js.map +1 -1
- package/dist/queries/prd/prd.d.ts.map +1 -1
- package/dist/queries/prd/prd.js +2 -1
- package/dist/queries/prd/prd.js.map +1 -1
- package/dist/queries/tower/tower-state.d.ts +56 -0
- package/dist/queries/tower/tower-state.d.ts.map +1 -0
- package/dist/queries/tower/tower-state.js +76 -0
- package/dist/queries/tower/tower-state.js.map +1 -0
- package/dist/queries/verification/verification.js +1 -1
- package/dist/queries/wire-schemas/schemas.d.ts +12 -0
- package/dist/queries/wire-schemas/schemas.d.ts.map +1 -1
- package/dist/queries/wire-schemas/schemas.js +11 -0
- package/dist/queries/wire-schemas/schemas.js.map +1 -1
- package/dist/spawn/lead-continuation.d.ts +9 -1
- package/dist/spawn/lead-continuation.d.ts.map +1 -1
- package/dist/spawn/lead-continuation.js +37 -11
- package/dist/spawn/lead-continuation.js.map +1 -1
- package/dist/spawn/spawn-decision.d.ts.map +1 -1
- package/dist/spawn/spawn-decision.js +4 -1
- package/dist/spawn/spawn-decision.js.map +1 -1
- package/dist/supervision/spawn-cooldown.js +1 -1
- package/dist/supervision/stop-rows-team-session.d.ts.map +1 -1
- package/dist/supervision/stop-rows-team-session.js +11 -10
- package/dist/supervision/stop-rows-team-session.js.map +1 -1
- package/dist/supervision/team-work.d.ts.map +1 -1
- package/dist/supervision/team-work.js +3 -1
- package/dist/supervision/team-work.js.map +1 -1
- package/dist/testing/fixtures/api-client.js +1 -1
- package/dist/testing/fixtures/approved-head-inert-deps.js +1 -1
- package/dist/testing/fixtures/approved-head-inert-deps.js.map +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.js +3 -1
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
- package/dist/testing/fixtures/review-exit-deps.js +1 -1
- package/dist/testing/fixtures/review-exit-deps.js.map +1 -1
- package/dist/testing/fixtures/verification-deps.js +1 -1
- package/dist/testing/fixtures/verification-feedback-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/verification-feedback-deps.js +2 -0
- package/dist/testing/fixtures/verification-feedback-deps.js.map +1 -1
- package/dist/testing/fixtures/worktree-provisioning-test-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/worktree-provisioning-test-deps.js +1 -0
- package/dist/testing/fixtures/worktree-provisioning-test-deps.js.map +1 -1
- package/dist/tower/focus-landed.d.ts +4 -0
- package/dist/tower/focus-landed.d.ts.map +1 -0
- package/dist/tower/focus-landed.js +45 -0
- package/dist/tower/focus-landed.js.map +1 -0
- package/dist/tower/tower-admission.d.ts +91 -0
- package/dist/tower/tower-admission.d.ts.map +1 -0
- package/dist/tower/tower-admission.js +137 -0
- package/dist/tower/tower-admission.js.map +1 -0
- package/dist/tower/tower-graph.d.ts +23 -0
- package/dist/tower/tower-graph.d.ts.map +1 -0
- package/dist/tower/tower-graph.js +53 -0
- package/dist/tower/tower-graph.js.map +1 -0
- package/dist/tower/tower-heartbeat-status.d.ts +28 -0
- package/dist/tower/tower-heartbeat-status.d.ts.map +1 -0
- package/dist/tower/tower-heartbeat-status.js +11 -0
- package/dist/tower/tower-heartbeat-status.js.map +1 -0
- package/dist/tower/tower-mode.d.ts +9 -0
- package/dist/tower/tower-mode.d.ts.map +1 -0
- package/dist/tower/tower-mode.js +16 -0
- package/dist/tower/tower-mode.js.map +1 -0
- package/dist/tower/tower-pass-standing.d.ts +8 -0
- package/dist/tower/tower-pass-standing.d.ts.map +1 -0
- package/dist/tower/tower-pass-standing.js +50 -0
- package/dist/tower/tower-pass-standing.js.map +1 -0
- package/dist/tower/tower-pass.d.ts +55 -0
- package/dist/tower/tower-pass.d.ts.map +1 -0
- package/dist/tower/tower-pass.js +59 -0
- package/dist/tower/tower-pass.js.map +1 -0
- package/dist/tower/tower-production-pass.d.ts +3 -0
- package/dist/tower/tower-production-pass.d.ts.map +1 -0
- package/dist/tower/tower-production-pass.js +24 -0
- package/dist/tower/tower-production-pass.js.map +1 -0
- package/dist/tower/tower-spawn-intent.d.ts +72 -0
- package/dist/tower/tower-spawn-intent.d.ts.map +1 -0
- package/dist/tower/tower-spawn-intent.js +138 -0
- package/dist/tower/tower-spawn-intent.js.map +1 -0
- package/dist/tower/tower-verdicts.d.ts +81 -0
- package/dist/tower/tower-verdicts.d.ts.map +1 -0
- package/dist/tower/tower-verdicts.js +139 -0
- package/dist/tower/tower-verdicts.js.map +1 -0
- package/dist/types/index.js +1 -1
- package/dist/types/issue-status.d.ts +14 -0
- package/dist/types/issue-status.d.ts.map +1 -1
- package/dist/types/issue-status.js +14 -0
- package/dist/types/issue-status.js.map +1 -1
- package/dist/verify/deterministic-gate/verification-checkout.d.ts +8 -1
- package/dist/verify/deterministic-gate/verification-checkout.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-checkout.js +94 -15
- package/dist/verify/deterministic-gate/verification-checkout.js.map +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.js +1 -0
- package/dist/verify/deterministic-gate/verification-deterministic.js.map +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts +44 -5
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.js +85 -27
- package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
- package/dist/worktree/focus-worktree-state.d.ts.map +1 -1
- package/dist/worktree/focus-worktree-state.js +1 -0
- package/dist/worktree/focus-worktree-state.js.map +1 -1
- package/dist/worktree/verify-interlock.d.ts.map +1 -1
- package/dist/worktree/verify-interlock.js +1 -0
- package/dist/worktree/verify-interlock.js.map +1 -1
- package/dist/worktree/worktree-package-provisioning.d.ts +6 -1
- package/dist/worktree/worktree-package-provisioning.d.ts.map +1 -1
- package/dist/worktree/worktree-package-provisioning.js +37 -17
- package/dist/worktree/worktree-package-provisioning.js.map +1 -1
- package/package.json +3 -3
|
@@ -28,6 +28,7 @@ import type { NextSpawnRouteDeps } from '../spawn/next-spawn-cooldown.js';
|
|
|
28
28
|
import type { PendingSpawnGuardDeps } from '../spawn/guards.js';
|
|
29
29
|
import type { RespawnCycleEscalationDeps } from '../spawn/respawn-cycle-escalation.js';
|
|
30
30
|
import type { ReadReviewWindow } from './closed-review-window.js';
|
|
31
|
+
import type { TowerAdmissionDeps } from '../tower/tower-admission.js';
|
|
31
32
|
/** The spawn passes' own reads and the spawn, bound at the composition root (RuntimeContexts.spawnPass). */
|
|
32
33
|
export interface SpawnPassContext {
|
|
33
34
|
/** Ready focuses per product (the focuses the ready pass may spawn a team for). */
|
|
@@ -63,6 +64,8 @@ export interface ReadyFocusPassDeps {
|
|
|
63
64
|
readyFocusHasTeamWork: (focus: ReadyFocusWorkRow) => Promise<boolean>;
|
|
64
65
|
/** The focus's review window, read when a review directive is queued (focus/closed-review-window.ts). */
|
|
65
66
|
readReviewWindow: ReadReviewWindow;
|
|
67
|
+
/** The tower's mode and pass standing, read each pass (tower/tower-admission.ts). */
|
|
68
|
+
tower: TowerAdmissionDeps;
|
|
66
69
|
}
|
|
67
70
|
/** The pending-spawn pass's collaborators. */
|
|
68
71
|
export interface PendingSpawnPassDeps {
|
|
@@ -90,5 +93,7 @@ export interface PendingSpawnPassDeps {
|
|
|
90
93
|
pendingSpawnGuard: PendingSpawnGuardDeps;
|
|
91
94
|
/** The respawn_cycle_exhausted filing a terminated respawn cycle owes (spawn/respawn-cycle-escalation.ts). */
|
|
92
95
|
respawnCycleEscalation: RespawnCycleEscalationDeps;
|
|
96
|
+
/** The tower's mode and pass standing, read each pass (tower/tower-admission.ts). */
|
|
97
|
+
tower: TowerAdmissionDeps;
|
|
93
98
|
}
|
|
94
99
|
//# sourceMappingURL=pending-spawn-pass-deps.d.ts.map
|
|
@@ -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","sourceRoot":"","sources":["../../src/focus/pending-spawn-pass-deps.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,8BAA8B,EAAE,M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A6B,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;CAC3B"}
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
// packages/daemon/src/focus/gaps-found-hands-to-coding.test.ts,
|
|
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
|
-
// packages/daemon/src/focus/unclaimed-notice-coding-precedence.test.ts
|
|
7
|
+
// packages/daemon/src/focus/unclaimed-notice-coding-precedence.test.ts,
|
|
8
|
+
// packages/daemon/src/tower/tower-entrypoints.test.ts, packages/daemon/src/tower/tower-prd-arm.test.ts,
|
|
9
|
+
// packages/daemon/src/tower/tower-ready-row-ingestion.test.ts,
|
|
10
|
+
// packages/daemon/src/tower/tower-spawn-modes.test.ts
|
|
8
11
|
// PINNED-BY-END
|
|
9
12
|
export {};
|
|
10
13
|
//# sourceMappingURL=pending-spawn-pass-deps.js.map
|
|
@@ -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,
|
|
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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type FocusHoldWorkDeps } from '../worktree/verify-hold-facts.js';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a pending spawn directive must be DEFERRED because an in-flight verify
|
|
4
|
+
* hold covers the focus's only open work -- read through the ONE shared predicate,
|
|
5
|
+
* so a sibling delivery's open work outside the verified delivery still spawns
|
|
6
|
+
* (f1, 2026-09-13). A REVIEW-lineage pending directive is EXEMPT (returns false
|
|
7
|
+
* even while held): the review is exactly the work that releases the deliveries
|
|
8
|
+
* the hold is holding, so gating it would deadlock the focus in verify. Mirrors
|
|
9
|
+
* the directive gate's lineage exemption (directive/directive-verify-hold-gate.ts)
|
|
10
|
+
* and the review-always-spawnable rule, so the two disposal sites cannot drift.
|
|
11
|
+
*/
|
|
12
|
+
export declare function pendingSpawnDeferredByVerifyHold(focusId: string, deps: FocusHoldWorkDeps): Promise<boolean>;
|
|
13
|
+
//# sourceMappingURL=pending-spawn-verify-hold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pending-spawn-verify-hold.d.ts","sourceRoot":"","sources":["../../src/focus/pending-spawn-verify-hold.ts"],"names":[],"mappings":"AAaA,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGvG;;;;;;;;;GASG;AACH,wBAAsB,gCAAgC,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAIjH"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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/pending-spawn-verify-hold.test.ts,
|
|
3
|
+
// packages/daemon/src/worktree/verify-hold-facts.test.ts
|
|
4
|
+
// PINNED-BY-END
|
|
5
|
+
/**
|
|
6
|
+
* The pending-spawn pass's verify-hold gate, shared by the pass
|
|
7
|
+
* (focus-poller-spawn.ts processPendingSpawnFocuses) and the tower's demand
|
|
8
|
+
* probe (spawn-demand-probe.ts), so the two cannot disagree on whether a queued
|
|
9
|
+
* directive is deferred.
|
|
10
|
+
*/
|
|
11
|
+
import { getPendingSpawnDirective } from '../directive/directive-queue.js';
|
|
12
|
+
import { resolveFocusVerifyHoldFacts } from '../worktree/verify-hold-facts.js';
|
|
13
|
+
import { focusHasTeamActionableWork } from '../supervision/team-work.js';
|
|
14
|
+
/**
|
|
15
|
+
* Whether a pending spawn directive must be DEFERRED because an in-flight verify
|
|
16
|
+
* hold covers the focus's only open work -- read through the ONE shared predicate,
|
|
17
|
+
* so a sibling delivery's open work outside the verified delivery still spawns
|
|
18
|
+
* (f1, 2026-09-13). A REVIEW-lineage pending directive is EXEMPT (returns false
|
|
19
|
+
* even while held): the review is exactly the work that releases the deliveries
|
|
20
|
+
* the hold is holding, so gating it would deadlock the focus in verify. Mirrors
|
|
21
|
+
* the directive gate's lineage exemption (directive/directive-verify-hold-gate.ts)
|
|
22
|
+
* and the review-always-spawnable rule, so the two disposal sites cannot drift.
|
|
23
|
+
*/
|
|
24
|
+
export async function pendingSpawnDeferredByVerifyHold(focusId, deps) {
|
|
25
|
+
if (getPendingSpawnDirective(focusId)?.lineage === 'review')
|
|
26
|
+
return false;
|
|
27
|
+
const facts = await resolveFocusVerifyHoldFacts(focusId, deps);
|
|
28
|
+
return !focusHasTeamActionableWork({ hasUnheldActionableWork: true, ...facts });
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=pending-spawn-verify-hold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pending-spawn-verify-hold.js","sourceRoot":"","sources":["../../src/focus/pending-spawn-verify-hold.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0EAA0E;AAC1E,2DAA2D;AAC3D,gBAAgB;AAEhB;;;;;GAKG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAA0B,MAAM,kCAAkC,CAAC;AACvG,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEzE;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAAC,OAAe,EAAE,IAAuB;IAC7F,IAAI,wBAAwB,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC1E,MAAM,KAAK,GAAG,MAAM,2BAA2B,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC/D,OAAO,CAAC,0BAA0B,CAAC,EAAE,uBAAuB,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* decideFocusSpawn verdict out. Nothing here imports focus-poller-spawn.
|
|
4
4
|
*/
|
|
5
5
|
import type { AgentRole, DaemonConfig } from '../types/index.js';
|
|
6
|
-
import { type FocusSpawnAction } from './focus-spawn-decision.js';
|
|
6
|
+
import { type FocusSpawnAction, type FocusSpawnGate } from './focus-spawn-decision.js';
|
|
7
7
|
import type { ReadyFocusWorkRow } from './ready-focus-team-work.js';
|
|
8
8
|
import type { createReadyFocusCapHoldReader } from '../supervision/review-cycle-cap-hold.js';
|
|
9
9
|
import type { ReadyFocusPassDeps } from './pending-spawn-pass-deps.js';
|
|
10
10
|
import { type NextSpawnRoute } from '../spawn/index.js';
|
|
11
|
+
import { type TowerAdmissionFocus, type TowerGateOutcome } from '../tower/tower-admission.js';
|
|
11
12
|
/** The ready-focus row slice the review-cycle cap hold reader takes. */
|
|
12
13
|
export type ReadyFocusCapHoldTarget = Parameters<ReturnType<typeof createReadyFocusCapHoldReader>>[0];
|
|
13
14
|
/** The escapes that spawn past the work fact (see decideFocusSpawn `forced`). */
|
|
@@ -22,6 +23,18 @@ type ReadyFocusEscapes = {
|
|
|
22
23
|
* focus. The review-cycle cap hold is read only for a focus with no team (the
|
|
23
24
|
* pass's reader, one count read per product).
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
+
/** The ready-focus row a spawn-gate read takes. */
|
|
27
|
+
export type ReadyFocusGateRow = ReadyFocusCapHoldTarget & NextSpawnRoute & ReadyFocusWorkRow & ReadyFocusEscapes;
|
|
28
|
+
/**
|
|
29
|
+
* Read one ready focus's spawn-gate inputs from live state -- every gate but the
|
|
30
|
+
* tower's (towerHolds is left unset). The ONE read both the spawn pass
|
|
31
|
+
* (resolveReadyFocusSpawnAction) and the tower's demand probe
|
|
32
|
+
* (focus/spawn-demand-probe.ts) decide over, so the two cannot disagree on
|
|
33
|
+
* whether a focus could run.
|
|
34
|
+
*/
|
|
35
|
+
export declare function readReadyFocusGate(focus: ReadyFocusGateRow, role: AgentRole | undefined, deps: Pick<ReadyFocusPassDeps, 'resolveFocusVerifyHoldFacts' | 'readyFocusHasTeamWork'>, cfg: DaemonConfig, readCapHold: (focus: ReadyFocusCapHoldTarget) => Promise<boolean>): Promise<FocusSpawnGate>;
|
|
36
|
+
export declare function resolveReadyFocusSpawnAction(focus: ReadyFocusGateRow & TowerAdmissionFocus, role: AgentRole | undefined, deps: ReadyFocusPassDeps, cfg: DaemonConfig, readCapHold: (focus: ReadyFocusCapHoldTarget) => Promise<boolean>): Promise<FocusSpawnAction>;
|
|
37
|
+
/** How the tower reads a spawn-gate action: wanting a team (and how it ended) or not. */
|
|
38
|
+
export declare function towerOutcome(action: FocusSpawnAction): TowerGateOutcome;
|
|
26
39
|
export {};
|
|
27
40
|
//# sourceMappingURL=ready-focus-spawn-action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ready-focus-spawn-action.d.ts","sourceRoot":"","sources":["../../src/focus/ready-focus-spawn-action.ts"],"names":[],"mappings":"AAIA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ready-focus-spawn-action.d.ts","sourceRoot":"","sources":["../../src/focus/ready-focus-spawn-action.ts"],"names":[],"mappings":"AAIA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAoB,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACzG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EAA4C,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAExI,wEAAwE;AACxE,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtG,iFAAiF;AACjF,KAAK,iBAAiB,GAAG;IAAE,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,+BAA+B,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjH;;;;;;GAMG;AACH,mDAAmD;AACnD,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,cAAc,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAEjH;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,iBAAiB,EACxB,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,6BAA6B,GAAG,uBAAuB,CAAC,EACvF,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,OAAO,CAAC,OAAO,CAAC,GAChE,OAAO,CAAC,cAAc,CAAC,CAezB;AAED,wBAAsB,4BAA4B,CAChD,KAAK,EAAE,iBAAiB,GAAG,mBAAmB,EAC9C,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,IAAI,EAAE,kBAAkB,EACxB,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,OAAO,CAAC,OAAO,CAAC,GAChE,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAOvE"}
|
|
@@ -5,17 +5,18 @@ import { decideFocusSpawn } from './focus-spawn-decision.js';
|
|
|
5
5
|
import { hasActiveTeam, getActiveTeamCount } from '../daemon-state/focus-team-state.js';
|
|
6
6
|
import { isNextSpawnInCooldown } from '../spawn/index.js';
|
|
7
7
|
import { installedDaemonContexts } from './daemon-contexts.js';
|
|
8
|
+
import { decideTowerAdmission, noteTowerAdmission } from '../tower/tower-admission.js';
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
-
* is
|
|
11
|
-
*
|
|
12
|
-
* focus.
|
|
13
|
-
*
|
|
10
|
+
* Read one ready focus's spawn-gate inputs from live state -- every gate but the
|
|
11
|
+
* tower's (towerHolds is left unset). The ONE read both the spawn pass
|
|
12
|
+
* (resolveReadyFocusSpawnAction) and the tower's demand probe
|
|
13
|
+
* (focus/spawn-demand-probe.ts) decide over, so the two cannot disagree on
|
|
14
|
+
* whether a focus could run.
|
|
14
15
|
*/
|
|
15
|
-
export async function
|
|
16
|
+
export async function readReadyFocusGate(focus, role, deps, cfg, readCapHold) {
|
|
16
17
|
const focusId = focus.focus_id;
|
|
17
18
|
const forced = focus.answer_rearm_requested_at != null || focus.unclaimed_migration_notice_owed === true;
|
|
18
|
-
return
|
|
19
|
+
return {
|
|
19
20
|
hasRole: role !== undefined,
|
|
20
21
|
hasActiveTeam: hasActiveTeam(focusId),
|
|
21
22
|
reviewCycleCapHeld: !hasActiveTeam(focusId) && await readCapHold(focus),
|
|
@@ -26,6 +27,22 @@ export async function resolveReadyFocusSpawnAction(focus, role, deps, cfg, readC
|
|
|
26
27
|
inSpawnCooldown: await isNextSpawnInCooldown(cfg, focus, installedDaemonContexts().nextSpawnRoute),
|
|
27
28
|
activeTeamCount: getActiveTeamCount(),
|
|
28
29
|
maxTotalSessions: cfg.maxTotalSessions,
|
|
29
|
-
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export async function resolveReadyFocusSpawnAction(focus, role, deps, cfg, readCapHold) {
|
|
33
|
+
const nowMs = Date.now();
|
|
34
|
+
const tower = decideTowerAdmission(focus, deps.tower, nowMs);
|
|
35
|
+
const action = decideFocusSpawn({ ...(await readReadyFocusGate(focus, role, deps, cfg, readCapHold)), towerHolds: tower.holds });
|
|
36
|
+
noteTowerAdmission(focus, tower, towerOutcome(action), nowMs);
|
|
37
|
+
return action;
|
|
38
|
+
}
|
|
39
|
+
/** How the tower reads a spawn-gate action: wanting a team (and how it ended) or not. */
|
|
40
|
+
export function towerOutcome(action) {
|
|
41
|
+
switch (action) {
|
|
42
|
+
case 'spawn': return 'spawn';
|
|
43
|
+
case 'skip_tower_hold': return 'tower_hold';
|
|
44
|
+
case 'stop_capacity': return 'capacity';
|
|
45
|
+
default: return 'not_wanting';
|
|
46
|
+
}
|
|
30
47
|
}
|
|
31
48
|
//# sourceMappingURL=ready-focus-spawn-action.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ready-focus-spawn-action.js","sourceRoot":"","sources":["../../src/focus/ready-focus-spawn-action.ts"],"names":[],"mappings":"AAAA,8FAA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AAE,CAAC,cAAc,CAAC;QAClG,eAAe,EAAE,kBAAkB,EAAE;QACrC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;KACvC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,KAA8C,EAC9C,IAA2B,EAC3B,IAAwB,EACxB,GAAiB,EACjB,WAAiE;IAEjE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IACjI,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9D,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,YAAY,CAAC,MAAwB;IACnD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO,CAAC,CAAC,OAAO,OAAO,CAAC;QAC7B,KAAK,iBAAiB,CAAC,CAAC,OAAO,YAAY,CAAC;QAC5C,KAAK,eAAe,CAAC,CAAC,OAAO,UAAU,CAAC;QACxC,OAAO,CAAC,CAAC,OAAO,aAAa,CAAC;IAChC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tower's demand probe: could this surfaced focus run NOW, if the tower and
|
|
3
|
+
* the host cap let it? Read BEFORE the tower allocates the product's slots
|
|
4
|
+
* (focus-poller-spawn.ts reconcileSpawnDemand), so a slot goes only to a focus
|
|
5
|
+
* whose every other gate is open on this pass, and never past a higher-ranked
|
|
6
|
+
* focus whose gate has just cleared.
|
|
7
|
+
*
|
|
8
|
+
* Each probe walks the gates its spawn pass applies, in the pass's order, bar the
|
|
9
|
+
* tower and the host cap:
|
|
10
|
+
*
|
|
11
|
+
* ready focus -- readReadyFocusGate (the one read the ready pass decides
|
|
12
|
+
* over) through decideFocusSpawn; the demoted-respawn
|
|
13
|
+
* suppression; the review-window guard (a queued review whose
|
|
14
|
+
* window cannot be read withholds the spawn -- the guard's own
|
|
15
|
+
* verdict, so the focus cannot use a slot this pass and does
|
|
16
|
+
* not want one); and the escalation guard spawnFocusTeam
|
|
17
|
+
* applies before it starts a team.
|
|
18
|
+
* queued directive -- the pass's disposals (a stale stage, a closed review
|
|
19
|
+
* window, a coding directive a review supersedes); role and
|
|
20
|
+
* live team; the review budget; the escalation guard; the
|
|
21
|
+
* review's operator-hold park; a review at an approved head; a
|
|
22
|
+
* terminated respawn cycle; the verify hold; the cooldown.
|
|
23
|
+
*
|
|
24
|
+
* The gates that DISPOSE of, PARK or RELEASE a queued directive run for real
|
|
25
|
+
* (focus/pending-directive-gates.ts and the drops): they are idempotent and the
|
|
26
|
+
* pending pass would make the same disposal on this poll, so making it before
|
|
27
|
+
* allocation means a dropped or parked directive reserves no slot and a released
|
|
28
|
+
* review competes for one on the same pass. Every other gate is read without its
|
|
29
|
+
* effects (no log, no filing, no reset): those stay with the pass.
|
|
30
|
+
*
|
|
31
|
+
* A probe that throws answers null (unknown); the reconcile keeps a fresh
|
|
32
|
+
* record and otherwise fails open (tower/tower-spawn-intent.ts).
|
|
33
|
+
*/
|
|
34
|
+
import type { DaemonConfig } from '../types/index.js';
|
|
35
|
+
import { type ReadyFocusCapHoldTarget, type ReadyFocusGateRow } from './ready-focus-spawn-action.js';
|
|
36
|
+
import type { PendingSpawnPassDeps, ReadyFocusPassDeps } from './pending-spawn-pass-deps.js';
|
|
37
|
+
import type { ActiveFocusRow } from '../queries/focuses/focus-discovery.js';
|
|
38
|
+
import { type RespawnGuardDeps } from './focus-respawn-guard.js';
|
|
39
|
+
/** A ready focus: wants a slot when every gate but the tower and the host cap would spawn it. */
|
|
40
|
+
export declare function probeReadyFocusDemand(focus: ReadyFocusGateRow & {
|
|
41
|
+
assigned_agent_role_id: string;
|
|
42
|
+
}, deps: Pick<ReadyFocusPassDeps, 'resolveFocusVerifyHoldFacts' | 'readyFocusHasTeamWork' | 'readReviewWindow'>, respawnGuard: RespawnGuardDeps, cfg: DaemonConfig, readCapHold: (focus: ReadyFocusCapHoldTarget) => Promise<boolean>): Promise<boolean | null>;
|
|
43
|
+
/** A focus holding a queued directive: wants a slot when the pending pass's gates (bar tower and host cap) are open. */
|
|
44
|
+
export declare function probePendingFocusDemand(focus: ActiveFocusRow, deps: Pick<PendingSpawnPassDeps, 'reviewNextStep' | 'reviewCycleCapHold' | 'respawnGuard' | 'reviewHoldPark' | 'reviewApprovedHead' | 'verifyHold' | 'nextSpawnRoute'>, cfg: DaemonConfig): Promise<boolean | null>;
|
|
45
|
+
//# sourceMappingURL=spawn-demand-probe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn-demand-probe.d.ts","sourceRoot":"","sources":["../../src/focus/spawn-demand-probe.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAsB,KAAK,uBAAuB,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACzH,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAO5E,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAmBpF,iGAAiG;AACjG,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,iBAAiB,GAAG;IAAE,sBAAsB,EAAE,MAAM,CAAA;CAAE,EAC7D,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,6BAA6B,GAAG,uBAAuB,GAAG,kBAAkB,CAAC,EAC5G,YAAY,EAAE,gBAAgB,EAC9B,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,OAAO,CAAC,OAAO,CAAC,GAChE,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAUzB;AAED,wHAAwH;AACxH,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,IAAI,CAAC,oBAAoB,EAAE,gBAAgB,GAAG,oBAAoB,GAAG,cAAc,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,YAAY,GAAG,gBAAgB,CAAC,EACtK,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAiBzB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: none -- no test imports this module directly (baselined; see lint:pinned-by)
|
|
3
|
+
// PINNED-BY-END
|
|
4
|
+
import { decideFocusSpawn } from './focus-spawn-decision.js';
|
|
5
|
+
import { readReadyFocusGate } from './ready-focus-spawn-action.js';
|
|
6
|
+
import { roles } from './focus-poller-state.js';
|
|
7
|
+
import { hasActiveTeam } from '../daemon-state/focus-team-state.js';
|
|
8
|
+
import { focusMayRunTeam } from '../supervision/null-role-spawn.js';
|
|
9
|
+
import { resolveReviewCycleCapHold } from '../supervision/review-cycle-cap-hold.js';
|
|
10
|
+
import { isRespawnCycleTerminated } from '../supervision/spawn-cooldown.js';
|
|
11
|
+
import { getPendingSpawnDirective } from '../directive/directive-queue.js';
|
|
12
|
+
import { respawnGuardHolds } from './focus-respawn-guard.js';
|
|
13
|
+
import { pendingSpawnDeferredByVerifyHold } from './pending-spawn-verify-hold.js';
|
|
14
|
+
import { dropStalePendingSpawnDirective, pendingReviewDeclinedAtApprovedHead, pendingReviewParkedOnOperatorHold } from './pending-directive-gates.js';
|
|
15
|
+
import { dropReviewDirectiveOfClosedWindow, readyReviewWindowWouldWithhold } from './closed-review-window.js';
|
|
16
|
+
import { pendingCodingSpawnSupersededByReview } from './pending-spawn-review-next-step.js';
|
|
17
|
+
import { hasUnclassifiedFiring, isMechanismDemoted, SUPERVISION_MECHANISM } from '../completion/team-liveness/supervision-firing-record.js';
|
|
18
|
+
import { isNextSpawnInCooldown } from '../spawn/index.js';
|
|
19
|
+
/**
|
|
20
|
+
* The demoted-respawn suppression, read without its effects: the ready pass
|
|
21
|
+
* (focus-poller-spawn.ts respawnSuppressedByDemotion) does not respawn a focus
|
|
22
|
+
* whose teardown this pass falsifies while the spawn-gate-vs-exit mechanism is
|
|
23
|
+
* demoted.
|
|
24
|
+
*/
|
|
25
|
+
function respawnWouldBeSuppressed(focusId) {
|
|
26
|
+
return hasUnclassifiedFiring(SUPERVISION_MECHANISM.TEARDOWN_AT_FIRST_RESULT, focusId)
|
|
27
|
+
&& isMechanismDemoted(SUPERVISION_MECHANISM.SPAWN_GATE_VS_EXIT_RESPAWN);
|
|
28
|
+
}
|
|
29
|
+
/** A ready focus: wants a slot when every gate but the tower and the host cap would spawn it. */
|
|
30
|
+
export async function probeReadyFocusDemand(focus, deps, respawnGuard, cfg, readCapHold) {
|
|
31
|
+
try {
|
|
32
|
+
const gate = await readReadyFocusGate(focus, roles.get(focus.assigned_agent_role_id), deps, cfg, readCapHold);
|
|
33
|
+
if (decideFocusSpawn({ ...gate, towerHolds: false, activeTeamCount: 0, maxTotalSessions: 1 }) !== 'spawn')
|
|
34
|
+
return false;
|
|
35
|
+
if (respawnWouldBeSuppressed(focus.focus_id))
|
|
36
|
+
return false;
|
|
37
|
+
if (await readyReviewWindowWouldWithhold(cfg.organizationId, focus, deps.readReviewWindow))
|
|
38
|
+
return false;
|
|
39
|
+
return !(await respawnGuardHolds(focus.focus_id, respawnGuard));
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** A focus holding a queued directive: wants a slot when the pending pass's gates (bar tower and host cap) are open. */
|
|
46
|
+
export async function probePendingFocusDemand(focus, deps, cfg) {
|
|
47
|
+
try {
|
|
48
|
+
const focusId = focus.focus_id;
|
|
49
|
+
if (!getPendingSpawnDirective(focusId) || hasActiveTeam(focusId))
|
|
50
|
+
return false;
|
|
51
|
+
if (dropStalePendingSpawnDirective(focus) || dropReviewDirectiveOfClosedWindow(focus) || await pendingCodingSpawnSupersededByReview(focus, deps.reviewNextStep))
|
|
52
|
+
return false;
|
|
53
|
+
if (!focusMayRunTeam(focus.assigned_agent_role_id) || !roles.has(focus.assigned_agent_role_id))
|
|
54
|
+
return false;
|
|
55
|
+
const capFocus = { focusId, focusName: focus.focus_name, reviewCycleCount: focus.review_cycle_count };
|
|
56
|
+
if (await resolveReviewCycleCapHold(capFocus, deps.reviewCycleCapHold))
|
|
57
|
+
return false;
|
|
58
|
+
if (await respawnGuardHolds(focusId, deps.respawnGuard))
|
|
59
|
+
return false;
|
|
60
|
+
if (await pendingReviewParkedOnOperatorHold(focus, deps.reviewHoldPark))
|
|
61
|
+
return false;
|
|
62
|
+
if (await pendingReviewDeclinedAtApprovedHead(focus, deps.reviewApprovedHead))
|
|
63
|
+
return false;
|
|
64
|
+
if (isRespawnCycleTerminated(focusId))
|
|
65
|
+
return false;
|
|
66
|
+
if (await pendingSpawnDeferredByVerifyHold(focusId, deps.verifyHold))
|
|
67
|
+
return false;
|
|
68
|
+
return !(await isNextSpawnInCooldown(cfg, focus, deps.nextSpawnRoute));
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=spawn-demand-probe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spaw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AsB,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,sBAAsB,CAAC;YAAE,OAAO,KAAK,CAAC;QAC7G,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,UAAU,EAAE,gBAAgB,EAAE,KAAK,CAAC,kBAAkB,EAAE,CAAC;QACtG,IAAI,MAAM,yBAAyB,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC;YAAE,OAAO,KAAK,CAAC;QACrF,IAAI,MAAM,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC;YAAE,OAAO,KAAK,CAAC;QACtE,IAAI,MAAM,iCAAiC,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC;YAAE,OAAO,KAAK,CAAC;QACtF,IAAI,MAAM,mCAAmC,CAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC;YAAE,OAAO,KAAK,CAAC;QAC5F,IAAI,wBAAwB,CAAC,OAAO,CAAC;YAAE,OAAO,KAAK,CAAC;QACpD,IAAI,MAAM,gCAAgC,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC;YAAE,OAAO,KAAK,CAAC;QACnF,OAAO,CAAC,CAAC,MAAM,qBAAqB,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IACzE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stranded-review-reroute.d.ts","sourceRoot":"","sources":["../../src/focus/stranded-review-reroute.ts"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,
|
|
1
|
+
{"version":3,"file":"stranded-review-reroute.d.ts","s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ISPOSITION_AGENT_RESOLVABLE } from '../queries/escalations/escalation-dispositions.js';
|
|
59
|
-
import { fileReworkForFailedVerdict } from '../verify/outcome-routing/verification-rework-issue.js';
|
|
59
|
+
import { describeFailedVerdictRework, fileReworkForFailedVerdict } from '../verify/outcome-routing/verification-rework-issue.js';
|
|
60
60
|
import { commitVerdictHeldDeliveryIds } from '../delivery/commit-verdict-hold.js';
|
|
61
61
|
import { shouldRefireStrandedReview } from '../directive/phase-sync.js';
|
|
62
62
|
import { createLogger } from '../log/daemon-log.js';
|
|
@@ -150,8 +150,10 @@ async function reroute(focus, ctx, { head, verdict }, deps) {
|
|
|
150
150
|
(failed
|
|
151
151
|
? 'routing the failed verdict to rework (a Bug naming the failure on the verify delivery whose commits caused it) and closing the review window'
|
|
152
152
|
: `closing the review window and filing a ${STRANDED_REVIEW_REROUTED_KIND} observation`));
|
|
153
|
-
if (failed)
|
|
154
|
-
await fileReworkForFailedVerdict(focus.focus_id, verdict, deps);
|
|
153
|
+
if (failed) {
|
|
154
|
+
const result = await fileReworkForFailedVerdict(focus.focus_id, verdict, deps);
|
|
155
|
+
log.info(`[directive-executor] "${focus.focus_name}": failed verdict at ${at} -- ${describeFailedVerdictRework(result)}`);
|
|
156
|
+
}
|
|
155
157
|
else
|
|
156
158
|
await reportStuckWindow(focus, ctx, head, verdict, deps);
|
|
157
159
|
deps.clearPendingSpawnDirective(focus.focus_id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stranded-review-reroute.js","sourceRoot":"","sources":["../../src/focus/stranded-review-reroute.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,gFAAgF;AAChF,oEAAoE;AACpE,+DAA+D;AAC/D,2FAA2F;AAC3F,kFAAkF;AAClF,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAA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H,CAAC;AAED,KAAK,UAAU,iBAAiB,CAC9B,KAA0B,EAC1B,GAAkD,EAClD,IAAmB,EACnB,OAA6B,EAC7B,IAA+B;IAE/B,IAAI,CAAC;QACH,IAAI,MAAM,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,QAAQ,EAAE,6BAA6B,CAAC;YAAE,OAAO;QAC7F,MAAM,IAAI,CAAC,gBAAgB,CAAC;YAC1B,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,kBAAkB,CAAC,iBAAiB;YAChD,WAAW,EAAE,4BAA4B;YACzC,cAAc,EAAE,6BAA6B;YAC7C,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE;YACnC,WAAW,EACT,UAAU,KAAK,CAAC,UAAU,uCAAuC,4BAA4B,iBAAiB;gBAC9G,GAAG,IAAI,IAAI,cAAc,mBAAmB,OAAO,EAAE,OAAO,IAAI,eAAe,oCAAoC;gBACnH,+EAA+E;YACjF,YAAY,EACV,6GAA6G;gBAC7G,4CAA4C;YAC9C,UAAU,EACR,kHAAkH;gBAClH,kHAAkH;YACpH,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,KAAK,EAAE,4BAA4B,EAAE;SAC3F,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,yBAAyB,KAAK,CAAC,UAAU,yBAAyB,6BAA6B,iBAAkB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACrJ,CAAC;AACH,CAAC"}
|
|
@@ -6,7 +6,12 @@
|
|
|
6
6
|
* in-flight gate wait the review exit applies;
|
|
7
7
|
* 2. releaseCommitVerdictHolds: a review exit held on its commit's gate verdict
|
|
8
8
|
* is replayed once that verdict lands (held re-work: once the run is over),
|
|
9
|
-
* or its held evidence is dropped when HEAD moved
|
|
9
|
+
* or its held evidence is dropped when HEAD moved;
|
|
10
|
+
* 3. fileReworkForFailedHeadWedges: an armed focus left with a FAILED gate
|
|
11
|
+
* verdict at its head and nothing to run (no review window, no owed work, no
|
|
12
|
+
* live team) gets the rework Bug for it (focus/failed-head-wedge.ts). It runs
|
|
13
|
+
* after the release pass, so a held exit the release routes this poll is
|
|
14
|
+
* never read as a wedge.
|
|
10
15
|
*
|
|
11
16
|
* The release pass is the ONLY production path that routes a held review exit: if
|
|
12
17
|
* it stops running, every commit-verdict hold waits until its overdue observation
|
|
@@ -16,8 +21,7 @@
|
|
|
16
21
|
* one function with injectable passes, pinned by verify-routing-passes.test.ts;
|
|
17
22
|
* the composition root binds the real passes (composition/runtime-poll-context.ts
|
|
18
23
|
* buildVerifyRoutingPasses) and the focus poll runs the phase once per product per
|
|
19
|
-
* poll.
|
|
20
|
-
* and never throw.
|
|
24
|
+
* poll. Every pass is best-effort and never throws.
|
|
21
25
|
*
|
|
22
26
|
* @module focus/verify-routing-passes
|
|
23
27
|
*/
|
|
@@ -26,6 +30,7 @@ import type { DaemonConfig } from '../types/index.js';
|
|
|
26
30
|
export interface VerifyRoutingPasses {
|
|
27
31
|
checkVerifyDeliveriesForOpenIssues: (config: DaemonConfig) => Promise<void>;
|
|
28
32
|
releaseCommitVerdictHolds: (config: DaemonConfig) => Promise<unknown>;
|
|
33
|
+
fileReworkForFailedHeadWedges: (config: DaemonConfig) => Promise<unknown>;
|
|
29
34
|
}
|
|
30
35
|
/** Run the verify-routing phase for one product-scoped config, over the given passes. */
|
|
31
36
|
export declare function runVerifyRoutingPasses(config: DaemonConfig, passes: VerifyRoutingPasses): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-routing-passes.d.ts","sourceRoot":"","sources":["../../src/focus/verify-routing-passes.ts"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"verify-routing-passes.d.ts","sourceRoot":"","sources":["../../src/focus/verify-routing-passes.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,2CAA2C;AAC3C,MAAM,WAAW,mBAAmB;IAClC,kCAAkC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5E,yBAAyB,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE,6BAA6B,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3E;AAED,yFAAyF;AACzF,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -7,5 +7,6 @@
|
|
|
7
7
|
export async function runVerifyRoutingPasses(config, passes) {
|
|
8
8
|
await passes.checkVerifyDeliveriesForOpenIssues(config);
|
|
9
9
|
await passes.releaseCommitVerdictHolds(config);
|
|
10
|
+
await passes.fileReworkForFailedHeadWedges(config);
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=verify-routing-passes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-routing-passes.js","sourceRoot":"","sources":["../../src/focus/verify-routing-passes.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0EAA0E;AAC1E,6DAA6D;AAC7D,0EAA0E;AAC1E,gBAAgB;
|
|
1
|
+
{"version":3,"file":"verify-routing-passes.js","sourceRoot":"","sources":["../../src/focus/verify-routing-passes.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0EAA0E;AAC1E,6DAA6D;AAC7D,0EAA0E;AAC1E,gBAAgB;AAuChB,yFAAyF;AACzF,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAAoB,EACpB,MAA2B;IAE3B,MAAM,MAAM,CAAC,kCAAkC,CAAC,MAAM,CAAC,CAAC;IACxD,MAAM,MAAM,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,MAAM,CAAC,6BAA6B,CAAC,MAAM,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Is a focus branch's work contained in the integration branch? Read from git
|
|
3
|
+
* without a checkout, the input the LANDED rule (tower/focus-landed.ts) needs.
|
|
4
|
+
* Only PROOF lands; anything git cannot answer is unknown.
|
|
5
|
+
*
|
|
6
|
+
* contained -- the branch tip is an ancestor of (or equal to) integration:
|
|
7
|
+
* `git rev-list --count <integration>..<branch>` read 0.
|
|
8
|
+
* not_contained -- the branch carries commits integration lacks (count > 0).
|
|
9
|
+
* merged_removed -- no branch ref (none recorded, or the ref is gone), AND the
|
|
10
|
+
* focus's merge record (focus_merges.merge_commit_sha, written
|
|
11
|
+
* by the daemon at merge time) names a merge commit
|
|
12
|
+
* integration contains. The daemon removes a focus branch only
|
|
13
|
+
* after merging it (merge/focus-worktree-removal.ts); the
|
|
14
|
+
* record is the proof it did.
|
|
15
|
+
* unknown -- git could not answer (integration unreadable, a ref or
|
|
16
|
+
* rev-list read that errored, a timeout), the merge record
|
|
17
|
+
* could not be read, or the branch is gone with NO merge
|
|
18
|
+
* record contained in integration (removal unproven). Never
|
|
19
|
+
* read as either answer.
|
|
20
|
+
*
|
|
21
|
+
* Each read is shaped so success and failure cannot be confused: for-each-ref
|
|
22
|
+
* answers "absent" with an empty listing (exit 0), and rev-list --count answers
|
|
23
|
+
* "contained" with 0 -- so a nonzero exit is always an error, never an answer.
|
|
24
|
+
*/
|
|
25
|
+
export type FocusBranchContainment = 'contained' | 'not_contained' | 'merged_removed' | 'unknown';
|
|
26
|
+
export interface FocusBranchContainmentGit {
|
|
27
|
+
run: (args: string[], cwd: string) => {
|
|
28
|
+
success: boolean;
|
|
29
|
+
output: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface FocusBranchContainmentInput {
|
|
33
|
+
/** product_focuses.branch_name; null = none recorded. */
|
|
34
|
+
branchName: string | null;
|
|
35
|
+
/** focus_merges.merge_commit_sha for the focus; 'unknown' when the record could not be read. */
|
|
36
|
+
mergeCommitShas: readonly string[] | 'unknown';
|
|
37
|
+
}
|
|
38
|
+
export declare function readFocusBranchContainment(input: FocusBranchContainmentInput, integrationBranch: string, repoPath: string, git: FocusBranchContainmentGit): FocusBranchContainment;
|
|
39
|
+
//# sourceMappingURL=focus-branch-containment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-branch-containment.d.ts","sourceRoot":"","sources":["../../src/git/focus-branch-containment.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAElG,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5E;AAED,MAAM,WAAW,2BAA2B;IAC1C,yDAAyD;IACzD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gGAAgG;IAChG,eAAe,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CAChD;AAkBD,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,2BAA2B,EAClC,iBAAiB,EAAE,MAAM,EACzB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,yBAAyB,GAC7B,sBAAsB,CAmBxB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/tower/focus-landed.test.ts,
|
|
3
|
+
// packages/daemon/src/tower/tower-state-ingestion.test.ts
|
|
4
|
+
// PINNED-BY-END
|
|
5
|
+
/** Commits `ref` carries that `integration` lacks; null when git could not answer. */
|
|
6
|
+
function aheadOf(ref, integration, repoPath, git) {
|
|
7
|
+
const r = git.run(['rev-list', '--count', `${integration}..${ref}`], repoPath);
|
|
8
|
+
if (!r.success)
|
|
9
|
+
return null;
|
|
10
|
+
const n = Number.parseInt(r.output.trim(), 10);
|
|
11
|
+
return Number.isInteger(n) && n >= 0 && String(n) === r.output.trim() ? n : null;
|
|
12
|
+
}
|
|
13
|
+
/** 'present' | 'absent' for a local branch ref; null when git could not answer. */
|
|
14
|
+
function branchRef(branchName, repoPath, git) {
|
|
15
|
+
const ref = `refs/heads/${branchName}`;
|
|
16
|
+
const r = git.run(['for-each-ref', '--format=%(refname)', ref], repoPath);
|
|
17
|
+
if (!r.success)
|
|
18
|
+
return null;
|
|
19
|
+
return r.output.split('\n').some((line) => line.trim() === ref) ? 'present' : 'absent';
|
|
20
|
+
}
|
|
21
|
+
export function readFocusBranchContainment(input, integrationBranch, repoPath, git) {
|
|
22
|
+
try {
|
|
23
|
+
if (!git.run(['rev-parse', '--verify', `${integrationBranch}^{commit}`], repoPath).success)
|
|
24
|
+
return 'unknown';
|
|
25
|
+
const present = input.branchName ? branchRef(input.branchName, repoPath, git) : 'absent';
|
|
26
|
+
if (present === null)
|
|
27
|
+
return 'unknown';
|
|
28
|
+
if (present === 'present') {
|
|
29
|
+
const ahead = aheadOf(`refs/heads/${input.branchName}`, integrationBranch, repoPath, git);
|
|
30
|
+
if (ahead === null)
|
|
31
|
+
return 'unknown';
|
|
32
|
+
return ahead === 0 ? 'contained' : 'not_contained';
|
|
33
|
+
}
|
|
34
|
+
// No branch: landed only on proof the daemon merged it before removing it.
|
|
35
|
+
if (input.mergeCommitShas === 'unknown')
|
|
36
|
+
return 'unknown';
|
|
37
|
+
for (const sha of input.mergeCommitShas) {
|
|
38
|
+
if (aheadOf(sha, integrationBranch, repoPath, git) === 0)
|
|
39
|
+
return 'merged_removed';
|
|
40
|
+
}
|
|
41
|
+
return 'unknown';
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return 'unknown';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=focus-branch-containment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-branch-containment.js","sourceRoot":"","sources":["../../src/git/focus-branch-containment.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,6DAA6D;AAC7D,4DAA4D;AAC5D,gBAAgB;AAwChB,sFAAsF;AACtF,SAAS,OAAO,CAAC,GAAW,EAAE,WAAmB,EAAE,QAAgB,EAAE,GAA8B;IACjG,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,WAAW,KAAK,GAAG,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC/E,IAAI,CAAC,CAAC,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC5B,MAAM,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACnF,CAAC;AAED,mFAAmF;AACnF,SAAS,SAAS,CAAC,UAAkB,EAAE,QAAgB,EAAE,GAA8B;IACrF,MAAM,GAAG,GAAG,cAAc,UAAU,EAAE,CAAC;IACvC,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,qBAAqB,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,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EAAE,iBAAiB,EAAE,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC;gBAAE,OAAO,gBAAgB,CAAC;QACpF,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
package/dist/git/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/git/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/git/types.ts"],"names":[],"mappings":"AA+BA,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtE,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,CAAC;AAElE,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,iBAAiB,GAC1B,SAAS,CAGX;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAEjE"}
|
package/dist/git/types.js
CHANGED
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
// packages/daemon/src/migrations/migration-held-set.test.ts,
|
|
9
9
|
// packages/daemon/src/spawn/integration-reconcile-spawn.test.ts,
|
|
10
10
|
// packages/daemon/src/supervision/team-stall-reapers.test.ts,
|
|
11
|
+
// packages/daemon/src/tower/focus-landed.test.ts,
|
|
11
12
|
// packages/daemon/src/verify/attribution/verification-attribution.test.ts,
|
|
12
13
|
// packages/daemon/src/verify/attribution/verification-baseline-run.test.ts,
|
|
13
14
|
// packages/daemon/src/verify/deterministic-gate/verification-checkout.test.ts,
|
|
15
|
+
// packages/daemon/src/verify/deterministic-gate/verify-checkout-judged-installs.test.ts,
|
|
14
16
|
// packages/daemon/src/verify/deterministic-gate/verify-unprovisioned-worktree.test.ts,
|
|
15
17
|
// packages/daemon/src/verify/engine/verification-commit-sharing.test.ts,
|
|
16
18
|
// packages/daemon/src/verify/gate-config/verification-run-config-source.test.ts,
|
package/dist/git/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/git/types.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,gGAAgG;AAChG,gFAAgF;AAChF,gEAAgE;AAChE,uDAAuD;AACvD,4DAA4D;AAC5D,wEAAwE;AACxE,+DAA+D;AAC/D,mEAAmE;AACnE,gEAAgE;AAChE,6EAA6E;AAC7E,8EAA8E;AAC9E,iFAAiF;AACjF,yFAAyF;AACzF,2EAA2E;AAC3E,mFAAmF;AACnF,yDAAyD;AACzD,uEAAuE;AACvE,gBAAgB;AAEhB;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,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