fix/maintenance-lifecycle-and-sweep #1
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/maintenance-lifecycle-and-sweep"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Maintenance / WHMCS
cancelwhen an issue is closed; the API treats that as a close, so this works before the hook is redeployed.notify.Security and reliability
UI
?month=.Ops
Dependencies
npm auditgoes from 27 advisories (1 critical) to 2 moderate, build-time only.Deploy notes
TRUSTED_PROXY_HOPS=2if a CDN or WAF sits in front of the site.MAILWIZ_TIMEZONEif the MailWizz account isn't on UTC.whmcs-hooks/maintenance_sync.phpto WHMCS, and adddefine('STATUSPAGE_ADMIN_TOKEN', '…')to itsconfiguration.php.docs/DEPLOY_ENHANCE.md; the monthly archiver needsCRON_TZ=UTC.data/historyanddata/monthly-uptimeare no longer tracked in git. On any install that updates withgit pull, back updata/first.Test plan
npm test: 34 tests (lifecycle, email rendering, storage safety, client IP)astro check: 0 errors; production build succeeds- NetworkIssueClose ("resolved") now completes the window (cancelled only if it never started); reopen and delete hooks are handled; the cron poller reconciles windows whose issue is no longer open in WHMCS. - Legacy hooks that send action=cancel on close are treated as a close, so this works before the WHMCS hook is redeployed. - Every change is recorded in a per-window updates timeline. - Emails keep WHMCS formatting (sanitised HTML/Markdown), escape title and services, honour notify, and cover scheduled/rescheduled/completed/ cancelled. Content-only edits don't email. - Upserts run find-or-create under one lock (no duplicate windows/emails), omitted fields no longer erase stored values, input is validated. - Crash-safe JSON store: atomic writes; a corrupt file is never overwritten. - Hook: logs curl/HTTP failures, shows server names, token docs fixed. - Add vitest; npm start runs the built server; engines >=22. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>bd034795b401b115c89a