@ultimat3/core 13.0.0 → 15.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/core",
3
- "version": "13.0.0",
3
+ "version": "15.0.0",
4
4
  "description": "Ultimate's foundation: errors, context, env, config, clock, ids, logging, telemetry, lifecycle",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,6 +8,7 @@
8
8
  // one place and not the other fails the build instead of quietly disagreeing at runtime.
9
9
 
10
10
  import { registerErrorCodes } from './error-codes';
11
+ import { registerErrorRetry } from './error-retry';
11
12
 
12
13
  /** Mirrors `SCHEMA_ERROR_CODES` in `packages/schema/src/errors.ts`. Keep the titles identical. */
13
14
  export const SCHEMA_ERROR_CODE_TITLES: Readonly<Record<string, string>> = Object.freeze({
@@ -26,3 +27,23 @@ registerErrorCodes(
26
27
  Object.entries(SCHEMA_ERROR_CODE_TITLES).map(([code, title]) => [code, { title }]),
27
28
  ),
28
29
  );
30
+
31
+ // And how each is RETRIED, here for the same tier reason the titles are here.
32
+ //
33
+ // Every one is LISTED rather than left to the default, which is the lesson `packages/jobs/src/
34
+ // errors.ts` writes up for its own six terminal webhook codes: `classifyThrown` reads an
35
+ // unregistered code as UNCLASSIFIED, so the attempt count governs and a schema refusal raised
36
+ // inside a job body burns the whole retry policy re-proving an answer no attempt can change.
37
+ //
38
+ // Measured cost before this: `@ultimat3/scraping` spent FIVE browser launches on a page carrying
39
+ // a `<div constructor="...">` — five navigations, five arrivals at a login — and dead-lettered
40
+ // reporting that the browser went away, about a browser that answered perfectly.
41
+ // `packages/scraping/src/cdp-target.ts` names the gap and says it cannot be closed from there.
42
+ //
43
+ // A value that does not match its schema does not match it on attempt five either.
44
+ registerErrorRetry({
45
+ X_VALIDATION_FAILED: 'terminal',
46
+ X_SCHEMA_UNSUPPORTED: 'terminal',
47
+ X_SCHEMA_DISCRIMINANT_INVALID: 'terminal',
48
+ X_SCHEMA_DEFAULT_UNSHAREABLE: 'terminal',
49
+ });