Tech+ study materials
Tech+ study resources

The Friday Afternoon Reminder Bug

Tech+ · Put your knowledge to work in context.

All case studies

The Friday Afternoon Reminder Bug

A four-person team maintains a patient-scheduling web application for a twelve-clinic medical group. They use Git with a single main branch: everyone commits directly to main, and whoever is on call deploys to production manually on Friday afternoons. Last week a change to the appointment-reminder job shipped in the same release as an unfinished UI refactor. A reminder-timing defect reached production at 4:40 p.m. on Friday. With 23 commits since the previous release and no automated tests or staging environment, nobody could isolate the cause, and rolling back would also have withdrawn the UI changes that two clinics had already begun using. Clinics are open Monday through Saturday, and reminders go out nightly at 6 p.m.

1. Identify what made this incident hard to resolve and name the practices that would have prevented it.

Read the worked answer

The difficulty was created by four compounding choices, not by bad luck:

  1. No isolation between changes. The reminder job and the UI refactor occupied the same release, so a defect in one could only be fixed by removing the other. One deployable unit contained two unrelated changes with different risk profiles.
  2. No way to localize the cause. 23 commits directly on main with no tests means the defect's origin is found by reading code, not by watching a test fail.
  3. Deploy coupled to release. Shipping the build and exposing the feature were the same act, so the team had no option that was both 'fix the bug' and 'keep the UI.'
  4. Worst-case timing. A Friday-afternoon deploy leaves about one hour before the 6 p.m. reminder run and no business hours left to recover before the weekend, when clinics are open.

Preventive practices: short-lived feature branches merged through a reviewed pull request so each change is reviewable and revertible on its own; a smoke test suite in CI; a staging environment with a seeded copy of reminder data; deploying Tuesday–Thursday; and feature flags so deploying the UI code is not the same as turning it on.

2. Design a minimal Git and release workflow for this four-person team that adds control without slowing them down.

Read the worked answer

Keep it light - process overhead is a real cost for four engineers.

Branching

  • main is always deployable and is a protected branch: no direct pushes, one approving review on each pull request.
  • One short-lived feature/<ticket> branch per change, rebased or merged within a few days. No long-lived develop branch, no release trains.

Continuous integration

  • Every PR triggers build + lint + unit tests + a smoke test against a staging database.
  • Merge to main auto-deploys to staging. Staging gets the same reminder scheduler with a compressed clock so timing bugs surface in minutes rather than at 6 p.m.

Release

  • Promotion from staging to production is a separate, manual button pushed Tuesday through Thursday mornings.
  • Risky user-facing changes sit behind feature flags, defaulting off, so code can ship before the feature is announced.
  • Tag every production deploy (prod-YYYY.MM.DD-n) so there is always a named commit to return to.

Hotfixes

  • hotfix/<ticket> branches from the production tag, gets a review and a targeted test, deploys immediately regardless of day, and is merged back to main.

Guardrails

  • Never deploy on Friday afternoon or the day before a holiday unless it is a hotfix.

3. The team wants to make the reminder fix tonight. Should they revert the commit, roll back the deployment, or cut a hotfix - and how do they protect the UI work the clinics are already using?

Read the worked answer

Cut a hotfix; do not revert or roll back.

  • git revert of the offending commit is only clean if the reminder change is a single self-contained commit. With 23 mixed commits and no tests, they cannot be confident which one is responsible, and reverting the wrong one re-breaks production with less time to fix it.
  • A full deployment rollback restores the previous build, which also removes the UI refactor two clinics are actively using - trading a scheduling defect for a workflow disruption.

Procedure:

  1. Branch hotfix/reminder-timing from the current production tag.
  2. Determine the correct timing behaviour from the ticket and the clinics' description, not from the broken code's intent.
  3. Add one automated test that asserts the expected send time; it should fail before the change and pass after.
  4. Review, merge, deploy the hotfix branch, tag it.
  5. Verify against a real scheduler run or a staging replay before 6 p.m., and watch the first production run.
  6. Merge the hotfix back into main so the fix is not lost at the next release.

If the cause cannot be found in time: roll back and immediately re-deploy only the UI work behind a flag. A rollback plus a controlled re-release is a legitimate second choice - but a silent rollback that yanks a working feature is not.