@telora/daemon 0.24.17 → 0.24.26
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 +12 -3
- package/dist/audit/audit-prompt.d.ts.map +1 -1
- package/dist/audit/audit-prompt.js +15 -0
- package/dist/audit/audit-prompt.js.map +1 -1
- package/dist/ci/candidate-failure-record.d.ts +104 -0
- package/dist/ci/candidate-failure-record.d.ts.map +1 -0
- package/dist/ci/candidate-failure-record.js +135 -0
- package/dist/ci/candidate-failure-record.js.map +1 -0
- package/dist/ci/candidate-ref.d.ts.map +1 -1
- package/dist/ci/candidate-ref.js +10 -3
- package/dist/ci/candidate-ref.js.map +1 -1
- package/dist/ci/ci-status-git.d.ts.map +1 -1
- package/dist/ci/ci-status-git.js +1 -0
- package/dist/ci/ci-status-git.js.map +1 -1
- package/dist/ci/ci-status.d.ts.map +1 -1
- package/dist/ci/ci-status.js +1 -0
- package/dist/ci/ci-status.js.map +1 -1
- package/dist/ci/gate-ref.d.ts +10 -1
- package/dist/ci/gate-ref.d.ts.map +1 -1
- package/dist/ci/gate-ref.js +11 -4
- package/dist/ci/gate-ref.js.map +1 -1
- package/dist/ci/product-ci-repo.d.ts.map +1 -1
- package/dist/ci/product-ci-repo.js +3 -2
- package/dist/ci/product-ci-repo.js.map +1 -1
- package/dist/completion/completion-event/event.d.ts +4 -3
- package/dist/completion/completion-event/event.d.ts.map +1 -1
- package/dist/completion/completion-event/event.js.map +1 -1
- package/dist/completion/review-cycle-budget/review-cycle-cap.d.ts +19 -11
- package/dist/completion/review-cycle-budget/review-cycle-cap.d.ts.map +1 -1
- package/dist/completion/review-cycle-budget/review-cycle-cap.js +36 -36
- package/dist/completion/review-cycle-budget/review-cycle-cap.js.map +1 -1
- package/dist/completion/review-cycle-budget/review-loop-detection.d.ts +101 -0
- package/dist/completion/review-cycle-budget/review-loop-detection.d.ts.map +1 -0
- package/dist/completion/review-cycle-budget/review-loop-detection.js +105 -0
- package/dist/completion/review-cycle-budget/review-loop-detection.js.map +1 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.d.ts +70 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.d.ts.map +1 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.js +98 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.js.map +1 -0
- package/dist/completion/review-exit/review-defect-detector.d.ts +71 -49
- package/dist/completion/review-exit/review-defect-detector.d.ts.map +1 -1
- package/dist/completion/review-exit/review-defect-detector.js +75 -69
- package/dist/completion/review-exit/review-defect-detector.js.map +1 -1
- package/dist/completion/review-exit/review-exit-attribution.d.ts +1 -1
- package/dist/completion/review-exit/review-exit-attribution.js +1 -1
- package/dist/completion/review-exit/review-exit-deps.d.ts +5 -2
- package/dist/completion/review-exit/review-exit-deps.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-deps.js +1 -1
- package/dist/completion/review-exit/review-exit-evidence.d.ts +10 -1
- package/dist/completion/review-exit/review-exit-evidence.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-evidence.js +17 -14
- package/dist/completion/review-exit/review-exit-evidence.js.map +1 -1
- package/dist/completion/review-exit/review-exit-foreign-findings.d.ts +1 -1
- package/dist/completion/review-exit/review-exit-foreign-findings.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 +12 -8
- package/dist/completion/review-exit/review-exit-phase.js.map +1 -1
- package/dist/completion/state-cascade/review-next-step.d.ts +12 -3
- package/dist/completion/state-cascade/review-next-step.d.ts.map +1 -1
- package/dist/completion/state-cascade/review-next-step.js +10 -1
- package/dist/completion/state-cascade/review-next-step.js.map +1 -1
- package/dist/completion/state-cascade/standing-approval-convergence.d.ts +1 -1
- package/dist/completion/state-cascade/standing-approval-convergence.d.ts.map +1 -1
- package/dist/completion/state-cascade/standing-approval-convergence.js +10 -4
- package/dist/completion/state-cascade/standing-approval-convergence.js.map +1 -1
- package/dist/completion/state-cascade/state-cascade.d.ts +3 -0
- package/dist/completion/state-cascade/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade/state-cascade.js +16 -1
- package/dist/completion/state-cascade/state-cascade.js.map +1 -1
- package/dist/completion/team-exit/status-advance-phase.d.ts +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 -4
- package/dist/completion/team-exit/status-advance-phase.js.map +1 -1
- package/dist/completion/team-outcome/apply-turn.d.ts.map +1 -1
- package/dist/completion/team-outcome/apply-turn.js +9 -4
- package/dist/completion/team-outcome/apply-turn.js.map +1 -1
- package/dist/completion/team-outcome/decide-turn-entry-rows.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide-turn-entry-rows.js +28 -3
- package/dist/completion/team-outcome/decide-turn-entry-rows.js.map +1 -1
- package/dist/completion/team-outcome/decide.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide.js +1 -0
- package/dist/completion/team-outcome/decide.js.map +1 -1
- package/dist/completion/team-outcome/exit-limits.d.ts +6 -0
- package/dist/completion/team-outcome/exit-limits.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-limits.js +6 -0
- package/dist/completion/team-outcome/exit-limits.js.map +1 -1
- package/dist/completion/team-outcome/exit-pipeline-state.d.ts +5 -0
- package/dist/completion/team-outcome/exit-pipeline-state.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-pipeline-state.js.map +1 -1
- package/dist/completion/team-teardown/session-hold-bounds.d.ts +10 -1
- package/dist/completion/team-teardown/session-hold-bounds.d.ts.map +1 -1
- package/dist/completion/team-teardown/session-hold-bounds.js +11 -0
- package/dist/completion/team-teardown/session-hold-bounds.js.map +1 -1
- package/dist/completion/team-teardown/session-hold.d.ts.map +1 -1
- package/dist/completion/team-teardown/session-hold.js +2 -0
- package/dist/completion/team-teardown/session-hold.js.map +1 -1
- package/dist/composition/engine-start-context.d.ts.map +1 -1
- package/dist/composition/engine-start-context.js +9 -1
- package/dist/composition/engine-start-context.js.map +1 -1
- package/dist/composition/execution-merge-context.d.ts +13 -0
- package/dist/composition/execution-merge-context.d.ts.map +1 -1
- package/dist/composition/execution-merge-context.js +76 -3
- package/dist/composition/execution-merge-context.js.map +1 -1
- package/dist/composition/execution-spawn-context.d.ts.map +1 -1
- package/dist/composition/execution-spawn-context.js +2 -0
- package/dist/composition/execution-spawn-context.js.map +1 -1
- package/dist/composition/focus-activity-live-sources.d.ts.map +1 -1
- package/dist/composition/focus-activity-live-sources.js +1 -0
- package/dist/composition/focus-activity-live-sources.js.map +1 -1
- package/dist/composition/judgement-contexts.d.ts.map +1 -1
- package/dist/composition/judgement-contexts.js +8 -2
- package/dist/composition/judgement-contexts.js.map +1 -1
- package/dist/composition/review-exit-context.d.ts.map +1 -1
- package/dist/composition/review-exit-context.js +2 -0
- package/dist/composition/review-exit-context.js.map +1 -1
- package/dist/composition/review-loop-context.d.ts +28 -0
- package/dist/composition/review-loop-context.d.ts.map +1 -0
- package/dist/composition/review-loop-context.js +147 -0
- package/dist/composition/review-loop-context.js.map +1 -0
- package/dist/composition/runtime-heartbeat-context.d.ts +11 -0
- package/dist/composition/runtime-heartbeat-context.d.ts.map +1 -1
- package/dist/composition/runtime-heartbeat-context.js +33 -2
- package/dist/composition/runtime-heartbeat-context.js.map +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/state-cascade-context.d.ts.map +1 -1
- package/dist/composition/state-cascade-context.js +3 -1
- package/dist/composition/state-cascade-context.js.map +1 -1
- package/dist/composition/team-liveness-phase-sources.d.ts.map +1 -1
- package/dist/composition/team-liveness-phase-sources.js +1 -0
- package/dist/composition/team-liveness-phase-sources.js.map +1 -1
- package/dist/composition/tower-escalation-context.d.ts +12 -0
- package/dist/composition/tower-escalation-context.d.ts.map +1 -0
- package/dist/composition/tower-escalation-context.js +109 -0
- package/dist/composition/tower-escalation-context.js.map +1 -0
- package/dist/composition/verification-context.d.ts.map +1 -1
- package/dist/composition/verification-context.js +34 -4
- package/dist/composition/verification-context.js.map +1 -1
- package/dist/composition/workstation-intervals-context.d.ts +3 -0
- package/dist/composition/workstation-intervals-context.d.ts.map +1 -0
- package/dist/composition/workstation-intervals-context.js +33 -0
- package/dist/composition/workstation-intervals-context.js.map +1 -0
- package/dist/daemon-state/awaiting-slot.d.ts +18 -1
- package/dist/daemon-state/awaiting-slot.d.ts.map +1 -1
- package/dist/daemon-state/awaiting-slot.js +7 -0
- package/dist/daemon-state/awaiting-slot.js.map +1 -1
- package/dist/delivery/delivery-reconciler.d.ts +7 -7
- package/dist/delivery/recorded-concerns.d.ts +63 -28
- package/dist/delivery/recorded-concerns.d.ts.map +1 -1
- package/dist/delivery/recorded-concerns.js +72 -28
- package/dist/delivery/recorded-concerns.js.map +1 -1
- package/dist/directive/directive-queue.d.ts +8 -0
- package/dist/directive/directive-queue.d.ts.map +1 -1
- package/dist/directive/directive-queue.js +1 -1
- package/dist/directive/directive-queue.js.map +1 -1
- package/dist/focus/control-state.d.ts +6 -4
- package/dist/focus/control-state.d.ts.map +1 -1
- package/dist/focus/control-state.js +6 -4
- package/dist/focus/control-state.js.map +1 -1
- package/dist/focus/daemon-contexts-judgement.d.ts +6 -0
- package/dist/focus/daemon-contexts-judgement.d.ts.map +1 -1
- package/dist/focus/daemon-contexts.d.ts +6 -0
- package/dist/focus/daemon-contexts.d.ts.map +1 -1
- package/dist/focus/daemon-contexts.js.map +1 -1
- package/dist/focus/focus-engine.d.ts.map +1 -1
- package/dist/focus/focus-engine.js +3 -1
- package/dist/focus/focus-engine.js.map +1 -1
- package/dist/focus/focus-executor.d.ts.map +1 -1
- package/dist/focus/focus-executor.js +3 -2
- package/dist/focus/focus-executor.js.map +1 -1
- package/dist/focus/focus-loop-registry.d.ts.map +1 -1
- package/dist/focus/focus-loop-registry.js +42 -0
- package/dist/focus/focus-loop-registry.js.map +1 -1
- package/dist/focus/focus-poller-auto-advance.d.ts +4 -2
- package/dist/focus/focus-poller-auto-advance.d.ts.map +1 -1
- package/dist/focus/focus-poller-auto-advance.js +24 -18
- package/dist/focus/focus-poller-auto-advance.js.map +1 -1
- package/dist/focus/focus-poller-spawn.d.ts.map +1 -1
- package/dist/focus/focus-poller-spawn.js +8 -6
- package/dist/focus/focus-poller-spawn.js.map +1 -1
- package/dist/focus/heartbeat-metadata.d.ts +5 -0
- package/dist/focus/heartbeat-metadata.d.ts.map +1 -1
- package/dist/focus/heartbeat-metadata.js +12 -0
- package/dist/focus/heartbeat-metadata.js.map +1 -1
- package/dist/focus/heartbeat.d.ts +9 -2
- package/dist/focus/heartbeat.d.ts.map +1 -1
- package/dist/focus/heartbeat.js +10 -1
- package/dist/focus/heartbeat.js.map +1 -1
- package/dist/focus/host-pressure.d.ts +77 -0
- package/dist/focus/host-pressure.d.ts.map +1 -0
- package/dist/focus/host-pressure.js +83 -0
- package/dist/focus/host-pressure.js.map +1 -0
- package/dist/focus/pending-directive-gates.d.ts +14 -0
- package/dist/focus/pending-directive-gates.d.ts.map +1 -1
- package/dist/focus/pending-directive-gates.js +25 -1
- package/dist/focus/pending-directive-gates.js.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.d.ts +7 -0
- package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.d.ts +1 -1
- package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.js +2 -0
- package/dist/focus/pending-spawn-review-next-step.js.map +1 -1
- package/dist/focus/ready-focus-team-work.d.ts +9 -4
- package/dist/focus/ready-focus-team-work.d.ts.map +1 -1
- package/dist/focus/ready-focus-team-work.js +14 -3
- package/dist/focus/ready-focus-team-work.js.map +1 -1
- package/dist/focus/verify-open-issues.d.ts +3 -2
- package/dist/focus/verify-open-issues.d.ts.map +1 -1
- package/dist/focus/verify-open-issues.js +6 -4
- package/dist/focus/verify-open-issues.js.map +1 -1
- package/dist/focus/workstation-intervals.d.ts +83 -0
- package/dist/focus/workstation-intervals.d.ts.map +1 -0
- package/dist/focus/workstation-intervals.js +81 -0
- package/dist/focus/workstation-intervals.js.map +1 -0
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +5 -2
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.js +2 -2
- package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
- package/dist/git/types.js +1 -1
- package/dist/merge/candidate-ci-failures.d.ts +72 -0
- package/dist/merge/candidate-ci-failures.d.ts.map +1 -0
- package/dist/merge/candidate-ci-failures.js +240 -0
- package/dist/merge/candidate-ci-failures.js.map +1 -0
- package/dist/merge/candidate-red-record.d.ts +44 -0
- package/dist/merge/candidate-red-record.d.ts.map +1 -0
- package/dist/merge/candidate-red-record.js +98 -0
- package/dist/merge/candidate-red-record.js.map +1 -0
- package/dist/merge/candidate-rework.d.ts +4 -3
- package/dist/merge/candidate-rework.d.ts.map +1 -1
- package/dist/merge/candidate-rework.js +46 -14
- package/dist/merge/candidate-rework.js.map +1 -1
- package/dist/merge/candidate-tip-attribution.d.ts +135 -0
- package/dist/merge/candidate-tip-attribution.d.ts.map +1 -0
- package/dist/merge/candidate-tip-attribution.js +319 -0
- package/dist/merge/candidate-tip-attribution.js.map +1 -0
- package/dist/merge/completion-merge-driver.d.ts +49 -5
- package/dist/merge/completion-merge-driver.d.ts.map +1 -1
- package/dist/merge/completion-merge-driver.js +56 -2
- package/dist/merge/completion-merge-driver.js.map +1 -1
- package/dist/merge/completion-merge-gate.d.ts +4 -1
- package/dist/merge/completion-merge-gate.d.ts.map +1 -1
- package/dist/merge/completion-merge-gate.js +9 -8
- package/dist/merge/completion-merge-gate.js.map +1 -1
- package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
- package/dist/prompt-sections/persona-sections.js +4 -1
- package/dist/prompt-sections/persona-sections.js.map +1 -1
- package/dist/prompt-sections/qa-author-section.d.ts.map +1 -1
- package/dist/prompt-sections/qa-author-section.js +18 -1
- package/dist/prompt-sections/qa-author-section.js.map +1 -1
- package/dist/prompt-sections/scoping-sections.d.ts +0 -12
- package/dist/prompt-sections/scoping-sections.d.ts.map +1 -1
- package/dist/prompt-sections/scoping-sections.js +16 -2
- package/dist/prompt-sections/scoping-sections.js.map +1 -1
- package/dist/prompts/bounded-universals.d.ts +13 -0
- package/dist/prompts/bounded-universals.d.ts.map +1 -0
- package/dist/prompts/bounded-universals.js +32 -0
- package/dist/prompts/bounded-universals.js.map +1 -0
- package/dist/queries/api-client/shared.d.ts +2 -1
- package/dist/queries/api-client/shared.d.ts.map +1 -1
- package/dist/queries/api-client/shared.js +36 -1
- package/dist/queries/api-client/shared.js.map +1 -1
- package/dist/queries/candidate-ci-reds/candidate-ci-reds.d.ts +35 -0
- package/dist/queries/candidate-ci-reds/candidate-ci-reds.d.ts.map +1 -0
- package/dist/queries/candidate-ci-reds/candidate-ci-reds.js +42 -0
- package/dist/queries/candidate-ci-reds/candidate-ci-reds.js.map +1 -0
- package/dist/queries/candidate-ci-reds/gate-escape-files.d.ts +16 -0
- package/dist/queries/candidate-ci-reds/gate-escape-files.d.ts.map +1 -0
- package/dist/queries/candidate-ci-reds/gate-escape-files.js +51 -0
- package/dist/queries/candidate-ci-reds/gate-escape-files.js.map +1 -0
- package/dist/queries/deliveries/issues.d.ts.map +1 -1
- package/dist/queries/deliveries/issues.js +1 -0
- package/dist/queries/deliveries/issues.js.map +1 -1
- package/dist/queries/escalations/escalation-consumption.d.ts +13 -0
- package/dist/queries/escalations/escalation-consumption.d.ts.map +1 -1
- package/dist/queries/escalations/escalation-consumption.js +12 -2
- package/dist/queries/escalations/escalation-consumption.js.map +1 -1
- package/dist/queries/escalations/tower-escalations.d.ts +82 -0
- package/dist/queries/escalations/tower-escalations.d.ts.map +1 -0
- package/dist/queries/escalations/tower-escalations.js +97 -0
- package/dist/queries/escalations/tower-escalations.js.map +1 -0
- package/dist/queries/focus-review/recorded-concern-ids.d.ts +48 -11
- package/dist/queries/focus-review/recorded-concern-ids.d.ts.map +1 -1
- package/dist/queries/focus-review/recorded-concern-ids.js +42 -12
- package/dist/queries/focus-review/recorded-concern-ids.js.map +1 -1
- package/dist/queries/focus-review/review-criterion-verdicts.d.ts +37 -0
- package/dist/queries/focus-review/review-criterion-verdicts.d.ts.map +1 -0
- package/dist/queries/focus-review/review-criterion-verdicts.js +64 -0
- package/dist/queries/focus-review/review-criterion-verdicts.js.map +1 -0
- package/dist/queries/focus-review/review-finding-facts.d.ts +18 -6
- package/dist/queries/focus-review/review-finding-facts.d.ts.map +1 -1
- package/dist/queries/focus-review/review-finding-facts.js +21 -8
- package/dist/queries/focus-review/review-finding-facts.js.map +1 -1
- package/dist/queries/focuses/ended-arm.d.ts +56 -13
- package/dist/queries/focuses/ended-arm.d.ts.map +1 -1
- package/dist/queries/focuses/ended-arm.js +40 -14
- package/dist/queries/focuses/ended-arm.js.map +1 -1
- package/dist/queries/focuses/focus-criteria-standing.d.ts +12 -0
- package/dist/queries/focuses/focus-criteria-standing.d.ts.map +1 -1
- package/dist/queries/focuses/focus-criteria-standing.js +13 -0
- package/dist/queries/focuses/focus-criteria-standing.js.map +1 -1
- package/dist/queries/focuses/focus-discovery.d.ts +14 -3
- package/dist/queries/focuses/focus-discovery.d.ts.map +1 -1
- package/dist/queries/focuses/focus-discovery.js +2 -19
- package/dist/queries/focuses/focus-discovery.js.map +1 -1
- package/dist/queries/focuses/focuses.d.ts +15 -12
- package/dist/queries/focuses/focuses.d.ts.map +1 -1
- package/dist/queries/focuses/focuses.js +15 -13
- package/dist/queries/focuses/focuses.js.map +1 -1
- package/dist/queries/sessions/daemon-connection.d.ts.map +1 -1
- package/dist/queries/sessions/daemon-connection.js +1 -0
- package/dist/queries/sessions/daemon-connection.js.map +1 -1
- package/dist/queries/sessions/sessions.d.ts.map +1 -1
- package/dist/queries/sessions/sessions.js +2 -1
- package/dist/queries/sessions/sessions.js.map +1 -1
- package/dist/queries/tower-decisions/tower-decisions.d.ts +103 -0
- package/dist/queries/tower-decisions/tower-decisions.d.ts.map +1 -0
- package/dist/queries/tower-decisions/tower-decisions.js +138 -0
- package/dist/queries/tower-decisions/tower-decisions.js.map +1 -0
- package/dist/queries/verification/verification.js +1 -1
- package/dist/queries/wire-schemas/schemas.d.ts +2 -0
- package/dist/queries/wire-schemas/schemas.d.ts.map +1 -1
- package/dist/queries/wire-schemas/schemas.js +8 -2
- package/dist/queries/wire-schemas/schemas.js.map +1 -1
- package/dist/queries/workstation-intervals/workstation-intervals.d.ts +52 -0
- package/dist/queries/workstation-intervals/workstation-intervals.d.ts.map +1 -0
- package/dist/queries/workstation-intervals/workstation-intervals.js +49 -0
- package/dist/queries/workstation-intervals/workstation-intervals.js.map +1 -0
- package/dist/resolvers/escalation-answers.d.ts +31 -0
- package/dist/resolvers/escalation-answers.d.ts.map +1 -1
- package/dist/resolvers/escalation-answers.js +31 -17
- package/dist/resolvers/escalation-answers.js.map +1 -1
- package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -1
- package/dist/resolvers/focus-criteria-standing.js +20 -0
- package/dist/resolvers/focus-criteria-standing.js.map +1 -1
- package/dist/shell/unified-engine-lifecycle.d.ts +11 -1
- package/dist/shell/unified-engine-lifecycle.d.ts.map +1 -1
- package/dist/shell/unified-engine-lifecycle.js +10 -1
- package/dist/shell/unified-engine-lifecycle.js.map +1 -1
- package/dist/shell/unified-shell.d.ts +25 -0
- package/dist/shell/unified-shell.d.ts.map +1 -1
- package/dist/shell/unified-shell.js +26 -80
- package/dist/shell/unified-shell.js.map +1 -1
- package/dist/shell/update-restart.d.ts +47 -0
- package/dist/shell/update-restart.d.ts.map +1 -0
- package/dist/shell/update-restart.js +124 -0
- package/dist/shell/update-restart.js.map +1 -0
- package/dist/spawn/directive-dispatch.d.ts.map +1 -1
- package/dist/spawn/directive-dispatch.js +1 -0
- package/dist/spawn/directive-dispatch.js.map +1 -1
- package/dist/spawn/lead-continuation.d.ts +4 -3
- package/dist/spawn/lead-continuation.d.ts.map +1 -1
- package/dist/spawn/lead-continuation.js.map +1 -1
- package/dist/spawn/live-answer-delivery.d.ts +53 -0
- package/dist/spawn/live-answer-delivery.d.ts.map +1 -0
- package/dist/spawn/live-answer-delivery.js +26 -0
- package/dist/spawn/live-answer-delivery.js.map +1 -0
- package/dist/spawn/routing-decider-spawn.d.ts +64 -2
- package/dist/spawn/routing-decider-spawn.d.ts.map +1 -1
- package/dist/spawn/routing-decider-spawn.js +65 -20
- package/dist/spawn/routing-decider-spawn.js.map +1 -1
- package/dist/spawn/worktree-session.d.ts +7 -5
- package/dist/spawn/worktree-session.d.ts.map +1 -1
- package/dist/spawn/worktree-session.js +11 -7
- package/dist/spawn/worktree-session.js.map +1 -1
- package/dist/supervision/escalation-suppression.js +1 -1
- package/dist/supervision/review-cycle-cap-hold.d.ts +11 -5
- package/dist/supervision/review-cycle-cap-hold.d.ts.map +1 -1
- package/dist/supervision/review-cycle-cap-hold.js +29 -11
- package/dist/supervision/review-cycle-cap-hold.js.map +1 -1
- package/dist/supervision/review-loop-detector.d.ts +48 -0
- package/dist/supervision/review-loop-detector.d.ts.map +1 -0
- package/dist/supervision/review-loop-detector.js +13 -0
- package/dist/supervision/review-loop-detector.js.map +1 -0
- package/dist/supervision/review-loop-hold.d.ts +29 -0
- package/dist/supervision/review-loop-hold.d.ts.map +1 -0
- package/dist/supervision/review-loop-hold.js +99 -0
- package/dist/supervision/review-loop-hold.js.map +1 -0
- package/dist/supervision/stall-detector-config.d.ts +8 -0
- package/dist/supervision/stall-detector-config.d.ts.map +1 -1
- package/dist/supervision/stall-detector-config.js +14 -3
- package/dist/supervision/stall-detector-config.js.map +1 -1
- package/dist/supervision/stop-registry.d.ts +3 -0
- package/dist/supervision/stop-registry.d.ts.map +1 -1
- package/dist/supervision/stop-registry.js +3 -1
- package/dist/supervision/stop-registry.js.map +1 -1
- package/dist/supervision/stop-rows-review-loop.d.ts +35 -0
- package/dist/supervision/stop-rows-review-loop.d.ts.map +1 -0
- package/dist/supervision/stop-rows-review-loop.js +150 -0
- package/dist/supervision/stop-rows-review-loop.js.map +1 -0
- package/dist/supervision/stop-rows-team-session.d.ts +1 -1
- package/dist/supervision/stop-rows-team-session.d.ts.map +1 -1
- package/dist/supervision/stop-rows-team-session.js.map +1 -1
- package/dist/supervision/unreviewed-settle-detector.d.ts +7 -2
- package/dist/supervision/unreviewed-settle-detector.d.ts.map +1 -1
- package/dist/supervision/unreviewed-settle-detector.js +15 -2
- package/dist/supervision/unreviewed-settle-detector.js.map +1 -1
- package/dist/templates/agents-md.d.ts.map +1 -1
- package/dist/templates/agents-md.js +1 -0
- package/dist/templates/agents-md.js.map +1 -1
- package/dist/templates/claude-md.d.ts +1 -1
- package/dist/templates/claude-md.d.ts.map +1 -1
- package/dist/templates/claude-md.js +12 -0
- package/dist/templates/claude-md.js.map +1 -1
- package/dist/testing/fixtures/api-client.js +1 -1
- package/dist/testing/fixtures/completion-judge-stubs.d.ts +7 -2
- package/dist/testing/fixtures/completion-judge-stubs.d.ts.map +1 -1
- package/dist/testing/fixtures/completion-judge-stubs.js +11 -1
- package/dist/testing/fixtures/completion-judge-stubs.js.map +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/merge-log-capture.d.ts.map +1 -1
- package/dist/testing/fixtures/merge-log-capture.js +1 -0
- package/dist/testing/fixtures/merge-log-capture.js.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.d.ts +4 -0
- package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.js +15 -2
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
- package/dist/testing/fixtures/recording-api-client.js +1 -1
- package/dist/testing/fixtures/review-exit-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/review-exit-deps.js +3 -1
- package/dist/testing/fixtures/review-exit-deps.js.map +1 -1
- package/dist/testing/fixtures/review-loop.d.ts +19 -0
- package/dist/testing/fixtures/review-loop.d.ts.map +1 -0
- package/dist/testing/fixtures/review-loop.js +30 -0
- package/dist/testing/fixtures/review-loop.js.map +1 -0
- package/dist/testing/fixtures/shortfall-rework-hold-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/shortfall-rework-hold-deps.js +1 -0
- package/dist/testing/fixtures/shortfall-rework-hold-deps.js.map +1 -1
- package/dist/testing/fixtures/tower-loop.d.ts +28 -0
- package/dist/testing/fixtures/tower-loop.d.ts.map +1 -0
- package/dist/testing/fixtures/tower-loop.js +83 -0
- package/dist/testing/fixtures/tower-loop.js.map +1 -0
- package/dist/testing/fixtures/verification-deps.d.ts +7 -0
- package/dist/testing/fixtures/verification-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/verification-deps.js +17 -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 +2 -1
- package/dist/testing/fixtures/vitest-failure-log.js.map +1 -1
- package/dist/tower/tower-escalation-gather.d.ts +33 -0
- package/dist/tower/tower-escalation-gather.d.ts.map +1 -0
- package/dist/tower/tower-escalation-gather.js +38 -0
- package/dist/tower/tower-escalation-gather.js.map +1 -0
- package/dist/tower/tower-escalation-prompt.d.ts +62 -0
- package/dist/tower/tower-escalation-prompt.d.ts.map +1 -0
- package/dist/tower/tower-escalation-prompt.js +130 -0
- package/dist/tower/tower-escalation-prompt.js.map +1 -0
- package/dist/tower/tower-escalation-routing.d.ts +49 -0
- package/dist/tower/tower-escalation-routing.d.ts.map +1 -0
- package/dist/tower/tower-escalation-routing.js +53 -0
- package/dist/tower/tower-escalation-routing.js.map +1 -0
- package/dist/tower/tower-escalation-session.d.ts +149 -0
- package/dist/tower/tower-escalation-session.d.ts.map +1 -0
- package/dist/tower/tower-escalation-session.js +238 -0
- package/dist/tower/tower-escalation-session.js.map +1 -0
- package/dist/tower/tower-supervisor-history.d.ts +129 -0
- package/dist/tower/tower-supervisor-history.d.ts.map +1 -0
- package/dist/tower/tower-supervisor-history.js +217 -0
- package/dist/tower/tower-supervisor-history.js.map +1 -0
- package/dist/tower/tower-supervisor-prompt.d.ts +21 -0
- package/dist/tower/tower-supervisor-prompt.d.ts.map +1 -0
- package/dist/tower/tower-supervisor-prompt.js +205 -0
- package/dist/tower/tower-supervisor-prompt.js.map +1 -0
- package/dist/tower/tower-supervisor-session.d.ts +220 -0
- package/dist/tower/tower-supervisor-session.d.ts.map +1 -0
- package/dist/tower/tower-supervisor-session.js +307 -0
- package/dist/tower/tower-supervisor-session.js.map +1 -0
- package/dist/tower/tower-supervisor.d.ts +86 -0
- package/dist/tower/tower-supervisor.d.ts.map +1 -0
- package/dist/tower/tower-supervisor.js +8 -0
- package/dist/tower/tower-supervisor.js.map +1 -0
- package/dist/types/index.js +1 -1
- package/dist/update/auto-update.d.ts +11 -5
- package/dist/update/auto-update.d.ts.map +1 -1
- package/dist/update/auto-update.js +11 -5
- package/dist/update/auto-update.js.map +1 -1
- package/dist/update/restart-contract.d.ts +62 -0
- package/dist/update/restart-contract.d.ts.map +1 -0
- package/dist/update/restart-contract.js +137 -0
- package/dist/update/restart-contract.js.map +1 -0
- package/dist/verify/attribution/verification-baseline-run.d.ts.map +1 -1
- package/dist/verify/attribution/verification-baseline-run.js +1 -0
- package/dist/verify/attribution/verification-baseline-run.js.map +1 -1
- package/dist/verify/ci-gate/ci-gate-dispatch.d.ts +3 -0
- package/dist/verify/ci-gate/ci-gate-dispatch.d.ts.map +1 -1
- package/dist/verify/ci-gate/ci-gate-dispatch.js +31 -9
- package/dist/verify/ci-gate/ci-gate-dispatch.js.map +1 -1
- package/dist/verify/ci-gate/ci-gate-wait-record.d.ts +6 -0
- package/dist/verify/ci-gate/ci-gate-wait-record.d.ts.map +1 -1
- package/dist/verify/ci-gate/ci-gate-wait-record.js +1 -0
- package/dist/verify/ci-gate/ci-gate-wait-record.js.map +1 -1
- package/dist/verify/deterministic-gate/verification-checkout.d.ts +12 -2
- package/dist/verify/deterministic-gate/verification-checkout.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-checkout.js +18 -3
- package/dist/verify/deterministic-gate/verification-checkout.js.map +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.js +1 -1
- package/dist/verify/deterministic-gate/verification-failure-parser.d.ts +30 -9
- package/dist/verify/deterministic-gate/verification-failure-parser.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-failure-parser.js +52 -8
- package/dist/verify/deterministic-gate/verification-failure-parser.js.map +1 -1
- package/dist/verify/engine/verification-commit-sharing.d.ts.map +1 -1
- package/dist/verify/engine/verification-commit-sharing.js +6 -2
- package/dist/verify/engine/verification-commit-sharing.js.map +1 -1
- package/dist/verify/engine/verification-deps.d.ts +9 -0
- package/dist/verify/engine/verification-deps.d.ts.map +1 -1
- package/dist/verify/engine/verification-deps.js +1 -1
- package/dist/verify/engine/verification-engine.d.ts.map +1 -1
- package/dist/verify/engine/verification-engine.js +4 -1
- package/dist/verify/engine/verification-engine.js.map +1 -1
- package/dist/verify/escaped-tests/escaped-pass-store.d.ts +19 -0
- package/dist/verify/escaped-tests/escaped-pass-store.d.ts.map +1 -0
- package/dist/verify/escaped-tests/escaped-pass-store.js +90 -0
- package/dist/verify/escaped-tests/escaped-pass-store.js.map +1 -0
- package/dist/verify/escaped-tests/escaped-test-run.d.ts +39 -0
- package/dist/verify/escaped-tests/escaped-test-run.d.ts.map +1 -0
- package/dist/verify/escaped-tests/escaped-test-run.js +156 -0
- package/dist/verify/escaped-tests/escaped-test-run.js.map +1 -0
- package/dist/verify/escaped-tests/escaped-test-set.d.ts +65 -0
- package/dist/verify/escaped-tests/escaped-test-set.d.ts.map +1 -0
- package/dist/verify/escaped-tests/escaped-test-set.js +95 -0
- package/dist/verify/escaped-tests/escaped-test-set.js.map +1 -0
- package/dist/verify/escaped-tests/escaped-tests-source.d.ts +44 -0
- package/dist/verify/escaped-tests/escaped-tests-source.d.ts.map +1 -0
- package/dist/verify/escaped-tests/escaped-tests-source.js +142 -0
- package/dist/verify/escaped-tests/escaped-tests-source.js.map +1 -0
- package/dist/verify/gate-config/verification-manifest.d.ts +12 -1
- package/dist/verify/gate-config/verification-manifest.d.ts.map +1 -1
- package/dist/verify/gate-config/verification-manifest.js +12 -1
- package/dist/verify/gate-config/verification-manifest.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 +4 -4
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.js +16 -6
- package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
- package/package.json +3 -3
- package/scripts/telora-daemon-wrapper.sh +16 -7
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/merge/candidate-tip-attribution.test.ts,
|
|
3
|
+
// packages/daemon/src/merge/completion-merge-driver.test.ts
|
|
4
|
+
// PINNED-BY-END
|
|
5
|
+
/**
|
|
6
|
+
* Whether a red integration candidate's failures are the INTEGRATION TIP's: the
|
|
7
|
+
* check the completion merge driver (merge/completion-merge-driver.ts) makes in
|
|
8
|
+
* its `rework` step before a red candidate is filed as its focus's re-work.
|
|
9
|
+
*
|
|
10
|
+
* A candidate is the focus head with the integration tip merged in, so a test
|
|
11
|
+
* the tip already fails fails on every candidate built on it, whichever focus
|
|
12
|
+
* pushed it. Re-opening that focus hands it a failure it did not cause. So the
|
|
13
|
+
* candidate's failing test files (merge/candidate-ci-failures.ts) are run at the
|
|
14
|
+
* tip it was built on, and only a red the tip reproduces in full is recorded as
|
|
15
|
+
* the integration's.
|
|
16
|
+
*
|
|
17
|
+
* ELIGIBLE only when CI's failure record is held, complete, names test files
|
|
18
|
+
* and failing ids (fewer than the held cap, so the list is all of them), and
|
|
19
|
+
* the candidate's telora.verify.json declares a `rerunCommand`. Anything
|
|
20
|
+
* else is 'not_eligible' -- re-work exactly as without this check.
|
|
21
|
+
* THE TIP is `git merge-base <candidate> <integration tip>`, the tip read the
|
|
22
|
+
* way the completion gate reads it (merge/merge-gate-coverage.ts
|
|
23
|
+
* resolveGateIntegrationTip): the newest integration commit in the
|
|
24
|
+
* candidate's history. Unreadable -> 'not_eligible'.
|
|
25
|
+
* THE RUN is the failing files that exist at the tip, through the declared
|
|
26
|
+
* command, in a provisioned detached checkout pinned to the tip -- the same
|
|
27
|
+
* per-file base measurement verify attribution makes
|
|
28
|
+
* (verify/attribution/verification-baseline-files.ts measureFileBaseline),
|
|
29
|
+
* run on the daemon host whatever runner the product's gate declares. It
|
|
30
|
+
* is ASYNC: the first tick starts it (one run per product, focus, candidate
|
|
31
|
+
* and tip at a time) and answers 'running', and the driver does nothing that
|
|
32
|
+
* tick; a later tick reads the result recorded host-locally (one file per
|
|
33
|
+
* product, focus, candidate and tip under the global state dir, written
|
|
34
|
+
* atomically).
|
|
35
|
+
* INCONCLUSIVE: a run killed by its timeout, exiting non-zero naming no failing
|
|
36
|
+
* test, a checkout that could not be made or whose installs are not
|
|
37
|
+
* comparable with the tip's, a run that threw, one that left no result
|
|
38
|
+
* within TIP_RUN_RESULT_WINDOW_MS, or one this process is no longer running
|
|
39
|
+
* (the daemon restarted mid-run).
|
|
40
|
+
* THE DECISION is 'integration_borne' only on a CONCLUSIVE run in which EVERY
|
|
41
|
+
* failing id of the candidate (file repo-relative) also failed at the tip.
|
|
42
|
+
* An id that names no file, a file absent at the tip, an id the tip passed,
|
|
43
|
+
* or an inconclusive run is 'focus_owned': today's re-work. So is a tip CI
|
|
44
|
+
* itself judged GREEN (refs/ci-status), whatever the local run says: CI's
|
|
45
|
+
* environment does not carry the failure there. The check fails toward the
|
|
46
|
+
* team, never toward dropping a red.
|
|
47
|
+
*
|
|
48
|
+
* An integration-borne red is filed, once per candidate and tip, as a
|
|
49
|
+
* BRANCH-SCOPED ci_run_red observation (ci/ci-sensor-loop.ts
|
|
50
|
+
* ciRunRedEscalationParams, no focus anchor) keyed by the branch, the candidate
|
|
51
|
+
* and the tip, naming the files and the ci-logs command for the tip. It is a
|
|
52
|
+
* ci_run_red row of the product, so the ci_run_red sensor reads it as the
|
|
53
|
+
* integration's open red: a green integration run resolves it.
|
|
54
|
+
*
|
|
55
|
+
* NEVER THROWS: any error is 'focus_owned'.
|
|
56
|
+
*
|
|
57
|
+
* @module merge/candidate-tip-attribution
|
|
58
|
+
*/
|
|
59
|
+
import { mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
|
|
60
|
+
import { resolve } from 'node:path';
|
|
61
|
+
import { resolveGlobalStateDir } from '../daemon-state/daemon-process.js';
|
|
62
|
+
import { createLogger } from '../log/daemon-log.js';
|
|
63
|
+
import { HELD_FAILING_TEST_IDS_MAX } from './candidate-ci-failures.js';
|
|
64
|
+
import { measureFileBaseline } from '../verify/attribution/verification-baseline-files.js';
|
|
65
|
+
import { isBaselineUnavailable } from '../verify/attribution/verification-baseline-run.js';
|
|
66
|
+
import { testFileOfId } from '../verify/failing-test-rerun/rerun-command.js';
|
|
67
|
+
import { CI_RUN_RED_ESCALATION_KIND, ciRunRedEscalationParams } from '../ci/ci-sensor-loop.js';
|
|
68
|
+
import { ciLogInstruction, ciLogInstructionText } from '../ci/product-ci-repo.js';
|
|
69
|
+
import { computeCauseKey } from '../queries/escalations/cause-key.js';
|
|
70
|
+
const log = createLogger({ module: 'completion-merge' });
|
|
71
|
+
/** How long the failing files may run at the tip before the run is killed (inconclusive). */
|
|
72
|
+
export const TIP_RUN_TIMEOUT_MS = 30 * 60 * 1000;
|
|
73
|
+
/** How long a started run may go without a recorded result before it is inconclusive. */
|
|
74
|
+
export const TIP_RUN_RESULT_WINDOW_MS = 60 * 60 * 1000;
|
|
75
|
+
// ── Pure decisions ───────────────────────────────────────────────────
|
|
76
|
+
/** Why CI's failure record cannot be checked against the tip, or null when it can (module doc). Pure. */
|
|
77
|
+
export function failuresIneligibility(failures) {
|
|
78
|
+
if (failures === null)
|
|
79
|
+
return 'CI published no failure record for the candidate';
|
|
80
|
+
if (!failures.complete)
|
|
81
|
+
return "the candidate's failure record is incomplete";
|
|
82
|
+
if (failures.failingFiles.length === 0 || failures.failingTests.length === 0)
|
|
83
|
+
return "the candidate's failure record names no failing test file";
|
|
84
|
+
if (failures.failingTests.length >= HELD_FAILING_TEST_IDS_MAX)
|
|
85
|
+
return `the candidate failed ${HELD_FAILING_TEST_IDS_MAX} or more tests, more than the held record lists`;
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
/** Why a red candidate cannot be checked against the tip, or null when it can (module doc). Pure. */
|
|
89
|
+
export function tipAttributionIneligibility(failures, rerunCommand) {
|
|
90
|
+
return failuresIneligibility(failures) ?? (rerunCommand === null ? "the candidate's telora.verify.json declares no rerunCommand" : null);
|
|
91
|
+
}
|
|
92
|
+
/** A failing id with its file made relative to `roots` and any project label dropped; unchanged when it names no file. Pure. */
|
|
93
|
+
export function tipComparableId(id, roots) {
|
|
94
|
+
const file = testFileOfId(id, roots);
|
|
95
|
+
return file === null ? id : [file, ...id.split(' > ').slice(1)].join(' > ');
|
|
96
|
+
}
|
|
97
|
+
/** The decision a recorded result gives the candidate's failures (module doc). Pure. */
|
|
98
|
+
export function decideTipAttribution(failures, tipSha, result) {
|
|
99
|
+
if (!result.conclusive)
|
|
100
|
+
return { kind: 'focus_owned', tipSha, reason: `the run at the tip was inconclusive: ${result.reason}` };
|
|
101
|
+
const atTip = new Set(result.failingAtTip);
|
|
102
|
+
const unreproduced = failures.failingTests.filter((id) => testFileOfId(id, []) === null || !atTip.has(id));
|
|
103
|
+
if (unreproduced.length > 0 || result.command === null) {
|
|
104
|
+
const shown = unreproduced.slice(0, 5).join('; ');
|
|
105
|
+
return { kind: 'focus_owned', tipSha, reason: `${unreproduced.length} of the candidate's ${failures.failingTests.length} failing test(s) did not fail at the tip${shown ? ` (${shown})` : ''}` };
|
|
106
|
+
}
|
|
107
|
+
return { kind: 'integration_borne', tipSha, files: [...failures.failingFiles], failingTests: [...failures.failingTests], command: result.command };
|
|
108
|
+
}
|
|
109
|
+
// ── The run ──────────────────────────────────────────────────────────
|
|
110
|
+
/** Runs in flight, by record key. */
|
|
111
|
+
const inFlight = new Map();
|
|
112
|
+
/** Reset the check's memory -- tests start from a clean slate. */
|
|
113
|
+
export function __resetCandidateTipAttributionForTests() {
|
|
114
|
+
inFlight.clear();
|
|
115
|
+
}
|
|
116
|
+
/** Resolves when every run in flight has settled -- tests await a run they started. */
|
|
117
|
+
export async function __settleCandidateTipAttributionForTests() {
|
|
118
|
+
await Promise.all([...inFlight.values()]);
|
|
119
|
+
}
|
|
120
|
+
function runKey(subject, candidateSha, tipSha) {
|
|
121
|
+
return `${subject.productId}:${subject.focusId}:${candidateSha}:${tipSha}`;
|
|
122
|
+
}
|
|
123
|
+
/** Run the failing files at the tip and turn what happened into a result. Never throws. */
|
|
124
|
+
async function measureAtTip(tipSha, template, files, deps) {
|
|
125
|
+
try {
|
|
126
|
+
const run = await measureFileBaseline(deps.openTipCheckout, tipSha, template, files);
|
|
127
|
+
if (isBaselineUnavailable(run))
|
|
128
|
+
return { conclusive: false, reason: run.unavailable, at: deps.now() };
|
|
129
|
+
return { conclusive: true, command: run.command, failingAtTip: run.failingTests.map((id) => tipComparableId(id, run.roots)), at: deps.now() };
|
|
130
|
+
}
|
|
131
|
+
catch (err) {
|
|
132
|
+
return { conclusive: false, reason: `the run threw: ${err.message}`, at: deps.now() };
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/** Record `result` unless the record already holds one (a late run never overwrites a decided one). */
|
|
136
|
+
function settle(record, result, deps) {
|
|
137
|
+
const current = deps.readRecord(record.candidateSha, record.tipSha);
|
|
138
|
+
if (current?.result)
|
|
139
|
+
return;
|
|
140
|
+
deps.writeRecord({ ...(current ?? record), result });
|
|
141
|
+
}
|
|
142
|
+
function startRun(subject, candidateSha, failures, tipSha, template, deps) {
|
|
143
|
+
const record = {
|
|
144
|
+
productId: subject.productId, focusId: subject.focusId, candidateSha, tipSha, startedAt: deps.now(), result: null, filedAt: null,
|
|
145
|
+
};
|
|
146
|
+
deps.writeRecord(record);
|
|
147
|
+
const key = runKey(subject, candidateSha, tipSha);
|
|
148
|
+
const done = measureAtTip(tipSha, template, failures.failingFiles, deps)
|
|
149
|
+
.then((result) => {
|
|
150
|
+
settle(record, result, deps);
|
|
151
|
+
log.info(`[completion-merge] "${subject.focusName}": the failing files of red candidate ${candidateSha.slice(0, 9)} ran at the integration tip ${tipSha.slice(0, 9)}: ${result.conclusive ? `${result.failingAtTip.length} test(s) failed there` : `inconclusive (${result.reason})`}`);
|
|
152
|
+
})
|
|
153
|
+
.catch((err) => log.warn(`[completion-merge] "${subject.focusName}": the tip run of ${candidateSha.slice(0, 9)} could not be recorded: ${err.message}`))
|
|
154
|
+
.finally(() => inFlight.delete(key));
|
|
155
|
+
inFlight.set(key, done);
|
|
156
|
+
log.info(`[completion-merge] "${subject.focusName}": started running the ${failures.failingFiles.length} failing test file(s) of red candidate ${candidateSha.slice(0, 9)} at the integration tip ${tipSha.slice(0, 9)}`);
|
|
157
|
+
return { kind: 'running', tipSha };
|
|
158
|
+
}
|
|
159
|
+
/** A started record with no result: still running, or inconclusive (stale window, or no longer running here). */
|
|
160
|
+
function readStarted(subject, failures, record, deps) {
|
|
161
|
+
const running = inFlight.has(runKey(subject, record.candidateSha, record.tipSha));
|
|
162
|
+
const stale = deps.now() - record.startedAt >= TIP_RUN_RESULT_WINDOW_MS;
|
|
163
|
+
if (running && !stale)
|
|
164
|
+
return { kind: 'running', tipSha: record.tipSha };
|
|
165
|
+
const reason = stale
|
|
166
|
+
? `no result within ${Math.round(TIP_RUN_RESULT_WINDOW_MS / 60_000)}m of its start`
|
|
167
|
+
: 'the run ended without recording a result (the daemon restarted or it crashed)';
|
|
168
|
+
const result = { conclusive: false, reason, at: deps.now() };
|
|
169
|
+
settle(record, result, deps);
|
|
170
|
+
return decideTipAttribution(failures, record.tipSha, result);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* An integration-borne answer stands only while CI has not judged the tip GREEN:
|
|
174
|
+
* a tip CI ran green does not carry the failure in CI's environment, so a local
|
|
175
|
+
* reproduction there says more about the host than the tip (module doc). Pure.
|
|
176
|
+
*/
|
|
177
|
+
export function unlessTipGreen(decided, deps) {
|
|
178
|
+
if (decided.kind !== 'integration_borne' || deps.readTipCiStatus(decided.tipSha) !== 'green')
|
|
179
|
+
return decided;
|
|
180
|
+
return { kind: 'focus_owned', tipSha: decided.tipSha, reason: `the tip ${decided.tipSha.slice(0, 9)} reproduced the failures locally, but CI judged it green` };
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Whether the red candidate `candidateSha` is the integration tip's (module doc).
|
|
184
|
+
* Starts the tip run on first sight; never awaits it. Never throws.
|
|
185
|
+
*/
|
|
186
|
+
export async function attributeCandidateRedToTip(subject, candidateSha, failures, deps) {
|
|
187
|
+
try {
|
|
188
|
+
const unusable = failuresIneligibility(failures);
|
|
189
|
+
if (failures === null || unusable !== null)
|
|
190
|
+
return { kind: 'not_eligible', reason: unusable ?? 'no failure record' };
|
|
191
|
+
const template = deps.readRerunCommand(candidateSha);
|
|
192
|
+
if (template === null)
|
|
193
|
+
return { kind: 'not_eligible', reason: tipAttributionIneligibility(failures, template) ?? 'no rerunCommand' };
|
|
194
|
+
const integrationTip = deps.resolveIntegrationTip();
|
|
195
|
+
const tipSha = integrationTip === null ? null : deps.mergeBase(candidateSha, integrationTip);
|
|
196
|
+
if (tipSha === null)
|
|
197
|
+
return { kind: 'not_eligible', reason: 'the integration tip the candidate was built on could not be read' };
|
|
198
|
+
const record = deps.readRecord(candidateSha, tipSha);
|
|
199
|
+
if (record === null)
|
|
200
|
+
return startRun(subject, candidateSha, failures, tipSha, template, deps);
|
|
201
|
+
if (record.result === null)
|
|
202
|
+
return unlessTipGreen(readStarted(subject, failures, record, deps), deps);
|
|
203
|
+
return unlessTipGreen(decideTipAttribution(failures, tipSha, record.result), deps);
|
|
204
|
+
}
|
|
205
|
+
catch (err) {
|
|
206
|
+
log.warn(`[completion-merge] "${subject.focusName}": whether red candidate ${candidateSha.slice(0, 9)} is the integration tip's could not be decided -- treated as the focus's: ${err.message}`);
|
|
207
|
+
return { kind: 'focus_owned', tipSha: null, reason: `the check threw: ${err.message}` };
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/** The cause key of an integration-borne red: the ci_run_red scheme, scoped to the branch, the candidate and the tip. Pure. */
|
|
211
|
+
export function integrationBorneCauseKey(branch, candidateSha, tipSha) {
|
|
212
|
+
return computeCauseKey(CI_RUN_RED_ESCALATION_KIND, { branch, candidate: candidateSha, tip: tipSha });
|
|
213
|
+
}
|
|
214
|
+
/** The branch-scoped observation an integration-borne red is filed as (module doc). Pure. */
|
|
215
|
+
export function integrationBorneFilingParams(subject, candidateSha, red, filing) {
|
|
216
|
+
const branch = filing.integrationBranch;
|
|
217
|
+
const base = ciRunRedEscalationParams({
|
|
218
|
+
organizationId: filing.organizationId, productId: subject.productId, focusId: null, deliveryId: null, sha: red.tipSha, branch, ciRepo: filing.ciRepo,
|
|
219
|
+
});
|
|
220
|
+
const files = red.files.slice(0, 20);
|
|
221
|
+
const description = `The integration tip ${red.tipSha.slice(0, 12)} on ${branch} fails tests: the integration candidate ${candidateSha.slice(0, 12)} ` +
|
|
222
|
+
`of focus "${subject.focusName}" is RED in CI, and every one of its ${red.failingTests.length} failing test(s) failed again when ` +
|
|
223
|
+
`its failing files ran at the tip it was built on (\`${red.command}\`). The red is the integration's, so the focus was NOT ` +
|
|
224
|
+
`re-opened; its merge stays held until the tip moves.\n\nFailing test files: ${files.join(', ')}${red.files.length > files.length ? ` (+${red.files.length - files.length} more)` : ''}.\n\n` +
|
|
225
|
+
`Fixing it is coding work on ${branch}. ${ciLogInstructionText(ciLogInstruction(filing.ciRepo, red.tipSha), red.tipSha)}`;
|
|
226
|
+
return {
|
|
227
|
+
...base,
|
|
228
|
+
description,
|
|
229
|
+
metadata: {
|
|
230
|
+
...(base.metadata ?? {}),
|
|
231
|
+
source: 'integration_borne_candidate_red',
|
|
232
|
+
candidate_sha: candidateSha,
|
|
233
|
+
tip_sha: red.tipSha,
|
|
234
|
+
candidate_focus_id: subject.focusId,
|
|
235
|
+
failing_test_files: red.files,
|
|
236
|
+
failing_tests: red.failingTests.slice(0, 50),
|
|
237
|
+
rerun_command: red.command,
|
|
238
|
+
},
|
|
239
|
+
causeKey: integrationBorneCauseKey(branch, candidateSha, red.tipSha),
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* File the integration-borne red of `candidateSha` once per candidate and tip
|
|
244
|
+
* (a filed record is never filed again). True when this call filed it. A failed
|
|
245
|
+
* filing is logged and retried on a later tick. Never throws.
|
|
246
|
+
*/
|
|
247
|
+
export async function fileIntegrationBorneRed(subject, candidateSha, red, deps) {
|
|
248
|
+
try {
|
|
249
|
+
const record = deps.readRecord(candidateSha, red.tipSha);
|
|
250
|
+
if (record?.filedAt != null)
|
|
251
|
+
return false;
|
|
252
|
+
const params = integrationBorneFilingParams(subject, candidateSha, red, {
|
|
253
|
+
organizationId: deps.organizationId, integrationBranch: deps.integrationBranch, ciRepo: deps.resolveCiRepo(),
|
|
254
|
+
});
|
|
255
|
+
await deps.fileObservation(params);
|
|
256
|
+
if (record !== null)
|
|
257
|
+
deps.writeRecord({ ...record, filedAt: deps.now() });
|
|
258
|
+
return true;
|
|
259
|
+
}
|
|
260
|
+
catch (err) {
|
|
261
|
+
log.warn(`[completion-merge] "${subject.focusName}": the integration-borne red of ${candidateSha.slice(0, 9)} could not be filed (retried next tick): ${err.message}`);
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
// ── The record: one file per (product, focus, candidate, tip), written atomically ──
|
|
266
|
+
function recordDir() {
|
|
267
|
+
return resolve(resolveGlobalStateDir(), 'candidate-tip-runs');
|
|
268
|
+
}
|
|
269
|
+
/** The record file for one tip run; `dir` defaults to the global state dir. Exported for tests. */
|
|
270
|
+
export function tipRunRecordPath(productId, focusId, candidateSha, tipSha, dir = recordDir()) {
|
|
271
|
+
return resolve(dir, `${productId}-${focusId}-${candidateSha}-${tipSha}.json`.replace(/[^a-zA-Z0-9._-]/g, '_'));
|
|
272
|
+
}
|
|
273
|
+
/** Write a record atomically (temp + rename). Throws when it cannot. */
|
|
274
|
+
export function writeTipRunRecord(record, dir = recordDir()) {
|
|
275
|
+
mkdirSync(dir, { recursive: true });
|
|
276
|
+
const path = tipRunRecordPath(record.productId, record.focusId, record.candidateSha, record.tipSha, dir);
|
|
277
|
+
const tmp = `${path}.${process.pid}.tmp`;
|
|
278
|
+
writeFileSync(tmp, JSON.stringify(record, null, 2));
|
|
279
|
+
renameSync(tmp, path);
|
|
280
|
+
}
|
|
281
|
+
const isStrings = (v) => Array.isArray(v) && v.every((s) => typeof s === 'string');
|
|
282
|
+
function parseResult(value) {
|
|
283
|
+
if (value === null)
|
|
284
|
+
return null;
|
|
285
|
+
if (typeof value !== 'object')
|
|
286
|
+
return undefined;
|
|
287
|
+
const r = value;
|
|
288
|
+
const at = typeof r.at === 'number' ? r.at : 0;
|
|
289
|
+
if (r.conclusive === true && (r.command === null || typeof r.command === 'string') && isStrings(r.failingAtTip)) {
|
|
290
|
+
return { conclusive: true, command: r.command, failingAtTip: r.failingAtTip, at };
|
|
291
|
+
}
|
|
292
|
+
if (r.conclusive === false && typeof r.reason === 'string')
|
|
293
|
+
return { conclusive: false, reason: r.reason, at };
|
|
294
|
+
return undefined;
|
|
295
|
+
}
|
|
296
|
+
/** The record of one tip run; null when none is recorded, or it is unreadable. */
|
|
297
|
+
export function readTipRunRecord(productId, focusId, candidateSha, tipSha, dir = recordDir()) {
|
|
298
|
+
let raw;
|
|
299
|
+
try {
|
|
300
|
+
raw = JSON.parse(readFileSync(tipRunRecordPath(productId, focusId, candidateSha, tipSha, dir), 'utf8'));
|
|
301
|
+
}
|
|
302
|
+
catch {
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
305
|
+
if (typeof raw !== 'object' || raw === null)
|
|
306
|
+
return null;
|
|
307
|
+
const r = raw;
|
|
308
|
+
const result = parseResult(r.result);
|
|
309
|
+
if (r.candidateSha !== candidateSha || r.tipSha !== tipSha || typeof r.startedAt !== 'number' || result === undefined)
|
|
310
|
+
return null;
|
|
311
|
+
return { productId, focusId, candidateSha, tipSha, startedAt: r.startedAt, result, filedAt: typeof r.filedAt === 'number' ? r.filedAt : null };
|
|
312
|
+
}
|
|
313
|
+
/** `git merge-base <a> <b>` in `repoPath`: the newest commit both histories hold; null when git cannot say. */
|
|
314
|
+
export function readMergeBase(repoPath, a, b, runGit) {
|
|
315
|
+
const result = runGit(['merge-base', a, b], repoPath);
|
|
316
|
+
const sha = result.success ? result.output.trim() : '';
|
|
317
|
+
return /^[0-9a-f]{40}$/.test(sha) ? sha : null;
|
|
318
|
+
}
|
|
319
|
+
//# sourceMappingURL=candidate-tip-attribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candidate-tip-attribution.js","sourceRoot":"","sources":["../../src/merge/candidate-tip-attribution.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0EAA0E;AAC1E,8DAA8D;AAC9D,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,yBAAyB,EAA4B,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAAE,mBA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AAED,+GAA+G;AAC/G,MAAM,UAAU,aAAa,CAC3B,QAAgB,EAChB,CAAS,EACT,CAAS,EACT,MAA6E;IAE7E,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACtD,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACvD,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC"}
|
|
@@ -34,8 +34,26 @@
|
|
|
34
34
|
* head (merge/completion-local-judge.ts); its verdict lands
|
|
35
35
|
* on a later tick.
|
|
36
36
|
* rework -> return the focus to coding: one Bug on the owning delivery,
|
|
37
|
-
* re-opened to verify_failed (merge/candidate-rework.ts)
|
|
38
|
-
*
|
|
37
|
+
* re-opened to verify_failed (merge/candidate-rework.ts),
|
|
38
|
+
* naming the test files CI's failure record says failed
|
|
39
|
+
* (merge/candidate-ci-failures.ts) when it published one. No
|
|
40
|
+
* escalation is filed. Before it is routed, the red is
|
|
41
|
+
* recorded beside the gate verdict of the approved head the
|
|
42
|
+
* candidate was built from (merge/candidate-red-record.ts);
|
|
43
|
+
* that record never blocks the re-work, and it is posted
|
|
44
|
+
* again when a late failure record brings the files. A red
|
|
45
|
+
* with no record yet, of a product whose CI publishes them,
|
|
46
|
+
* waits for one up to a bounded window before anything
|
|
47
|
+
* else (merge/candidate-ci-failures.ts awaitsFailureRecord).
|
|
48
|
+
* Then its failing test files are run at the integration tip it was built on
|
|
49
|
+
* (merge/candidate-tip-attribution.ts): while that run is in
|
|
50
|
+
* flight nothing is routed; when the tip reproduces every
|
|
51
|
+
* failure the red is the INTEGRATION's -- filed once as a
|
|
52
|
+
* branch-scoped ci_run_red observation, the focus is not
|
|
53
|
+
* re-opened, and the merge stays held until the tip moves;
|
|
54
|
+
* any other answer (not checkable, a failure the tip does
|
|
55
|
+
* not reproduce, an inconclusive run, a check that threw)
|
|
56
|
+
* routes the re-work as above.
|
|
39
57
|
* rework_local -> the same, for a candidate that failed the local run; the
|
|
40
58
|
* Bug names the command, its result and the log.
|
|
41
59
|
*
|
|
@@ -46,6 +64,8 @@
|
|
|
46
64
|
*/
|
|
47
65
|
import type { CompletionMergeStep } from './completion-merge-gate.js';
|
|
48
66
|
import type { LocalRunStart, LocalSuiteFailure } from './completion-local-judge.js';
|
|
67
|
+
import type { CandidateCiFailures } from './candidate-ci-failures.js';
|
|
68
|
+
import type { CandidateTipAttribution, IntegrationBorneRed } from './candidate-tip-attribution.js';
|
|
49
69
|
/** How long a pushed candidate may sit with no published verdict before it is re-pushed (once). */
|
|
50
70
|
export declare const CANDIDATE_CI_VERDICT_WAIT_MS: number;
|
|
51
71
|
/** The focus branch a step acts on. */
|
|
@@ -57,8 +77,11 @@ export interface CompletionMergeSubject {
|
|
|
57
77
|
}
|
|
58
78
|
/** Why a candidate is returned to the focus as re-work. */
|
|
59
79
|
export type CandidateReworkCause = 'red' | 'local_red' | 'conflict' | 'unreviewed_merge' | 'unreviewed_commits';
|
|
60
|
-
/**
|
|
61
|
-
|
|
80
|
+
/**
|
|
81
|
+
* What a re-work Bug is told beyond its cause: a conflict's paths, a failed local
|
|
82
|
+
* run, the approval commits landed after, or the test files a red candidate failed in CI.
|
|
83
|
+
*/
|
|
84
|
+
export type CandidateReworkDetail = CompletionMergeConflict | LocalSuiteFailure | UnreviewedCommits | CandidateCiFailures;
|
|
62
85
|
/** Commits after the approved head: the commit the focus's newest approval judged. */
|
|
63
86
|
export interface UnreviewedCommits {
|
|
64
87
|
approvedSha: string;
|
|
@@ -110,6 +133,27 @@ export interface CompletionMergeDriverDeps {
|
|
|
110
133
|
startLocalRun: (sha: string) => LocalRunStart;
|
|
111
134
|
/** What a failed local run of `sha` recorded, for the re-work Bug. */
|
|
112
135
|
readLocalFailure: (sha: string) => LocalSuiteFailure | null;
|
|
136
|
+
/** The test files the red candidate `sha` failed in CI (merge/candidate-ci-failures.ts); null when CI published none. Never throws. */
|
|
137
|
+
readCandidateFailures: (sha: string) => CandidateCiFailures | null;
|
|
138
|
+
/**
|
|
139
|
+
* Whether the red candidate `sha`, with no failure record yet, waits this tick
|
|
140
|
+
* for a late one (merge/candidate-ci-failures.ts awaitsFailureRecord). Never throws.
|
|
141
|
+
*/
|
|
142
|
+
awaitFailureRecord: (sha: string) => boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Record the red candidate `sha` with its failure record and the approved head it
|
|
145
|
+
* was built from (merge/candidate-red-record.ts). Never blocks the re-work: a
|
|
146
|
+
* throw is logged and the re-work is routed regardless.
|
|
147
|
+
*/
|
|
148
|
+
recordCandidateRed: (subject: CompletionMergeSubject, sha: string, failures: CandidateCiFailures | null, approvedSha?: string) => Promise<void>;
|
|
149
|
+
/**
|
|
150
|
+
* Whether the red candidate `sha` is the integration tip's
|
|
151
|
+
* (merge/candidate-tip-attribution.ts): starts the tip run on first sight
|
|
152
|
+
* ('running'), then answers from its recorded result. A throw is 'focus_owned'.
|
|
153
|
+
*/
|
|
154
|
+
attributeCandidateRed: (subject: CompletionMergeSubject, sha: string, failures: CandidateCiFailures | null) => Promise<CandidateTipAttribution>;
|
|
155
|
+
/** File an integration-borne red once per candidate and tip; true when this call filed it. A throw is logged. */
|
|
156
|
+
fileIntegrationRed: (subject: CompletionMergeSubject, sha: string, red: IntegrationBorneRed) => Promise<boolean>;
|
|
113
157
|
/** Return the focus to coding as re-work for the candidate at `sha`. */
|
|
114
158
|
routeRework: (subject: CompletionMergeSubject, sha: string, cause: CandidateReworkCause, detail: CandidateReworkDetail | null) => Promise<CandidateReworkOutcome>;
|
|
115
159
|
now: () => number;
|
|
@@ -123,7 +167,7 @@ export interface CompletionMergeStepResult {
|
|
|
123
167
|
/**
|
|
124
168
|
* Take the step a held completion merge names, and say whether it returned the
|
|
125
169
|
* focus to coding. `approvedSha` is the gate's (review_head names the commits
|
|
126
|
-
* after it). Never throws: a failed step is retried next tick (and did not
|
|
170
|
+
* after it; rework records the red beside it). Never throws: a failed step is retried next tick (and did not
|
|
127
171
|
* return the focus).
|
|
128
172
|
*/
|
|
129
173
|
export declare function driveCompletionMergeStep(subject: CompletionMergeSubject, step: CompletionMergeStep, headSha: string, deps: CompletionMergeDriverDeps, approvedSha?: string): Promise<CompletionMergeStepResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-merge-driver.d.ts","sourceRoot":"","sources":["../../src/merge/completion-merge-driver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"completion-merge-driver.d.ts","sourceRoot":"","sources":["../../src/merge/completion-merge-driver.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAKnG,mGAAmG;AACnG,eAAO,MAAM,4BAA4B,QAAqB,CAAC;AAE/D,uCAAuC;AACvC,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,2DAA2D;AAC3D,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,WAAW,GAAG,UAAU,GAAG,kBAAkB,GAAG,oBAAoB,CAAC;AAEhH;;;GAGG;AACH,MAAM,MAAM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W,yBAAyB;IACxC,QAAQ,EAAE,OAAO,CAAC;CACnB;AA+HD;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,sBAAsB,EAC/B,IAAI,EAAE,mBAAmB,EACzB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,yBAAyB,EAC/B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,yBAAyB,CAAC,CAmBpC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// packages/daemon/src/integration/approved-head-hold-release-completion-regression.test.ts,
|
|
7
7
|
// packages/daemon/src/integration/commits-after-approval-review-regression.test.ts,
|
|
8
8
|
// packages/daemon/src/integration/same-run-rerun-candidate-merge-regression.test.ts,
|
|
9
|
+
// packages/daemon/src/merge/candidate-ci-failures.test.ts,
|
|
9
10
|
// packages/daemon/src/merge/candidate-rework.test.ts,
|
|
10
11
|
// packages/daemon/src/merge/completion-conflict-rework.test.ts,
|
|
11
12
|
// packages/daemon/src/merge/completion-merge-driver.test.ts,
|
|
@@ -47,6 +48,59 @@ async function rework(subject, sha, cause, detail, deps) {
|
|
|
47
48
|
return { reworked: true };
|
|
48
49
|
}
|
|
49
50
|
const NOTHING = { reworked: false };
|
|
51
|
+
/** Whether the red is the integration tip's; a check that throws is the focus's (fail toward the team). */
|
|
52
|
+
async function attributeRed(subject, headSha, failures, deps) {
|
|
53
|
+
try {
|
|
54
|
+
return await deps.attributeCandidateRed(subject, headSha, failures);
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
return { kind: 'focus_owned', tipSha: null, reason: `the tip check threw: ${err.message}` };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/** An integration-borne red: filed once as the integration's; the focus is not re-opened. */
|
|
61
|
+
async function holdIntegrationRed(subject, headSha, red, deps) {
|
|
62
|
+
let filed = false;
|
|
63
|
+
try {
|
|
64
|
+
filed = await deps.fileIntegrationRed(subject, headSha, red);
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
log.warn(`[completion-merge] "${subject.focusName}": the integration-borne red of ${headSha.slice(0, 9)} was not filed (retried next tick): ${err.message}`);
|
|
68
|
+
}
|
|
69
|
+
const text = `"${subject.focusName}": every failing test of red candidate ${headSha.slice(0, 9)} also fails at the integration tip ${red.tipSha.slice(0, 9)} -- the red is the integration's; the focus is not re-opened and the merge holds until the tip moves`;
|
|
70
|
+
if (filed)
|
|
71
|
+
log.warn(`[completion-merge] ${text} (filed as a branch-scoped ci_run_red observation)`);
|
|
72
|
+
else
|
|
73
|
+
log.debug(`[completion-merge] ${text}`);
|
|
74
|
+
return NOTHING;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* rework: record the red candidate (never blocking), check it against the
|
|
78
|
+
* integration tip it was built on, then route its re-work with CI's failure
|
|
79
|
+
* record -- unless the tip run is in flight or the tip carries the red (module doc).
|
|
80
|
+
*/
|
|
81
|
+
async function reworkRed(subject, headSha, approvedSha, deps) {
|
|
82
|
+
const failures = deps.readCandidateFailures(headSha);
|
|
83
|
+
try {
|
|
84
|
+
await deps.recordCandidateRed(subject, headSha, failures, approvedSha);
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
log.warn(`[completion-merge] "${subject.focusName}": the red candidate ${headSha.slice(0, 9)} was not recorded: ${err.message}`);
|
|
88
|
+
}
|
|
89
|
+
if (failures === null && deps.awaitFailureRecord(headSha)) {
|
|
90
|
+
log.debug(`[completion-merge] "${subject.focusName}": red candidate ${headSha.slice(0, 9)} waits for its CI failure record before its re-work is routed`);
|
|
91
|
+
return NOTHING;
|
|
92
|
+
}
|
|
93
|
+
const attribution = await attributeRed(subject, headSha, failures, deps);
|
|
94
|
+
if (attribution.kind === 'running') {
|
|
95
|
+
log.debug(`[completion-merge] "${subject.focusName}": red candidate ${headSha.slice(0, 9)} waits for its failing files to run at the integration tip ${attribution.tipSha.slice(0, 9)}`);
|
|
96
|
+
return NOTHING;
|
|
97
|
+
}
|
|
98
|
+
if (attribution.kind === 'integration_borne')
|
|
99
|
+
return holdIntegrationRed(subject, headSha, attribution, deps);
|
|
100
|
+
if (attribution.kind === 'focus_owned')
|
|
101
|
+
log.info(`[completion-merge] "${subject.focusName}": red candidate ${headSha.slice(0, 9)} is the focus's re-work: ${attribution.reason}`);
|
|
102
|
+
return rework(subject, headSha, 'red', failures, deps);
|
|
103
|
+
}
|
|
50
104
|
async function mergeOut(subject, headSha, deps) {
|
|
51
105
|
const outcome = await deps.mergeOut();
|
|
52
106
|
if (outcome.kind === 'conflict')
|
|
@@ -98,7 +152,7 @@ function runLocal(subject, headSha, deps) {
|
|
|
98
152
|
/**
|
|
99
153
|
* Take the step a held completion merge names, and say whether it returned the
|
|
100
154
|
* focus to coding. `approvedSha` is the gate's (review_head names the commits
|
|
101
|
-
* after it). Never throws: a failed step is retried next tick (and did not
|
|
155
|
+
* after it; rework records the red beside it). Never throws: a failed step is retried next tick (and did not
|
|
102
156
|
* return the focus).
|
|
103
157
|
*/
|
|
104
158
|
export async function driveCompletionMergeStep(subject, step, headSha, deps, approvedSha) {
|
|
@@ -110,7 +164,7 @@ export async function driveCompletionMergeStep(subject, step, headSha, deps, app
|
|
|
110
164
|
if (step === 'review_head')
|
|
111
165
|
return await rework(subject, headSha, 'unreviewed_commits', approvedSha ? { approvedSha } : null, deps);
|
|
112
166
|
if (step === 'rework')
|
|
113
|
-
return await
|
|
167
|
+
return await reworkRed(subject, headSha, approvedSha, deps);
|
|
114
168
|
if (step === 'rework_local')
|
|
115
169
|
return await rework(subject, headSha, 'local_red', deps.readLocalFailure(headSha), deps);
|
|
116
170
|
if (step === 'run_local')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-merge-driver.js","sourceRoot":"","sources":["../../src/merge/completion-merge-driver.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,yEAAyE;AACzE,0EAA0E;AAC1E,uEAAuE;AACvE,kEAAkE;AAClE,8FAA8F;AAC9F,sFAAsF;AACtF,uFAAuF;AACvF,wDAAwD;AACxD,kEAAkE;AAClE,+DAA+D;AAC/D,+DAA+D;AAC/D,sDAAsD;AACtD,gBAAgB;
|
|
1
|
+
{"version":3,"file":"completion-merge-driver.js","sourceRoot":"","sources":["../../src/merge/completion-merge-driver.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,yEAAyE;AACzE,0EAA0E;AAC1E,uEAAuE;AACvE,kEAAkE;AAClE,8FAA8F;AAC9F,sFAAsF;AACtF,uFAAuF;AACvF,6DAA6D;AAC7D,wDAAwD;AACxD,kEAAkE;AAClE,+DAA+D;AAC/D,+DAA+D;AAC/D,sDAAsD;AACtD,gBAAgB;AAuEhB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAEzD,mGAAmG;AACnG,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AA+F/D;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEpD,mEAAmE;AACnE,MAAM,UAAU,oCAAoC;IAClD,iBAAiB,CAAC,KAAK,EAAE,CAAC;AAC5B,CAAC;AAOD,SAAS,GAAG,CAAC,OAA+B,EAAE,GAAW;IACvD,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,GAAG,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,GAAyC;IACvD,GAAG,EAAE,cAAc;IACnB,SAAS,EAAE,iCAAiC;IAC5C,QAAQ,EAAE,oCAAoC;IAC9C,gBAAgB,EAAE,oDAAoD;IACtE,kBAAkB,EAAE,0DAA0D;CAC/E,CAAC;AAEF,KAAK,UAAU,MAAM,CACnB,OAA+B,EAC/B,GAAW,EACX,KAA2B,EAC3B,MAAoC,EACpC,IAA+B;IAE/B,MAAM,OAAO,GAAG,MAA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G,EAAE,CAAC,KAAK,IAAI;gBAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;YACjH,GAAG,CAAC,IAAI,CAAC,uBAAuB,OAAO,CAAC,SAAS,MAAM,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,0BAA0B,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;YACnJ,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,OAAO,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,uBAAuB,OAAO,CAAC,SAAS,MAAM,IAAI,QAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,YAAa,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAC5H,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC"}
|
|
@@ -12,7 +12,10 @@ export type MergeGateDecision = {
|
|
|
12
12
|
/** What a hold no step advances awaits: an approval covering the head, or the local judge's run in flight. */
|
|
13
13
|
awaiting?: 'approval' | 'local_run';
|
|
14
14
|
headSha?: string;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The commit the focus's newest approval judged, when the step concerns it:
|
|
17
|
+
* review_head (the commits after it), rework (the head a red candidate was built from).
|
|
18
|
+
*/
|
|
16
19
|
approvedSha?: string;
|
|
17
20
|
/** The gate's OWN delivery read found the focus incomplete: there is no completion hold to age. */
|
|
18
21
|
incomplete?: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-merge-gate.d.ts","sourceRoot":"","sources":["../../src/merge/completion-merge-gate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"completion-merge-gate.d.ts","sourceRoot":"","sources":["../../src/merge/completion-merge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