Deployment & CI/CD Pipelines
Relevant source files
The following files were used as context for generating this wiki page:
The hex-yt-intel project utilizes a multi-platform deployment strategy known as the Hybrid Edge Symphony. This architecture distributes components across Vercel for the web frontend and dashboard, and Cloudflare Workers for high-performance streaming and LLM synthesis. The CI/CD pipeline is designed to ensure strict version parity, security via HMAC-verified persistence, and comprehensive production verification through automated shell scripts and Playwright testing suites.
Sources: README.md:25-30, GEMINI.md:144-150, AGENTS.md:16-20
1. Hybrid Edge Architecture
The deployment is split into two primary environments to manage execution limits and performance requirements. Vercel acts as the "Bouncer," handling authentication and metadata within standard serverless limits (~8s), while Cloudflare Workers handle high-latency streaming tasks (~58s).
The diagram above illustrates the Hybrid Edge Symphony flow, where Vercel manages the initial handshake and Cloudflare handles the extended execution window.
Deployment Targets
| Component | Platform | Primary Responsibility |
|---|---|---|
/web | Vercel | Next.js 16.2.6 Dashboard, Auth Bouncer, and API gates. |
/worker | Cloudflare Workers | Hono-based High-Performance Streaming Engine. |
/supabase | Supabase | Database Migrations and Edge Functions. |
Sources: README.md:32-40, GEMINI.md:144-150
2. CI/CD Verification Pipelines
The project implements a "10x Verification Preflight Mandate," requiring local checks before any code mutation or pipeline push. This prevents duplicate fixes and git merge conflicts in a multi-agent environment.
Production Verification Suite
A dedicated suite of checks is executed post-deployment to ensure system integrity. This includes health endpoint validation, database connectivity, and frontend rendering via Playwright.
The verification pipeline ensures that all critical infrastructure (Database, Redis, Worker) is operational and that frontend hydration is successful.
Key Verification Tasks
- Health Checks: The
/api/healthendpoint is polled to verify structured responses and component latency. - Frontend Hydration: Playwright tests specifically check for "Hydration mismatch" and unpolyfilled environment variables in the rendered HTML.
- Security Audit: Verification scripts scan for exposed sensitive patterns like
sk_liveorpk_testin public HTML.
Sources: GEMINI.md:73-85, scripts/verify-production.sh:45-60, web/tests/production-verification.spec.ts:30-45
3. Automation Scripts
The project utilizes standardized shell scripts and Playwright specifications to automate the deployment lifecycle.
verify-production.sh
This script is the primary entry point for post-deployment validation. It performs a 5-stage check:
- Connectivity & Deployment: SSL certificate and URL accessibility.
- Health & Endpoints: API status and metadata accessibility.
- Frontend Rendering: Execution of headless browser tests via Playwright.
- Component Verification: Direct status checks for Supabase and Cloudflare Workers.
- Performance: Response time benchmarks (target < 1000ms for health routes).
Sources: scripts/verify-production.sh:221-255
Deployment Procedures
- Web: Automatically deployed to Vercel upon pushing to the
mainbranch. - Worker: Manually or semi-automatically deployed using
cd worker && pnpm deploy. - Preflight: Developers are required to run
pnpm type-check && pnpm lint && pnpm buildlocally before pushing to ensure a "Known Good State."
Sources: README.md:46-52, conductor/tracks.md:12-20
4. Security & Persistence Logic
A critical aspect of the deployment pipeline is the HMAC Persistence layer. To maintain data integrity without exposing database keys to the edge, Cloudflare Workers use cryptographically signed server-to-server writes.
- verifyContentSig: A routine in
web/app/api/analyses/persist/route.tsthat validates signatures from the Worker. - StreamToken HMAC: Vercel creates a
StreamTokenthat the Cloudflare Worker validates using a sharedSTREAM_HMAC_SECRET.
Sources: README.md:28-30, AGENTS.md:23-28, conductor/tracks.md:32-38
The hex-yt-intel deployment and CI/CD pipeline prioritize architectural stability through the Hybrid Edge Symphony, ensuring high-performance AI synthesis while maintaining strict security and verification standards across decentralized environments.