Skip to content

case study

A plan, verify and rollback method for releases

My role: I built this in 2026 as a demonstration of a release method. It runs on sample folders, uses no client or employer material, and the source is public.

Scope and constraints

Ownership
A solo demonstration with a sample cafe site. Not client or employer work.
Scale
One script, a sample build and target, and a test suite.
Constraints
A person must see what will change before it changes, a reviewed plan must not drift, and every uploaded file must be checked.
Judgment calls
Plan before write, bind the review to the apply, verify everything, and keep the target’s own files out of the upload set.

What was delivered and checked

  • Tests cover the five file statuses, plan id stability and sensitivity, refusal of a stale plan, refusal when the target changed, the deny-list, backups, verification, tamper detection, rollback and its refusal, noise-only files, the ledger and manifest mode.
  • A sample failure register is read by a test that fails if a named guard is missing.

What it is

A way to release a folder of files to a target folder without overwriting someone else's work or guessing whether the copy worked. It is one script with plan, apply, verify, rollback and log commands, a sample build and target, and tests.

The path of one release

  1. PlanRead-only. Compares the build with the target and marks each file new, changed, identical, denied or noise-only.
  2. ReviewA person reads every real difference before anything is written.
  3. ApplyRefuses unless the plan it recomputes has the id that was reviewed. Backs up every file it overwrites.
  4. VerifyRe-reads every uploaded file and compares its checksum with the build.
  5. RollbackRestores the backups, and refuses if a file changed after the apply.
Apply refuses unless the plan it recomputes has the id that was reviewed.
Sample data. Apply recomputes the plan and refuses when its id is not the one that was reviewed.

The ledger

Each apply and rollback adds one line. The tool never rewrites it.

Sample data. Each apply and each rollback adds one line.

Decisions

  • A read-only plan comes first

    Nothing is written until the plan shows what would change, so work already on the target is not overwritten by surprise. The cost is an extra step and a comparison of every candidate file.

  • The plan id binds the review to the apply

    Apply recomputes the plan and refuses if its id differs from the reviewed one, so a reviewed plan cannot drift. The cost is that anything that changes the build or the target between plan and apply needs a new review.

  • Verify every uploaded file, not a sample

    A sample can pass while one file is wrong. Every uploaded file is read back and compared. The cost is more reading after each apply.

  • A deny-list that is never uploaded

    Files that belong to the target, such as its own configuration, can never be in the upload set, and apply refuses if one appears. The cost is that a deliberate change to those files has to be made another way.

  • Noise is separated from change

    Lines that differ on every rebuild, such as build stamps, are matched by pattern and a file that differs only by them is not uploaded. The cost is that the patterns have to be kept honest, and they are compared after removal so a noisy line cannot hide a real edit next to it.

  • An append-only ledger

    Each apply and rollback adds one line. The tool never rewrites it.

Scope

  • Sample folders as the target

    The target is a local folder, so the method runs end to end on a sample build and target.

  • Verification is byte for byte

    Verification compares every uploaded file with the build byte for byte.

Source and tests

The source, the sample data and the tests are in the release-plan repository, under the MIT licence. npm test runs the tests.

Stack

  • Node.js
  • JavaScript
  • Node test runner

More case studies

    Engineering notes: the decisions behind the work