@teamscala/service-boot 0.23.339 → 0.23.340

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
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "name": "@teamscala/service-boot",
8
8
  "type": "module",
9
- "version": "0.23.339",
9
+ "version": "0.23.340",
10
10
  "sideEffects": false,
11
11
  "files": [
12
12
  "src"
@@ -108,3 +108,26 @@ describe("parseRootDiskPct", () => {
108
108
  expect(parseRootDiskPct("Use% Mounted on")).toBeNull();
109
109
  });
110
110
  });
111
+
112
+ describe("disk-threshold early-warning regression lock", () => {
113
+ const { readFileSync } = require("node:fs");
114
+ // Source-shape lock (same pattern as singleton-tools-currency-watch.test.ts):
115
+ // the df-check that rides this periodic sweep was once removed in favour of an
116
+ // in-process interval watchdog — the wrong architecture (interval watchdogs
117
+ // are forbidden; observability is event-driven). This asserts the corrected
118
+ // shape survives: the sweep handler MUST carry the event-driven host.disk.high
119
+ // emission (logger.warn -> GlitchTip) + the pure parseRootDiskPct helper that
120
+ // backs it. Removing either fails this test. The asserted surface is the
121
+ // disk early-warning cell of host-resources-have-complete-monitoring.
122
+ const src = readFileSync(import.meta.dir + "/sweep-host-cache.ts", "utf-8");
123
+ test("handler emits the host.disk.high event (event-driven, not an interval)", () => {
124
+ expect(src).toContain('log.warn("host.disk.high"');
125
+ expect(src).toContain('kind: "host.disk.high"');
126
+ });
127
+ test("handler reads df via the sanctioned spawn (no in-process poller)", () => {
128
+ expect(src).toContain('command: ["df", "--output=pcent,target"]');
129
+ });
130
+ test("threshold parse is the exported pure helper", () => {
131
+ expect(src).toContain("export function parseRootDiskPct");
132
+ });
133
+ });