@adonis-agora/durable 0.38.0 → 0.38.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @adonis-agora/durable
2
2
 
3
+ ## 0.38.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#128](https://github.com/DavideCarvalho/adonis-agora-durable/pull/128) [`0968a3e`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/0968a3e6512381f2594b642aa0d0bca3e728c15f) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `attachDurableOtel`'s root span now closes (error status, matching `run.failed`) when a run parks `blocked` via `capability.unavailable`/`protocol.incompatible`, instead of leaking — those two events never previously reached `endRoot()`, so a run stuck waiting on a missing capability or an incompatible worker fleet held its root span (and its entry in the bridge's internal `roots` Map) open for the rest of the process's life. Resuming a blocked run doesn't re-emit `run.started`, so no second root span opens for it later.
8
+
3
9
  ## 0.38.0
4
10
 
5
11
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  /** Keep in sync with this package's `version` in package.json. */
2
- export declare const VERSION = "0.38.0";
2
+ export declare const VERSION = "0.38.1";
3
3
  export type { AccessDeniedInfo, AccessDeniedPageOptions, AccessDeniedReason, } from './access_denied_page.js';
4
4
  export { CONSOLE as ACCESS_DENIED_CONSOLE, escapeHtml, renderAccessDeniedPage, resolveAccessDeniedPage, } from './access_denied_page.js';
5
5
  export type { AuthMode, DashboardAuthOptions, LoginHook, LoginOutcome, ResolvedDashboardAuth, SessionHook, SessionOutcome, } from './auth.js';
@@ -1,5 +1,5 @@
1
1
  /** Keep in sync with this package's `version` in package.json. */
2
- export const VERSION = '0.38.0';
2
+ export const VERSION = '0.38.1';
3
3
  // The built-in "access denied" page (what a browser sees on a refused page navigation).
4
4
  export { CONSOLE as ACCESS_DENIED_CONSOLE, escapeHtml, renderAccessDeniedPage, resolveAccessDeniedPage, } from './access_denied_page.js';
5
5
  // Built-in `dashboardAuth` login screen (optional; opt-in via `config/durable_dashboard.ts`).
@@ -1,5 +1,5 @@
1
1
  /** Keep in sync with this package's `version` in package.json. */
2
- export declare const VERSION = "0.38.0";
2
+ export declare const VERSION = "0.38.1";
3
3
  export { configure } from '../configure.js';
4
4
  export * from './admission.js';
5
5
  export type { AdmissionContext, AdmissionFactory, RedisAdmissionConfig, } from './admissions/factory.js';
package/dist/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Keep in sync with this package's `version` in package.json. */
2
- export const VERSION = '0.38.0';
2
+ export const VERSION = '0.38.1';
3
3
  // Re-export the configure hook from the package root so `node ace configure` finds it.
4
4
  // AdonisJS imports the package MAIN and reads `configure` off the module namespace —
5
5
  // the `./configure` subpath alone is never consulted.
@@ -1 +1 @@
1
- {"version":3,"file":"durable-otel.d.ts","sourceRoot":"","sources":["../../../src/otel/durable-otel.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,cAAc,EAEpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,kBAAuB,GAC/B,MAAM,IAAI,CA2EZ"}
1
+ {"version":3,"file":"durable-otel.d.ts","sourceRoot":"","sources":["../../../src/otel/durable-otel.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,cAAc,EAEpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,kBAAuB,GAC/B,MAAM,IAAI,CAwFZ"}
@@ -68,6 +68,19 @@ export function attachDurableOtel(engine, options = {}) {
68
68
  case 'run.failed':
69
69
  endRoot(event, { error: true, message: event.error?.message });
70
70
  break;
71
+ case 'capability.unavailable':
72
+ case 'protocol.incompatible':
73
+ // The run parked `blocked` (design §7.5/§7.6) — like a suspend, this is a resting state, not a
74
+ // fresh execution, so the blocked-recovery poll's eventual resume does NOT re-emit `run.started`
75
+ // (engine.ts only fires it from `pending`, and a blocked run resumes from `blocked`). Without
76
+ // closing here, this root would NEVER see another lifecycle event — `run.completed`/`failed`/
77
+ // `suspended` are the only other cases that end it — leaking the span (and this Map entry) for
78
+ // as long as the process lives whenever a run blocks on a missing capability/protocol and either
79
+ // never recovers or recovers on a leg with no further blocking. Mark it error: unlike a normal
80
+ // suspend, this is the engine's LOUD diagnostic for a fleet that (at least momentarily) can't
81
+ // serve the run.
82
+ endRoot(event, { error: true, message: event.error?.message });
83
+ break;
71
84
  }
72
85
  });
73
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"durable-otel.js","sourceRoot":"","sources":["../../../src/otel/durable-otel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,cAAc,EAGd,KAAK,GACN,MAAM,oBAAoB,CAAC;AAU5B;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAsB,EACtB,OAAO,GAAuB,EAAE;IAEhC,MAAM,MAAM,GACV,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC,SAAS,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IAC5F,MAAM,KAAK,GAAG,IAAI,GAAG,EAAgB,CAA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durable cross-app workflows for AdonisJS — deterministic replay engine, AdonisJS binding, ace commands, dashboard, OpenTelemetry, Telescope, testing harness and Redis admission, all in one package. Part of the Agora ecosystem.",
5
5
  "license": "MIT",
6
6
  "repository": {