@telora/daemon 0.24.8 → 0.24.11
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 +5 -3
- package/dist/ci/candidate-ref.js +1 -1
- package/dist/ci/candidate-ref.js.map +1 -1
- package/dist/ci/gate-ref.d.ts +150 -0
- package/dist/ci/gate-ref.d.ts.map +1 -0
- package/dist/ci/gate-ref.js +348 -0
- package/dist/ci/gate-ref.js.map +1 -0
- package/dist/composition/runtime-delivery-advance-context.d.ts.map +1 -1
- package/dist/composition/runtime-delivery-advance-context.js +22 -0
- package/dist/composition/runtime-delivery-advance-context.js.map +1 -1
- package/dist/composition/verification-context.d.ts.map +1 -1
- package/dist/composition/verification-context.js +79 -9
- package/dist/composition/verification-context.js.map +1 -1
- package/dist/focus/focus-poller-auto-advance.d.ts +7 -0
- package/dist/focus/focus-poller-auto-advance.d.ts.map +1 -1
- package/dist/focus/focus-poller-auto-advance.js +9 -33
- package/dist/focus/focus-poller-auto-advance.js.map +1 -1
- package/dist/focus/unarmed-advance-hold.d.ts +61 -0
- package/dist/focus/unarmed-advance-hold.d.ts.map +1 -0
- package/dist/focus/unarmed-advance-hold.js +73 -0
- package/dist/focus/unarmed-advance-hold.js.map +1 -0
- package/dist/nexus/file-escalation.d.ts.map +1 -1
- package/dist/nexus/file-escalation.js +1 -0
- package/dist/nexus/file-escalation.js.map +1 -1
- package/dist/nexus/intake.d.ts +14 -2
- package/dist/nexus/intake.d.ts.map +1 -1
- package/dist/nexus/intake.js +11 -2
- package/dist/nexus/intake.js.map +1 -1
- package/dist/nexus/pending-returns.d.ts +1 -1
- package/dist/nexus/pending-returns.d.ts.map +1 -1
- package/dist/prompt-sections/persona-sections.d.ts +8 -4
- package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
- package/dist/prompt-sections/persona-sections.js +13 -7
- package/dist/prompt-sections/persona-sections.js.map +1 -1
- 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/focuses/focus-discovery.d.ts.map +1 -1
- package/dist/queries/focuses/focus-discovery.js +1 -0
- package/dist/queries/focuses/focus-discovery.js.map +1 -1
- package/dist/queries/focuses/focuses.d.ts.map +1 -1
- package/dist/queries/focuses/focuses.js +1 -0
- package/dist/queries/focuses/focuses.js.map +1 -1
- package/dist/queries/verification/verification.js +1 -1
- package/dist/queries/workflow-transitions/workflows.d.ts.map +1 -1
- package/dist/queries/workflow-transitions/workflows.js +1 -0
- package/dist/queries/workflow-transitions/workflows.js.map +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- 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/verification-deps.d.ts +8 -67
- package/dist/testing/fixtures/verification-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/verification-deps.js +97 -2
- package/dist/testing/fixtures/verification-deps.js.map +1 -1
- package/dist/testing/fixtures/vitest-failure-log.d.ts.map +1 -1
- package/dist/testing/fixtures/vitest-failure-log.js +1 -0
- package/dist/testing/fixtures/vitest-failure-log.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/verify/ci-gate/ci-gate-dispatch.d.ts +93 -0
- package/dist/verify/ci-gate/ci-gate-dispatch.d.ts.map +1 -0
- package/dist/verify/ci-gate/ci-gate-dispatch.js +304 -0
- package/dist/verify/ci-gate/ci-gate-dispatch.js.map +1 -0
- package/dist/verify/ci-gate/ci-gate-reruns.d.ts +51 -0
- package/dist/verify/ci-gate/ci-gate-reruns.d.ts.map +1 -0
- package/dist/verify/ci-gate/ci-gate-reruns.js +189 -0
- package/dist/verify/ci-gate/ci-gate-reruns.js.map +1 -0
- package/dist/verify/ci-gate/ci-gate-wait-record.d.ts +33 -0
- package/dist/verify/ci-gate/ci-gate-wait-record.d.ts.map +1 -0
- package/dist/verify/ci-gate/ci-gate-wait-record.js +89 -0
- package/dist/verify/ci-gate/ci-gate-wait-record.js.map +1 -0
- package/dist/verify/deterministic-gate/verification-deterministic.d.ts +6 -0
- package/dist/verify/deterministic-gate/verification-deterministic.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.js +1 -20
- package/dist/verify/deterministic-gate/verification-deterministic.js.map +1 -1
- package/dist/verify/deterministic-gate/verification-gate-stages.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-gate-stages.js +1 -0
- package/dist/verify/deterministic-gate/verification-gate-stages.js.map +1 -1
- package/dist/verify/engine/verification-commit-sharing.d.ts +24 -0
- package/dist/verify/engine/verification-commit-sharing.d.ts.map +1 -1
- package/dist/verify/engine/verification-commit-sharing.js +93 -1
- package/dist/verify/engine/verification-commit-sharing.js.map +1 -1
- package/dist/verify/engine/verification-deps.d.ts +16 -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 +22 -6
- package/dist/verify/engine/verification-engine.js.map +1 -1
- package/dist/verify/failing-test-rerun/failing-test-retry.d.ts.map +1 -1
- package/dist/verify/failing-test-rerun/failing-test-retry.js +2 -1
- package/dist/verify/failing-test-rerun/failing-test-retry.js.map +1 -1
- package/dist/verify/gate-config/judged-commit-gate.d.ts +11 -3
- package/dist/verify/gate-config/judged-commit-gate.d.ts.map +1 -1
- package/dist/verify/gate-config/judged-commit-gate.js +16 -5
- package/dist/verify/gate-config/judged-commit-gate.js.map +1 -1
- package/dist/verify/gate-config/verification-config.js +1 -1
- package/dist/verify/gate-config/verification-manifest.d.ts +18 -1
- package/dist/verify/gate-config/verification-manifest.d.ts.map +1 -1
- package/dist/verify/gate-config/verification-manifest.js +21 -21
- package/dist/verify/gate-config/verification-manifest.js.map +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.d.ts +2 -0
- package/dist/verify/gate-verdicts/commit-verdict-record.d.ts.map +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js +11 -4
- package/dist/verify/gate-verdicts/commit-verdict-record.js.map +1 -1
- package/dist/verify/gate-verdicts/gate-run-registry.js +1 -1
- package/dist/verify/outcome-routing/failing-output-excerpt.d.ts +8 -0
- package/dist/verify/outcome-routing/failing-output-excerpt.d.ts.map +1 -0
- package/dist/verify/outcome-routing/failing-output-excerpt.js +41 -0
- package/dist/verify/outcome-routing/failing-output-excerpt.js.map +1 -0
- package/dist/verify/outcome-routing/verification-feedback.d.ts +2 -0
- package/dist/verify/outcome-routing/verification-feedback.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-feedback.js +3 -0
- package/dist/verify/outcome-routing/verification-feedback.js.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts +7 -0
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.js +30 -2
- package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
- package/dist/verify/run-selection/default-on-guards.js +1 -1
- package/dist/verify/run-selection/explicit-rearm.d.ts.map +1 -1
- package/dist/verify/run-selection/explicit-rearm.js +1 -0
- package/dist/verify/run-selection/explicit-rearm.js.map +1 -1
- package/dist/verify/run-selection/unarmed-unattributed.d.ts +89 -0
- package/dist/verify/run-selection/unarmed-unattributed.d.ts.map +1 -0
- package/dist/verify/run-selection/unarmed-unattributed.js +95 -0
- package/dist/verify/run-selection/unarmed-unattributed.js.map +1 -0
- package/dist/verify/run-selection/verification-default-on.d.ts.map +1 -1
- package/dist/verify/run-selection/verification-default-on.js +1 -0
- package/dist/verify/run-selection/verification-default-on.js.map +1 -1
- package/package.json +2 -2
package/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commitSha": "
|
|
3
|
-
"builtAt": "2026-10-
|
|
2
|
+
"commitSha": "d9a4269f0",
|
|
3
|
+
"builtAt": "2026-10-18T14:15:08.386Z",
|
|
4
4
|
"expectedMigrations": [
|
|
5
5
|
"20250829113330_create_org_nodes_table.sql",
|
|
6
6
|
"20250829113402_fix_function_security_search_path.sql",
|
|
@@ -879,6 +879,8 @@
|
|
|
879
879
|
"20261016030625_radar_wait_says_why_it_closed.sql",
|
|
880
880
|
"20261016145947_arm_readiness_names_unanchored_and_met.sql",
|
|
881
881
|
"20261016151419_bug_names_falsified_effects.sql",
|
|
882
|
-
"20261016163239_falsifying_bug_and_finding_taking_create_are_one_transaction.sql"
|
|
882
|
+
"20261016163239_falsifying_bug_and_finding_taking_create_are_one_transaction.sql",
|
|
883
|
+
"20261017023109_request_answered_without_focus_is_delivered.sql",
|
|
884
|
+
"20261017030437_request_requester_authority.sql"
|
|
883
885
|
]
|
|
884
886
|
}
|
package/dist/ci/candidate-ref.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
2
|
// Pinned by: packages/daemon/src/ci/candidate-ci-contract.test.ts,
|
|
3
|
-
// packages/daemon/src/ci/candidate-ref.test.ts
|
|
3
|
+
// packages/daemon/src/ci/candidate-ref.test.ts, packages/daemon/src/ci/gate-ref.test.ts
|
|
4
4
|
// PINNED-BY-END
|
|
5
5
|
/**
|
|
6
6
|
* The integration CANDIDATE namespace: where the daemon pushes a completed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidate-ref.js","sourceRoot":"","sources":["../../src/ci/candidate-ref.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,mEAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"candidate-ref.js","sourceRoot":"","sources":["../../src/ci/candidate-ref.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,mEAAmE;AACnE,0FAA0F;AAC1F,gBAAgB;AAEhB;;;;;;;;;;;;;;;;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;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,OAAe;IAC/D,OAAO,UAAU,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC;AACxH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAW,EAAE,MAAiC;IAClF,IAAI,IAAI,GAAa,EAAE,CAAC;IACxB,IAAI,CAAC;QACH,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,GAAG,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,yBAAyB,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAgB,EAAE,OAAe;IACtE,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,cAAc,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC/G,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACnD,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACvE,OAAO,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { type CiRunStatus } from './ci-status.js';
|
|
2
|
+
/** Branch prefix of the gate namespace (under refs/heads/). */
|
|
3
|
+
export declare const GATE_BRANCH_PREFIX = "telora-gate";
|
|
4
|
+
/** The ci.yml `on.push.branches` glob that admits every gate branch. */
|
|
5
|
+
export declare const GATE_BRANCH_TRIGGER_GLOB = "telora-gate/**";
|
|
6
|
+
/** Where the spec of a focus's latest gate push lives. */
|
|
7
|
+
export declare const GATE_SPEC_REF_PREFIX = "refs/telora-gate-spec";
|
|
8
|
+
/** Where CI publishes a gate run's verdict (in the ref name) and log (in the commit it points at). */
|
|
9
|
+
export declare const GATE_STATUS_REF_PREFIX = "refs/telora-gate-status";
|
|
10
|
+
/** The file in a published status commit holding the run's combined output. */
|
|
11
|
+
export declare const GATE_LOG_FILE = "gate.log";
|
|
12
|
+
/** The file in a published status commit holding the run's exit facts (JSON). */
|
|
13
|
+
export declare const GATE_RESULT_FILE = "gate-result.json";
|
|
14
|
+
/** The spec format this daemon writes; the CI script refuses any other. */
|
|
15
|
+
export declare const GATE_SPEC_VERSION = 1;
|
|
16
|
+
/**
|
|
17
|
+
* The git runner the IO below goes through (production: {@link gateGit}, bound at
|
|
18
|
+
* the composition root). `env` is added to git's environment (the harness build
|
|
19
|
+
* points GIT_INDEX_FILE at a scratch index).
|
|
20
|
+
*/
|
|
21
|
+
export type GateGit = (args: string[], cwd: string, env?: Record<string, string>) => {
|
|
22
|
+
success: boolean;
|
|
23
|
+
output: string;
|
|
24
|
+
error?: string;
|
|
25
|
+
};
|
|
26
|
+
/** git, synchronously, with room for a whole gate log; never throws. */
|
|
27
|
+
export declare const gateGit: GateGit;
|
|
28
|
+
/** Why a run is asked for: the per-HEAD gate, a re-run of named failing tests, or a run of the base for attribution. */
|
|
29
|
+
export type GateRunPurpose = 'gate' | 'rerun' | 'base';
|
|
30
|
+
/**
|
|
31
|
+
* What the CI job runs: `command` at `sha`, under `timeoutMs`, with `env` added
|
|
32
|
+
* to its environment, publishing under `key`. The daemon writes it; the CI
|
|
33
|
+
* script (scripts/ci-gate-run.sh) reads it and refuses one whose sha is not the
|
|
34
|
+
* commit it was triggered for.
|
|
35
|
+
*/
|
|
36
|
+
export interface GateRunSpec {
|
|
37
|
+
version: number;
|
|
38
|
+
purpose: GateRunPurpose;
|
|
39
|
+
focusId: string;
|
|
40
|
+
sha: string;
|
|
41
|
+
key: string;
|
|
42
|
+
command: string;
|
|
43
|
+
timeoutMs: number;
|
|
44
|
+
env: Record<string, string>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A gate's identity: its command + timeout, hashed (12 hex). The ONE definition
|
|
48
|
+
* the per-commit verdict record keys its files by and CI publishes under.
|
|
49
|
+
*/
|
|
50
|
+
export declare function gateRunKey(gate: {
|
|
51
|
+
command: string;
|
|
52
|
+
timeoutMs: number;
|
|
53
|
+
}): string;
|
|
54
|
+
/** The gate branch name for a focus (one per focus; force-pushed per run). */
|
|
55
|
+
export declare function gateBranchForFocus(focusId: string): string;
|
|
56
|
+
/** The spec ref for a focus. */
|
|
57
|
+
export declare function gateSpecRefForFocus(focusId: string): string;
|
|
58
|
+
/** Whether a branch name (or full refs/heads/ ref) is in the gate namespace. */
|
|
59
|
+
export declare function isGateBranch(ref: string): boolean;
|
|
60
|
+
/** Build the spec for one run; its key is the gate identity of `command` + `timeoutMs`. Pure. */
|
|
61
|
+
export declare function buildGateRunSpec(params: {
|
|
62
|
+
purpose: GateRunPurpose;
|
|
63
|
+
focusId: string;
|
|
64
|
+
sha: string;
|
|
65
|
+
command: string;
|
|
66
|
+
timeoutMs: number;
|
|
67
|
+
env?: Record<string, string>;
|
|
68
|
+
}): GateRunSpec;
|
|
69
|
+
/** Parse a spec (the spec commit's message); null when it is not a well-formed spec of this version. Pure. */
|
|
70
|
+
export declare function parseGateRunSpec(text: string): GateRunSpec | null;
|
|
71
|
+
/** The sha the focus's gate branch points at on origin; null when never pushed or git fails. */
|
|
72
|
+
export declare function readPushedGateSha(repoPath: string, focusId: string, git: GateGit): string | null;
|
|
73
|
+
/** Remove the focus's gate branch from origin. Best-effort: false when git refused (e.g. nothing to delete). */
|
|
74
|
+
export declare function deleteGateBranch(repoPath: string, focusId: string, git: GateGit): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* What a CI run needs from the repo besides the code it judges: the workflows that
|
|
77
|
+
* define the gate job, and the script the job runs. A commit from before the
|
|
78
|
+
* product adopted the CI gate (a focus base, for attribution) carries neither, so
|
|
79
|
+
* pushing it alone would start no run at all.
|
|
80
|
+
*/
|
|
81
|
+
export declare const GATE_HARNESS_PATHS: readonly [".github/workflows", ".gitea/workflows", "scripts/ci-gate-run.sh"];
|
|
82
|
+
/** The subject a harness commit opens with; scripts/ci-gate-run.sh accepts only a commit carrying it. */
|
|
83
|
+
export declare const GATE_HARNESS_SUBJECT = "telora-gate-harness";
|
|
84
|
+
/**
|
|
85
|
+
* A HARNESS commit for running `sourceSha` on CI with the gate harness of
|
|
86
|
+
* `harnessFrom`: its only parent is `sourceSha`, and its tree is `sourceSha`'s
|
|
87
|
+
* with {@link GATE_HARNESS_PATHS} replaced by `harnessFrom`'s -- so the push
|
|
88
|
+
* triggers the gate job, and the job (scripts/ci-gate-run.sh) checks out
|
|
89
|
+
* `sourceSha` itself before it runs the command: the run executes at the source
|
|
90
|
+
* commit exactly, and only the harness comes from the installed revision. Built
|
|
91
|
+
* in a scratch index, so no working tree or real index is touched. Null when git
|
|
92
|
+
* fails.
|
|
93
|
+
*/
|
|
94
|
+
export declare function buildHarnessCommit(repoPath: string, sourceSha: string, harnessFrom: string, git: GateGit): string | null;
|
|
95
|
+
/**
|
|
96
|
+
* Hand `spec` to CI: push the spec commit to the focus's spec ref and `spec.sha`
|
|
97
|
+
* to its gate branch, in ONE push (both refs land before the push triggers the
|
|
98
|
+
* job). When the branch already points at `spec.sha` -- a re-push, or a re-run
|
|
99
|
+
* of the same commit -- it is deleted first, because re-pushing an unchanged sha
|
|
100
|
+
* to an existing branch triggers nothing. With `harnessFrom` naming another commit
|
|
101
|
+
* than `spec.sha` (the judged HEAD, for a run at the focus base), a harness commit
|
|
102
|
+
* over `spec.sha` carrying `harnessFrom`'s gate job and script is pushed instead
|
|
103
|
+
* ({@link buildHarnessCommit}); the job still runs at `spec.sha` and publishes
|
|
104
|
+
* under it. Returns false on any git failure; the caller holds and asks again.
|
|
105
|
+
*/
|
|
106
|
+
export declare function pushGateRun(repoPath: string, spec: GateRunSpec, git: GateGit, harnessFrom?: string): boolean;
|
|
107
|
+
/** A published status ref: its name, the commit it points at (the log commit), its run and state. */
|
|
108
|
+
export interface PublishedGateStatus {
|
|
109
|
+
ref: string;
|
|
110
|
+
oid: string;
|
|
111
|
+
runNumber: number;
|
|
112
|
+
state: 'green' | 'red' | 'pending';
|
|
113
|
+
}
|
|
114
|
+
/** Every status CI published for `sha` under `key` (scoped, read-only ls-remote); [] on any failure. */
|
|
115
|
+
export declare function listGateStatus(repoPath: string, sha: string, key: string, git: GateGit): PublishedGateStatus[];
|
|
116
|
+
/** A gate run's verdict as CI published it, and the published run that decided it (null: no decision). */
|
|
117
|
+
export interface GateRunVerdict {
|
|
118
|
+
status: CiRunStatus;
|
|
119
|
+
decidedBy: PublishedGateStatus | null;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Classify the statuses published for one (sha, key) exactly as an integration
|
|
123
|
+
* tip is classified (ci/ci-status.ts classifyGitNativeCiStatus: red wins within a
|
|
124
|
+
* run, any completed green wins across runs, none = unknown), and name the run
|
|
125
|
+
* that decided it: a green run for green, the newest red run for red. Pure.
|
|
126
|
+
*/
|
|
127
|
+
export declare function classifyGateStatus(published: readonly PublishedGateStatus[]): GateRunVerdict;
|
|
128
|
+
/** Read the verdict CI published for `sha` under `key`. Fail-closed: anything unreadable is 'unknown'. */
|
|
129
|
+
export declare function readGateRunVerdict(repoPath: string, sha: string, key: string, git: GateGit): GateRunVerdict;
|
|
130
|
+
/** The exit facts a CI run published beside its log. */
|
|
131
|
+
export interface GateRunResultFacts {
|
|
132
|
+
exitCode: number | null;
|
|
133
|
+
timedOut: boolean;
|
|
134
|
+
durationMs: number | null;
|
|
135
|
+
}
|
|
136
|
+
/** Parse gate-result.json; null when it is not well-formed. Pure. */
|
|
137
|
+
export declare function parseGateRunResult(text: string): GateRunResultFacts | null;
|
|
138
|
+
/** A published run's log and exit facts. */
|
|
139
|
+
export interface PublishedGateLog {
|
|
140
|
+
log: string;
|
|
141
|
+
result: GateRunResultFacts | null;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Fetch the log a published status points at: one scoped fetch of that ref
|
|
145
|
+
* (no FETCH_HEAD written, no local ref created), then the blob read out of the
|
|
146
|
+
* commit it named. Null when the fetch fails or the commit carries no log --
|
|
147
|
+
* the caller treats that as unavailable evidence, never as a pass.
|
|
148
|
+
*/
|
|
149
|
+
export declare function readGateRunLog(repoPath: string, published: PublishedGateStatus, git: GateGit): PublishedGateLog | null;
|
|
150
|
+
//# sourceMappingURL=gate-ref.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate-ref.d.ts","sourceRoot":"","sources":["../../src/ci/gate-ref.ts"],"names":[],"mappings":"AAqEA,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7E,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAEhD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,mBAA6B,CAAC;AAEnE,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,sGAAsG;AACtG,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAEhE,+EAA+E;AAC/E,eAAO,MAAM,aAAa,aAAa,CAAC;AAExC,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAKnC;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,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E,WAAW,CAAC;IACpB,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACvC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,mBAAmB,EAAE,GAAG,cAAc,CAK5F;AAED,0GAA0G;AAC1G,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,cAAc,CAM3G;AAED,wDAAwD;AACxD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,qEAAqE;AACrE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAY1E;AAED,4CAA4C;AAC5C,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,GAAG,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAOtH"}
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/ci/gate-ci-contract.test.ts, packages/daemon/src/ci/gate-ref.test.ts,
|
|
3
|
+
// packages/daemon/src/verify/ci-gate/ci-gate-dispatch.test.ts,
|
|
4
|
+
// packages/daemon/src/verify/ci-gate/ci-gate-reruns.test.ts
|
|
5
|
+
// PINNED-BY-END
|
|
6
|
+
/**
|
|
7
|
+
* The per-HEAD GATE namespace: where the daemon hands a focus commit to the
|
|
8
|
+
* product's CI to run its gate command, and where CI hands the verdict and the
|
|
9
|
+
* log back -- for a product whose telora.verify.json says `"gateRunner": "ci"`
|
|
10
|
+
* (verify/ci-gate/). Why: docs/runbook-verify-gate-in-ci.md.
|
|
11
|
+
*
|
|
12
|
+
* FOUR names, all git-native, all read and written over the daemon's existing
|
|
13
|
+
* git channel (no Gitea API client, no token):
|
|
14
|
+
*
|
|
15
|
+
* refs/heads/telora-gate/<focusId> the judged commit, force-pushed. A BRANCH
|
|
16
|
+
* because Gitea Actions fires `push` only
|
|
17
|
+
* for branches and tags (as with
|
|
18
|
+
* ci/candidate-ref.ts). One per focus. A
|
|
19
|
+
* run at another commit than the judged
|
|
20
|
+
* HEAD (attribution's base) is pushed as a
|
|
21
|
+
* HARNESS commit over it
|
|
22
|
+
* ({@link buildHarnessCommit}): that commit
|
|
23
|
+
* may predate the gate job and its script.
|
|
24
|
+
* refs/telora-gate-spec/<focusId> a commit whose message is the run's
|
|
25
|
+
* GateRunSpec (JSON): the commit it judges,
|
|
26
|
+
* the command, the timeout, the boundary
|
|
27
|
+
* env (TELORA_VERIFY_BASE_REF,
|
|
28
|
+
* TELORA_VERIFY_RECORDED_COMMIT_COUNT) and
|
|
29
|
+
* the run key. Pushed in the SAME push as
|
|
30
|
+
* the branch, so the job triggered by the
|
|
31
|
+
* branch always finds the spec beside it.
|
|
32
|
+
* refs/telora-gate-status/<sha>/<key>/<run>/<state>
|
|
33
|
+
* what CI publishes: the state in the ref
|
|
34
|
+
* NAME (success | failure), the run number
|
|
35
|
+
* ordering runs, and the ref POINTING AT a
|
|
36
|
+
* commit whose tree holds `gate.log` and
|
|
37
|
+
* `gate-result.json` -- so one ls-remote
|
|
38
|
+
* reads the verdict and names the log.
|
|
39
|
+
*
|
|
40
|
+
* DISTINCT from the candidate namespace on purpose. A completed focus's
|
|
41
|
+
* integration candidate (telora-candidate/**, refs/ci-status) and a focus HEAD's
|
|
42
|
+
* gate are different questions -- the full suite on the combined tree vs the
|
|
43
|
+
* product's per-HEAD gate command -- and can be asked of the same sha. Sharing
|
|
44
|
+
* refs/ci-status would let one answer the other.
|
|
45
|
+
*
|
|
46
|
+
* The run KEY is the gate's identity: the same hash the per-commit verdict record
|
|
47
|
+
* is keyed by (verify/gate-verdicts/commit-verdict-record.ts imports
|
|
48
|
+
* {@link gateRunKey} from here, so the two can never disagree). A verdict under
|
|
49
|
+
* one command or timeout says nothing about another, so a status published under
|
|
50
|
+
* another key is never read as this gate's.
|
|
51
|
+
*
|
|
52
|
+
* NAMED ONCE HERE. `.github/workflows/ci.yml` triggers on
|
|
53
|
+
* {@link GATE_BRANCH_TRIGGER_GLOB}; scripts/ci-gate-run.sh runs the spec and
|
|
54
|
+
* publishes under {@link GATE_STATUS_REF_PREFIX}; ci/gate-ci-contract.test.ts
|
|
55
|
+
* executes that script against a real bare repo and reads its output back
|
|
56
|
+
* through the readers below.
|
|
57
|
+
*
|
|
58
|
+
* Fail-closed throughout: an unreadable remote, an absent ref or a malformed one
|
|
59
|
+
* classifies to 'unknown', and the caller holds.
|
|
60
|
+
*
|
|
61
|
+
* @module ci/gate-ref
|
|
62
|
+
*/
|
|
63
|
+
import { execFileSync } from 'node:child_process';
|
|
64
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
65
|
+
import { rmSync } from 'node:fs';
|
|
66
|
+
import { tmpdir } from 'node:os';
|
|
67
|
+
import { join } from 'node:path';
|
|
68
|
+
import { classifyGitNativeCiStatus } from './ci-status.js';
|
|
69
|
+
/** Branch prefix of the gate namespace (under refs/heads/). */
|
|
70
|
+
export const GATE_BRANCH_PREFIX = 'telora-gate';
|
|
71
|
+
/** The ci.yml `on.push.branches` glob that admits every gate branch. */
|
|
72
|
+
export const GATE_BRANCH_TRIGGER_GLOB = `${GATE_BRANCH_PREFIX}/**`;
|
|
73
|
+
/** Where the spec of a focus's latest gate push lives. */
|
|
74
|
+
export const GATE_SPEC_REF_PREFIX = 'refs/telora-gate-spec';
|
|
75
|
+
/** Where CI publishes a gate run's verdict (in the ref name) and log (in the commit it points at). */
|
|
76
|
+
export const GATE_STATUS_REF_PREFIX = 'refs/telora-gate-status';
|
|
77
|
+
/** The file in a published status commit holding the run's combined output. */
|
|
78
|
+
export const GATE_LOG_FILE = 'gate.log';
|
|
79
|
+
/** The file in a published status commit holding the run's exit facts (JSON). */
|
|
80
|
+
export const GATE_RESULT_FILE = 'gate-result.json';
|
|
81
|
+
/** The spec format this daemon writes; the CI script refuses any other. */
|
|
82
|
+
export const GATE_SPEC_VERSION = 1;
|
|
83
|
+
/** Identity the daemon commits the spec as (a runner or a host may have no git identity). */
|
|
84
|
+
const SPEC_AUTHOR = ['-c', 'user.name=telora-daemon', '-c', 'user.email=telora-daemon@localhost'];
|
|
85
|
+
/** A gate log can run to megabytes; the shared runGit caps output at Node's 1 MiB default. */
|
|
86
|
+
const GIT_MAX_BUFFER = 256 * 1024 * 1024;
|
|
87
|
+
const GIT_TIMEOUT_MS = 120_000;
|
|
88
|
+
/** git, synchronously, with room for a whole gate log; never throws. */
|
|
89
|
+
export const gateGit = (args, cwd, env) => {
|
|
90
|
+
try {
|
|
91
|
+
const output = execFileSync('git', args, {
|
|
92
|
+
cwd, encoding: 'utf-8', stdio: ['ignore', 'pipe', 'pipe'], timeout: GIT_TIMEOUT_MS, maxBuffer: GIT_MAX_BUFFER,
|
|
93
|
+
...(env ? { env: { ...process.env, ...env } } : {}),
|
|
94
|
+
});
|
|
95
|
+
return { success: true, output: output.trim() };
|
|
96
|
+
}
|
|
97
|
+
catch (err) {
|
|
98
|
+
const e = err;
|
|
99
|
+
return { success: false, output: e.stdout?.toString() ?? '', error: e.stderr?.toString() || e.message || 'git failed' };
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const SHA40 = /^[0-9a-f]{40}$/i;
|
|
103
|
+
const KEY_RE = /^[0-9a-f]{12}$/;
|
|
104
|
+
/**
|
|
105
|
+
* A gate's identity: its command + timeout, hashed (12 hex). The ONE definition
|
|
106
|
+
* the per-commit verdict record keys its files by and CI publishes under.
|
|
107
|
+
*/
|
|
108
|
+
export function gateRunKey(gate) {
|
|
109
|
+
return createHash('sha256').update(JSON.stringify([gate.command, gate.timeoutMs])).digest('hex').slice(0, 12);
|
|
110
|
+
}
|
|
111
|
+
/** The gate branch name for a focus (one per focus; force-pushed per run). */
|
|
112
|
+
export function gateBranchForFocus(focusId) {
|
|
113
|
+
return `${GATE_BRANCH_PREFIX}/${focusId}`;
|
|
114
|
+
}
|
|
115
|
+
/** The spec ref for a focus. */
|
|
116
|
+
export function gateSpecRefForFocus(focusId) {
|
|
117
|
+
return `${GATE_SPEC_REF_PREFIX}/${focusId}`;
|
|
118
|
+
}
|
|
119
|
+
/** Whether a branch name (or full refs/heads/ ref) is in the gate namespace. */
|
|
120
|
+
export function isGateBranch(ref) {
|
|
121
|
+
const name = ref.startsWith('refs/heads/') ? ref.slice('refs/heads/'.length) : ref;
|
|
122
|
+
return name.startsWith(`${GATE_BRANCH_PREFIX}/`);
|
|
123
|
+
}
|
|
124
|
+
/** Build the spec for one run; its key is the gate identity of `command` + `timeoutMs`. Pure. */
|
|
125
|
+
export function buildGateRunSpec(params) {
|
|
126
|
+
return {
|
|
127
|
+
version: GATE_SPEC_VERSION,
|
|
128
|
+
purpose: params.purpose,
|
|
129
|
+
focusId: params.focusId,
|
|
130
|
+
sha: params.sha,
|
|
131
|
+
key: gateRunKey(params),
|
|
132
|
+
command: params.command,
|
|
133
|
+
timeoutMs: params.timeoutMs,
|
|
134
|
+
env: { ...(params.env ?? {}) },
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function isStringRecord(value) {
|
|
138
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
139
|
+
&& Object.values(value).every((v) => typeof v === 'string');
|
|
140
|
+
}
|
|
141
|
+
/** Parse a spec (the spec commit's message); null when it is not a well-formed spec of this version. Pure. */
|
|
142
|
+
export function parseGateRunSpec(text) {
|
|
143
|
+
let raw;
|
|
144
|
+
try {
|
|
145
|
+
raw = JSON.parse(text.trim());
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
if (typeof raw !== 'object' || raw === null)
|
|
151
|
+
return null;
|
|
152
|
+
const r = raw;
|
|
153
|
+
if (r.version !== GATE_SPEC_VERSION)
|
|
154
|
+
return null;
|
|
155
|
+
if (r.purpose !== 'gate' && r.purpose !== 'rerun' && r.purpose !== 'base')
|
|
156
|
+
return null;
|
|
157
|
+
if (typeof r.focusId !== 'string' || typeof r.sha !== 'string' || !SHA40.test(r.sha))
|
|
158
|
+
return null;
|
|
159
|
+
if (typeof r.key !== 'string' || !KEY_RE.test(r.key))
|
|
160
|
+
return null;
|
|
161
|
+
if (typeof r.command !== 'string' || r.command.trim() === '')
|
|
162
|
+
return null;
|
|
163
|
+
if (typeof r.timeoutMs !== 'number' || !(r.timeoutMs > 0))
|
|
164
|
+
return null;
|
|
165
|
+
if (!isStringRecord(r.env))
|
|
166
|
+
return null;
|
|
167
|
+
return {
|
|
168
|
+
version: r.version, purpose: r.purpose, focusId: r.focusId, sha: r.sha, key: r.key,
|
|
169
|
+
command: r.command, timeoutMs: r.timeoutMs, env: { ...r.env },
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/** The sha a ref points at on origin via a scoped ls-remote; null when absent or git fails. */
|
|
173
|
+
function lsRemoteSha(repoPath, ref, git) {
|
|
174
|
+
const result = git(['ls-remote', 'origin', ref], repoPath);
|
|
175
|
+
if (!result.success || !result.output)
|
|
176
|
+
return null;
|
|
177
|
+
const sha = result.output.split('\n')[0]?.split('\t')[0]?.trim() ?? '';
|
|
178
|
+
return SHA40.test(sha) ? sha : null;
|
|
179
|
+
}
|
|
180
|
+
/** The sha the focus's gate branch points at on origin; null when never pushed or git fails. */
|
|
181
|
+
export function readPushedGateSha(repoPath, focusId, git) {
|
|
182
|
+
return lsRemoteSha(repoPath, `refs/heads/${gateBranchForFocus(focusId)}`, git);
|
|
183
|
+
}
|
|
184
|
+
/** Remove the focus's gate branch from origin. Best-effort: false when git refused (e.g. nothing to delete). */
|
|
185
|
+
export function deleteGateBranch(repoPath, focusId, git) {
|
|
186
|
+
return git(['push', 'origin', '--delete', `refs/heads/${gateBranchForFocus(focusId)}`], repoPath).success;
|
|
187
|
+
}
|
|
188
|
+
/** Write the spec as a commit (empty tree, the JSON as its message); its sha, or null when git failed. */
|
|
189
|
+
function writeSpecCommit(repoPath, spec, git) {
|
|
190
|
+
const tree = git(['hash-object', '-t', 'tree', '-w', '/dev/null'], repoPath);
|
|
191
|
+
const treeSha = tree.output.trim();
|
|
192
|
+
if (!tree.success || !SHA40.test(treeSha))
|
|
193
|
+
return null;
|
|
194
|
+
const commit = git([...SPEC_AUTHOR, 'commit-tree', treeSha, '-m', JSON.stringify(spec)], repoPath);
|
|
195
|
+
const sha = commit.output.trim();
|
|
196
|
+
return commit.success && SHA40.test(sha) ? sha : null;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* What a CI run needs from the repo besides the code it judges: the workflows that
|
|
200
|
+
* define the gate job, and the script the job runs. A commit from before the
|
|
201
|
+
* product adopted the CI gate (a focus base, for attribution) carries neither, so
|
|
202
|
+
* pushing it alone would start no run at all.
|
|
203
|
+
*/
|
|
204
|
+
export const GATE_HARNESS_PATHS = ['.github/workflows', '.gitea/workflows', 'scripts/ci-gate-run.sh'];
|
|
205
|
+
/** The subject a harness commit opens with; scripts/ci-gate-run.sh accepts only a commit carrying it. */
|
|
206
|
+
export const GATE_HARNESS_SUBJECT = 'telora-gate-harness';
|
|
207
|
+
/**
|
|
208
|
+
* A HARNESS commit for running `sourceSha` on CI with the gate harness of
|
|
209
|
+
* `harnessFrom`: its only parent is `sourceSha`, and its tree is `sourceSha`'s
|
|
210
|
+
* with {@link GATE_HARNESS_PATHS} replaced by `harnessFrom`'s -- so the push
|
|
211
|
+
* triggers the gate job, and the job (scripts/ci-gate-run.sh) checks out
|
|
212
|
+
* `sourceSha` itself before it runs the command: the run executes at the source
|
|
213
|
+
* commit exactly, and only the harness comes from the installed revision. Built
|
|
214
|
+
* in a scratch index, so no working tree or real index is touched. Null when git
|
|
215
|
+
* fails.
|
|
216
|
+
*/
|
|
217
|
+
export function buildHarnessCommit(repoPath, sourceSha, harnessFrom, git) {
|
|
218
|
+
const index = join(tmpdir(), `telora-gate-harness-${process.pid}-${randomUUID()}.index`);
|
|
219
|
+
const env = { GIT_INDEX_FILE: index };
|
|
220
|
+
try {
|
|
221
|
+
if (!git(['read-tree', sourceSha], repoPath, env).success)
|
|
222
|
+
return null;
|
|
223
|
+
if (!git(['rm', '-r', '--cached', '--ignore-unmatch', '--quiet', '--', ...GATE_HARNESS_PATHS], repoPath, env).success)
|
|
224
|
+
return null;
|
|
225
|
+
const listed = git(['ls-tree', '-r', harnessFrom, '--', ...GATE_HARNESS_PATHS], repoPath);
|
|
226
|
+
if (!listed.success)
|
|
227
|
+
return null;
|
|
228
|
+
for (const line of listed.output.split('\n').filter(Boolean)) {
|
|
229
|
+
const [meta = '', path = ''] = line.split('\t');
|
|
230
|
+
const [mode = '', , oid = ''] = meta.split(' ');
|
|
231
|
+
if (!git(['update-index', '--add', '--cacheinfo', `${mode},${oid},${path}`], repoPath, env).success)
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
const tree = git(['write-tree'], repoPath, env);
|
|
235
|
+
if (!tree.success || !SHA40.test(tree.output.trim()))
|
|
236
|
+
return null;
|
|
237
|
+
const subject = `${GATE_HARNESS_SUBJECT}: run ${sourceSha} with the gate harness of ${harnessFrom}`;
|
|
238
|
+
const commit = git([...SPEC_AUTHOR, 'commit-tree', tree.output.trim(), '-p', sourceSha, '-m', subject], repoPath);
|
|
239
|
+
const sha = commit.output.trim();
|
|
240
|
+
return commit.success && SHA40.test(sha) ? sha : null;
|
|
241
|
+
}
|
|
242
|
+
finally {
|
|
243
|
+
rmSync(index, { force: true });
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Hand `spec` to CI: push the spec commit to the focus's spec ref and `spec.sha`
|
|
248
|
+
* to its gate branch, in ONE push (both refs land before the push triggers the
|
|
249
|
+
* job). When the branch already points at `spec.sha` -- a re-push, or a re-run
|
|
250
|
+
* of the same commit -- it is deleted first, because re-pushing an unchanged sha
|
|
251
|
+
* to an existing branch triggers nothing. With `harnessFrom` naming another commit
|
|
252
|
+
* than `spec.sha` (the judged HEAD, for a run at the focus base), a harness commit
|
|
253
|
+
* over `spec.sha` carrying `harnessFrom`'s gate job and script is pushed instead
|
|
254
|
+
* ({@link buildHarnessCommit}); the job still runs at `spec.sha` and publishes
|
|
255
|
+
* under it. Returns false on any git failure; the caller holds and asks again.
|
|
256
|
+
*/
|
|
257
|
+
export function pushGateRun(repoPath, spec, git, harnessFrom) {
|
|
258
|
+
const specSha = writeSpecCommit(repoPath, spec, git);
|
|
259
|
+
if (specSha === null)
|
|
260
|
+
return false;
|
|
261
|
+
const pushed = harnessFrom !== undefined && harnessFrom !== spec.sha ? buildHarnessCommit(repoPath, spec.sha, harnessFrom, git) : spec.sha;
|
|
262
|
+
if (pushed === null)
|
|
263
|
+
return false;
|
|
264
|
+
const branch = `refs/heads/${gateBranchForFocus(spec.focusId)}`;
|
|
265
|
+
if (lsRemoteSha(repoPath, branch, git) === pushed.toLowerCase())
|
|
266
|
+
deleteGateBranch(repoPath, spec.focusId, git);
|
|
267
|
+
const result = git(['push', '--force', 'origin', `${specSha}:${gateSpecRefForFocus(spec.focusId)}`, `${pushed}:${branch}`], repoPath);
|
|
268
|
+
return result.success;
|
|
269
|
+
}
|
|
270
|
+
/** Parse one ls-remote line under `<prefix>/<sha>/<key>/`; null when it is not a well-formed status ref. */
|
|
271
|
+
function parseStatusLine(line, prefix) {
|
|
272
|
+
const [oid = '', ref = ''] = line.trim().split('\t').map((s) => s.trim());
|
|
273
|
+
if (!SHA40.test(oid) || !ref.startsWith(prefix))
|
|
274
|
+
return null;
|
|
275
|
+
const [run = '', state = '', ...rest] = ref.slice(prefix.length).split('/');
|
|
276
|
+
if (rest.length > 0 || !/^[0-9]+$/.test(run))
|
|
277
|
+
return null;
|
|
278
|
+
const runNumber = Number(run);
|
|
279
|
+
if (!Number.isSafeInteger(runNumber))
|
|
280
|
+
return null;
|
|
281
|
+
const mapped = classifyGitNativeCiStatus([`refs/ci-status/x/${runNumber}/${state}`]);
|
|
282
|
+
if (mapped !== 'green' && mapped !== 'red' && mapped !== 'pending')
|
|
283
|
+
return null;
|
|
284
|
+
return { ref, oid, runNumber, state: mapped };
|
|
285
|
+
}
|
|
286
|
+
/** Every status CI published for `sha` under `key` (scoped, read-only ls-remote); [] on any failure. */
|
|
287
|
+
export function listGateStatus(repoPath, sha, key, git) {
|
|
288
|
+
const prefix = `${GATE_STATUS_REF_PREFIX}/${sha}/${key}/`;
|
|
289
|
+
const result = git(['ls-remote', 'origin', `${prefix}*`], repoPath);
|
|
290
|
+
if (!result.success || !result.output)
|
|
291
|
+
return [];
|
|
292
|
+
return result.output.split('\n').map((line) => parseStatusLine(line, prefix)).filter((s) => s !== null);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Classify the statuses published for one (sha, key) exactly as an integration
|
|
296
|
+
* tip is classified (ci/ci-status.ts classifyGitNativeCiStatus: red wins within a
|
|
297
|
+
* run, any completed green wins across runs, none = unknown), and name the run
|
|
298
|
+
* that decided it: a green run for green, the newest red run for red. Pure.
|
|
299
|
+
*/
|
|
300
|
+
export function classifyGateStatus(published) {
|
|
301
|
+
const status = classifyGitNativeCiStatus(published.map((p) => `refs/ci-status/x/${p.runNumber}/${p.state === 'green' ? 'success' : p.state === 'red' ? 'failure' : 'pending'}`));
|
|
302
|
+
if (status !== 'green' && status !== 'red')
|
|
303
|
+
return { status, decidedBy: null };
|
|
304
|
+
const deciding = published.filter((p) => p.state === status).sort((a, b) => b.runNumber - a.runNumber)[0] ?? null;
|
|
305
|
+
return { status, decidedBy: deciding };
|
|
306
|
+
}
|
|
307
|
+
/** Read the verdict CI published for `sha` under `key`. Fail-closed: anything unreadable is 'unknown'. */
|
|
308
|
+
export function readGateRunVerdict(repoPath, sha, key, git) {
|
|
309
|
+
try {
|
|
310
|
+
return classifyGateStatus(listGateStatus(repoPath, sha, key, git));
|
|
311
|
+
}
|
|
312
|
+
catch {
|
|
313
|
+
return { status: 'unknown', decidedBy: null };
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
/** Parse gate-result.json; null when it is not well-formed. Pure. */
|
|
317
|
+
export function parseGateRunResult(text) {
|
|
318
|
+
try {
|
|
319
|
+
const raw = JSON.parse(text);
|
|
320
|
+
if (typeof raw !== 'object' || raw === null)
|
|
321
|
+
return null;
|
|
322
|
+
return {
|
|
323
|
+
exitCode: typeof raw.exitCode === 'number' ? raw.exitCode : null,
|
|
324
|
+
timedOut: raw.timedOut === true,
|
|
325
|
+
durationMs: typeof raw.durationMs === 'number' ? raw.durationMs : null,
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
catch {
|
|
329
|
+
return null;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Fetch the log a published status points at: one scoped fetch of that ref
|
|
334
|
+
* (no FETCH_HEAD written, no local ref created), then the blob read out of the
|
|
335
|
+
* commit it named. Null when the fetch fails or the commit carries no log --
|
|
336
|
+
* the caller treats that as unavailable evidence, never as a pass.
|
|
337
|
+
*/
|
|
338
|
+
export function readGateRunLog(repoPath, published, git) {
|
|
339
|
+
const fetched = git(['fetch', '--no-write-fetch-head', '--no-tags', 'origin', published.ref], repoPath);
|
|
340
|
+
if (!fetched.success)
|
|
341
|
+
return null;
|
|
342
|
+
const log = git(['cat-file', 'blob', `${published.oid}:${GATE_LOG_FILE}`], repoPath);
|
|
343
|
+
if (!log.success)
|
|
344
|
+
return null;
|
|
345
|
+
const result = git(['cat-file', 'blob', `${published.oid}:${GATE_RESULT_FILE}`], repoPath);
|
|
346
|
+
return { log: log.output, result: result.success ? parseGateRunResult(result.output) : null };
|
|
347
|
+
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ance-context.d.ts","sourceRoot":"","sources":["../../src/composition/runtime-delivery-advance-context.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAChC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAgBhF,OAAO,EAA2B,KAAK,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-delivery-advance-context.d.ts","sourceRoot":"","sources":["../../src/composition/runtime-delivery-advance-context.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAChC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAgBhF,OAAO,EAA2B,KAAK,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAYtH,4DAA4D;AAC5D,wBAAgB,kBAAkB,IAAI,0BAA0B,CAQ/D;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,IAAI,uBAAuB,CActE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,IAAI,4BAA4B,CAmBnE;AAoBD,oIAAoI;AACpI,wBAAgB,yBAAyB,IAAI,yBAAyB,CASrE"}
|
|
@@ -42,6 +42,10 @@ import { getDeliveryShortfallRulings } from '../queries/verification/shortfall-r
|
|
|
42
42
|
import { createIssue } from '../queries/deliveries/issues.js';
|
|
43
43
|
import { getFocusWorktree } from '../worktree/focus-worktree-state.js';
|
|
44
44
|
import { execGitRunner } from './verification-context.js';
|
|
45
|
+
import { buildAttributedCommitReader } from '../verify/run-selection/unarmed-unattributed.js';
|
|
46
|
+
import { buildCreditsReader } from '../verify/attribution/verification-attribution-deps.js';
|
|
47
|
+
import { getCommitAttributionsForFocus } from '../queries/verification/commit-attributions.js';
|
|
48
|
+
import { resolveGitTrailerCommitSet } from '../resolvers/shared/git-diff.js';
|
|
45
49
|
/** The work-start crossing's reads and its status write. */
|
|
46
50
|
export function buildWorkStartDeps() {
|
|
47
51
|
return {
|
|
@@ -103,8 +107,26 @@ export function buildAutoAdvanceDeps() {
|
|
|
103
107
|
isoNow: () => new Date().toISOString(),
|
|
104
108
|
readRecordedConcernIds: makeRecordedConcernReader(getFocusReviewFindingFacts, getFocusIssues),
|
|
105
109
|
shortfallReworkHold: bindShortfallReworkHold(buildShortfallReworkHoldDeps()),
|
|
110
|
+
readAttributedCommit: buildAdvanceAttributedCommitReader(),
|
|
106
111
|
};
|
|
107
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* The auto-advance's attributed-commit read (focus/unarmed-advance-hold.ts): the
|
|
115
|
+
* SAME reader verify selection uses (verify/run-selection/unarmed-unattributed.ts)
|
|
116
|
+
* -- a recorded merge-back, an attribute_commit credit, or a Telora-Delivery
|
|
117
|
+
* trailer on the focus HEAD or the integration branch -- against the pass's
|
|
118
|
+
* product-scoped config.
|
|
119
|
+
*/
|
|
120
|
+
function buildAdvanceAttributedCommitReader() {
|
|
121
|
+
const readCredits = buildCreditsReader(getCommitAttributionsForFocus);
|
|
122
|
+
return (subject, config) => buildAttributedCommitReader({
|
|
123
|
+
integrationBranch: config.integrationBranch,
|
|
124
|
+
resolveWorktreePath: (s) => (s.focusId ? getFocusWorktree(s.focusId)?.worktreePath ?? null : null),
|
|
125
|
+
resolveRepoPath: () => config.repoPath,
|
|
126
|
+
listTrailerCommits: resolveGitTrailerCommitSet,
|
|
127
|
+
readCredits,
|
|
128
|
+
})(subject);
|
|
129
|
+
}
|
|
108
130
|
/** The verify open-issue pass: the work-start reads, the team registry, the issue closes, the gate seams, the escalation writer. */
|
|
109
131
|
export function buildVerifyOpenIssuesDeps() {
|
|
110
132
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-delivery-advance-context.js","sourceRoot":"","sources":["../../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,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-delivery-advance-context.js","sourceRoot":"","sources":["../../src/composition/runtime-delivery-advance-context.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,uFAAuF;AACvF,qEAAqE;AACrE,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,+DAA+D;AAC/D,gBAAgB;AAEhB;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,mBAAmB,GAGpB,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,oCAAoC,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC/F,OA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