@telora/daemon 0.20.89 → 0.20.96
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 +2 -2
- package/dist/audit-prompt.d.ts.map +1 -1
- package/dist/audit-prompt.js +6 -1
- package/dist/audit-prompt.js.map +1 -1
- package/dist/ci-sensor-loop.d.ts +33 -5
- package/dist/ci-sensor-loop.d.ts.map +1 -1
- package/dist/ci-sensor-loop.js +95 -14
- package/dist/ci-sensor-loop.js.map +1 -1
- package/dist/ci-status-git.d.ts +7 -5
- package/dist/ci-status-git.d.ts.map +1 -1
- package/dist/ci-status-git.js +12 -9
- package/dist/ci-status-git.js.map +1 -1
- package/dist/ci-status.d.ts +21 -6
- package/dist/ci-status.d.ts.map +1 -1
- package/dist/ci-status.js +90 -15
- package/dist/ci-status.js.map +1 -1
- package/dist/cli/connect/agents.d.ts +64 -14
- package/dist/cli/connect/agents.d.ts.map +1 -1
- package/dist/cli/connect/agents.js +102 -19
- package/dist/cli/connect/agents.js.map +1 -1
- package/dist/cli/connect/claude.d.ts +19 -16
- package/dist/cli/connect/claude.d.ts.map +1 -1
- package/dist/cli/connect/claude.js +34 -68
- package/dist/cli/connect/claude.js.map +1 -1
- package/dist/cli/connect/scaffolding.d.ts +3 -2
- package/dist/cli/connect/scaffolding.d.ts.map +1 -1
- package/dist/cli/connect/scaffolding.js +17 -6
- package/dist/cli/connect/scaffolding.js.map +1 -1
- package/dist/cli/connect/seed-retirement.d.ts +39 -0
- package/dist/cli/connect/seed-retirement.d.ts.map +1 -0
- package/dist/cli/connect/seed-retirement.js +95 -0
- package/dist/cli/connect/seed-retirement.js.map +1 -0
- package/dist/cli/connect.d.ts +2 -2
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +8 -2
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/session-state.d.ts +0 -20
- package/dist/cli/session-state.d.ts.map +1 -1
- package/dist/cli/session-state.js +20 -49
- package/dist/cli/session-state.js.map +1 -1
- package/dist/completion/merge-phase.d.ts +1 -1
- package/dist/completion/merge-phase.d.ts.map +1 -1
- package/dist/completion/merge-phase.js +14 -34
- package/dist/completion/merge-phase.js.map +1 -1
- package/dist/completion/team-lifecycle.d.ts.map +1 -1
- package/dist/completion/team-lifecycle.js +13 -1
- package/dist/completion/team-lifecycle.js.map +1 -1
- package/dist/git/merge.d.ts +16 -0
- package/dist/git/merge.d.ts.map +1 -1
- package/dist/git/merge.js +39 -1
- package/dist/git/merge.js.map +1 -1
- package/dist/product-scaffold.d.ts +8 -6
- package/dist/product-scaffold.d.ts.map +1 -1
- package/dist/product-scaffold.js +14 -10
- package/dist/product-scaffold.js.map +1 -1
- package/dist/queries/cause-key.d.ts +13 -3
- package/dist/queries/cause-key.d.ts.map +1 -1
- package/dist/queries/cause-key.js +14 -4
- package/dist/queries/cause-key.js.map +1 -1
- package/dist/queries/holds.d.ts +11 -2
- package/dist/queries/holds.d.ts.map +1 -1
- package/dist/queries/holds.js +11 -2
- package/dist/queries/holds.js.map +1 -1
- package/dist/templates/agents-md.d.ts +16 -0
- package/dist/templates/agents-md.d.ts.map +1 -1
- package/dist/templates/agents-md.js +26 -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 +0 -20
- package/dist/templates/claude-md.js.map +1 -1
- package/dist/templates/claude-settings.d.ts +44 -1
- package/dist/templates/claude-settings.d.ts.map +1 -1
- package/dist/templates/claude-settings.js +73 -1
- package/dist/templates/claude-settings.js.map +1 -1
- package/dist/unified-shell-provisioning.d.ts +99 -0
- package/dist/unified-shell-provisioning.d.ts.map +1 -0
- package/dist/unified-shell-provisioning.js +222 -0
- package/dist/unified-shell-provisioning.js.map +1 -0
- package/dist/unified-shell.d.ts +0 -41
- package/dist/unified-shell.d.ts.map +1 -1
- package/dist/unified-shell.js +19 -135
- package/dist/unified-shell.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-07-
|
|
2
|
+
"commitSha": "957ded634",
|
|
3
|
+
"builtAt": "2026-07-31T00:28:50.254Z",
|
|
4
4
|
"expectedMigrations": [
|
|
5
5
|
"20250829113330_create_org_nodes_table.sql",
|
|
6
6
|
"20250829113402_fix_function_security_search_path.sql",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-prompt.d.ts","sourceRoot":"","sources":["../src/audit-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"audit-prompt.d.ts","sourceRoot":"","sources":["../src/audit-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC;AAuKhD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAQ9D;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,QAAgC,CAAC"}
|
package/dist/audit-prompt.js
CHANGED
|
@@ -85,7 +85,12 @@ const AUDIT_GUIDE_SHARED = `## Rounds (distinct jobs -- not "find more")
|
|
|
85
85
|
3. **Leverage -> injections.** Propose **injection** nodes at the LOWEST / root
|
|
86
86
|
causes (the nodes with the most downstream UDEs), not at the symptoms.
|
|
87
87
|
One injection at a root can clear a whole subtree of UDEs; that leverage is
|
|
88
|
-
the whole reason for the tree.
|
|
88
|
+
the whole reason for the tree. As you aim an injection at the UDE(s) it
|
|
89
|
+
addresses (\`telora_reality_tree_node action=target\`), DECLARE each target's
|
|
90
|
+
desired effect up front via \`restatements\` (the resolved future-state that
|
|
91
|
+
UDE becomes) -- a flipped node must read as its future state, not its problem
|
|
92
|
+
text. A flip left without a declared desired effect is an omission the machine
|
|
93
|
+
can only backfill with a weaker draft.
|
|
89
94
|
4. **Self-validate -> derive_frt.** Call
|
|
90
95
|
\`telora_reality_tree action=derive_frt\` with the treeId. This is read-only:
|
|
91
96
|
it returns the cleared/flipped UDE sets the injections produce. Confirm each
|
package/dist/audit-prompt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-prompt.js","sourceRoot":"","sources":["../src/audit-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAaH;;;;;GAKG;AACH,MAAM,WAAW,GAAsB;IACrC,uEAAuE;IACvE,EAAE;IACF,ujBAAujB;CACxjB,CAAC;AAEF;;;;;;GAMG;AACH,SAAS,mBAAmB,CAAC,OAAqB;IAChD,IAAI,OAAO,KAAK,WAAW,EAAE,CAAC;QAC5B,OAAO;YACL,EAAE;YACF,6RAA6R;SAC9R,CAAC;IACJ,CAAC;IACD,OAAO;QACL,EAAE;QACF,whBAAwhB;KACzhB,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,kBAAkB,GAAsB;IAC5C,EAAE;IACF,yIAAyI;IACzI,EAAE;IACF,kBAAkB;IAClB,0BAA0B;IAC1B,0BAA0B;IAC1B,YAAY;IACZ,4IAA4I;IAC5I,KAAK;IACL,EAAE;IACF,6LAA6L;CAC9L,CAAC;AAEF,+EAA+E;AAC/E,uEAAuE;AACvE,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,+EAA+E;AAC/E,oCAAoC;AACpC,2BAA2B;AAC3B,MAAM,kBAAkB,GAAG
|
|
1
|
+
{"version":3,"file":"audit-prompt.js","sourceRoot":"","sources":["../src/audit-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAaH;;;;;GAKG;AACH,MAAM,WAAW,GAA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TEL-3
|
|
2
|
+
* CI-result sensor loop (Reconnect CI to the loop, TEL-3; machine-receiver
|
|
3
|
+
* routing from the focus "A red CI run must mint work, not an inbox line").
|
|
3
4
|
*
|
|
4
5
|
* A red CI run on integration used to have NO receiver -- it evaporated. This
|
|
5
6
|
* loop makes a failing run SIGNAL: per product, it reads the integration tip's
|
|
6
7
|
* git-native CI status (refs/ci-status/<sha>) via the daemon's existing
|
|
7
8
|
* git-over-SSH channel and, on RED, files exactly one open `ci_run_red`
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* escalation. When a LATER run on integration goes green, it resolves the open
|
|
10
|
+
* escalation. Pure decision (decideCiSensorAction in ci-status.ts) + injected IO
|
|
11
|
+
* so the loop is unit-testable without a live remote or DB.
|
|
12
|
+
*
|
|
13
|
+
* The filing is a MACHINE receiver, not a human inbox line. Fixing a failing
|
|
14
|
+
* lint/typecheck/test/build gate is CODING work, so the filing carries
|
|
15
|
+
* disposition `agent_resolvable` (hidden from the operator inbox) anchored to a
|
|
16
|
+
* FOCUS, so the daemon's focus-scoped agent_resolvable pickup
|
|
17
|
+
* (reconcileAgentResolvableForFocus) rides it into that focus's next CODING pass
|
|
18
|
+
* to be resolved. The ONLY path from here to a `needs_operator` filing is the
|
|
19
|
+
* existing 24h agent_resolvable promotion backstop, after the machine has had
|
|
20
|
+
* spawn cycles to clear it and has not -- never a direct operator filing.
|
|
21
|
+
*
|
|
22
|
+
* Anchor choice (decided, reversible): the tip's OWNING focus, resolved from the
|
|
23
|
+
* tip commit's `Telora-Delivery` trailer -> delivery -> focus; falling back to
|
|
24
|
+
* any currently-active focus for the product (a CI-gate fix is cross-cutting, so
|
|
25
|
+
* any armed team can take it). If NO focus is armed at all there is no coding
|
|
26
|
+
* pass to route the fix to, so the tick files nothing and retries next tick --
|
|
27
|
+
* the fail-closed integration->main merge gate (resolveCiMergeGate, which reads
|
|
28
|
+
* the git ref independently of this escalation) still holds main out on the red,
|
|
29
|
+
* so nothing merges while the signal waits for a team. The recorded alternative,
|
|
30
|
+
* a standing per-product "CI health" focus, would remove the fallback heuristic
|
|
31
|
+
* but is a larger change (new focus lifecycle) and can replace this later with
|
|
32
|
+
* no data migration.
|
|
33
|
+
*
|
|
34
|
+
* The cause key is BRANCH-scoped (queries/cause-key.ciRunRedCauseKey): successive
|
|
35
|
+
* red tips carrying the same unfixed breakage collapse onto ONE open filing
|
|
36
|
+
* instead of minting one per tip.
|
|
12
37
|
*
|
|
13
38
|
* Registered in LOOP_REGISTRY under the opt-out guard TELORA_CI_SENSOR_LOOP.
|
|
14
39
|
* Consumes the same fail-closed CiStatusReader the green-wait (TEL-2) uses.
|
|
@@ -55,6 +80,8 @@ export declare function isCiRedRefileSuppressed(rows: readonly CiEscalationRow[]
|
|
|
55
80
|
export interface CiSensorDeps {
|
|
56
81
|
getCiStatus: CiStatusReader;
|
|
57
82
|
resolveIntegrationTip: (config: DaemonConfig) => string | null;
|
|
83
|
+
/** Resolve the focus a red run's fix routes to (tip-owner, fallback active). */
|
|
84
|
+
resolveOwningFocus: (config: DaemonConfig, sha: string) => Promise<string | null>;
|
|
58
85
|
hasOpenCiRedEscalation: (params: {
|
|
59
86
|
productId: string;
|
|
60
87
|
sha: string;
|
|
@@ -63,6 +90,7 @@ export interface CiSensorDeps {
|
|
|
63
90
|
fileCiRedEscalation: (params: {
|
|
64
91
|
organizationId: string;
|
|
65
92
|
productId: string;
|
|
93
|
+
focusId: string;
|
|
66
94
|
sha: string;
|
|
67
95
|
branch: string;
|
|
68
96
|
}) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-sensor-loop.d.ts","sourceRoot":"","sources":["../src/ci-sensor-loop.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ci-sensor-loop.d.ts","sourceRoot":"","sources":["../src/ci-sensor-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5I,uBAAuB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACjE;AAWD,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,EACpB,IAAI,GAAE,YAA0B,GAC/B,OAAO,CAAC,kBAAkB,CAAC,CAmC7B"}
|
package/dist/ci-sensor-loop.js
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CI-result sensor loop (Reconnect CI to the loop, TEL-3
|
|
2
|
+
* CI-result sensor loop (Reconnect CI to the loop, TEL-3; machine-receiver
|
|
3
|
+
* routing from the focus "A red CI run must mint work, not an inbox line").
|
|
3
4
|
*
|
|
4
5
|
* A red CI run on integration used to have NO receiver -- it evaporated. This
|
|
5
6
|
* loop makes a failing run SIGNAL: per product, it reads the integration tip's
|
|
6
7
|
* git-native CI status (refs/ci-status/<sha>) via the daemon's existing
|
|
7
8
|
* git-over-SSH channel and, on RED, files exactly one open `ci_run_red`
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* escalation. When a LATER run on integration goes green, it resolves the open
|
|
10
|
+
* escalation. Pure decision (decideCiSensorAction in ci-status.ts) + injected IO
|
|
11
|
+
* so the loop is unit-testable without a live remote or DB.
|
|
12
|
+
*
|
|
13
|
+
* The filing is a MACHINE receiver, not a human inbox line. Fixing a failing
|
|
14
|
+
* lint/typecheck/test/build gate is CODING work, so the filing carries
|
|
15
|
+
* disposition `agent_resolvable` (hidden from the operator inbox) anchored to a
|
|
16
|
+
* FOCUS, so the daemon's focus-scoped agent_resolvable pickup
|
|
17
|
+
* (reconcileAgentResolvableForFocus) rides it into that focus's next CODING pass
|
|
18
|
+
* to be resolved. The ONLY path from here to a `needs_operator` filing is the
|
|
19
|
+
* existing 24h agent_resolvable promotion backstop, after the machine has had
|
|
20
|
+
* spawn cycles to clear it and has not -- never a direct operator filing.
|
|
21
|
+
*
|
|
22
|
+
* Anchor choice (decided, reversible): the tip's OWNING focus, resolved from the
|
|
23
|
+
* tip commit's `Telora-Delivery` trailer -> delivery -> focus; falling back to
|
|
24
|
+
* any currently-active focus for the product (a CI-gate fix is cross-cutting, so
|
|
25
|
+
* any armed team can take it). If NO focus is armed at all there is no coding
|
|
26
|
+
* pass to route the fix to, so the tick files nothing and retries next tick --
|
|
27
|
+
* the fail-closed integration->main merge gate (resolveCiMergeGate, which reads
|
|
28
|
+
* the git ref independently of this escalation) still holds main out on the red,
|
|
29
|
+
* so nothing merges while the signal waits for a team. The recorded alternative,
|
|
30
|
+
* a standing per-product "CI health" focus, would remove the fallback heuristic
|
|
31
|
+
* but is a larger change (new focus lifecycle) and can replace this later with
|
|
32
|
+
* no data migration.
|
|
33
|
+
*
|
|
34
|
+
* The cause key is BRANCH-scoped (queries/cause-key.ciRunRedCauseKey): successive
|
|
35
|
+
* red tips carrying the same unfixed breakage collapse onto ONE open filing
|
|
36
|
+
* instead of minting one per tip.
|
|
12
37
|
*
|
|
13
38
|
* Registered in LOOP_REGISTRY under the opt-out guard TELORA_CI_SENSOR_LOOP.
|
|
14
39
|
* Consumes the same fail-closed CiStatusReader the green-wait (TEL-2) uses.
|
|
@@ -19,6 +44,8 @@ import { configForProduct } from './config.js';
|
|
|
19
44
|
import { decideCiSensorAction, createGitNativeCiStatusReader } from './ci-status.js';
|
|
20
45
|
import { listCiStatusRefs, resolveRemoteIntegrationTip } from './ci-status-git.js';
|
|
21
46
|
import { createEscalation, markEscalationResolved } from './queries/issues.js';
|
|
47
|
+
import { getDeliveryContext, getActiveFocuses } from './queries/deliveries.js';
|
|
48
|
+
import { readDeliveryTrailer } from './resolvers/shared/git-diff.js';
|
|
22
49
|
import { callApi } from './queries/shared.js';
|
|
23
50
|
import { ciRunRedCauseKey } from './queries/cause-key.js';
|
|
24
51
|
import { ESCALATION_REASONS, ESCALATION_DISPOSITIONS } from '@telora/daemon-core';
|
|
@@ -57,7 +84,9 @@ function isOpenCiRedForProduct(e, productId) {
|
|
|
57
84
|
* direct unit testing (no callApi mocking needed).
|
|
58
85
|
*/
|
|
59
86
|
export function isCiRedRefileSuppressed(rows, params) {
|
|
60
|
-
|
|
87
|
+
// Branch-scoped: one open ci_run_red per red integration branch. Successive
|
|
88
|
+
// red tips (different sha, same branch) suppress onto the open filing.
|
|
89
|
+
const causeKey = ciRunRedCauseKey(params.branch);
|
|
61
90
|
return rows.some((e) => {
|
|
62
91
|
// A cause-key match suppresses only for OPEN or DISMISSED rows -- 'resolved'
|
|
63
92
|
// is excluded so a recurrence of the same sha after a green resolve re-files.
|
|
@@ -101,26 +130,67 @@ async function defaultFileCiRedEscalation(params) {
|
|
|
101
130
|
organizationId: params.organizationId,
|
|
102
131
|
issueId: null,
|
|
103
132
|
reasonType: ESCALATION_REASONS.ERROR_ENCOUNTERED,
|
|
104
|
-
|
|
133
|
+
// Fixing a failing CI gate is CODING work: file it as machine-routable
|
|
134
|
+
// (hidden from the operator inbox) and anchor it to a focus so the daemon's
|
|
135
|
+
// focus-scoped agent_resolvable pickup rides it into that focus's next
|
|
136
|
+
// coding pass. A needs_operator filing only ever comes from the 24h
|
|
137
|
+
// promotion backstop, after the machine has failed to clear it.
|
|
138
|
+
disposition: ESCALATION_DISPOSITIONS.AGENT_RESOLVABLE,
|
|
105
139
|
productId: params.productId,
|
|
140
|
+
focusId: params.focusId,
|
|
106
141
|
escalationKind: CI_RUN_RED_ESCALATION_KIND,
|
|
107
142
|
description: `CI is RED on the integration branch (${params.branch}) at ${params.sha.slice(0, 12)}. ` +
|
|
108
143
|
`The clean-environment instrument is failing, so integration->main merges are held ` +
|
|
109
|
-
`(fail-closed green-wait). Run reference: commit ${params.sha}.
|
|
110
|
-
`
|
|
111
|
-
|
|
112
|
-
|
|
144
|
+
`(fail-closed green-wait). Run reference: commit ${params.sha}. Fixing the failing ` +
|
|
145
|
+
`gate is coding work: reproduce it in the worktree (the CI 'ci' job's gate block) ` +
|
|
146
|
+
`and fix it. This filing auto-resolves when a later integration run goes green; if ` +
|
|
147
|
+
`the machine cannot clear it, the 24h agent_resolvable promotion backstop surfaces ` +
|
|
148
|
+
`it to an operator.`,
|
|
149
|
+
// cause_key (branch) collapses successive red tips onto one open filing and
|
|
150
|
+
// keeps the branch silent while it is already signalled; a green resolves it.
|
|
113
151
|
metadata: {
|
|
114
152
|
sha: params.sha,
|
|
115
153
|
branch: params.branch,
|
|
116
154
|
product_id: params.productId,
|
|
117
|
-
|
|
155
|
+
focus_id: params.focusId,
|
|
156
|
+
cause_key: ciRunRedCauseKey(params.branch),
|
|
118
157
|
},
|
|
119
158
|
});
|
|
120
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Resolve the focus a red integration run's fix should be routed to. Primary:
|
|
162
|
+
* the tip commit's OWNING focus, via its `Telora-Delivery` trailer -> delivery ->
|
|
163
|
+
* focus. Fallback: any currently-active focus for the product (a CI-gate fix is
|
|
164
|
+
* cross-cutting, so any armed team can take it). Returns null when neither
|
|
165
|
+
* resolves -- there is no coding pass to route the fix to, so the caller files
|
|
166
|
+
* nothing and retries next tick (the fail-closed merge gate still holds main).
|
|
167
|
+
* Best-effort: any git/DB failure degrades to null, never throws.
|
|
168
|
+
*/
|
|
169
|
+
async function defaultResolveOwningFocus(config, sha) {
|
|
170
|
+
try {
|
|
171
|
+
const deliveryId = readDeliveryTrailer(config.repoPath, sha);
|
|
172
|
+
if (deliveryId) {
|
|
173
|
+
const ctx = await getDeliveryContext(deliveryId);
|
|
174
|
+
if (ctx?.focus?.id)
|
|
175
|
+
return ctx.focus.id;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
catch (err) {
|
|
179
|
+
log.debug(`owning-focus trailer resolution failed for ${sha.slice(0, 12)}: ${err.message}`);
|
|
180
|
+
}
|
|
181
|
+
try {
|
|
182
|
+
const active = await getActiveFocuses(config.organizationId, config.productId);
|
|
183
|
+
return active[0]?.focus_id ?? null;
|
|
184
|
+
}
|
|
185
|
+
catch (err) {
|
|
186
|
+
log.debug(`active-focus fallback failed for product ${config.productId}: ${err.message}`);
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
121
190
|
const defaultDeps = {
|
|
122
191
|
getCiStatus: createGitNativeCiStatusReader(listCiStatusRefs),
|
|
123
192
|
resolveIntegrationTip: resolveRemoteIntegrationTip,
|
|
193
|
+
resolveOwningFocus: defaultResolveOwningFocus,
|
|
124
194
|
hasOpenCiRedEscalation: defaultHasOpenCiRedEscalation,
|
|
125
195
|
fileCiRedEscalation: defaultFileCiRedEscalation,
|
|
126
196
|
resolveCiRedEscalations: defaultResolveCiRedEscalations,
|
|
@@ -144,9 +214,20 @@ export async function runCiSensorTick(config, deps = defaultDeps) {
|
|
|
144
214
|
const hasOpen = await deps.hasOpenCiRedEscalation({ productId: pc.productId, sha, branch: pc.integrationBranch });
|
|
145
215
|
const action = decideCiSensorAction(status, hasOpen);
|
|
146
216
|
if (action === 'file') {
|
|
147
|
-
await deps.
|
|
217
|
+
const focusId = await deps.resolveOwningFocus(pc, sha);
|
|
218
|
+
if (!focusId) {
|
|
219
|
+
// No armed focus to route the fix to. File nothing and retry next
|
|
220
|
+
// tick -- the fail-closed merge gate still holds main out on the red,
|
|
221
|
+
// so nothing merges while the signal waits for a team. Filing an
|
|
222
|
+
// unanchored agent_resolvable would be invisible forever (never
|
|
223
|
+
// ridden, never promoted); a direct needs_operator is exactly the
|
|
224
|
+
// inbox line this focus removes.
|
|
225
|
+
log.warn(`CI red on ${pc.integrationBranch} @ ${sha.slice(0, 12)} but no armed focus to route the fix to; holding (merge gate still fail-closed), will retry.`);
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
await deps.fileCiRedEscalation({ organizationId: pc.organizationId, productId: pc.productId, focusId, sha, branch: pc.integrationBranch });
|
|
148
229
|
counts.escalationsFiled++;
|
|
149
|
-
log.warn(`ci_run_red
|
|
230
|
+
log.warn(`ci_run_red (agent_resolvable) filed for product ${pc.productId}, focus ${focusId.slice(0, 8)} (integration @ ${sha.slice(0, 12)}).`);
|
|
150
231
|
}
|
|
151
232
|
else if (action === 'resolve') {
|
|
152
233
|
counts.escalationsResolved += await deps.resolveCiRedEscalations(pc.productId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-sensor-loop.js","sourceRoot":"","sources":["../src/ci-sensor-loop.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ci-sensor-loop.js","sourceRoot":"","sources":["../src/ci-sensor-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAuB,MAAM,gBAAgB,CAAC;AAC1G,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,qB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CAAC,mDAAmD,EAAE,CAAC,SAAS,WAAW,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,mBAAmB,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;YACjJ,CAAC;iBAAM,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBAChC,MAAM,CAAC,mBAAmB,IAAI,MAAM,IAAI,CAAC,uBAAuB,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;gBAC/E,GAAG,CAAC,IAAI,CAAC,iCAAiC,EAAE,CAAC,SAAS,6CAA6C,CAAC,CAAC;YACvG,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,GAAG,CAAC,IAAI,CAAC,2BAA2B,OAAO,CAAC,EAAE,KAAM,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/ci-status-git.d.ts
CHANGED
|
@@ -20,11 +20,13 @@ import { type CiStatusReader } from './ci-status.js';
|
|
|
20
20
|
/** The per-SHA CI status ref namespace. State is encoded in the ref name. */
|
|
21
21
|
export declare const CI_STATUS_REF_PREFIX = "refs/ci-status";
|
|
22
22
|
/**
|
|
23
|
-
* List the published
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
23
|
+
* List the published ci-status ref names for a SHA on the remote, via a scoped
|
|
24
|
+
* read-only `git ls-remote origin <pattern>`. TWO glob depths are queried so both
|
|
25
|
+
* schemes are seen: the new run-ordered refs `refs/ci-status/<sha>/<run>/<state>`
|
|
26
|
+
* AND legacy `refs/ci-status/<sha>/<state>` -- each bounded to THIS sha's
|
|
27
|
+
* namespace, disjoint from `refs/heads/*` (branch-sync-neutral), and re-checked
|
|
28
|
+
* client-side with the prefix filter below. Returns the matched ref names; [] on
|
|
29
|
+
* any git failure (fail-closed -> classifies to 'unknown' -> holds).
|
|
28
30
|
*/
|
|
29
31
|
export declare function listCiStatusRefs(sha: string, config: DaemonConfig): string[];
|
|
30
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-status-git.d.ts","sourceRoot":"","sources":["../src/ci-status-git.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAGxB,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ci-status-git.d.ts","sourceRoot":"","sources":["../src/ci-status-git.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAGxB,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,MAAM,EAAE,CAiB5E;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI,CAS/E;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAEhF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,cAAc,GAAG,SAAS,CAGtG"}
|
package/dist/ci-status-git.js
CHANGED
|
@@ -20,18 +20,21 @@ import { createGitNativeCiStatusReader, } from './ci-status.js';
|
|
|
20
20
|
import { loadEnvConfig } from '@telora/daemon-core';
|
|
21
21
|
/** The per-SHA CI status ref namespace. State is encoded in the ref name. */
|
|
22
22
|
export const CI_STATUS_REF_PREFIX = 'refs/ci-status';
|
|
23
|
-
/** The recognized states CI publishes (one immutable ref per completed run). */
|
|
24
|
-
const CI_STATUS_STATES = ['success', 'failure', 'pending'];
|
|
25
23
|
/**
|
|
26
|
-
* List the published
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
24
|
+
* List the published ci-status ref names for a SHA on the remote, via a scoped
|
|
25
|
+
* read-only `git ls-remote origin <pattern>`. TWO glob depths are queried so both
|
|
26
|
+
* schemes are seen: the new run-ordered refs `refs/ci-status/<sha>/<run>/<state>`
|
|
27
|
+
* AND legacy `refs/ci-status/<sha>/<state>` -- each bounded to THIS sha's
|
|
28
|
+
* namespace, disjoint from `refs/heads/*` (branch-sync-neutral), and re-checked
|
|
29
|
+
* client-side with the prefix filter below. Returns the matched ref names; [] on
|
|
30
|
+
* any git failure (fail-closed -> classifies to 'unknown' -> holds).
|
|
31
31
|
*/
|
|
32
32
|
export function listCiStatusRefs(sha, config) {
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const patterns = [
|
|
34
|
+
`${CI_STATUS_REF_PREFIX}/${sha}/*`,
|
|
35
|
+
`${CI_STATUS_REF_PREFIX}/${sha}/*/*`,
|
|
36
|
+
];
|
|
37
|
+
const result = runGitSync(['ls-remote', 'origin', ...patterns], config.repoPath);
|
|
35
38
|
if (!result.output)
|
|
36
39
|
return [];
|
|
37
40
|
// ls-remote lines: "<objectsha>\t<refname>". Extract the ref names.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-status-git.js","sourceRoot":"","sources":["../src/ci-status-git.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EACL,6BAA6B,GAE9B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,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AO,CAAC,GAAG;IACxE,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAC/C,OAAO,6BAA6B,CAAC,gBAAgB,CAAC,CAAC;AACzD,CAAC"}
|
package/dist/ci-status.d.ts
CHANGED
|
@@ -63,12 +63,27 @@ export interface CiMergeGateDecision {
|
|
|
63
63
|
*/
|
|
64
64
|
export declare function resolveCiMergeGate(status: CiRunStatus): CiMergeGateDecision;
|
|
65
65
|
/**
|
|
66
|
-
* Classify a git-native CI status from the set of
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
66
|
+
* Classify a git-native CI status from the set of ci-status ref names published
|
|
67
|
+
* for a SHA. The STATE is encoded in the ref NAME (immutable per-SHA), so no
|
|
68
|
+
* object content read is needed. Pure -- the caller supplies the ref names from a
|
|
69
|
+
* scoped `git ls-remote` / fetch.
|
|
70
|
+
*
|
|
71
|
+
* MOST-RECENT-RUN-WINS. The publisher encodes run order in the ref PATH
|
|
72
|
+
* (`refs/ci-status/<sha>/<runNumber>/<state>`), so a later GREEN run's ref
|
|
73
|
+
* outranks an earlier FAILURE ref for the same sha. This fixes the "a failure
|
|
74
|
+
* ref outranks a success ref, forever" trap: ref names carried no order, so a
|
|
75
|
+
* sha that once published a failure (an infra blip, or an evicted run) stayed
|
|
76
|
+
* red permanently even after a real green run of the same sha. The order comes
|
|
77
|
+
* from the workflow, never inferred by this reader.
|
|
78
|
+
*
|
|
79
|
+
* FAIL-CLOSED throughout: an empty set / unrecognized suffix -> 'unknown'
|
|
80
|
+
* (holds); among the highest run number, RED wins on a tie (the rare same-run
|
|
81
|
+
* re-run that published both states resolves to red, never a false green).
|
|
82
|
+
*
|
|
83
|
+
* LEGACY refs (`refs/ci-status/<sha>/<state>`, no run number) carry no order; if
|
|
84
|
+
* ONLY legacy refs exist we fall back to the original fail-closed precedence
|
|
85
|
+
* (failure outranks success outranks pending), preserving prior behavior for
|
|
86
|
+
* shas published before the run-ordered scheme deployed.
|
|
72
87
|
*/
|
|
73
88
|
export declare function classifyGitNativeCiStatus(refNames: readonly string[]): CiRunStatus;
|
|
74
89
|
/** Parameters passed to a CI status reader. */
|
package/dist/ci-status.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-status.d.ts","sourceRoot":"","sources":["../src/ci-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;AAElE,gFAAgF;AAChF,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,MAAM,EAAE,WAAW,CAAC;IACpB,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,CAY3E;
|
|
1
|
+
{"version":3,"file":"ci-status.d.ts","sourceRoot":"","sources":["../src/ci-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;AAElE,gFAAgF;AAChF,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,MAAM,EAAE,WAAW,CAAC;IACpB,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,CAY3E;AA8BD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,WAAW,CAuClF;AAED,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,+EAA+E;IAC/E,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;AAElF;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,KAAK,MAAM,EAAE,CAAC;AAEhF;;;;GAIG;AACH,8EAA8E;AAC9E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE,OAAO,GAAG,cAAc,CAIvG;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,iBAAiB,GAAG,cAAc,CAWvF"}
|
package/dist/ci-status.js
CHANGED
|
@@ -54,29 +54,104 @@ export function resolveCiMergeGate(status) {
|
|
|
54
54
|
return { proceed: false, status: 'unknown', reason: 'CI status unavailable for the merged SHA -- holding (fail-closed: unknown != green)' };
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
/** The recognized state a ci-status ref suffix encodes, or null if unrecognized. */
|
|
58
|
+
function ciStateFromRefSuffix(ref) {
|
|
59
|
+
if (ref.endsWith('/failure') || ref.endsWith('/error') || ref.endsWith('/red'))
|
|
60
|
+
return 'red';
|
|
61
|
+
if (ref.endsWith('/success') || ref.endsWith('/green') || ref.endsWith('/passed'))
|
|
62
|
+
return 'green';
|
|
63
|
+
if (ref.endsWith('/pending') || ref.endsWith('/running') || ref.endsWith('/queued'))
|
|
64
|
+
return 'pending';
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The run-ordering token a NEW ref carries, or null for a legacy ref.
|
|
69
|
+
*
|
|
70
|
+
* New scheme: `refs/ci-status/<sha>/<runNumber>/<state>` (5 slash-parts) -- the
|
|
71
|
+
* run number is parts[3]. Legacy scheme: `refs/ci-status/<sha>/<state>` (4
|
|
72
|
+
* parts) carries no order. Disambiguated by SEGMENT COUNT, not by numeric-ness,
|
|
73
|
+
* so an all-digit sha in a legacy ref is never mistaken for a run number.
|
|
74
|
+
*/
|
|
75
|
+
function ciRunOrderFromRef(ref) {
|
|
76
|
+
const parts = ref.split('/');
|
|
77
|
+
if (parts.length === 5 && parts[1] === 'ci-status') {
|
|
78
|
+
const token = parts[3];
|
|
79
|
+
if (token !== undefined && /^[0-9]+$/.test(token)) {
|
|
80
|
+
const n = Number(token);
|
|
81
|
+
return Number.isSafeInteger(n) ? n : null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
57
86
|
/**
|
|
58
|
-
* Classify a git-native CI status from the set of
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
87
|
+
* Classify a git-native CI status from the set of ci-status ref names published
|
|
88
|
+
* for a SHA. The STATE is encoded in the ref NAME (immutable per-SHA), so no
|
|
89
|
+
* object content read is needed. Pure -- the caller supplies the ref names from a
|
|
90
|
+
* scoped `git ls-remote` / fetch.
|
|
91
|
+
*
|
|
92
|
+
* MOST-RECENT-RUN-WINS. The publisher encodes run order in the ref PATH
|
|
93
|
+
* (`refs/ci-status/<sha>/<runNumber>/<state>`), so a later GREEN run's ref
|
|
94
|
+
* outranks an earlier FAILURE ref for the same sha. This fixes the "a failure
|
|
95
|
+
* ref outranks a success ref, forever" trap: ref names carried no order, so a
|
|
96
|
+
* sha that once published a failure (an infra blip, or an evicted run) stayed
|
|
97
|
+
* red permanently even after a real green run of the same sha. The order comes
|
|
98
|
+
* from the workflow, never inferred by this reader.
|
|
99
|
+
*
|
|
100
|
+
* FAIL-CLOSED throughout: an empty set / unrecognized suffix -> 'unknown'
|
|
101
|
+
* (holds); among the highest run number, RED wins on a tie (the rare same-run
|
|
102
|
+
* re-run that published both states resolves to red, never a false green).
|
|
103
|
+
*
|
|
104
|
+
* LEGACY refs (`refs/ci-status/<sha>/<state>`, no run number) carry no order; if
|
|
105
|
+
* ONLY legacy refs exist we fall back to the original fail-closed precedence
|
|
106
|
+
* (failure outranks success outranks pending), preserving prior behavior for
|
|
107
|
+
* shas published before the run-ordered scheme deployed.
|
|
64
108
|
*/
|
|
65
109
|
export function classifyGitNativeCiStatus(refNames) {
|
|
66
|
-
let
|
|
67
|
-
|
|
110
|
+
let bestOrder = -1;
|
|
111
|
+
const statesAtBest = new Set();
|
|
112
|
+
let sawLegacyRed = false;
|
|
113
|
+
let sawLegacyGreen = false;
|
|
114
|
+
let sawLegacyPending = false;
|
|
68
115
|
for (const raw of refNames) {
|
|
69
116
|
const ref = raw.trim();
|
|
70
|
-
|
|
117
|
+
const state = ciStateFromRefSuffix(ref);
|
|
118
|
+
if (!state)
|
|
119
|
+
continue;
|
|
120
|
+
const order = ciRunOrderFromRef(ref);
|
|
121
|
+
if (order === null) {
|
|
122
|
+
if (state === 'red')
|
|
123
|
+
sawLegacyRed = true;
|
|
124
|
+
else if (state === 'green')
|
|
125
|
+
sawLegacyGreen = true;
|
|
126
|
+
else
|
|
127
|
+
sawLegacyPending = true;
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (order > bestOrder) {
|
|
131
|
+
bestOrder = order;
|
|
132
|
+
statesAtBest.clear();
|
|
133
|
+
statesAtBest.add(state);
|
|
134
|
+
}
|
|
135
|
+
else if (order === bestOrder) {
|
|
136
|
+
statesAtBest.add(state);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// Most-recent ordered run decides (red wins a same-run tie, fail-closed).
|
|
140
|
+
if (bestOrder >= 0) {
|
|
141
|
+
if (statesAtBest.has('red'))
|
|
71
142
|
return 'red';
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
143
|
+
if (statesAtBest.has('green'))
|
|
144
|
+
return 'green';
|
|
145
|
+
if (statesAtBest.has('pending'))
|
|
146
|
+
return 'pending';
|
|
147
|
+
return 'unknown';
|
|
76
148
|
}
|
|
77
|
-
|
|
149
|
+
// Legacy-only fallback: original fail-closed precedence.
|
|
150
|
+
if (sawLegacyRed)
|
|
151
|
+
return 'red';
|
|
152
|
+
if (sawLegacyGreen)
|
|
78
153
|
return 'green';
|
|
79
|
-
if (
|
|
154
|
+
if (sawLegacyPending)
|
|
80
155
|
return 'pending';
|
|
81
156
|
return 'unknown';
|
|
82
157
|
}
|
package/dist/ci-status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-status.js","sourceRoot":"","sources":["../src/ci-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAyBH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAmB;IACpD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO;YACV,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,6BAA6B,EAAE,CAAC;QAC1E,KAAK,SAAS;YACZ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,4EAA4E,EAAE,CAAC;QAC1H,KAAK,KAAK;YACR,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,wFAAwF,EAAE,CAAC;Q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