smartyfy.mrindigi.com

Web Development Pro | Lesson 054 | Release, Smoke Checks, and Rollback

Web Development Pro · Lesson 54 of 60

Module 6: Delivery and the capstone

In this lesson

Prerequisites and learning outcomes

Complete lesson 53 first. This lesson builds on staged delivery and post-release verification. By the end, you can plan a reversible release and verify the exact artifact that was deployed. Plan 10–15 minutes for the core explanation and additional time for the worked practice.

Release a known artifact through a reversible plan

A release is the delivery of a specific version to an intended audience. It includes the files, configuration, authorization, and checks needed to know what was delivered. Clicking an upload button is only one possible step. Before any external change, define the destination, owner, expected version, verification steps, and rollback trigger.

This lesson stays local. It compares two small fictional release folders and prepares a handoff plan. No host is contacted and no publication is authorized by the exercise. The goal is to understand how a future authorized release can be verified rather than to imply that the demonstration is already live.

Freeze the candidate before checking it

Choose a candidate and stop casual edits while gathering release evidence. If a file changes, its identity changes and affected checks may need repeating. A manifest can list relative filenames and checksums so a reviewer can compare the candidate with the delivered artifact.

The supplied manifest function reads an explicit allowlist of files beneath a chosen release folder and computes SHA-256 values. Its tests show that a heading change produces a different checksum and reject URL-like or traversal names. The helper accepts simple relative filenames, resolves real paths, and rejects a symlink target outside the release folder. Use a stable, trusted local release directory; this is not a sandbox for an attacker who can change files during checking. A checksum is an identity tool; it does not establish content correctness or trust in the person who supplied the manifest.

Keep credentials, internal notes, and development-only data outside the deployable allowlist. Uploading an entire working directory can expose files that were never intended for visitors. A small static release should contain only the public HTML, styles, modules, data, and authorized assets it needs.

Prepare the previous known version

A rollback plan needs an actual prior artifact, not merely a promise that someone can recreate it. Preserve the files and relevant configuration that worked together. If the new HTML refers to new asset names, restoring only one file may leave a mixed and broken version.

For a static site, a host may support switching back to an earlier immutable deployment or redeploying a preserved artifact. The exact mechanism depends on the provider and authorization. This lesson records the desired outcome without pretending there is one universal rollback command.

A source-code revert and a deployed rollback are different operations. Reverting a Git commit changes repository history through a new inverse commit; the host may still serve the newer files until an authorized delivery action occurs. Verify the actual destination after either approach.

Define smoke checks before the change

Smoke checks are a short set of important observations immediately after delivery. They are not the entire test strategy. For the hub, open the home page, navigate directly to the event page, load local JSON, apply a filter, reset it, inspect access information, and request a missing path.

Record expected status and content type for each relevant resource. Confirm the delivered version marker or checksum where the hosting workflow supports it. A page looking familiar is not strong evidence that the intended release is present; an old cached page can look correct while omitting the new change.

Check with an appropriate fresh-cache condition and a repeat visit. Cache behavior can leave old HTML referring to old assets or new HTML encountering absent assets. Do not clear every user's cache as a substitute for a coherent caching and versioning strategy.

Keep rollback criteria concrete

A trigger might be: “The event module fails to load at the intended base path,” or “The primary search cannot be completed by keyboard.” Decide who can authorize and execute the rollback. An unclear ownership chain can turn a small defect into a long outage while people debate responsibility.

For applications with server data, rolling back code may not reverse schema changes or transactions. Our static demo avoids those complications, but the distinction is important. Never assume an earlier executable can safely read a newer database without a compatibility plan.

Use a release record that another person can follow

Candidate: local-demo-b
Destination: pending; no deployment performed
Previous artifact: local-demo-a
Blocking evidence: browser and hosting checks pending
Rollback trigger: core page or directory journey fails
Rollback method: owner chooses provider-supported restore

This record identifies what is known and what remains a decision. It does not contain invented account names, URLs, or credentials. A future owner can fill in the verified destination and supported procedure when publication is actually requested.

Include how to reproduce the important checks and where the source and test reports live. A release note should summarize user-visible changes, known limitations, and any operational follow-up. Avoid copying internal working notes or irrelevant debug output into a public announcement.

Verify after delivery and after reversal

If an authorized release later occurs, observe the actual destination rather than stopping when a tool reports upload success. Confirm that the candidate is served, the important paths work, and required headers are present. A successful upload can still target the wrong directory or leave a stale cache layer in front of the files.

After a rollback, repeat the relevant smoke checks and confirm that the earlier artifact is actually active. Mark the problematic candidate as unsuitable until its defect is understood. Keep enough evidence to diagnose the cause without storing private visitor information.

The supplied Node tests compare local artifacts and exercise manifest logic. They do not upload files, observe an HTTP response, or establish a live rollback. Manual browser, hosting, and operational checks remain pending. A responsible handoff makes those limits visible instead of presenting a local folder as a completed release.

Worked practice

Worked exercise 1: Catch the wrong candidate

Task: A host reports success, but the page lacks the new heading. Worked answer: compare the intended release identity with the actual response and inspect caching and destination paths. Upload success does not prove the correct artifact is currently served to visitors.

Worked exercise 2: Preserve a coherent rollback

Task: You keep old HTML but delete its referenced assets. Worked answer: preserve a complete prior artifact and configuration relationship. Restoring a page that points to missing files is not a reliable rollback. Use a provider-supported version restore when available and authorized.

Worked exercise 3: Separate local and live evidence

Task: The manifest test passes. Can you report a successful deployment? Worked answer: no. It proves the local identity calculation for the tested files. A real release requires authorized delivery and direct smoke checks against the verified destination.

Knowledge check

Question 1

Why freeze a release candidate? A) To prevent every future maintenance change. B) To keep evidence tied to a stable artifact. C) To make checksums prove correctness. D) To carry every old test result forward regardless of later edits.

Check question 1: answer and explanation

Answer: B. Relevant edits can invalidate observations made against an earlier version.

Question 2

What belongs in a deployable allowlist? A) Only files required for the intended public site. B) All generated files even when they contain development-only data. C) Every file tracked in Git regardless of its public purpose. D) Every diagnostic export because it may help a future maintainer.

Check question 2: answer and explanation

Answer: A. Deliberate packaging reduces accidental exposure and ambiguity.

Question 3

What is a smoke check? A) A replacement for all prior testing. B) A guarantee of production security. C) A short post-delivery check of critical behavior. D) Only a source-code formatting check.

Check question 3: answer and explanation

Answer: C. It confirms essential paths while broader evidence remains necessary.

Question 4

What makes a rollback plan actionable? A) A written promise to reconstruct the previous files later. B) A source diff without the prior assets or configuration. C) A presumed restore feature that no responsible owner has verified. D) A preserved version, concrete trigger, responsible owner, and supported restore method.

Check question 4: answer and explanation

Answer: D. Those details make the intended reversal reproducible.

Question 5

Why check after rollback? A) An issued restore command does not prove the expected version is served. B) Git always updates hosting automatically. C) Old artifacts never have cache interactions. D) Earlier code reverses all external data changes.

Check question 5: answer and explanation

Answer: A. The destination's observed state is the relevant result.

Sources and further reading