Shopify Hydrogen Operational SOP: CI/CD, Caching, and Runtime Guardrails
Introduction
Hydrogen storefronts run on Shopifyβs Oxygen edge β a global, quota-driven platform. Unlike Liquid themes, Hydrogen stores are codebases that must be operated like software. That means checklists, CI/CD pipelines, caching rules, and runtime guardrails.
This post outlines an Operational SOP (Standard Operating Procedure) for teams running Hydrogen on Oxygen.
Why SOPs Matter
- π Revenue risk β a broken cart loader = abandoned checkouts.
- β‘ Quotas β Oxygen enforces bundle size, memory, and subrequest caps.
- π Team scaling β multiple devs need consistent workflows.
- π Compliance β GDPR/PCI mean you must control data flows.
Without SOPs, Hydrogen storefronts risk fragility and expensive downtime.
CI/CD Patterns
Build & Test
- Run Playwright tests for cart, PDP, checkout flows.
- Run Lighthouse CI to track CWV regressions.
- Lint GraphQL queries (prevent over-fetching).
Deployment
- GitHub Actions β Oxygen deploy.
- Block merges if:
- Bundle >10 MB
- 40 subrequests detected
- CWV regression >10%
Caching Rules
Tokenless Queries (Public)
- Cache with CacheLong() for stable catalog data.
- Example: product details, collection pages.
Authenticated Queries
- Cache with CacheShort() or disable if dynamic.
- Example: customer account pages, carts.
CDN Assets
- Push images/videos to Shopify CDN, not app bundle.
Runtime Guardrails
- Bundle Size: <10 MB.
- Subrequests: <40 per route.
- Memory: <128 MB per request.
- CPU: <30s execution cap.
π Build guardrails into CI to prevent surprises.
Operational Checklist
Daily
- Monitor error rates in Sentry/Datadog.
- Check webhook delivery success.
Weekly
- Run regression suite in Playwright.
- Audit Lighthouse scores.
Monthly
- Review bundle analyzer output.
- Validate CMS sync workflows.
- Update .copilot-instructions.md for guardrails.
Sales Collateral: Hydrogen on Oxygen vs Hosted Elsewhere
Oxygen
- β Native Shopify integration (checkout, customer API).
- β Global PoPs tuned for commerce.
- β Built-in quotas β performance discipline.
Vercel/Netlify
- β More lenient runtime.
- β οΈ Requires extra Shopify API wiring.
- β οΈ Checkout redirect complexity.
π Pitch Oxygen as βcommerce-first infrastructure with guardrails.β
Conclusion
Hydrogen storefronts must be operated like software products, not static themes. CI/CD pipelines, caching policies, and runtime guardrails keep them reliable.
Hydrogen on Oxygen is powerful β but only if you run it with discipline.