@fourier-labs/harbour-contracts 0.3.1 → 0.5.0
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/README.md +1 -1
- package/dist/gen-ts/ai-callsite-inventory.d.ts +49 -0
- package/dist/gen-ts/ai-gateway-key-lookup.d.ts +20 -0
- package/dist/gen-ts/ai-gateway-key-token.d.ts +4 -0
- package/dist/gen-ts/ai-gateway-key-token.js +6 -0
- package/dist/gen-ts/ai-governance-decision.d.ts +74 -0
- package/dist/gen-ts/ai-policy-snapshot.d.ts +429 -0
- package/dist/gen-ts/ai-runtime-contract.d.ts +27 -0
- package/dist/gen-ts/ai-trace-event.d.ts +68 -0
- package/dist/gen-ts/ai-transform-event.d.ts +66 -0
- package/dist/gen-ts/ai-transform-result.d.ts +32 -0
- package/dist/gen-ts/ai-verification-evidence.d.ts +49 -0
- package/dist/gen-ts/data-dependency.d.ts +42 -0
- package/dist/gen-ts/data-grant.d.ts +58 -0
- package/dist/gen-ts/data-grant.js +12 -0
- package/dist/gen-ts/data-source.d.ts +74 -0
- package/dist/{deploy-request.d.ts → gen-ts/deploy-request.d.ts} +30 -0
- package/dist/gen-ts/deploy-response.js +3 -0
- package/dist/gen-ts/deployment-environment.js +3 -0
- package/dist/gen-ts/deployment-source.js +3 -0
- package/dist/gen-ts/deployment-status-failure.js +3 -0
- package/dist/gen-ts/deployment-status-request.js +3 -0
- package/dist/{deployment-status-response.d.ts → gen-ts/deployment-status-response.d.ts} +2 -2
- package/dist/gen-ts/deployment-status-response.js +3 -0
- package/dist/gen-ts/env-bindings.js +3 -0
- package/dist/{error-category-registry.d.ts → gen-ts/error-category-registry.d.ts} +7 -0
- package/dist/{error-category-registry.js → gen-ts/error-category-registry.js} +14 -0
- package/dist/gen-ts/error-category.js +3 -0
- package/dist/gen-ts/error-envelope.js +3 -0
- package/dist/{index.d.ts → gen-ts/index.d.ts} +16 -0
- package/dist/{index.js → gen-ts/index.js} +16 -0
- package/dist/gen-ts/kvs-routing-entry.js +3 -0
- package/dist/gen-ts/promotion-request.d.ts +17 -0
- package/dist/gen-ts/promotion-request.js +3 -0
- package/dist/gen-ts/promotion-response.d.ts +17 -0
- package/dist/gen-ts/promotion-response.js +3 -0
- package/dist/gen-ts/secret-reference.d.ts +36 -0
- package/dist/gen-ts/secret-reference.js +3 -0
- package/dist/{version-state-machine.d.ts → gen-ts/version-state-machine.d.ts} +7 -2
- package/dist/gen-ts/version-state-machine.js +45 -0
- package/dist/gen-ts/version-state.js +3 -0
- package/dist/resolver/index.d.ts +256 -0
- package/dist/resolver/index.js +679 -0
- package/package.json +14 -4
- package/schema/ai-callsite-inventory.schema.json +138 -0
- package/schema/ai-gateway-key-lookup.schema.json +53 -0
- package/schema/ai-governance-decision.schema.json +105 -0
- package/schema/ai-policy-snapshot.schema.json +340 -0
- package/schema/ai-runtime-contract.schema.json +85 -0
- package/schema/ai-trace-event.schema.json +178 -0
- package/schema/ai-transform-event.schema.json +72 -0
- package/schema/ai-transform-result.schema.json +46 -0
- package/schema/ai-verification-evidence.schema.json +57 -0
- package/schema/data-dependency.schema.json +89 -0
- package/schema/data-grant.schema.json +107 -0
- package/schema/data-source.schema.json +151 -0
- package/schema/deploy-request.schema.json +60 -0
- package/schema/deploy-response.schema.json +1 -1
- package/schema/deployment-status-request.schema.json +1 -1
- package/schema/deployment-status-response.schema.json +2 -2
- package/schema/error-category.enum.json +7 -0
- package/schema/promotion-request.schema.json +26 -0
- package/schema/promotion-response.schema.json +50 -0
- package/schema/secret-reference.schema.json +70 -0
- package/schema/version-state.schema.json +25 -24
- package/dist/version-state-machine.js +0 -35
- /package/dist/{api-error-response.js → gen-ts/ai-callsite-inventory.js} +0 -0
- /package/dist/{artifact-contract.js → gen-ts/ai-gateway-key-lookup.js} +0 -0
- /package/dist/{deploy-request.js → gen-ts/ai-governance-decision.js} +0 -0
- /package/dist/{deploy-response.js → gen-ts/ai-policy-snapshot.js} +0 -0
- /package/dist/{deployment-environment.js → gen-ts/ai-runtime-contract.js} +0 -0
- /package/dist/{deployment-source.js → gen-ts/ai-trace-event.js} +0 -0
- /package/dist/{deployment-status-failure.js → gen-ts/ai-transform-event.js} +0 -0
- /package/dist/{deployment-status-request.js → gen-ts/ai-transform-result.js} +0 -0
- /package/dist/{deployment-status-response.js → gen-ts/ai-verification-evidence.js} +0 -0
- /package/dist/{api-error-response.d.ts → gen-ts/api-error-response.d.ts} +0 -0
- /package/dist/{env-bindings.js → gen-ts/api-error-response.js} +0 -0
- /package/dist/{artifact-contract.d.ts → gen-ts/artifact-contract.d.ts} +0 -0
- /package/dist/{error-category.js → gen-ts/artifact-contract.js} +0 -0
- /package/dist/{error-envelope.js → gen-ts/data-dependency.js} +0 -0
- /package/dist/{kvs-routing-entry.js → gen-ts/data-source.js} +0 -0
- /package/dist/{version-state.js → gen-ts/deploy-request.js} +0 -0
- /package/dist/{deploy-response.d.ts → gen-ts/deploy-response.d.ts} +0 -0
- /package/dist/{deployment-environment.d.ts → gen-ts/deployment-environment.d.ts} +0 -0
- /package/dist/{deployment-source.d.ts → gen-ts/deployment-source.d.ts} +0 -0
- /package/dist/{deployment-status-failure.d.ts → gen-ts/deployment-status-failure.d.ts} +0 -0
- /package/dist/{deployment-status-request.d.ts → gen-ts/deployment-status-request.d.ts} +0 -0
- /package/dist/{env-bindings.d.ts → gen-ts/env-bindings.d.ts} +0 -0
- /package/dist/{error-category.d.ts → gen-ts/error-category.d.ts} +0 -0
- /package/dist/{error-envelope.d.ts → gen-ts/error-envelope.d.ts} +0 -0
- /package/dist/{kvs-routing-entry.d.ts → gen-ts/kvs-routing-entry.d.ts} +0 -0
- /package/dist/{version-state.d.ts → gen-ts/version-state.d.ts} +0 -0
|
@@ -42,6 +42,13 @@
|
|
|
42
42
|
{ "id": "admission.app-not-registered", "retryable": false, "description": "Admission rejected: the app directory does not know this app, so there is no sourceRef to fetch a commit from. Fails closed rather than creating the app on demand — a deploy request must not become an app-creation side effect, or app naming stops being a reviewed act. Non-retryable: the directory is authoritative, so retrying cannot make an unknown app known." },
|
|
43
43
|
{ "id": "deploy.commit-not-on-branch", "retryable": false, "description": "Admission rejected: the deploy request's commit is not reachable from the app's branch." },
|
|
44
44
|
{ "id": "deploy.queue-publication-failed", "retryable": true, "description": "The version was created but its version-qualified SQS message definitively could not be published. The lane is released when this version still owns it; submitting a new deployment is safe." },
|
|
45
|
+
{ "id": "promotion.preview-not-promotable", "retryable": false, "description": "The referenced preview is missing, belongs to another route, is not LIVE, or lacks immutable artifact and source-tree evidence." },
|
|
46
|
+
{ "id": "promotion.production-branch-moved", "retryable": false, "description": "The requested production commit is not the current configured production branch head." },
|
|
47
|
+
{ "id": "promotion.source-tree-mismatch", "retryable": false, "description": "The production commit root Git tree identity differs from the referenced preview tree identity." },
|
|
48
|
+
{ "id": "promotion.artifact-mismatch", "retryable": false, "description": "The stored preview artifact is missing, mutable, or resolves to a different backend digest." },
|
|
49
|
+
{ "id": "promotion.idempotency-conflict", "retryable": false, "description": "An idempotency key was reused with a different preview version or production commit." },
|
|
50
|
+
{ "id": "promotion.in-progress", "retryable": true, "description": "A different production promotion currently owns the application's production lane." },
|
|
51
|
+
{ "id": "promotion.queue-publication-failed", "retryable": true, "description": "The production version was durably accepted but its version-qualified queue event could not be published." },
|
|
45
52
|
{ "id": "cutover.flip-failed", "retryable": false, "description": "The atomic alias flip failed at cutover; previous version keeps serving." },
|
|
46
53
|
{ "id": "quota.exceeded", "retryable": false, "family": true, "description": "A provisioning/account limit was hit (cluster/IAM-role quota) — NOT runtime traffic quotas. Concrete token names which limit." },
|
|
47
54
|
{ "id": "uncategorized", "retryable": false, "family": true, "description": "A failure that fit no category — this is a bug: file uncategorized.<stage> AND a spec PR to this file." }
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://schemas.harbour.dev/promotion-request.schema.json",
|
|
4
|
+
"title": "PromotionRequest",
|
|
5
|
+
"description": "JSON body for POST /v1/tenants/{tenant}/apps/{app}/promotions. Repository identity is loaded from stored application and preview records, not supplied by the caller.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["previewVersionId", "commit", "idempotencyKey"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"previewVersionId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?#[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?#preview#[0-9]{6,}$",
|
|
13
|
+
"description": "Immutable preview version selected by the caller. The API also verifies that its tenant and app match the route."
|
|
14
|
+
},
|
|
15
|
+
"commit": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^[0-9a-f]{40}$",
|
|
18
|
+
"description": "Current commit at the configured production branch head. Its root Git tree must equal the preview tree."
|
|
19
|
+
},
|
|
20
|
+
"idempotencyKey": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$",
|
|
23
|
+
"description": "Durable caller-generated key. Identical replays return the original production version; reuse with a changed request is rejected."
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://schemas.harbour.dev/promotion-response.schema.json",
|
|
4
|
+
"title": "PromotionResponse",
|
|
5
|
+
"description": "202 Accepted body returned after the production version and its durable idempotency binding exist.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["idempotencyKey", "versionId", "previewVersionId", "tenant", "app", "environment", "status", "acceptedAt", "statusUrl"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"idempotencyKey": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$"
|
|
13
|
+
},
|
|
14
|
+
"versionId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?#[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?#prod#[0-9]{6,}$",
|
|
17
|
+
"description": "Immutable identity of the admitted production version."
|
|
18
|
+
},
|
|
19
|
+
"previewVersionId": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?#[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?#preview#[0-9]{6,}$"
|
|
22
|
+
},
|
|
23
|
+
"tenant": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"maxLength": 63
|
|
27
|
+
},
|
|
28
|
+
"app": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"maxLength": 63
|
|
32
|
+
},
|
|
33
|
+
"environment": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": ["prod"]
|
|
36
|
+
},
|
|
37
|
+
"status": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"enum": ["QUEUED"]
|
|
40
|
+
},
|
|
41
|
+
"acceptedAt": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"format": "date-time"
|
|
44
|
+
},
|
|
45
|
+
"statusUrl": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^/v1/tenants/[^/]+/apps/[^/]+/deployments/[^/]+$"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://schemas.harbour.dev/secret-reference.schema.json",
|
|
4
|
+
"title": "SecretReference",
|
|
5
|
+
"description": "Secret-Manager MVP: a named secret slot an app depends on. Only the reference and its lifecycle cross this boundary — the secret VALUE never appears in any contract. scope=app secrets are shared by the app; scope=personal secrets belong to one builder (ownerBuilderId). origin records whether a builder created the slot or the platform minted it (e.g. for a data grant).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["appId", "name", "scope", "secretRef", "status", "origin"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"appId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"maxLength": 255,
|
|
14
|
+
"description": "App the secret slot belongs to."
|
|
15
|
+
},
|
|
16
|
+
"name": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"minLength": 1,
|
|
19
|
+
"maxLength": 255,
|
|
20
|
+
"description": "Slot name as the app references it (typically the environment-variable name)."
|
|
21
|
+
},
|
|
22
|
+
"scope": {
|
|
23
|
+
"$ref": "#/definitions/SecretReferenceScope"
|
|
24
|
+
},
|
|
25
|
+
"ownerBuilderId": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"maxLength": 255,
|
|
29
|
+
"description": "Owning builder; present only when scope is personal."
|
|
30
|
+
},
|
|
31
|
+
"secretRef": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^secretref://[A-Za-z0-9][A-Za-z0-9/_.:-]*$",
|
|
34
|
+
"description": "secretref URI of the stored value. The value itself never crosses this boundary."
|
|
35
|
+
},
|
|
36
|
+
"status": {
|
|
37
|
+
"$ref": "#/definitions/SecretReferenceStatus"
|
|
38
|
+
},
|
|
39
|
+
"origin": {
|
|
40
|
+
"$ref": "#/definitions/SecretReferenceOrigin"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"definitions": {
|
|
44
|
+
"SecretReferenceScope": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"enum": ["app", "personal"],
|
|
47
|
+
"description": "app = shared by the whole app; personal = owned by a single builder (ownerBuilderId)."
|
|
48
|
+
},
|
|
49
|
+
"SecretReferenceStatus": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": ["SET", "UNSET"],
|
|
52
|
+
"description": "UNSET slots block promotion until a human sets a value (secrets.unresolvable)."
|
|
53
|
+
},
|
|
54
|
+
"SecretReferenceOrigin": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": ["builder", "minted"],
|
|
57
|
+
"description": "builder = created by a builder; minted = created by the platform (e.g. a data-grant credential)."
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"examples": [
|
|
61
|
+
{
|
|
62
|
+
"appId": "reports",
|
|
63
|
+
"name": "STRIPE_API_KEY",
|
|
64
|
+
"scope": "app",
|
|
65
|
+
"secretRef": "secretref://tenants/fourier/apps/reports/STRIPE_API_KEY",
|
|
66
|
+
"status": "SET",
|
|
67
|
+
"origin": "builder"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
@@ -35,32 +35,33 @@
|
|
|
35
35
|
"x-terminal": ["FAILED", "STALE"],
|
|
36
36
|
"x-terminalStable": ["LIVE", "AWAITING-PROMOTION"],
|
|
37
37
|
"x-transitions": [
|
|
38
|
-
{ "from": "QUEUED", "to": "ANALYZING", "trigger": "admission: slot free AND commit reachable from branch" },
|
|
38
|
+
{ "from": "QUEUED", "to": "ANALYZING", "environments": ["preview"], "trigger": "admission: slot free AND commit reachable from branch" },
|
|
39
|
+
{ "from": "QUEUED", "to": "PROMOTING", "environments": ["prod"], "trigger": "production promotion admission: stored preview and source-fidelity guards pass" },
|
|
39
40
|
{ "from": "QUEUED", "to": "FAILED", "trigger": "admission validation fails — commit not reachable from branch" },
|
|
40
|
-
{ "from": "ANALYZING", "to": "BUILDING", "trigger": "nothing to transform (fast path)" },
|
|
41
|
-
{ "from": "ANALYZING", "to": "TRANSFORMING", "trigger": "transform-relevant findings; 15-min wall deadline stamped" },
|
|
42
|
-
{ "from": "ANALYZING", "to": "FAILED", "trigger": "hard intake failure" },
|
|
43
|
-
{ "from": "TRANSFORMING", "to": "VALIDATING", "trigger": "agent produced candidate" },
|
|
44
|
-
{ "from": "TRANSFORMING", "to": "FAILED", "trigger": "non-retryable failure or deadline exceeded" },
|
|
45
|
-
{ "from": "VALIDATING", "to": "BUILDING", "trigger": "validation passed" },
|
|
46
|
-
{ "from": "VALIDATING", "to": "TRANSFORMING", "trigger": "retryable failure AND now < deadline" },
|
|
47
|
-
{ "from": "VALIDATING", "to": "FAILED", "trigger": "non-retryable failure or deadline exceeded" },
|
|
48
|
-
{ "from": "BUILDING", "to": "VERIFYING", "trigger": "artifact produced + artifact secret scan clean" },
|
|
49
|
-
{ "from": "BUILDING", "to": "FAILED", "trigger": "build recipe failed or secret scan hit" },
|
|
50
|
-
{ "from": "VERIFYING", "to": "GATING", "trigger": "all candidate checks pass" },
|
|
51
|
-
{ "from": "VERIFYING", "to": "FAILED", "trigger": "a verification check fails (e.g. auth.app-publicly-invocable)" },
|
|
52
|
-
{ "from": "GATING", "to": "LIVE", "trigger": "all gates pass -> atomic alias flip" },
|
|
53
|
-
{ "from": "GATING", "to": "FAILED", "trigger": "a blocking gate fails" },
|
|
54
|
-
{ "from": "LIVE", "to": "AWAITING-PROMOTION", "trigger": "preview only — maker confirms; platform raises PR" },
|
|
55
|
-
{ "from": "AWAITING-PROMOTION", "to": "PROMOTING", "trigger": "human merges PR (no agent-callable path)" },
|
|
41
|
+
{ "from": "ANALYZING", "to": "BUILDING", "environments": ["preview"], "trigger": "nothing to transform (fast path)" },
|
|
42
|
+
{ "from": "ANALYZING", "to": "TRANSFORMING", "environments": ["preview"], "trigger": "transform-relevant findings; 15-min wall deadline stamped" },
|
|
43
|
+
{ "from": "ANALYZING", "to": "FAILED", "environments": ["preview"], "trigger": "hard intake failure" },
|
|
44
|
+
{ "from": "TRANSFORMING", "to": "VALIDATING", "environments": ["preview"], "trigger": "agent produced candidate" },
|
|
45
|
+
{ "from": "TRANSFORMING", "to": "FAILED", "environments": ["preview"], "trigger": "non-retryable failure or deadline exceeded" },
|
|
46
|
+
{ "from": "VALIDATING", "to": "BUILDING", "environments": ["preview"], "trigger": "validation passed" },
|
|
47
|
+
{ "from": "VALIDATING", "to": "TRANSFORMING", "environments": ["preview"], "trigger": "retryable failure AND now < deadline" },
|
|
48
|
+
{ "from": "VALIDATING", "to": "FAILED", "environments": ["preview"], "trigger": "non-retryable failure or deadline exceeded" },
|
|
49
|
+
{ "from": "BUILDING", "to": "VERIFYING", "environments": ["preview"], "trigger": "artifact produced + artifact secret scan clean" },
|
|
50
|
+
{ "from": "BUILDING", "to": "FAILED", "environments": ["preview"], "trigger": "build recipe failed or secret scan hit" },
|
|
51
|
+
{ "from": "VERIFYING", "to": "GATING", "environments": ["preview"], "trigger": "all candidate checks pass" },
|
|
52
|
+
{ "from": "VERIFYING", "to": "FAILED", "environments": ["preview"], "trigger": "a verification check fails (e.g. auth.app-publicly-invocable)" },
|
|
53
|
+
{ "from": "GATING", "to": "LIVE", "environments": ["preview"], "trigger": "all gates pass -> atomic alias flip" },
|
|
54
|
+
{ "from": "GATING", "to": "FAILED", "environments": ["preview"], "trigger": "a blocking gate fails" },
|
|
55
|
+
{ "from": "LIVE", "to": "AWAITING-PROMOTION", "environments": ["preview"], "trigger": "preview only — maker confirms; platform raises PR" },
|
|
56
|
+
{ "from": "AWAITING-PROMOTION", "to": "PROMOTING", "environments": ["preview"], "trigger": "human merges PR (no agent-callable path)" },
|
|
56
57
|
{ "from": "PROMOTING", "to": "LIVE", "trigger": "prod candidate verified -> flip" },
|
|
57
58
|
{ "from": "PROMOTING", "to": "FAILED", "trigger": "candidate verify/migration fails; prod alias never moved" },
|
|
58
|
-
{ "from": "QUEUED", "to": "STALE", "trigger": "newer deploy request passes its guard" },
|
|
59
|
-
{ "from": "ANALYZING", "to": "STALE", "trigger": "newer deploy request passes its guard" },
|
|
60
|
-
{ "from": "TRANSFORMING", "to": "STALE", "trigger": "newer deploy request; survives unless new commit touches transform-relevant files" },
|
|
61
|
-
{ "from": "VALIDATING", "to": "STALE", "trigger": "newer deploy request passes its guard" },
|
|
62
|
-
{ "from": "BUILDING", "to": "STALE", "trigger": "newer deploy request; let finish, skip flip" },
|
|
63
|
-
{ "from": "VERIFYING", "to": "STALE", "trigger": "newer deploy request; let finish, skip flip" },
|
|
64
|
-
{ "from": "GATING", "to": "STALE", "trigger": "newer deploy request passes its guard" }
|
|
59
|
+
{ "from": "QUEUED", "to": "STALE", "environments": ["preview"], "trigger": "newer deploy request passes its guard" },
|
|
60
|
+
{ "from": "ANALYZING", "to": "STALE", "environments": ["preview"], "trigger": "newer deploy request passes its guard" },
|
|
61
|
+
{ "from": "TRANSFORMING", "to": "STALE", "environments": ["preview"], "trigger": "newer deploy request; survives unless new commit touches transform-relevant files" },
|
|
62
|
+
{ "from": "VALIDATING", "to": "STALE", "environments": ["preview"], "trigger": "newer deploy request passes its guard" },
|
|
63
|
+
{ "from": "BUILDING", "to": "STALE", "environments": ["preview"], "trigger": "newer deploy request; let finish, skip flip" },
|
|
64
|
+
{ "from": "VERIFYING", "to": "STALE", "environments": ["preview"], "trigger": "newer deploy request; let finish, skip flip" },
|
|
65
|
+
{ "from": "GATING", "to": "STALE", "environments": ["preview"], "trigger": "newer deploy request passes its guard" }
|
|
65
66
|
]
|
|
66
67
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
|
|
3
|
-
export const States = {
|
|
4
|
-
QUEUED: "QUEUED",
|
|
5
|
-
ANALYZING: "ANALYZING",
|
|
6
|
-
TRANSFORMING: "TRANSFORMING",
|
|
7
|
-
VALIDATING: "VALIDATING",
|
|
8
|
-
BUILDING: "BUILDING",
|
|
9
|
-
VERIFYING: "VERIFYING",
|
|
10
|
-
GATING: "GATING",
|
|
11
|
-
LIVE: "LIVE",
|
|
12
|
-
AWAITINGPROMOTION: "AWAITING-PROMOTION",
|
|
13
|
-
PROMOTING: "PROMOTING",
|
|
14
|
-
FAILED: "FAILED",
|
|
15
|
-
STALE: "STALE",
|
|
16
|
-
};
|
|
17
|
-
const legalTransitions = {
|
|
18
|
-
"QUEUED": { "ANALYZING": true, "FAILED": true, "STALE": true },
|
|
19
|
-
"ANALYZING": { "BUILDING": true, "TRANSFORMING": true, "FAILED": true, "STALE": true },
|
|
20
|
-
"TRANSFORMING": { "VALIDATING": true, "FAILED": true, "STALE": true },
|
|
21
|
-
"VALIDATING": { "BUILDING": true, "TRANSFORMING": true, "FAILED": true, "STALE": true },
|
|
22
|
-
"BUILDING": { "VERIFYING": true, "FAILED": true, "STALE": true },
|
|
23
|
-
"VERIFYING": { "GATING": true, "FAILED": true, "STALE": true },
|
|
24
|
-
"GATING": { "LIVE": true, "FAILED": true, "STALE": true },
|
|
25
|
-
"LIVE": { "AWAITING-PROMOTION": true },
|
|
26
|
-
"AWAITING-PROMOTION": { "PROMOTING": true },
|
|
27
|
-
"PROMOTING": { "LIVE": true, "FAILED": true },
|
|
28
|
-
};
|
|
29
|
-
const terminalStates = new Set(["FAILED", "STALE"]);
|
|
30
|
-
/** True iff from→to is a legal edge in the T1a state machine. */
|
|
31
|
-
export function canTransition(from, to) {
|
|
32
|
-
return Boolean(legalTransitions[from] && legalTransitions[from][to]);
|
|
33
|
-
}
|
|
34
|
-
/** True iff the state is terminal (FAILED, STALE). */
|
|
35
|
-
export function isTerminal(state) { return terminalStates.has(state); }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|