Automated Launch-Gate Compliance Verification: Building BSSD's Nightly Pre-Send Check
Pre-send compliance verification is a critical but often-neglected piece of email infrastructure. When you're operating an outreach engine that sends thousands of messages on a schedule, a single configuration issue—bad robots.txt, misconfigured unsubscribe, missing sitemap—can silently tank deliverability or invite legal exposure. This post covers the design and implementation of the BSSD (Burial at Sea San Diego) launch-gate nightly check system, which runs unattended verification cycles before each campaign blast-send.
The Problem: Drift Between Staging and Live
During pre-launch setup, you verify your domain configuration, SEO assets, and compliance endpoints. But configuration drifts: a CDN cache refresh happens, a Route53 record gets accidentally modified, or a Lambda function gets deployed with stale environment variables. By the time your first-send window opens (Tuesday, 9 AM), you've had hours of potential drift with no active visibility.
For BSSD, the outreach first-send was scheduled for Tuesday, July 8, 2026. The launch gate had four checkpoints:
- GBP Claim: Google Business Profile ownership verified (manual, not automated)
- GSC Verification: Google Search Console domain ownership (manual)
- 403 Fixed (robots.txt + sitemap): Public SEO assets returning 200 OK
- Unsubscribe Compliance: Legal-compliant opt-out mechanism live and reachable
The third and fourth checkpoints are testable via automation; the first two require human interaction. Our job was to run the automated checks on a nightly cycle and escalate to a HOLD recommendation if critical gates drifted into red by Monday night.
Technical Implementation
HTTP Endpoint Verification
The simplest but most critical check: does the domain serve its core SEO and compliance assets?
curl -I https://burialsatseasandiego.com/robots.txt
curl -I https://burialsatseasandiego.com/sitemap.xml
Both endpoints must return HTTP 200. A 403 or 404 here is an instant blocker—search engines won't crawl the domain, and ISPs may flag the sender as misconfigured. We verify:
- robots.txt exists and is readable (Disallow rules are application-specific, so we don't validate content, just presence and status)
- sitemap.xml is well-formed XML and reachable (parsed to count entries; BSSD had 23 URLs at check time)
- Both are served with correct Content-Type headers (text/plain and application/xml respectively)
Unsubscribe Compliance Verification
CAN-SPAM law requires a working, clearly identified opt-out mechanism. Most email campaigns use a URL-based unsubscribe link; BSSD's outreach engine uses a reply-based mechanism by design—users reply to the message to unsubscribe, which is equally CAN-SPAM compliant and avoids maintaining a separate unsubscribe endpoint.
The verification step here checks the outreach engine configuration (not a live HTTP endpoint) to confirm the reply mechanism is wired correctly. This is a file-based check, not a network call: we read the engine config from /Users/cb/icloud-jada-ops/bssd-crm/send_bssd_outreach.py (or equivalent) to confirm the reply handler is enabled and points to a monitored inbox.
Gate Status Review
The launch-gate status document lives at /Users/cb/icloud-jada-ops/bssd-crm/LAUNCH-GATE-2026-07-08.md and is maintained by the business/product team. The nightly check reads this file and flags any item still marked as red by the Monday night (July 6) deadline.
Gate items have two classifications:
- FIXED: Completed by engineering, verified live, no further action needed
- CB-ACTION-NEEDED: Requires manual business action (e.g., clicking through Google's claim flow) or depends on external services
If any item is red on Monday night and cannot be resolved by Tuesday morning, the check script generates a HOLD recommendation report that gates the Tuesday blast-send.
Decision: Nightly Cycle vs. On-Demand
Why run this every night rather than on-demand?
- Early warning: Drift detected 6+ hours before send window. Enough time to debug and fix without paging oncall.
- No human ceremony: Runs unattended (cron or Lambda schedule). No Slack polling, no "can you run the gate check real quick?"
- Compliance audit trail: Each cycle generates a dated report. Legal can point to evidence that pre-send verification occurred.
- Graceful escalation: Red gates auto-generate a HOLD recommendation; no ambiguity about whether to proceed.
On-demand checks tempt you to skip them ("we're already confident") or run them too late in the window ("oh, forgot about that").
Report Generation and Archival
Each nightly cycle produces a Markdown report: /Users/cb/dablio/reports/2026-07-05-bssd-launch-gate-nightly-check-cycle-1-sun-jul-5.md
The report includes:
- Run timestamp and cycle number (Cycle 1, Cycle 2, etc.)
- HTTP status codes and response times for robots.txt and sitemap.xml
- Sitemap URL count and sample entries
- Unsubscribe mechanism status (reply-handler enabled, monitored inbox confirmed)
- Gate status summary (which items are green, which are still red)
- HOLD recommendation (generated if red items persist past the Monday night deadline)
Reports are versioned by date and cycle number, making it trivial to audit what was known and when.
What's Next: Multi-Cycle Automation
The system is designed to run multiple times per campaign window:
- Sunday (Jul 5): Cycle 1 — gates at 50% status, no recommendation yet (Monday ahead)
- Monday (Jul 6): Cycle 2 — if red items remain, HOLD recommendation auto-triggers
- Tuesday (Jul 8, pre-send): Final verification before first-send fires
This pattern scales to any campaign with a scheduled first-send. Add new gate items by extending the gate document; add new HTTP checks by extending the verification script. The nightly orchestration remains the same.
For BSSD specifically: GBP claim and GSC verification require business action (clicking through claim flows), so tomorrow night's report will show whether those landed. If not by Monday evening, the HOLD flows through to the Tuesday morning decision.
```