run402 4.4.0 → 4.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/cli.mjs +6 -0
- package/lib/errors.mjs +626 -0
- package/lib/errors.test.mjs +217 -0
- package/package.json +1 -1
- package/sdk/dist/index.d.ts +10 -0
- package/sdk/dist/index.d.ts.map +1 -1
- package/sdk/dist/index.js +10 -0
- package/sdk/dist/index.js.map +1 -1
- package/sdk/dist/namespaces/errors.d.ts +77 -0
- package/sdk/dist/namespaces/errors.d.ts.map +1 -0
- package/sdk/dist/namespaces/errors.js +256 -0
- package/sdk/dist/namespaces/errors.js.map +1 -0
- package/sdk/dist/namespaces/errors.types.d.ts +220 -0
- package/sdk/dist/namespaces/errors.types.d.ts.map +1 -0
- package/sdk/dist/namespaces/errors.types.js +25 -0
- package/sdk/dist/namespaces/errors.types.js.map +1 -0
- package/sdk/dist/namespaces/functions.types.d.ts +12 -0
- package/sdk/dist/namespaces/functions.types.d.ts.map +1 -1
- package/sdk/dist/scoped.d.ts +14 -0
- package/sdk/dist/scoped.d.ts.map +1 -1
- package/sdk/dist/scoped.js +23 -0
- package/sdk/dist/scoped.js.map +1 -1
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `errors` namespace — the release-error-rollup query surface (gateway
|
|
3
|
+
* `release-error-rollup`). The platform's durable, grouped error memory:
|
|
4
|
+
* every 5xx at the invoke choke points is fingerprinted (deploy-stable by
|
|
5
|
+
* normalization) and collapsed into one hot row per distinct failure, each
|
|
6
|
+
* baselined against the previous ACTIVE release.
|
|
7
|
+
*
|
|
8
|
+
* Verdict-first, gateway-authoritative: every page leads with a computed
|
|
9
|
+
* promote-vs-revert verdict, and the SDK NEVER recomputes it. No client-side
|
|
10
|
+
* fingerprinting, no re-baselining, no re-counting of `new_fingerprints` — the
|
|
11
|
+
* gateway's numbers are the truth. `list`/`get` pass the envelope through
|
|
12
|
+
* untouched; `watch` polls and reads `verdict.new_fingerprints`.
|
|
13
|
+
*
|
|
14
|
+
* The promote-gate golden path (run right after an apply/promote activates a
|
|
15
|
+
* release):
|
|
16
|
+
*
|
|
17
|
+
* const w = await r.errors.watch(projectId, { newIn: releaseId });
|
|
18
|
+
* if (!w.clean) {
|
|
19
|
+
* // w.verdict.new_fingerprints > 0 — new error identities under the new
|
|
20
|
+
* // release. w.new_errors carries the grouped rows + fetch_logs drill-downs.
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* `clean === (verdict.new_fingerprints === 0)` — the gateway's count, never a
|
|
24
|
+
* client recount. Exposed both unscoped (`r.errors.list(projectId, …)`) and
|
|
25
|
+
* project-scoped (`r.project(id).errors.list(…)`), mirroring `r.events`.
|
|
26
|
+
*
|
|
27
|
+
* Auth: the addressed project's OWN key (apikey-authed read). A key for a
|
|
28
|
+
* different project gets 403, never a 404 that would confirm existence.
|
|
29
|
+
*/
|
|
30
|
+
import { LocalError } from "../errors.js";
|
|
31
|
+
import { isRun402Error } from "../errors.js";
|
|
32
|
+
import { requireProjectCredentials } from "../project-credentials.js";
|
|
33
|
+
const WATCH_DEFAULT_DURATION_MS = 600_000;
|
|
34
|
+
const WATCH_DEFAULT_INTERVAL_MS = 15_000;
|
|
35
|
+
/** Consecutive tolerated-failure polls before `watch` rethrows the last error. */
|
|
36
|
+
const WATCH_MAX_CONSECUTIVE_FAILURES = 3;
|
|
37
|
+
/** Map {@link ListErrorsOptions} to the wire query string (`newIn` → `new_in`; all else 1:1). */
|
|
38
|
+
function errorsQuery(opts = {}) {
|
|
39
|
+
const params = new URLSearchParams();
|
|
40
|
+
if (opts.since !== undefined)
|
|
41
|
+
params.set("since", opts.since);
|
|
42
|
+
if (opts.until !== undefined)
|
|
43
|
+
params.set("until", opts.until);
|
|
44
|
+
if (opts.function !== undefined)
|
|
45
|
+
params.set("function", opts.function);
|
|
46
|
+
if (opts.kind !== undefined)
|
|
47
|
+
params.set("kind", opts.kind);
|
|
48
|
+
if (opts.fingerprint !== undefined)
|
|
49
|
+
params.set("fingerprint", opts.fingerprint);
|
|
50
|
+
if (opts.newIn !== undefined)
|
|
51
|
+
params.set("new_in", opts.newIn);
|
|
52
|
+
if (opts.limit !== undefined)
|
|
53
|
+
params.set("limit", String(opts.limit));
|
|
54
|
+
if (opts.cursor !== undefined)
|
|
55
|
+
params.set("cursor", opts.cursor);
|
|
56
|
+
const qs = params.toString();
|
|
57
|
+
return qs ? `?${qs}` : "";
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The ONLY error classes `watch` tolerates across polls (so an outage can't
|
|
61
|
+
* masquerade as a clean verdict): a network error (fetch produced no
|
|
62
|
+
* response), a 408/429, or any 5xx. Everything else — a 4xx auth/validation
|
|
63
|
+
* denial, a local credential miss — will not heal on retry and rethrows
|
|
64
|
+
* immediately.
|
|
65
|
+
*/
|
|
66
|
+
function isTransientWatchError(err) {
|
|
67
|
+
if (!isRun402Error(err))
|
|
68
|
+
return false;
|
|
69
|
+
if (err.kind === "network_error")
|
|
70
|
+
return true;
|
|
71
|
+
const s = err.status;
|
|
72
|
+
return s === 408 || s === 429 || (typeof s === "number" && s >= 500);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Sleep `ms`, resolving early if `signal` aborts. setTimeout-based, no busy
|
|
76
|
+
* loop; the timer is always cleared and the listener always removed so no
|
|
77
|
+
* handle is left dangling.
|
|
78
|
+
*/
|
|
79
|
+
function sleepRacingSignal(ms, signal) {
|
|
80
|
+
return new Promise((resolve) => {
|
|
81
|
+
if (signal?.aborted) {
|
|
82
|
+
resolve();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
let timer;
|
|
86
|
+
let settled = false;
|
|
87
|
+
const finish = () => {
|
|
88
|
+
if (settled)
|
|
89
|
+
return;
|
|
90
|
+
settled = true;
|
|
91
|
+
if (timer !== undefined)
|
|
92
|
+
clearTimeout(timer);
|
|
93
|
+
if (signal)
|
|
94
|
+
signal.removeEventListener("abort", finish);
|
|
95
|
+
resolve();
|
|
96
|
+
};
|
|
97
|
+
timer = setTimeout(finish, ms);
|
|
98
|
+
if (signal)
|
|
99
|
+
signal.addEventListener("abort", finish, { once: true });
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
export class Errors {
|
|
103
|
+
client;
|
|
104
|
+
constructor(client) {
|
|
105
|
+
this.client = client;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Read a verdict-first page of a project's grouped error fingerprints
|
|
109
|
+
* (`GET /projects/v1/:project_id/errors`). Filters map 1:1 to wire query
|
|
110
|
+
* params except `newIn` → `new_in`; `newIn` (a release id or `"active"`)
|
|
111
|
+
* drives the verdict's promote-gate `new_fingerprints`. Envelope is passed
|
|
112
|
+
* through untouched. Authorized with the addressed project's OWN key.
|
|
113
|
+
*/
|
|
114
|
+
async list(projectId, opts = {}) {
|
|
115
|
+
if (!projectId) {
|
|
116
|
+
throw new LocalError("errors.list requires a projectId", "reading release error fingerprints");
|
|
117
|
+
}
|
|
118
|
+
const keys = await requireProjectCredentials(this.client, projectId, "reading release error fingerprints");
|
|
119
|
+
return this.client.request(`/projects/v1/${encodeURIComponent(projectId)}/errors${errorsQuery(opts)}`, {
|
|
120
|
+
method: "GET",
|
|
121
|
+
headers: { apikey: keys.service_key },
|
|
122
|
+
withAuth: false,
|
|
123
|
+
context: "reading release error fingerprints",
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Read one fingerprint's full detail — the same row shape as {@link list}
|
|
128
|
+
* with the complete sample ring, a per-sample `fetch_logs` next action, and
|
|
129
|
+
* `also_seen_in_functions` when the hash surfaced under more than one
|
|
130
|
+
* function (`GET /projects/v1/:project_id/errors/:fingerprint_id`). Throws an
|
|
131
|
+
* {@link ApiError} 404 (`RESOURCE_NOT_FOUND`) for an unknown id under an
|
|
132
|
+
* authorized project.
|
|
133
|
+
*/
|
|
134
|
+
async get(projectId, fingerprintId) {
|
|
135
|
+
if (!projectId) {
|
|
136
|
+
throw new LocalError("errors.get requires a projectId", "reading an error fingerprint");
|
|
137
|
+
}
|
|
138
|
+
if (!fingerprintId) {
|
|
139
|
+
throw new LocalError("errors.get requires a fingerprintId", "reading an error fingerprint");
|
|
140
|
+
}
|
|
141
|
+
const keys = await requireProjectCredentials(this.client, projectId, "reading an error fingerprint");
|
|
142
|
+
return this.client.request(`/projects/v1/${encodeURIComponent(projectId)}/errors/${encodeURIComponent(fingerprintId)}`, {
|
|
143
|
+
method: "GET",
|
|
144
|
+
headers: { apikey: keys.service_key },
|
|
145
|
+
withAuth: false,
|
|
146
|
+
context: "reading an error fingerprint",
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The promote-gate poll loop. Run it right after an apply/promote activates a
|
|
151
|
+
* release to watch that release under real traffic. Polls {@link list} with
|
|
152
|
+
* `{ newIn }` immediately, then every `intervalMs`, and does one final poll
|
|
153
|
+
* when the `durationMs` window elapses. With `failFast` (the default), stops
|
|
154
|
+
* the moment a poll reports `verdict.new_fingerprints > 0`.
|
|
155
|
+
*
|
|
156
|
+
* The verdict is the gateway's — `clean === (verdict.new_fingerprints === 0)`
|
|
157
|
+
* is read straight off the last observed page; nothing is recomputed here.
|
|
158
|
+
* `new_errors` is that page's `errors[]` (already server-filtered to
|
|
159
|
+
* first-seen-under-release when `newIn` is passed).
|
|
160
|
+
*
|
|
161
|
+
* Fault tolerance so an outage can't masquerade as a verdict: a 4xx (other
|
|
162
|
+
* than 408/429) rethrows immediately — auth/validation won't heal; network
|
|
163
|
+
* errors, 5xx, 408, and 429 are tolerated, but three CONSECUTIVE failed polls
|
|
164
|
+
* rethrow the last error (a successful poll resets the counter).
|
|
165
|
+
*
|
|
166
|
+
* `signal` aborts cleanly: if at least one poll succeeded, returns the
|
|
167
|
+
* result-so-far with `aborted: true`; if none did, throws a {@link LocalError}.
|
|
168
|
+
*
|
|
169
|
+
* @throws {LocalError} when `projectId` or `opts.newIn` is missing, or when
|
|
170
|
+
* aborted before any poll succeeded.
|
|
171
|
+
*/
|
|
172
|
+
async watch(projectId, opts) {
|
|
173
|
+
if (!projectId) {
|
|
174
|
+
throw new LocalError("errors.watch requires a projectId", "watching release errors");
|
|
175
|
+
}
|
|
176
|
+
if (!opts || !opts.newIn) {
|
|
177
|
+
throw new LocalError('errors.watch requires opts.newIn (a release id or "active")', "watching release errors");
|
|
178
|
+
}
|
|
179
|
+
const durationMs = opts.durationMs ?? WATCH_DEFAULT_DURATION_MS;
|
|
180
|
+
const intervalMs = opts.intervalMs ?? WATCH_DEFAULT_INTERVAL_MS;
|
|
181
|
+
const failFast = opts.failFast ?? true;
|
|
182
|
+
const signal = opts.signal;
|
|
183
|
+
const started = Date.now();
|
|
184
|
+
let polls = 0;
|
|
185
|
+
let consecutiveFailures = 0;
|
|
186
|
+
let lastError;
|
|
187
|
+
let lastPage;
|
|
188
|
+
let aborted = false;
|
|
189
|
+
for (;;) {
|
|
190
|
+
if (signal?.aborted) {
|
|
191
|
+
aborted = true;
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
// Whether THIS poll is the final one (its window budget is already spent).
|
|
195
|
+
const windowElapsed = Date.now() - started >= durationMs;
|
|
196
|
+
let triggered = false;
|
|
197
|
+
try {
|
|
198
|
+
const page = await this.list(projectId, { newIn: opts.newIn });
|
|
199
|
+
consecutiveFailures = 0;
|
|
200
|
+
polls += 1;
|
|
201
|
+
lastPage = page;
|
|
202
|
+
if (opts.onPoll) {
|
|
203
|
+
try {
|
|
204
|
+
opts.onPoll(page, { poll: polls, elapsedMs: Date.now() - started });
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
// A caller's onPoll must never break the watch loop.
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (failFast && page.verdict.new_fingerprints > 0)
|
|
211
|
+
triggered = true;
|
|
212
|
+
}
|
|
213
|
+
catch (err) {
|
|
214
|
+
lastError = err;
|
|
215
|
+
// Won't heal (4xx auth/validation, local credential miss) → surface now.
|
|
216
|
+
if (!isTransientWatchError(err))
|
|
217
|
+
throw err;
|
|
218
|
+
consecutiveFailures += 1;
|
|
219
|
+
// A sustained outage must not read as a verdict.
|
|
220
|
+
if (consecutiveFailures >= WATCH_MAX_CONSECUTIVE_FAILURES)
|
|
221
|
+
throw err;
|
|
222
|
+
}
|
|
223
|
+
if (triggered)
|
|
224
|
+
break;
|
|
225
|
+
if (windowElapsed)
|
|
226
|
+
break; // this was the final poll (success or tolerated failure)
|
|
227
|
+
await sleepRacingSignal(intervalMs, signal);
|
|
228
|
+
if (signal?.aborted) {
|
|
229
|
+
aborted = true;
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
if (!lastPage) {
|
|
234
|
+
// No poll ever succeeded.
|
|
235
|
+
if (aborted) {
|
|
236
|
+
throw new LocalError("errors.watch was aborted before any poll succeeded", "watching release errors", { cause: lastError });
|
|
237
|
+
}
|
|
238
|
+
// Reached only if the window elapsed with zero successful polls.
|
|
239
|
+
if (lastError !== undefined)
|
|
240
|
+
throw lastError;
|
|
241
|
+
throw new LocalError("errors.watch produced no result", "watching release errors");
|
|
242
|
+
}
|
|
243
|
+
const newErrors = lastPage.errors;
|
|
244
|
+
const result = {
|
|
245
|
+
clean: lastPage.verdict.new_fingerprints === 0,
|
|
246
|
+
verdict: lastPage.verdict,
|
|
247
|
+
new_errors: newErrors,
|
|
248
|
+
polls,
|
|
249
|
+
elapsed_ms: Date.now() - started,
|
|
250
|
+
};
|
|
251
|
+
if (aborted)
|
|
252
|
+
result.aborted = true;
|
|
253
|
+
return result;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/namespaces/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,UAAU,EAA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YAC1B,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,IAAI,UAAU,CAClB,oDAAoD,EACpD,yBAAyB,EACzB,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;YACJ,CAAC;YACD,iEAAiE;YACjE,IAAI,SAAS,KAAK,SAAS;gBAAE,MAAM,SAAS,CAAC;YAC7C,MAAM,IAAI,UAAU,CAAC,iCAAiC,EAAE,yBAAyB,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,SAAS,GAAuB,QAAQ,CAAC,MAAM,CAAC;QACtD,MAAM,MAAM,GAAsB;YAChC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,gBAAgB,KAAK,CAAC;YAC9C,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,UAAU,EAAE,SAAS;YACrB,KAAK;YACL,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO;SACjC,CAAC;QACF,IAAI,OAAO;YAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;QACnC,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request/response types for the `errors` namespace — the release-error-rollup
|
|
3
|
+
* query surface (`GET /projects/v1/:project_id/errors` and
|
|
4
|
+
* `GET /projects/v1/:project_id/errors/:fingerprint_id`).
|
|
5
|
+
*
|
|
6
|
+
* The platform keeps a durable, grouped error memory: every 5xx at the
|
|
7
|
+
* gateway's invoke choke points is fingerprinted (normalization-first, so the
|
|
8
|
+
* identity is deploy-stable) and collapsed into one hot row per distinct
|
|
9
|
+
* failure. The read is **verdict-first**: the page leads with a computed
|
|
10
|
+
* promote-vs-revert verdict for the release you name, then the grouped rows.
|
|
11
|
+
*
|
|
12
|
+
* The verdict math is the GATEWAY'S — never recomputed client-side. The SDK
|
|
13
|
+
* never fingerprints, never re-baselines, never re-counts `new_fingerprints`.
|
|
14
|
+
* It passes the envelope through untouched (index signatures keep unknown
|
|
15
|
+
* future fields), and `watch` polls this surface and reads
|
|
16
|
+
* `verdict.new_fingerprints` as the truth.
|
|
17
|
+
*
|
|
18
|
+
* Baseline semantics: `baseline_release_id` is the previous ACTIVE release by
|
|
19
|
+
* ACTIVATION HISTORY (`releases.activated_at`, re-stamped on every activation),
|
|
20
|
+
* NOT lineage — so after A→B→(rollback)→A→C, C's baseline is A and fingerprints
|
|
21
|
+
* first seen under B are not misattributed to C. Cursors are OPAQUE keyset
|
|
22
|
+
* tokens: store `next_cursor` and pass it back as `{ cursor }`, never parse it.
|
|
23
|
+
*/
|
|
24
|
+
/** The choke point that produced an error identity. */
|
|
25
|
+
export type ErrorKind = "uncaught" | "boot_crash" | "invoke_failed" | "handled_5xx";
|
|
26
|
+
/**
|
|
27
|
+
* How much signal a fingerprint's identity carries.
|
|
28
|
+
* - `frame_names` — full fidelity: ≥1 stable stack frame name survived.
|
|
29
|
+
* - `message_only` — normalized message template, no stable frames.
|
|
30
|
+
* - `coarse` — no error detail at all (the function predates the error
|
|
31
|
+
* side-channel). Redeploying the function upgrades FUTURE occurrences to
|
|
32
|
+
* full fidelity; already-recorded coarse rows stay coarse.
|
|
33
|
+
*/
|
|
34
|
+
export type FingerprintQuality = "frame_names" | "message_only" | "coarse";
|
|
35
|
+
/**
|
|
36
|
+
* A platform-synthesized drill-down attached to a fingerprint. Today the only
|
|
37
|
+
* type is `fetch_logs`, carrying the exact `run402 logs <fn> --request-id
|
|
38
|
+
* <sample_id>` command for a sample occurrence. Rendering an action must never
|
|
39
|
+
* execute it. Unknown future fields pass through via the index signature.
|
|
40
|
+
*/
|
|
41
|
+
export interface ErrorNextAction {
|
|
42
|
+
type: string;
|
|
43
|
+
command?: string;
|
|
44
|
+
why?: string;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* One occurrence pointer. The `id` is a fetchable request/run id
|
|
49
|
+
* (`req_…` / `fnrun_…` / `fnatt_…`) accepted by the function-diagnostics logs
|
|
50
|
+
* surface; `release_id` is the release the occurrence was attributed to (null
|
|
51
|
+
* when the platform had no release context at ingest).
|
|
52
|
+
*/
|
|
53
|
+
export interface ErrorSample {
|
|
54
|
+
id: string;
|
|
55
|
+
at: string;
|
|
56
|
+
release_id: string | null;
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The sample set for a fingerprint. `first` is the pinned first occurrence
|
|
61
|
+
* (diagnostic gold — never overwritten); `recent` is a newest-first ring
|
|
62
|
+
* capped at 10. The list view carries this trimmed set; {@link Errors.get}
|
|
63
|
+
* returns the full ring.
|
|
64
|
+
*/
|
|
65
|
+
export interface ErrorSamples {
|
|
66
|
+
first: ErrorSample;
|
|
67
|
+
recent: ErrorSample[];
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
}
|
|
70
|
+
/** One grouped error identity — a hot row that collapses an error storm. */
|
|
71
|
+
export interface ErrorFingerprint {
|
|
72
|
+
/** Stable identity hash (`fp_…`). Also the `fingerprint` filter/param value. */
|
|
73
|
+
fingerprint_id: string;
|
|
74
|
+
/** The function the error surfaced in. */
|
|
75
|
+
function: string;
|
|
76
|
+
kind: ErrorKind;
|
|
77
|
+
fingerprint_quality: FingerprintQuality;
|
|
78
|
+
/** Error class/type name (a JS builtin kept verbatim, else `CustomError`, or the Lambda errorType). */
|
|
79
|
+
error_name: string;
|
|
80
|
+
/** Normalized, low-cardinality message template (high-cardinality tokens scrubbed). */
|
|
81
|
+
message_template: string;
|
|
82
|
+
/** Up to 3 stable stack frame NAMES — never line/column, wrapper, or minified frames. */
|
|
83
|
+
stable_frames: string[];
|
|
84
|
+
/** Total occurrences collapsed into this row. */
|
|
85
|
+
count: number;
|
|
86
|
+
first_seen: string;
|
|
87
|
+
last_seen: string;
|
|
88
|
+
first_seen_release_id: string | null;
|
|
89
|
+
last_seen_release_id: string | null;
|
|
90
|
+
samples: ErrorSamples;
|
|
91
|
+
next_actions: ErrorNextAction[];
|
|
92
|
+
[key: string]: unknown;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The detail row from {@link Errors.get}: the same shape as a list row with the
|
|
96
|
+
* FULL sample ring, a per-sample `fetch_logs` next action, and — when the same
|
|
97
|
+
* fingerprint hash surfaced under more than one function — the sibling function
|
|
98
|
+
* names in `also_seen_in_functions`.
|
|
99
|
+
*/
|
|
100
|
+
export interface ErrorFingerprintDetail extends ErrorFingerprint {
|
|
101
|
+
also_seen_in_functions?: string[];
|
|
102
|
+
}
|
|
103
|
+
/** The window the verdict + listing were computed over (resolved gateway-side). */
|
|
104
|
+
export interface ErrorsWindow {
|
|
105
|
+
since: string;
|
|
106
|
+
until: string;
|
|
107
|
+
[key: string]: unknown;
|
|
108
|
+
}
|
|
109
|
+
/** Fingerprint-quality coverage across the project's functions. */
|
|
110
|
+
export interface ErrorsCoverage {
|
|
111
|
+
/** Functions emitting the full-fidelity error side-channel. */
|
|
112
|
+
full_fidelity_functions: number;
|
|
113
|
+
/** Functions still fingerprinting coarsely (redeploy to upgrade). */
|
|
114
|
+
coarse_functions: number;
|
|
115
|
+
[key: string]: unknown;
|
|
116
|
+
}
|
|
117
|
+
/** Row-cap disclosure so at-cap eviction is never silent. */
|
|
118
|
+
export interface ErrorsRowCap {
|
|
119
|
+
limit: number;
|
|
120
|
+
at_cap: boolean;
|
|
121
|
+
[key: string]: unknown;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The computed promote-vs-revert verdict — the head of every errors page.
|
|
125
|
+
*
|
|
126
|
+
* With a `new_in` release, `new_fingerprints` counts error IDENTITIES first
|
|
127
|
+
* seen UNDER that release (the promote-gate signal); without one it counts
|
|
128
|
+
* identities first seen within the window. `invocations_in_window` pairs the
|
|
129
|
+
* counts with real traffic so "0 errors over 0 traffic" is distinguishable
|
|
130
|
+
* from a healthy release. Every number here is the gateway's — the SDK never
|
|
131
|
+
* recomputes them.
|
|
132
|
+
*/
|
|
133
|
+
export interface ErrorsVerdict {
|
|
134
|
+
window: ErrorsWindow;
|
|
135
|
+
/** The `new_in` release (the resolved id when `new_in="active"`); null when no `new_in` was given. */
|
|
136
|
+
compared_release_id: string | null;
|
|
137
|
+
/** Previous ACTIVE release by activation history (rollback-safe); null when none / no `new_in`. */
|
|
138
|
+
baseline_release_id: string | null;
|
|
139
|
+
new_fingerprints: number;
|
|
140
|
+
recurring_fingerprints: number;
|
|
141
|
+
invocations_in_window: number;
|
|
142
|
+
coverage: ErrorsCoverage;
|
|
143
|
+
row_cap: ErrorsRowCap;
|
|
144
|
+
[key: string]: unknown;
|
|
145
|
+
}
|
|
146
|
+
/** One page of grouped errors, verdict-first. */
|
|
147
|
+
export interface ErrorsPage {
|
|
148
|
+
verdict: ErrorsVerdict;
|
|
149
|
+
errors: ErrorFingerprint[];
|
|
150
|
+
has_more: boolean;
|
|
151
|
+
/** Opaque keyset cursor for the next page. Present only when `has_more`. */
|
|
152
|
+
next_cursor?: string;
|
|
153
|
+
[key: string]: unknown;
|
|
154
|
+
}
|
|
155
|
+
/** Options for {@link Errors.list}. All filters map 1:1 to wire query params except `newIn` → `new_in`. */
|
|
156
|
+
export interface ListErrorsOptions {
|
|
157
|
+
/** ISO-8601 window start. Default (gateway-side): `until` − 24h. */
|
|
158
|
+
since?: string;
|
|
159
|
+
/** ISO-8601 window end. Default (gateway-side): now. */
|
|
160
|
+
until?: string;
|
|
161
|
+
/** Restrict to one function by name. */
|
|
162
|
+
function?: string;
|
|
163
|
+
/** Restrict to one choke-point class. */
|
|
164
|
+
kind?: ErrorKind;
|
|
165
|
+
/** Restrict to one fingerprint identity (`fp_…`). */
|
|
166
|
+
fingerprint?: string;
|
|
167
|
+
/**
|
|
168
|
+
* A release id, or the literal `"active"` (resolves to the live release
|
|
169
|
+
* gateway-side). Selects rows first seen UNDER that release and drives the
|
|
170
|
+
* verdict's `new_fingerprints` / baseline. Wire param: `new_in`.
|
|
171
|
+
*/
|
|
172
|
+
newIn?: string;
|
|
173
|
+
/** Page size (server default 50, max 200). */
|
|
174
|
+
limit?: number;
|
|
175
|
+
/** Opaque keyset cursor from a prior page's `next_cursor`. */
|
|
176
|
+
cursor?: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Options for {@link Errors.watch} — the promote-gate poll loop. `newIn` is
|
|
180
|
+
* REQUIRED (the release under scrutiny). The loop polls immediately, then every
|
|
181
|
+
* `intervalMs`, and does one final poll when the window elapses.
|
|
182
|
+
*/
|
|
183
|
+
export interface WatchErrorsOptions {
|
|
184
|
+
/** The release to watch — a release id, or `"active"`. Required. */
|
|
185
|
+
newIn: string;
|
|
186
|
+
/** Total watch window in ms before returning the last verdict. Default 600_000 (10 min). */
|
|
187
|
+
durationMs?: number;
|
|
188
|
+
/** Poll cadence in ms. NOT clamped by the SDK (callers/tests may go fast). Default 15_000. */
|
|
189
|
+
intervalMs?: number;
|
|
190
|
+
/** Abort the watch cleanly. If ≥1 poll succeeded, returns the result-so-far with `aborted: true`. */
|
|
191
|
+
signal?: AbortSignal;
|
|
192
|
+
/** Called after each SUCCESSFUL poll with the page and progress metadata. Throwing from it never breaks the loop. */
|
|
193
|
+
onPoll?: (page: ErrorsPage, meta: {
|
|
194
|
+
poll: number;
|
|
195
|
+
elapsedMs: number;
|
|
196
|
+
}) => void;
|
|
197
|
+
/** Stop the moment a poll reports `verdict.new_fingerprints > 0`. Default true. */
|
|
198
|
+
failFast?: boolean;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Result of {@link Errors.watch}. `clean` is `verdict.new_fingerprints === 0`
|
|
202
|
+
* on the last observed page — the gateway's number, never a client recount.
|
|
203
|
+
* `new_errors` is the `errors[]` of the final/triggering page (already
|
|
204
|
+
* server-filtered to first-seen-under-release when `newIn` was passed).
|
|
205
|
+
*/
|
|
206
|
+
export interface WatchErrorsResult {
|
|
207
|
+
/** True iff the last verdict reported zero new fingerprints. The promote-gate pass/fail. */
|
|
208
|
+
clean: boolean;
|
|
209
|
+
/** The last verdict observed (final poll, or the fail-fast triggering poll). */
|
|
210
|
+
verdict: ErrorsVerdict;
|
|
211
|
+
/** The grouped errors from the final/triggering page. */
|
|
212
|
+
new_errors: ErrorFingerprint[];
|
|
213
|
+
/** Number of successful polls performed. */
|
|
214
|
+
polls: number;
|
|
215
|
+
/** Wall-clock ms the watch ran. */
|
|
216
|
+
elapsed_ms: number;
|
|
217
|
+
/** Present and true only when the watch ended because its `signal` aborted. */
|
|
218
|
+
aborted?: boolean;
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=errors.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.types.d.ts","sourceRoot":"","sources":["../../src/namespaces/errors.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,uDAAuD;AACvD,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,eAAe,GAAG,aAAa,CAAC;AAEpF;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,cAAc,GAAG,QAAQ,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AA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AC,EAAE,MAAM,CAAC;IACpB,8FAA8F;IAC9F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,qHAAqH;IACrH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,4FAA4F;IAC5F,KAAK,EAAE,OAAO,CAAC;IACf,gFAAgF;IAChF,OAAO,EAAE,aAAa,CAAC;IACvB,yDAAyD;IACzD,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request/response types for the `errors` namespace — the release-error-rollup
|
|
3
|
+
* query surface (`GET /projects/v1/:project_id/errors` and
|
|
4
|
+
* `GET /projects/v1/:project_id/errors/:fingerprint_id`).
|
|
5
|
+
*
|
|
6
|
+
* The platform keeps a durable, grouped error memory: every 5xx at the
|
|
7
|
+
* gateway's invoke choke points is fingerprinted (normalization-first, so the
|
|
8
|
+
* identity is deploy-stable) and collapsed into one hot row per distinct
|
|
9
|
+
* failure. The read is **verdict-first**: the page leads with a computed
|
|
10
|
+
* promote-vs-revert verdict for the release you name, then the grouped rows.
|
|
11
|
+
*
|
|
12
|
+
* The verdict math is the GATEWAY'S — never recomputed client-side. The SDK
|
|
13
|
+
* never fingerprints, never re-baselines, never re-counts `new_fingerprints`.
|
|
14
|
+
* It passes the envelope through untouched (index signatures keep unknown
|
|
15
|
+
* future fields), and `watch` polls this surface and reads
|
|
16
|
+
* `verdict.new_fingerprints` as the truth.
|
|
17
|
+
*
|
|
18
|
+
* Baseline semantics: `baseline_release_id` is the previous ACTIVE release by
|
|
19
|
+
* ACTIVATION HISTORY (`releases.activated_at`, re-stamped on every activation),
|
|
20
|
+
* NOT lineage — so after A→B→(rollback)→A→C, C's baseline is A and fingerprints
|
|
21
|
+
* first seen under B are not misattributed to C. Cursors are OPAQUE keyset
|
|
22
|
+
* tokens: store `next_cursor` and pass it back as `{ cursor }`, never parse it.
|
|
23
|
+
*/
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=errors.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.types.js","sourceRoot":"","sources":["../../src/namespaces/errors.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG"}
|
|
@@ -221,6 +221,18 @@ export interface FunctionSummary {
|
|
|
221
221
|
* regime (see the companion `drop-functions-layer-and-fix-deps` change).
|
|
222
222
|
*/
|
|
223
223
|
runtime_version?: string | null;
|
|
224
|
+
/**
|
|
225
|
+
* The `@run402/functions` version the gateway injects into new function
|
|
226
|
+
* deployments. `null` when the gateway cannot resolve its installed
|
|
227
|
+
* package version; omitted by older gateways.
|
|
228
|
+
*/
|
|
229
|
+
runtime_current_version?: string | null;
|
|
230
|
+
/**
|
|
231
|
+
* Minimum injected `@run402/functions` version guaranteed by the gateway.
|
|
232
|
+
* Use this to determine whether a helper surface is platform-guaranteed,
|
|
233
|
+
* independently of the version recorded on this deployed function.
|
|
234
|
+
*/
|
|
235
|
+
runtime_minimum_version?: string;
|
|
224
236
|
/**
|
|
225
237
|
* Resolved direct user dependency versions from `--deps`. Map of dep
|
|
226
238
|
* name → actually-installed concrete version. `{}` for empty-deps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.types.d.ts","sourceRoot":"","sources":["../../src/namespaces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;AAEnE,qEAAqE;AACrE,MAAM,WAAW,0BAA0B;IACzC,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,OAAO,EAAE,yBAAyB,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC/C"}
|
package/sdk/dist/scoped.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import type { ManagedJobLogsOptions, ManagedJobLogsResponse, ManagedJobPurgeResp
|
|
|
31
31
|
import type { DeleteSecretResult, SecretListResult, SecretSetOptions } from "./namespaces/secrets.js";
|
|
32
32
|
import type { CreateGrantInput, GrantCreateResult, GrantRevokeResult } from "./namespaces/grants.types.js";
|
|
33
33
|
import type { ListEventsOptions, ProjectEventFeedPage } from "./namespaces/events.types.js";
|
|
34
|
+
import type { ErrorFingerprintDetail, ErrorsPage, ListErrorsOptions, WatchErrorsOptions, WatchErrorsResult } from "./namespaces/errors.types.js";
|
|
34
35
|
import type { ProjectArchiveCreateOptions, ProjectArchiveDownload, ProjectArchiveDto, ProjectArchiveExportOptions, ProjectArchiveExportResult, ProjectArchiveWaitOptions } from "./namespaces/archives.types.js";
|
|
35
36
|
import type { ProjectSnapshotDto, ProjectSnapshotsListOptions, ProjectSnapshotsListResult, SnapshotRestoreOptions, SnapshotRestorePlanEnvelope, SnapshotRestoreResult } from "./namespaces/snapshots.types.js";
|
|
36
37
|
import type { ProjectBranchCreateOptions, ProjectBranchCreateResult, ProjectBranchDto, ProjectBranchesListResult, ProjectBranchRenewOptions } from "./namespaces/branches.types.js";
|
|
@@ -101,6 +102,17 @@ declare class ScopedEvents {
|
|
|
101
102
|
/** Read a page of this project's events feed (cursor is opaque — store and echo). */
|
|
102
103
|
list(opts?: ListEventsOptions): Promise<ProjectEventFeedPage>;
|
|
103
104
|
}
|
|
105
|
+
declare class ScopedErrors {
|
|
106
|
+
private readonly parent;
|
|
107
|
+
private readonly projectId;
|
|
108
|
+
constructor(parent: Run402, projectId: string);
|
|
109
|
+
/** Read a verdict-first page of this project's grouped error fingerprints. */
|
|
110
|
+
list(opts?: ListErrorsOptions): Promise<ErrorsPage>;
|
|
111
|
+
/** Read one fingerprint's full detail (all samples + per-sample drill-downs). */
|
|
112
|
+
get(fingerprintId: string): Promise<ErrorFingerprintDetail>;
|
|
113
|
+
/** Run the promote-gate poll loop against a release (`{ newIn }` required). */
|
|
114
|
+
watch(opts: WatchErrorsOptions): Promise<WatchErrorsResult>;
|
|
115
|
+
}
|
|
104
116
|
declare class ScopedArchives {
|
|
105
117
|
private readonly parent;
|
|
106
118
|
private readonly projectId;
|
|
@@ -416,6 +428,8 @@ export declare class ScopedRun402 {
|
|
|
416
428
|
readonly grants: ScopedGrants;
|
|
417
429
|
/** Cursored project events feed, project-id pre-bound. */
|
|
418
430
|
readonly events: ScopedEvents;
|
|
431
|
+
/** Release-error-rollup query surface (list / get / watch), project-id pre-bound. */
|
|
432
|
+
readonly errors: ScopedErrors;
|
|
419
433
|
readonly archives: ScopedArchives;
|
|
420
434
|
readonly snapshots: ScopedSnapshots;
|
|
421
435
|
readonly branches: ScopedBranches;
|