97672f7e7467aa59f2153944399ca2b25e574391
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
97672f7e74 |
[glm-grade=A] fix(notifications): un-gate 7 dead emitters + repair legacy 4-arg send shape (DC-094)
Two silent-death defects in one class: 1. Seven emitters absent from DEFAULT events, so the send() gate (config.events[canonical] !== true) dropped them on every install: ssl-cert-expiry, dns-propagation, drift-detected, dependency-restart-complete/-failed, recipeRemoved, workflow. All now default ON; dependency-restart spellings fold onto one canonical toggle; recipeRemoved aliases to recipe-removed in both the manager and route alias maps. 2. Nine call sites used a legacy 4-arg send(event, title, message, type) against the 3-arg signature: the message string landed in the type slot (Discord embed color fell back to info-blue, history.type wrong) and providers received the TITLE as the body - deploy-failure notifications carried no error text at all. Fixed at source (9 sites) plus a type-guarded shim in send() for external legacy callers. Also: explicit data.title now flows to ntfy Title header, email subject, Discord embed title, and history; settings UI gains 9 event toggles (separate Backup Complete/Failed) with defaults-on semantics. Tests: +24 (new DC-094 suite: defaults, gate pass-through, alias folding send-time and load-time, stored-config inheritance, shim body/title/ color/subject/history, type-guard, 3-arg no-regression); 4 assertions in bundled-workflows-health-check updated from the old 4-arg mock contract to the canonical shape (same behavior asserted). Full suite 116 suites / 2706 tests green. Judge: GLM-5.3 cold read via delegate_task (deleg_8a7cedd0), grade A, zero blockers; 2 polish items (Backups toggle conflation, shim type-guard) folded into this commit. Verdict URN: urn:ump:uyipjjwdjqjy3alvceqxvlucrymd7hnsben5udpp2bqycoh3l2la |
||
|
|
be798a9bc2 |
[grade=B] fix(workflows): DC-044 root-cause — gate notify-on-failure, interpolate failingServices, fix Health.Status check
The original DC-044 fix (
|
||
|
|
b492e1cd4f |
DC-044: fix WorkflowEngine healthCheckService — servicesStateManager.getState bug
The bundled-workflows.js:310 call site used a non-existent .getState() method AND forgot to await. The Promise short-circuited via '|| []' to an empty array, so every health-check-on-interval workflow ran every 5 min reporting 'Action health-check failed: servicesStateManager.getState is not a function' while silently iterating over zero services. Visible on both DNS2 (production) and dc-contabo-de (test server) — same code, same bug, same log spam. Fix: 'await servicesStateManager.read().catch(() => []) || []' — uses the actual async method, returns empty array on read() failure (corrupt or missing state file shouldn't break the workflow), preserves the original short-circuit guard. New regression test __tests__/bundled-workflows-health-check.test.js with 5 cases: 1. uses .read() not the non-existent .getState() — does not throw 2. returns checked/healthy counts from read() output 3. gracefully degrades if read() throws — empty services list, no crash 4. servicesStateManager absent on ctx → no crash, empty result 5. single service (non-template serviceId) path still works Tests: 1219/1219 pass (1214 baseline + 5 new). ESLint: clean for the new file. Test fixture note: had to clearInterval the constructor's scheduledJobs so Jest could exit cleanly — scheduled workflows are not under test here. |