@telora/daemon 0.24.8 → 0.24.10

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.
Files changed (94) hide show
  1. package/build-info.json +5 -3
  2. package/dist/ci/candidate-ref.js +1 -1
  3. package/dist/ci/candidate-ref.js.map +1 -1
  4. package/dist/ci/gate-ref.d.ts +150 -0
  5. package/dist/ci/gate-ref.d.ts.map +1 -0
  6. package/dist/ci/gate-ref.js +348 -0
  7. package/dist/ci/gate-ref.js.map +1 -0
  8. package/dist/composition/verification-context.d.ts.map +1 -1
  9. package/dist/composition/verification-context.js +56 -8
  10. package/dist/composition/verification-context.js.map +1 -1
  11. package/dist/nexus/file-escalation.d.ts.map +1 -1
  12. package/dist/nexus/file-escalation.js +1 -0
  13. package/dist/nexus/file-escalation.js.map +1 -1
  14. package/dist/nexus/intake.d.ts +14 -2
  15. package/dist/nexus/intake.d.ts.map +1 -1
  16. package/dist/nexus/intake.js +11 -2
  17. package/dist/nexus/intake.js.map +1 -1
  18. package/dist/nexus/pending-returns.d.ts +1 -1
  19. package/dist/nexus/pending-returns.d.ts.map +1 -1
  20. package/dist/queries/verification/verification.js +1 -1
  21. package/dist/testing/fixtures/index.js +1 -1
  22. package/dist/testing/fixtures/verification-deps.d.ts +8 -67
  23. package/dist/testing/fixtures/verification-deps.d.ts.map +1 -1
  24. package/dist/testing/fixtures/verification-deps.js +94 -1
  25. package/dist/testing/fixtures/verification-deps.js.map +1 -1
  26. package/dist/testing/fixtures/vitest-failure-log.d.ts.map +1 -1
  27. package/dist/testing/fixtures/vitest-failure-log.js +1 -0
  28. package/dist/testing/fixtures/vitest-failure-log.js.map +1 -1
  29. package/dist/verify/ci-gate/ci-gate-dispatch.d.ts +93 -0
  30. package/dist/verify/ci-gate/ci-gate-dispatch.d.ts.map +1 -0
  31. package/dist/verify/ci-gate/ci-gate-dispatch.js +304 -0
  32. package/dist/verify/ci-gate/ci-gate-dispatch.js.map +1 -0
  33. package/dist/verify/ci-gate/ci-gate-reruns.d.ts +51 -0
  34. package/dist/verify/ci-gate/ci-gate-reruns.d.ts.map +1 -0
  35. package/dist/verify/ci-gate/ci-gate-reruns.js +189 -0
  36. package/dist/verify/ci-gate/ci-gate-reruns.js.map +1 -0
  37. package/dist/verify/ci-gate/ci-gate-wait-record.d.ts +33 -0
  38. package/dist/verify/ci-gate/ci-gate-wait-record.d.ts.map +1 -0
  39. package/dist/verify/ci-gate/ci-gate-wait-record.js +89 -0
  40. package/dist/verify/ci-gate/ci-gate-wait-record.js.map +1 -0
  41. package/dist/verify/deterministic-gate/verification-deterministic.d.ts +6 -0
  42. package/dist/verify/deterministic-gate/verification-deterministic.d.ts.map +1 -1
  43. package/dist/verify/deterministic-gate/verification-deterministic.js +1 -20
  44. package/dist/verify/deterministic-gate/verification-deterministic.js.map +1 -1
  45. package/dist/verify/deterministic-gate/verification-gate-stages.d.ts.map +1 -1
  46. package/dist/verify/deterministic-gate/verification-gate-stages.js +1 -0
  47. package/dist/verify/deterministic-gate/verification-gate-stages.js.map +1 -1
  48. package/dist/verify/engine/verification-commit-sharing.d.ts +24 -0
  49. package/dist/verify/engine/verification-commit-sharing.d.ts.map +1 -1
  50. package/dist/verify/engine/verification-commit-sharing.js +93 -1
  51. package/dist/verify/engine/verification-commit-sharing.js.map +1 -1
  52. package/dist/verify/engine/verification-deps.d.ts +9 -0
  53. package/dist/verify/engine/verification-deps.d.ts.map +1 -1
  54. package/dist/verify/engine/verification-deps.js +1 -1
  55. package/dist/verify/engine/verification-engine.d.ts.map +1 -1
  56. package/dist/verify/engine/verification-engine.js +19 -5
  57. package/dist/verify/engine/verification-engine.js.map +1 -1
  58. package/dist/verify/failing-test-rerun/failing-test-retry.d.ts.map +1 -1
  59. package/dist/verify/failing-test-rerun/failing-test-retry.js +2 -1
  60. package/dist/verify/failing-test-rerun/failing-test-retry.js.map +1 -1
  61. package/dist/verify/gate-config/judged-commit-gate.d.ts +11 -3
  62. package/dist/verify/gate-config/judged-commit-gate.d.ts.map +1 -1
  63. package/dist/verify/gate-config/judged-commit-gate.js +16 -5
  64. package/dist/verify/gate-config/judged-commit-gate.js.map +1 -1
  65. package/dist/verify/gate-config/verification-config.js +1 -1
  66. package/dist/verify/gate-config/verification-manifest.d.ts +18 -1
  67. package/dist/verify/gate-config/verification-manifest.d.ts.map +1 -1
  68. package/dist/verify/gate-config/verification-manifest.js +21 -21
  69. package/dist/verify/gate-config/verification-manifest.js.map +1 -1
  70. package/dist/verify/gate-verdicts/commit-verdict-record.d.ts +2 -0
  71. package/dist/verify/gate-verdicts/commit-verdict-record.d.ts.map +1 -1
  72. package/dist/verify/gate-verdicts/commit-verdict-record.js +11 -4
  73. package/dist/verify/gate-verdicts/commit-verdict-record.js.map +1 -1
  74. package/dist/verify/gate-verdicts/gate-run-registry.js +1 -1
  75. package/dist/verify/outcome-routing/failing-output-excerpt.d.ts +8 -0
  76. package/dist/verify/outcome-routing/failing-output-excerpt.d.ts.map +1 -0
  77. package/dist/verify/outcome-routing/failing-output-excerpt.js +41 -0
  78. package/dist/verify/outcome-routing/failing-output-excerpt.js.map +1 -0
  79. package/dist/verify/outcome-routing/verification-feedback.d.ts +2 -0
  80. package/dist/verify/outcome-routing/verification-feedback.d.ts.map +1 -1
  81. package/dist/verify/outcome-routing/verification-feedback.js +3 -0
  82. package/dist/verify/outcome-routing/verification-feedback.js.map +1 -1
  83. package/dist/verify/outcome-routing/verification-rework-issue.d.ts +7 -0
  84. package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
  85. package/dist/verify/outcome-routing/verification-rework-issue.js +30 -2
  86. package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
  87. package/dist/verify/run-selection/default-on-guards.js +1 -1
  88. package/dist/verify/run-selection/explicit-rearm.d.ts.map +1 -1
  89. package/dist/verify/run-selection/explicit-rearm.js +1 -0
  90. package/dist/verify/run-selection/explicit-rearm.js.map +1 -1
  91. package/dist/verify/run-selection/verification-default-on.d.ts.map +1 -1
  92. package/dist/verify/run-selection/verification-default-on.js +1 -0
  93. package/dist/verify/run-selection/verification-default-on.js.map +1 -1
  94. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"vitest-failure-log.js","sourceRoot":"","sources":["../../../src/testing/fixtures/vitest-failure-log.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,yFAAyF;AACzF,8EAA8E;AAC9E,yEAAyE;AACzE,yEAAyE;AACzE,gBAAgB;AAEhB;;;;;;GAMG;AAEH,4FAA4F;AAC5F,MAAM,UAAU,gBAAgB,CAAC,GAAsB;IACrD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,wDAAwD,CAAC;IACtF,OAAO;QACL,wBAAwB,GAAG,CAAC,MAAM,UAAU;QAC5C,EAAE;QACF,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,UAAU,EAAE,EAAE,EAAE,2CAA2C,EAAE,EAAE,CAAC,CAAC;QACzF,2BAA2B;QAC3B,gBAAgB,GAAG,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,GAAG;QACnD,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"vitest-failure-log.js","sourceRoot":"","sources":["../../../src/testing/fixtures/vitest-failure-log.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,yFAAyF;AACzF,iEAAiE;AACjE,8EAA8E;AAC9E,yEAAyE;AACzE,yEAAyE;AACzE,gBAAgB;AAEhB;;;;;;GAMG;AAEH,4FAA4F;AAC5F,MAAM,UAAU,gBAAgB,CAAC,GAAsB;IACrD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,wDAAwD,CAAC;IACtF,OAAO;QACL,wBAAwB,GAAG,CAAC,MAAM,UAAU;QAC5C,EAAE;QACF,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,UAAU,EAAE,EAAE,EAAE,2CAA2C,EAAE,EAAE,CAAC,CAAC;QACzF,2BAA2B;QAC3B,gBAAgB,GAAG,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,GAAG;QACnD,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,93 @@
1
+ import { type GateRunSpec, type GateRunVerdict, type PublishedGateLog, type PublishedGateStatus } from '../../ci/gate-ref.js';
2
+ import type { PendingVerification } from '../../queries/verification/verification.js';
3
+ import type { StrategyResult } from '../deterministic-gate/verification-deterministic.js';
4
+ import { type VerifyBoundaryEnvDeps } from '../deterministic-gate/verification-boundary-env.js';
5
+ import type { AppliedVerificationConfig, VerificationConfigScope } from '../gate-config/verification-config.js';
6
+ import type { JudgedCommitManifest, JudgedCommitRead } from '../run-selection/verification-default-on.js';
7
+ import type { FileEscalationInput } from '../../nexus/file-escalation.js';
8
+ import type { CiGateWaitStore } from './ci-gate-wait-record.js';
9
+ /** Past the gate's own timeout, how long a handed-over run may sit with no verdict before it is re-pushed (once). */
10
+ export declare const CI_GATE_QUEUE_MARGIN_MS: number;
11
+ /** A visible CI-run registration no dispatch has touched for this long is ended. */
12
+ export declare const CI_GATE_REGISTRATION_STALE_MS: number;
13
+ /** The machine kind of the one filing a held CI gate run makes. */
14
+ export declare const CI_GATE_NO_VERDICT_KIND = "verify_ci_gate_no_verdict";
15
+ /** The CI-run gate's own seams; production binds the git IO of ci/gate-ref.ts and the durable wait record. */
16
+ export interface CiGateDeps {
17
+ /** The config a default-on run applies at the judged commit (verify/gate-config/judged-commit-gate.ts), or null. */
18
+ appliedConfigAt: (source: VerificationConfigScope, read: JudgedCommitManifest) => AppliedVerificationConfig | null;
19
+ /** The verdict CI published for (sha, key) on the product's origin; fail-closed. */
20
+ readVerdict: (repoPath: string, sha: string, key: string) => GateRunVerdict;
21
+ /** Every status CI published for (sha, key), each run on its own ([] when unreadable). */
22
+ listStatus: (repoPath: string, sha: string, key: string) => PublishedGateStatus[];
23
+ /** The log and exit facts a published run points at; null when unreadable. */
24
+ readLog: (repoPath: string, published: PublishedGateStatus) => PublishedGateLog | null;
25
+ /**
26
+ * Hand a run to CI (spec + gate branch, one push); false on any git failure.
27
+ * `harnessFrom`: for a run at another commit than the judged HEAD, the commit
28
+ * whose gate job and script ride along (ci/gate-ref.ts buildHarnessCommit).
29
+ */
30
+ pushRun: (repoPath: string, spec: GateRunSpec, harnessFrom?: string) => boolean;
31
+ waits: CiGateWaitStore;
32
+ /** Where a fetched CI log is kept, so the log readers find it by path. */
33
+ logDir: () => string;
34
+ now: () => number;
35
+ /** Resolve after `ms`: the wait between reads of an awaited re-run's status (verify/ci-gate/ci-gate-reruns.ts). */
36
+ sleep: (ms: number) => Promise<void>;
37
+ /** How long an awaited re-run waits between reads of its published status. */
38
+ pollIntervalMs: number;
39
+ }
40
+ /** What {@link stepCiGate} reads beyond its own seams. */
41
+ export type CiGateStepDeps = VerifyBoundaryEnvDeps & {
42
+ ciGate: CiGateDeps;
43
+ /** The product's repo path, for a candidate that carries none (an explicit row). */
44
+ resolveCwd: (productId: string | null) => string;
45
+ readJudgedCommitManifest: (focusId: string) => JudgedCommitRead | null;
46
+ fileEscalation: (input: FileEscalationInput) => Promise<void>;
47
+ organizationId: string;
48
+ };
49
+ /** A candidate whose gate runs on CI: what it applies at the judged commit, and where it pushes from. */
50
+ export interface CiGateRun {
51
+ productId: string;
52
+ focusId: string;
53
+ repoPath: string;
54
+ sha: string;
55
+ applied: AppliedVerificationConfig;
56
+ key: string;
57
+ }
58
+ /**
59
+ * The CI-run gate a candidate takes, or null when its gate runs on the host: a
60
+ * deterministic candidate -- default-on, or an explicit-method row -- on a focus
61
+ * whose judged commit's manifest names CI as the gate runner. The runner is the
62
+ * PRODUCT's declaration, so it binds every deterministic gate judged at that
63
+ * commit: a default-on candidate applies the config resolved at the judged commit,
64
+ * an explicit row its own command and timeout (the gate its verdict is keyed by).
65
+ * Pure over `deps`.
66
+ */
67
+ export declare function ciGateRunOf(v: PendingVerification, deps: Pick<CiGateStepDeps, 'ciGate' | 'readJudgedCommitManifest' | 'resolveCwd'>): CiGateRun | null;
68
+ /** One step's outcome: a verdict CI rendered (to judge and record), or a wait (nothing to route). */
69
+ export type CiGateStep = {
70
+ kind: 'verdict';
71
+ result: StrategyResult;
72
+ } | {
73
+ kind: 'waiting';
74
+ why: string;
75
+ };
76
+ /** The bounded wait for one run: the gate's own timeout plus the queue margin. */
77
+ export declare function ciGateWaitWindowMs(applied: Pick<AppliedVerificationConfig, 'timeoutMs'>): number;
78
+ /** Test seam: forget every visible run. */
79
+ export declare function __resetCiGateRunsForTests(): void;
80
+ /**
81
+ * The StrategyResult a published run renders: its outcome and exit, the commit it
82
+ * judged, the config it applied, and its log -- kept on disk (logPath) and its
83
+ * tail inline -- so every log reader treats it as a local run's. A red whose log
84
+ * cannot be fetched still renders red: the readers then find only the rationale,
85
+ * and the gate's own blindness rules (a failure naming nothing) apply to it.
86
+ */
87
+ export declare function resultFromPublished(run: CiGateRun, status: 'green' | 'red', published: PublishedGateStatus, fetched: PublishedGateLog | null, logPath: string | null): StrategyResult;
88
+ /**
89
+ * Take one step of the CI-run gate for `run` (module doc). Never throws for a
90
+ * normal miss: anything unreadable is a wait.
91
+ */
92
+ export declare function stepCiGate(v: PendingVerification, run: CiGateRun, deps: CiGateStepDeps): Promise<CiGateStep>;
93
+ //# sourceMappingURL=ci-gate-dispatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-gate-dispatch.d.ts","sourceRoot":"","sources":["../../../src/verify/ci-gate/ci-gate-dispatch.ts"],"names":[],"mappings":"AA+DA,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,KAAK,EAAE,cAAc,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,OAAO,EAAE,IAAI,CAAC,yBAAyB,EAAE,WAAW,CAAC,GAAG,MAAM,CAEhG;AA8CD,2CAA2C;AAC3C,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD;AAoBD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,OAAO,GAAG,KAAK,EACvB,SAAS,EAAE,mBAAmB,EAC9B,OAAO,EAAE,gBAAgB,GAAG,IAAI,EAChC,OAAO,EAAE,MAAM,GAAG,IAAI,GACrB,cAAc,CAgBhB;AA6FD;;;GAGG;AACH,wBAAsB,UAAU,CAAC,CAAC,EAAE,mBAAmB,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CAgClH"}
@@ -0,0 +1,304 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/verify/ci-gate/ci-gate-dispatch.test.ts,
3
+ // packages/daemon/src/verify/ci-gate/ci-gate-reruns.test.ts
4
+ // PINNED-BY-END
5
+ /**
6
+ * The per-HEAD gate, run on CI instead of the daemon host.
7
+ *
8
+ * A product whose telora.verify.json AT THE JUDGED COMMIT says
9
+ * `"gateRunner": "ci"` gets no gate process on the host: no checkout, no
10
+ * verification-semaphore slot, no command. In their place, each dispatch of a
11
+ * default-on candidate takes ONE step of a small state machine
12
+ * ({@link stepCiGate}), keyed by the judged commit and the gate the run would
13
+ * apply there (its command + timeout -- the same key the per-commit verdict
14
+ * record uses):
15
+ *
16
+ * verdict published -> CI's verdict for (sha, gate) is read back
17
+ * (ci/gate-ref.ts); a red's log is fetched and kept
18
+ * where the log readers find it. The result is judged
19
+ * and recorded into the SAME per-(focus, sha, gate)
20
+ * verdict record a local run writes
21
+ * (verify/engine/verification-commit-sharing.ts), so the
22
+ * review request, re-work routing, the gate-verdict
23
+ * prompt section and the dashboard read it unchanged.
24
+ * nothing handed yet -> push the commit to the focus's gate branch with the
25
+ * run's spec (command, timeout, the verify boundary env),
26
+ * and stamp the wait durably (ci-gate-wait-record.ts).
27
+ * waiting -> nothing, until the bounded window has passed with no
28
+ * verdict; then the run is RE-PUSHED once (so CI sees a
29
+ * fresh push), and after a second window the delivery
30
+ * simply holds and the hold is SURFACED once (one
31
+ * agent_resolvable filing). A missing verdict is CI's
32
+ * fault, never the focus's re-work; and it never reads as
33
+ * passed: no verdict is recorded, so every reader of the
34
+ * commit's verdict still finds none.
35
+ *
36
+ * A run CI ended by its timeout, whose log rendered no verdict either
37
+ * (verify/deterministic-gate/timed-out-rendered-verdict.ts), is no verdict too:
38
+ * it is re-pushed once at once, and a second such run holds.
39
+ *
40
+ * VISIBLE WHILE IT WAITS. A handed-over run is registered on the gate-run
41
+ * registry as RUNNING at its commit, for as long as the dispatch keeps finding it
42
+ * waiting (verify/gate-verdicts/gate-run-registry.ts) -- the gate is running, on
43
+ * a runner -- so the heartbeat publishes it as a running gate, and the review
44
+ * exit and the done route wait for its verdict exactly as for a local run. The
45
+ * registration ends when the verdict is read, when the focus's next run replaces
46
+ * it, or by itself once no dispatch has touched it for
47
+ * {@link CI_GATE_REGISTRATION_STALE_MS} (the delivery left verify, or the focus
48
+ * stopped awaiting its gate) -- a timer, so an abandoned wait never holds a
49
+ * delivery's routing for the life of the process.
50
+ *
51
+ * A red is then handled as a local red is -- the same-commit flake retry and
52
+ * attribution against the focus base -- with every run that asks for sent to CI
53
+ * as well (verify/ci-gate/ci-gate-reruns.ts), from the log CI published.
54
+ *
55
+ * Why: docs/runbook-verify-gate-in-ci.md.
56
+ *
57
+ * @module verify/ci-gate/ci-gate-dispatch
58
+ */
59
+ import { mkdirSync, writeFileSync } from 'node:fs';
60
+ import { resolve } from 'node:path';
61
+ import { ESCALATION_DISPOSITIONS, ESCALATION_REASONS } from '@telora/daemon-core';
62
+ import { buildGateRunSpec, gateBranchForFocus, gateRunKey, } from '../../ci/gate-ref.js';
63
+ import { judgeTimedOutRun } from '../deterministic-gate/timed-out-rendered-verdict.js';
64
+ import { resolveVerifyBoundaryEnv } from '../deterministic-gate/verification-boundary-env.js';
65
+ import { gateRunsOnCi } from '../gate-config/verification-manifest.js';
66
+ import { registerGateRun } from '../gate-verdicts/gate-run-registry.js';
67
+ import { commitVerdictGateOf } from '../gate-verdicts/commit-verdict-record.js';
68
+ import { createLogger } from '../../log/daemon-log.js';
69
+ const log = createLogger({ module: 'verification' });
70
+ /** Past the gate's own timeout, how long a handed-over run may sit with no verdict before it is re-pushed (once). */
71
+ export const CI_GATE_QUEUE_MARGIN_MS = 60 * 60 * 1000;
72
+ /** A visible CI-run registration no dispatch has touched for this long is ended. */
73
+ export const CI_GATE_REGISTRATION_STALE_MS = 10 * 60 * 1000;
74
+ /** The machine kind of the one filing a held CI gate run makes. */
75
+ export const CI_GATE_NO_VERDICT_KIND = 'verify_ci_gate_no_verdict';
76
+ /** Chars of the CI log kept inline on the result (the whole log is in the file logPath names). */
77
+ const LOG_TAIL_CHARS = 4000;
78
+ /**
79
+ * The CI-run gate a candidate takes, or null when its gate runs on the host: a
80
+ * deterministic candidate -- default-on, or an explicit-method row -- on a focus
81
+ * whose judged commit's manifest names CI as the gate runner. The runner is the
82
+ * PRODUCT's declaration, so it binds every deterministic gate judged at that
83
+ * commit: a default-on candidate applies the config resolved at the judged commit,
84
+ * an explicit row its own command and timeout (the gate its verdict is keyed by).
85
+ * Pure over `deps`.
86
+ */
87
+ export function ciGateRunOf(v, deps) {
88
+ if (v.verificationMethod !== 'deterministic' || !v.focusId || !v.productId)
89
+ return null;
90
+ const read = deps.readJudgedCommitManifest(v.focusId);
91
+ if (read === null || 'unreadable' in read || !gateRunsOnCi(read.manifest))
92
+ return null;
93
+ const applied = v.defaultOnSource ? deps.ciGate.appliedConfigAt(v.defaultOnSource, read) : explicitRowConfig(v);
94
+ if (applied === null)
95
+ return null;
96
+ const repoPath = v.defaultOnSource?.repoPath ?? deps.resolveCwd(v.productId);
97
+ if (!repoPath) {
98
+ log.warn(`[verification] ci-gate: delivery ${v.deliveryId} names CI as its gate runner but its product has no repoPath to push from; it holds`);
99
+ }
100
+ return { productId: v.productId, focusId: v.focusId, repoPath: repoPath ?? '', sha: read.sha, applied, key: gateRunKey(applied) };
101
+ }
102
+ /** An explicit row's own gate as a run applies it (its command; its timeout, else the strategy default); null with no command. */
103
+ function explicitRowConfig(v) {
104
+ const gate = commitVerdictGateOf(v);
105
+ return gate ? { ...gate, timeoutSource: 'the delivery\'s own verification config' } : null;
106
+ }
107
+ /** The bounded wait for one run: the gate's own timeout plus the queue margin. */
108
+ export function ciGateWaitWindowMs(applied) {
109
+ return applied.timeoutMs + CI_GATE_QUEUE_MARGIN_MS;
110
+ }
111
+ const visibleRuns = new Map();
112
+ /** (Re)arm the run's expiry: it ends itself unless a dispatch touches it again in time. Never keeps the process alive. */
113
+ function armExpiry(focusId) {
114
+ const timer = setTimeout(() => endVisible(focusId), CI_GATE_REGISTRATION_STALE_MS);
115
+ timer.unref();
116
+ return timer;
117
+ }
118
+ /** Keep the focus's handed-over run registered as running at its commit (module doc). */
119
+ function showWaiting(run, deliveryId) {
120
+ const current = visibleRuns.get(run.focusId);
121
+ if (current && current.sha === run.sha && current.key === run.key) {
122
+ clearTimeout(current.expiry);
123
+ current.expiry = armExpiry(run.focusId);
124
+ return;
125
+ }
126
+ if (current)
127
+ endVisible(run.focusId);
128
+ const registration = registerGateRun({ deliveryId, focusId: run.focusId, explicit: false });
129
+ registration.start({ sha: run.sha, timeoutMs: ciGateWaitWindowMs(run.applied) });
130
+ visibleRuns.set(run.focusId, { sha: run.sha, key: run.key, registration, expiry: armExpiry(run.focusId) });
131
+ }
132
+ /** The focus's handed-over run rendered its verdict, was replaced, or went untouched: it is no longer running. */
133
+ function endVisible(focusId) {
134
+ const run = visibleRuns.get(focusId);
135
+ if (!run)
136
+ return;
137
+ clearTimeout(run.expiry);
138
+ run.registration.end();
139
+ visibleRuns.delete(focusId);
140
+ }
141
+ /** Test seam: forget every visible run. */
142
+ export function __resetCiGateRunsForTests() {
143
+ for (const focusId of [...visibleRuns.keys()])
144
+ endVisible(focusId);
145
+ }
146
+ // ---------------------------------------------------------------------------
147
+ // The step
148
+ // ---------------------------------------------------------------------------
149
+ /** Keep a fetched CI log on disk, where readVerificationLogText and the stage readers find it; null when it cannot be written. */
150
+ function keepLog(run, published, text, deps) {
151
+ try {
152
+ const dir = deps.logDir();
153
+ mkdirSync(dir, { recursive: true });
154
+ const path = resolve(dir, `ci-gate-${run.focusId}-${run.sha.slice(0, 12)}-${run.key}-run${published.runNumber}.log`);
155
+ writeFileSync(path, text, { mode: 0o600 });
156
+ return path;
157
+ }
158
+ catch (err) {
159
+ log.warn(`[verification] ci-gate: could not keep the CI log of ${published.ref}:`, err.message);
160
+ return null;
161
+ }
162
+ }
163
+ /**
164
+ * The StrategyResult a published run renders: its outcome and exit, the commit it
165
+ * judged, the config it applied, and its log -- kept on disk (logPath) and its
166
+ * tail inline -- so every log reader treats it as a local run's. A red whose log
167
+ * cannot be fetched still renders red: the readers then find only the rationale,
168
+ * and the gate's own blindness rules (a failure naming nothing) apply to it.
169
+ */
170
+ export function resultFromPublished(run, status, published, fetched, logPath) {
171
+ const passed = status === 'green';
172
+ const exitCode = fetched?.result?.exitCode ?? (passed ? 0 : 1);
173
+ const tail = fetched ? fetched.log.slice(-LOG_TAIL_CHARS) : undefined;
174
+ return {
175
+ outcome: passed ? 'passed' : 'failed',
176
+ rationale: `CI gate run #${published.runNumber} of ${run.sha.slice(0, 8)} ${passed ? 'passed (exit 0)' : `failed (exit ${exitCode})`} `
177
+ + `-- published as ${published.ref}`,
178
+ exitCode,
179
+ verifiedSha: run.sha,
180
+ appliedConfig: run.applied,
181
+ ...(fetched?.result?.timedOut ? { timedOut: true } : {}),
182
+ ...(tail !== undefined ? { stdoutTail: tail } : {}),
183
+ ...(logPath !== null ? { logPath } : {}),
184
+ publishedLogRef: published.ref,
185
+ };
186
+ }
187
+ /** Read the verdict CI published for the run; a 'verdict' step, or null when there is none to take. */
188
+ function readPublished(run, deps) {
189
+ const verdict = deps.readVerdict(run.repoPath, run.sha, run.key);
190
+ if ((verdict.status !== 'green' && verdict.status !== 'red') || verdict.decidedBy === null)
191
+ return null;
192
+ const published = verdict.decidedBy;
193
+ const fetched = verdict.status === 'red' ? deps.readLog(run.repoPath, published) : null;
194
+ if (verdict.status === 'red' && fetched === null) {
195
+ log.warn(`[verification] ci-gate: the log of ${published.ref} could not be fetched; the red routes on its exit alone`);
196
+ }
197
+ const logPath = fetched ? keepLog(run, published, fetched.log, deps) : null;
198
+ const raw = resultFromPublished(run, verdict.status, published, fetched, logPath);
199
+ if (raw.timedOut !== true)
200
+ return { result: raw, timedOutUnrendered: false };
201
+ // CI ended the run at its timeout: a completed pass or named failing tests in its log are still a verdict.
202
+ const judged = judgeTimedOutRun(raw, run.applied.command, fetched?.log ?? '');
203
+ return { result: judged, timedOutUnrendered: judged.timedOut === true };
204
+ }
205
+ /** Hand the run to CI: its spec, carrying the verify boundary the local run would have handed the command. */
206
+ async function handOver(v, run, deps) {
207
+ const env = await resolveVerifyBoundaryEnv(deps, v);
208
+ const spec = buildGateRunSpec({
209
+ purpose: 'gate', focusId: run.focusId, sha: run.sha, command: run.applied.command, timeoutMs: run.applied.timeoutMs, env,
210
+ });
211
+ return run.repoPath !== '' && deps.ciGate.pushRun(run.repoPath, spec);
212
+ }
213
+ function filingFor(run, wait, organizationId) {
214
+ return {
215
+ organizationId,
216
+ focusId: run.focusId,
217
+ productId: run.productId,
218
+ reason: `The per-HEAD gate of focus commit ${run.sha} runs on CI (telora.verify.json "gateRunner": "ci"), and CI has published `
219
+ + `no verdict for it under gate key ${run.key} (\`${run.applied.command}\`), even after one re-push of ${gateBranchForFocus(run.focusId)}. `
220
+ + 'The delivery holds in verify: no verdict is ever assumed. Check that the product\'s CI runs the gate job for that branch '
221
+ + `(docs/runbook-verify-gate-in-ci.md) and that its runners are up; diagnose with \`ci-logs\`.`,
222
+ reasonType: ESCALATION_REASONS.ERROR_ENCOUNTERED,
223
+ disposition: ESCALATION_DISPOSITIONS.AGENT_RESOLVABLE,
224
+ kind: CI_GATE_NO_VERDICT_KIND,
225
+ details: { sha: run.sha, key: run.key, command: run.applied.command, pushedAt: new Date(wait.pushedAt).toISOString(), repushedAt: wait.repushedAt ? new Date(wait.repushedAt).toISOString() : null },
226
+ };
227
+ }
228
+ /** A handed-over run with no verdict yet: re-push it once past its window, then hold and surface once (module doc). */
229
+ async function waitForVerdict(v, run, wait, deps, repushNow) {
230
+ const now = deps.ciGate.now();
231
+ const since = wait.repushedAt ?? wait.pushedAt;
232
+ const window = ciGateWaitWindowMs(run.applied);
233
+ if (!repushNow && now - since < window)
234
+ return { kind: 'waiting', why: `CI gate run of ${run.sha.slice(0, 8)} handed over ${Math.round((now - wait.pushedAt) / 60000)} min ago; no verdict yet` };
235
+ if (wait.repushedAt === undefined) {
236
+ const pushed = await handOver(v, run, deps);
237
+ if (pushed)
238
+ deps.ciGate.waits.write({ ...wait, repushedAt: now });
239
+ log.warn(`[verification] ci-gate: focus ${run.focusId} commit ${run.sha.slice(0, 8)}: CI published no verdict `
240
+ + `${repushNow ? '(its run timed out without rendering one)' : `within ${Math.round(window / 60000)} min`} -- `
241
+ + `${pushed ? 're-pushed once so CI sees a fresh push' : 'the re-push failed; retried next tick'}`);
242
+ return { kind: 'waiting', why: pushed ? 're-pushed once for a missing verdict' : 're-push failed' };
243
+ }
244
+ if (wait.surfacedAt === undefined) {
245
+ try {
246
+ await deps.fileEscalation(filingFor(run, wait, deps.organizationId));
247
+ deps.ciGate.waits.write({ ...wait, surfacedAt: now });
248
+ }
249
+ catch (err) {
250
+ log.warn(`[verification] ci-gate: failed to surface the held CI gate run of ${run.focusId}@${run.sha.slice(0, 8)}:`, err.message);
251
+ }
252
+ }
253
+ return { kind: 'waiting', why: 'held: CI published no verdict even after a re-push (surfaced)' };
254
+ }
255
+ /**
256
+ * Whether another gate of the same commit holds the focus's one gate branch: a
257
+ * handed-over run under another key (an explicit row's own command beside the
258
+ * default-on gate) with no verdict yet and inside its windows. Pushing now would
259
+ * supersede it -- its job would publish nothing -- and the two would take turns
260
+ * replacing each other forever; so this one waits its turn. A run of an older
261
+ * commit never holds a newer one.
262
+ */
263
+ function sharesBranchWithOtherGate(run, wait, deps, now) {
264
+ if (wait === null || wait.sha !== run.sha || wait.key === run.key)
265
+ return false;
266
+ const other = deps.readVerdict(run.repoPath, wait.sha, wait.key);
267
+ if (other.status === 'green' || other.status === 'red')
268
+ return false;
269
+ return now - (wait.repushedAt ?? wait.pushedAt) < 2 * ciGateWaitWindowMs(run.applied);
270
+ }
271
+ /**
272
+ * Take one step of the CI-run gate for `run` (module doc). Never throws for a
273
+ * normal miss: anything unreadable is a wait.
274
+ */
275
+ export async function stepCiGate(v, run, deps) {
276
+ const now = deps.ciGate.now();
277
+ const published = readPublished(run, deps.ciGate);
278
+ const wait = deps.ciGate.waits.read(run.productId, run.focusId);
279
+ const current = wait !== null && wait.sha === run.sha && wait.key === run.key ? wait : null;
280
+ if (published !== null && !published.timedOutUnrendered) {
281
+ endVisible(run.focusId);
282
+ log.info(`[verification] ci-gate: delivery "${v.deliveryName}" (${v.deliveryId}) -- CI's '${published.result.outcome}' verdict for `
283
+ + `${run.sha.slice(0, 8)} is read back; it is judged and recorded as the commit's gate verdict (no gate process on this host)`);
284
+ return { kind: 'verdict', result: published.result };
285
+ }
286
+ if (current === null && sharesBranchWithOtherGate(run, wait, deps.ciGate, now)) {
287
+ return { kind: 'waiting', why: `another gate of ${run.sha.slice(0, 8)} is on CI on this focus's gate branch` };
288
+ }
289
+ if (current === null) {
290
+ const pushed = await handOver(v, run, deps);
291
+ if (!pushed) {
292
+ log.warn(`[verification] ci-gate: could not push ${run.sha.slice(0, 8)} to ${gateBranchForFocus(run.focusId)} for delivery ${v.deliveryId}; retried next tick`);
293
+ return { kind: 'waiting', why: 'the push to the gate branch failed' };
294
+ }
295
+ deps.ciGate.waits.write({ productId: run.productId, focusId: run.focusId, sha: run.sha, key: run.key, deliveryId: v.deliveryId, pushedAt: now });
296
+ showWaiting(run, v.deliveryId);
297
+ log.info(`[verification] ci-gate: delivery "${v.deliveryName}" (${v.deliveryId}) -- handed focus commit ${run.sha.slice(0, 8)} to CI on `
298
+ + `${gateBranchForFocus(run.focusId)} (gate key ${run.key}); the delivery waits on the CI gate`);
299
+ return { kind: 'waiting', why: 'handed to CI' };
300
+ }
301
+ showWaiting(run, v.deliveryId);
302
+ return waitForVerdict(v, run, current, deps, published?.timedOutUnrendered === true && current.repushedAt === undefined);
303
+ }
304
+ //# sourceMappingURL=ci-gate-dispatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-gate-dispatch.js","sourceRoot":"","sources":["../../../src/verify/ci-gate/ci-gate-dispatch.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0EAA0E;AAC1E,8DAA8D;AAC9D,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,GAKX,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAA8B,MAAM,oDAAoD,CAAC;AAC1H,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAGvE,OAAO,EAAE,eAAe,EAA4B,MAAM,uCAAuC,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,M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GateRunSpec, type PublishedGateLog, type PublishedGateStatus } from '../../ci/gate-ref.js';
2
+ import type { PendingVerification } from '../../queries/verification/verification.js';
3
+ import type { OpenBaselineBuilder } from '../attribution/verification-baseline.js';
4
+ import type { FailingTestRerunner } from '../failing-test-rerun/failing-test-rerunner.js';
5
+ import type { StageContinuationRunner } from '../engine/verification-deps.js';
6
+ import type { CiGateDeps, CiGateRun } from './ci-gate-dispatch.js';
7
+ /** Past a re-run's own timeout, how long it may wait for a runner before it is no verdict. */
8
+ export declare const CI_RERUN_QUEUE_MARGIN_MS: number;
9
+ /** How long an awaited re-run waits between reads of its published status (production). */
10
+ export declare const CI_GATE_POLL_INTERVAL_MS = 20000;
11
+ /** What a re-run's await reads: the CI gate's seams (its push, its reads, its clock and its poll wait). */
12
+ export interface CiRerunDeps {
13
+ ciGate: CiGateDeps;
14
+ }
15
+ /** A re-run CI rendered: its state, the run that published it, and its log (null when the log could not be fetched). */
16
+ export interface CiRerunResult {
17
+ status: 'green' | 'red';
18
+ published: PublishedGateStatus;
19
+ fetched: PublishedGateLog | null;
20
+ }
21
+ /**
22
+ * Hand `spec` to CI and wait for the verdict of a run published after the
23
+ * hand-over (module doc). Null when the push failed or no such verdict arrived
24
+ * within the bound.
25
+ */
26
+ export declare function awaitCiRun(run: CiGateRun, spec: GateRunSpec, deps: CiRerunDeps): Promise<CiRerunResult | null>;
27
+ /** Which candidates' gate runs on CI (ci-gate-dispatch.ts ciGateRunOf, bound over the verification context). */
28
+ export type CiGateRunResolver = (v: PendingVerification) => CiGateRun | null;
29
+ /**
30
+ * The same-commit re-run of named failing test files: on CI for a CI-run gate
31
+ * (the gate's declared `rerunCommand`, rendered over `files`, at `sha`), else the
32
+ * local runner. A commit that is no longer the one the CI gate judges, or a gate
33
+ * that declares no re-run command, renders no verdict, as locally.
34
+ */
35
+ export declare function ciAwareFailingTestRerun(local: FailingTestRerunner, ciRunOf: CiGateRunResolver, deps: CiRerunDeps): FailingTestRerunner;
36
+ /**
37
+ * The continuation of gate stages a red cut short, at the commit the red was
38
+ * rendered at: on CI for a CI-run gate, else the local runner. Its applied config
39
+ * names the continuation itself, as the local continuation's row does.
40
+ */
41
+ export declare function ciAwareStageContinuation(local: StageContinuationRunner, ciRunOf: CiGateRunResolver, deps: CiRerunDeps): StageContinuationRunner;
42
+ /**
43
+ * The base checkout attribution opens, for a CI-run gate: no checkout on the
44
+ * host -- each command the measurement runs at the base (the gate, a continuation
45
+ * of it, or the failing files alone) is a CI run at the base commit, its log the
46
+ * run's output. A base CI cannot run renders no output: the run THROWS, which the
47
+ * measurement reports as an unavailable base and attribution as no baseline, so
48
+ * every red gates and nothing is cached for that base.
49
+ */
50
+ export declare function ciOpenBaselineBuilder(run: CiGateRun, deps: CiRerunDeps): OpenBaselineBuilder;
51
+ //# sourceMappingURL=ci-gate-reruns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-gate-reruns.d.ts","sourceRoot":"","sources":["../../../src/verify/ci-gate/ci-gate-reruns.ts"],"names":[],"mappings":"AAwCA,OAAO,EAA6D,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACpK,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAItF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAEnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAKnE,8FAA8F;AAC9F,eAAO,MAAM,wBAAwB,QAAiB,CAAC;AAEvD,2FAA2F;AAC3F,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAK/C,2GAA2G;AAC3G,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,UAAU,CAAC;CAC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