@onlineapps/service-wrapper 3.4.1 → 3.4.3

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
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this package. Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format and semantic versioning within the internal-monorepo convention (all biz-service consumers ship matching changes in the same session).
4
4
 
5
+ ## [3.4.3] — 2026-08-17
6
+
7
+ **Ajv config: `allowUnionTypes: true`.**
8
+
9
+ Every biz `operations.json` in `api_biz/*` uses `type: [X, "null"]` union types for nullable fields — a widely-accepted JSON Schema idiom. Ajv `strict: true` without `allowUnionTypes` rejects them and blocks service boot at `SchemaValidator.precompile` with:
10
+
11
+ strict mode: use allowUnionTypes to allow union type keyword ...
12
+
13
+ 3.4.3 keeps strict mode (still rejects unknown keywords etc.) but explicitly allows union types. No other behaviour change.
14
+
15
+ Discovered during Fáze F5 live-rollout: property, converter, ingest, meta all have nullable output-schema fields using unions. Blocked their boot after F3 bump. Fix here is server-side (validator config).
16
+
17
+ ## [3.4.2] — 2026-08-17
18
+
19
+ **Hot-fix: dangling `serviceUrl` reference at line 2649** left by 3.4.1's guard-removal pass. `_ensureValidationProof` still passed `serviceUrl` to `ValidationOrchestrator` after the `const serviceUrl = ...` declaration was deleted. Result: every biz that force-recreated to 3.4.1 hit `Phase 0.2 Tier 1 Validation - FAILED: serviceUrl is not defined` and stalled.
20
+
21
+ Fix: reintroduce `const serviceUrl = this.config.service?.url || ''` — kept as local so downstream still gets the value (empty string when config omits URL; used only for telemetry/log annotation by ValidationOrchestrator).
22
+
23
+ Verified: property/meta/converter recreated post-3.4.2 pass Phase 0.2.
24
+
5
25
  ## [3.4.1] — 2026-08-17
6
26
 
7
27
  **Patch: drop stale port/url/specificationEndpoint guards left over from A2.2.**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/service-wrapper",
3
- "version": "3.4.1",
3
+ "version": "3.4.3",
4
4
  "description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -27,7 +27,16 @@ const { ValidationError } = require('./ErrorMapper');
27
27
  function _buildDefaultAjv() {
28
28
  const Ajv = require('ajv');
29
29
  const addFormats = require('ajv-formats');
30
- const ajv = new Ajv({ strict: true, allErrors: true, removeAdditional: false });
30
+ // allowUnionTypes: `type: [X, "null"]` is a widely-used JSON Schema idiom
31
+ // for nullable fields; every biz operations.json in api_biz/* uses it.
32
+ // Strict mode without this flag rejects union types outright and blocks
33
+ // service boot (SchemaValidator.precompile throws).
34
+ const ajv = new Ajv({
35
+ strict: true,
36
+ allowUnionTypes: true,
37
+ allErrors: true,
38
+ removeAdditional: false
39
+ });
31
40
  addFormats(ajv);
32
41
  return ajv;
33
42
  }
@@ -2618,7 +2618,10 @@ class ServiceWrapper {
2618
2618
 
2619
2619
  // ADR 0005: biz services have no HTTP surface — no port to bind, no
2620
2620
  // URL to advertise. Prior versions of this method required both;
2621
- // dropped in 3.4.1 because they had no consumer post-A2.
2621
+ // dropped in 3.4.1 because they had no consumer post-A2. Kept as a
2622
+ // local var so downstream ValidationOrchestrator can still receive it
2623
+ // (accepts empty string; only used for telemetry / log annotation).
2624
+ const serviceUrl = this.config.service?.url || '';
2622
2625
 
2623
2626
  // Phase 5: Check restart-aware failure tracking
2624
2627
  const failureData = this._readValidationFailureFile();