@justair/justair-library 7.3.0-alpha.0df53d8 → 7.3.0-alpha.57848e2

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": "@justair/justair-library",
3
- "version": "7.3.0-alpha.0df53d8",
3
+ "version": "7.3.0-alpha.57848e2",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -151,10 +151,11 @@ export const PARAMETERS = {
151
151
  origin: null,
152
152
  impacts: null,
153
153
  },
154
- // JA-3058: T/RH are enclosure-internal (corrections + fog detection only); T_AMB/RH_AMB are true
155
- // ambient and the only ones safe for public display or Heat Index. Never substitute one for the
156
- // other. DP is already ambient today; DP_AMB is declared for symmetry with its role unresolved.
157
- // Nothing consumes an _AMB id yet — see "Ambient vs internal met parameters" in CLAUDE.md first.
154
+ // ---- Meteorological parameters (T, RH, DP and their _AMB pairs) ----
155
+ // JA-3058: bare ids (T/RH/DP) are enclosure-internal, for corrections and fog detection only.
156
+ // The _AMB ids are true ambient and the only ones safe for public display or Heat Index. Never
157
+ // substitute one for the other. Caveat: five suppliers still write outdoor dew point into DP;
158
+ // JA-3061 re-points them. See "Ambient vs internal met parameters" in CLAUDE.md before wiring up.
158
159
  DP: {
159
160
  id: "DP",
160
161
  label: "Dew Point",
@@ -69,6 +69,20 @@ function sharedAssertions(constants) {
69
69
 
70
70
  describe("PARAMETERS", () => {
71
71
  sharedAssertions(PARAMETERS);
72
+
73
+ // JA-3060: Processing-Engine hardcodes these ids, so lock the ambient/internal pairing.
74
+ const ambientKeys = Object.keys(PARAMETERS).filter((key) => key.endsWith("_AMB"));
75
+
76
+ test("every met parameter has an ambient counterpart", () => {
77
+ expect(ambientKeys.sort()).toEqual(["DP_AMB", "RH_AMB", "T_AMB"]);
78
+ });
79
+
80
+ test.each(ambientKeys)("%s pairs with its bare parameter on unit and type", (key) => {
81
+ const bare = PARAMETERS[key.replace(/_AMB$/, "")];
82
+ expect(bare).toBeDefined();
83
+ expect(PARAMETERS[key].unit).toBe(bare.unit);
84
+ expect(PARAMETERS[key].type).toBe(bare.type);
85
+ });
72
86
  });
73
87
 
74
88
  describe("HEAVY_METALS", () => {