Today’s goal
Make delivery and production feedback part of front-end architecture.
We will connect:
- CI, reproducibility, artifacts, and environments;
- preview, staging, production, and deployment protection;
- release strategies, feature flags, canaries, and rollback;
- logs, metrics, traces, RUM, errors, and session context;
- dashboards, alerts, SLOs, error budgets, and synthetic monitoring;
- dependency, browser, API, service-worker, and technical-debt maintenance;
- ownership, runbooks, incident response, privacy, and production readiness.
By the end of today you can
- design a CI pipeline with fast and broad verification stages;
- produce and promote one versioned artifact;
- separate preview, staging, and production responsibilities;
- use feature flags without confusing them with authorization;
- plan canary, rollback, and kill-switch behavior;
- distinguish monitoring from observability;
- define useful frontend telemetry without oversharing data;
- create SLOs and alerts with owners and response actions;
- maintain dependencies, browser support, APIs, storage, and service workers;
- write a production runbook and rehearse the delivery loop.
Delivery is part of architecture
Delivery decisions determine:
- which code reaches users;
- how quickly a fix can ship;
- whether a release can be identified;
- how a failure is contained;
- whether rollback is possible;
- how production evidence reaches developers.
A frontend that cannot be safely changed is not operationally complete.
Browser console is not production observability
Console output can disappear because:
- the user closes the page;
- the browser filters it;
- no one can access the user’s console;
- context is incomplete;
- sensitive data was logged.
Send carefully designed events to a controlled telemetry system when investigation requires it.
Practical stages 1–3: reproducible artifact & preview verification
- Stage 1 (Immutable Reproducible Artifact):
- Produce a production build with deterministic content hashes.
- Generate
release-manifest.jsonwith commit SHA, timestamp, and metadata.
- Stage 2 (CI Verification Gates & Secrets Scanning):
- Execute parallel linting, type checks, unit/integration suites, and bundle budgets.
- Run automated secret scanning to prevent token leaks into client bundles.
- Stage 3 (Preview Environments & Release Identity):
- Deploy isolated PR preview environments.
- Inject
window.__RELEASE_INFO__for runtime telemetry attribution.
Practical stages 4–5: observability & rehearsed rollback
- Stage 4 (Front-End Observability & Breadcrumbs):
- Implement zero-dependency client telemetry for unhandled errors and RUM metrics.
- Capture user interaction breadcrumbs with strict PII masking.
- Stage 5 (Simulated Disaster Rehearsal & Safe Rollback):
- Inject a deliberate production failure into v2.4 (breaking Safari form submissions).
- Observe automated SLO breach and trigger instant CDN rollback to v2.3.
- Verify client data compatibility (
localStorage) and draft a blameless post-mortem.
Troubleshooting guide (Part 1)
| Symptom | Likely cause |
|---|---|
| CI passes but deployed app fails | Tested artifact differs from deployed artifact |
| Rollback restores old code but breaks API | Compatibility window was not designed |
| Alerts fire constantly | Thresholds lack context or ownership |
| Errors cannot be debugged | Release identity or private source maps missing |
| Feature flag remains forever | Lifecycle and owner were never defined |
Troubleshooting guide (Part 2)
| Symptom | Likely cause |
|---|---|
| Telemetry is expensive or unsafe | Payload, sampling, and privacy policy are weak |
| Users keep stale behavior | Long-lived clients and service-worker updates ignored |
| Dependency update is frightening | Updates were deferred instead of maintained continuously |
| Incident response is slow | Runbook and rollback were not practiced |
Completion checklist
- CI produces a reproducible, identifiable artifact;
- the same artifact is promoted across environments;
- production access and secrets use least privilege;
- releases can be canaried, flagged, killed, or rolled back;
- telemetry connects release, route, journey, and failure;
- alerts have owners and runbooks;
- SLOs and error budgets are meaningful and segmented;
- dependencies, browsers, APIs, storage, and workers have maintenance paths;
- telemetry respects privacy and data minimization;
- rollback and recovery have been rehearsed.
Misconceptions to leave behind (Part 1)
| Misconception | Better mental model |
|---|---|
| CI means one hosted test command | CI is clean verification and artifact production |
| Delivery means every commit deploys | Delivery keeps a safe release ready |
| Passing tests makes deployment safe | Artifact, environment, integration, and recovery also matter |
| Staging is production without users | Environments have different purposes and gaps |
| Preview replaces code review | It provides deployed evidence, not design judgment |
| Feature flags are authorization | The server still enforces permissions |
| Flags can stay forever | Flags need ownership and removal |
Misconceptions to leave behind (Part 2)
| Misconception | Better mental model |
|---|---|
| Rollback is failure | Rollback is a normal safety mechanism |
| Observability means logs | Logs, metrics, traces, errors, and context work together |
| More telemetry is always better | Telemetry has cost, privacy, and signal limits |
| Every error should page someone | Alerts require actionable owners and thresholds |
| Dependency updates should be automatic | Automation needs review, grouping, and risk triage |
| Users refresh after deployment | Long-lived clients require compatibility and update policy |
| Maintenance is separate from architecture | Lifecycle and recovery are architectural properties |