gencow 0.1.224 → 0.1.225
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/lib/deployment-operation-poll.mjs +16 -3
- package/package.json +3 -3
- package/runtime/server.mjs +3766 -2568
- package/server/index.js.map +7 -0
|
@@ -2,6 +2,7 @@ import { readJsonObjectResponse } from "./http-response-json.mjs";
|
|
|
2
2
|
|
|
3
3
|
const PENDING_STATES = new Set(["accepted", "queued", "running"]);
|
|
4
4
|
const TERMINAL_STATES = new Set(["succeeded", "failed", "blocked", "cancelled"]);
|
|
5
|
+
const TERMINAL_FAILURE_STATES = new Set(["failed", "blocked"]);
|
|
5
6
|
const OPERATION_ID = /^[1-9][0-9]*$/u;
|
|
6
7
|
const CORRELATION_ID = /^[A-Za-z0-9_-]{8,128}$/u;
|
|
7
8
|
const APP_NAME = /^[a-z0-9][a-z0-9-]{0,62}$/u;
|
|
@@ -63,12 +64,24 @@ function isNonterminalResponse(response, body, identity) {
|
|
|
63
64
|
);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
function
|
|
67
|
+
function isMatchingTerminalPinnedFailure(response, identity, expected) {
|
|
67
68
|
return (
|
|
68
69
|
expected.operationId !== null &&
|
|
69
70
|
Number.isInteger(response?.status) &&
|
|
70
71
|
response.status >= 500 &&
|
|
71
|
-
response.status <= 599
|
|
72
|
+
response.status <= 599 &&
|
|
73
|
+
TERMINAL_FAILURE_STATES.has(identity.state) &&
|
|
74
|
+
identityIsValid(identity, expected, false)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function isTransientPinnedOperationRead(response, identity, expected) {
|
|
79
|
+
return (
|
|
80
|
+
expected.operationId !== null &&
|
|
81
|
+
Number.isInteger(response?.status) &&
|
|
82
|
+
response.status >= 500 &&
|
|
83
|
+
response.status <= 599 &&
|
|
84
|
+
!isMatchingTerminalPinnedFailure(response, identity, expected)
|
|
72
85
|
);
|
|
73
86
|
}
|
|
74
87
|
|
|
@@ -171,7 +184,7 @@ export async function pollAcceptedDeploymentOperation({
|
|
|
171
184
|
// Once the server has sealed the operation identity, a gateway/database
|
|
172
185
|
// read failure cannot safely be presented as that operation's terminal
|
|
173
186
|
// result. Keep polling the same receipt; never submit a second deploy.
|
|
174
|
-
if (isTransientPinnedOperationRead(response, expected)) {
|
|
187
|
+
if (isTransientPinnedOperationRead(response, identity, expected)) {
|
|
175
188
|
if (nowImpl() >= deadlineMs) return pendingResponse();
|
|
176
189
|
const retryAfter = Number(response.headers?.get?.("Retry-After"));
|
|
177
190
|
const retryDelayMs =
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gencow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.225",
|
|
4
4
|
"description": "Gencow — AI Backend Engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^25.9.5",
|
|
35
35
|
"better-auth": "^1.6.23",
|
|
36
|
+
"@gencow/core": "0.1.43",
|
|
36
37
|
"@gencow/client": "0.2.7",
|
|
37
|
-
"@gencow/react": "0.2.7"
|
|
38
|
-
"@gencow/core": "0.1.43"
|
|
38
|
+
"@gencow/react": "0.2.7"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"prebuild": "pnpm --filter @gencow/migration-contract run build && pnpm --filter @gencow/server run build",
|