Release 3.6
Post-Deploy Verification & LLM Summary
Automated health checks, git changelog, and email report after every release
Overview
Releases now run a verification pass immediately after the symlink swap and service restart. The pass gathers health checks, commit history, runtime metadata, and an optional LLM-generated narrative, and emails the combined report. If anything fails the release can be rolled back via the previous symlink target.
What Changed
Verification Script
scripts/post-deploy-verify.tsruns against the newly-deployed release.- Health checks hit platform, releases, and dossier-api endpoints with a PASS/FAIL status per env.
- PHPUnit runs when dev dependencies are present (skipped in production builds by design).
- Gathers current commit SHA, changelog entries since the previous release, PHP and Node versions, and timestamp.
LLM Summary (Ollama Cloud)
- When
OLLAMA_API_KEYis configured, the verification script asks Ollama Cloud to narrate the changelog into a short deploy summary suitable for a status email. - The LLM call is best-effort - if the API is unreachable or rate-limited, the verification continues without the narrative.
Email Report
- Verification emails go via the server's local MailHog / SMTP relay on
localhost:1025. - Report body includes the full structured output plus the LLM narrative when available.
- Raw JSON report is attached so downstream tooling can parse it.
SMTP Hardening
- Long report lines were hitting SMTP's 998-character limit on some relays. Report generator now chunks long fields.
DEPLOY_MAILER_DSNdefaults tolocalhost:1025so reports land in server MailHog by default.
Files Touched
| File | Change |
|---|---|
scripts/post-deploy-verify.ts | New verification script |
scripts/bootstrap-utils.ts | Shared utilities (env resolution, command running) |
scripts/release-prod-safe.ts | Invokes verify step after release |
scripts/post-release.sh | Restarts services before verify runs |
How to Use
# After a release, verify runs automatically. Manual invocation:
sudo LIVE_LINK_NAME=live bun /home/ftsuser/releases/<release>/scripts/post-deploy-verify.ts
# Skip LLM summary if unavailable:
unset OLLAMA_API_KEY
sudo LIVE_LINK_NAME=live bun .../post-deploy-verify.tsChangelog Reference
- feat: add post-deploy-verify skeleton with environment resolution (42bb51b)
- feat: add data gathering - tests, git log, health checks, metadata (6f34a1c)
- feat: add Ollama Cloud LLM summary generation (2f6f1a8)
- feat: add SMTP email with HTML body and raw report attachment (c35661f)
- feat: add verify step to release-prod-safe output (7abf620)
- fix: handle missing PHPUnit in production and SMTP line length (27f1ad9)
- fix: default DEPLOY_MAILER_DSN to localhost:1025 (cc1ca73)