Delivery on this project has had three shapes in twenty months: a single workflow that built and copied files, a full pipeline with gates, staging, automatic rollback and an incident path, and finally a gated script run by a person. Each change followed the state of the product and the team. This page records what each stage did and why it gave way to the next.

Timeline

DateChange
March 2025First deploy workflow: on a push, build, copy to the server, restart the process
December 2025That workflow is removed
March 2026An automated review action on pull requests is trialled, then withdrawn within the week
June 2026Web CI: a quality gate, integration tests and conditional build and smoke jobs
July 2026Web CD: a merge to main builds once and deploys, with snapshot rollback on the server
September 2026A staging server and its own deploy workflow. Incident triage from an error alert
October 2026A draft-fix job for incidents, a check for agent-authored pull requests, a verify step after staging deploys, and an end-to-end suite against staging
November 2026All workflows are removed and replaced by one gated deploy script

The pipeline at its fullest

Two bands. CI on every pull request, with six gate checks then integration and build: checks one and two, workflow policy and lint with zero warnings; checks three and four, type-check and unit tests; checks five and six, test safety, meaning API and end-to-end tests may not reach live services; then integration tests against an in-memory database and a real Redis; then build and smoke, only when the changed paths call for it. Deploy: build once, with the artifact kept so it can be redeployed; snapshot, a hard-link copy of the live folder with the last three kept; activate, installing dependencies, backing up the database and reloading the process; health check, the health route and the home page, repeated; and restore, where any failure puts the snapshot back. A note on the incident path: an error alert, marked by a person, starts a triage report in the alert thread; for a code fix an agent opens a draft pull request against staging; a person merges it; and a check after the staging deploy labels the result.
Figure 1. The pipeline as it ran from July to November 2026. Six gate checks, integration tests and a conditional build on every pull request, then a deploy that snapshots the live folder and restores it on any failure.

Continuous integration

A first job looked at which paths a pull request changed, so that later jobs ran only when they were relevant. Then came the gate.

CheckWhat it enforced
Workflow policyA checker for the workflow files themselves
LintESLint with zero warnings allowed
Type-checkThe TypeScript gate
Unit testsThe Jest suite
API test safetyAPI tests cannot reach live external services
End-to-end test safetyEnd-to-end tests cannot reach live external services

The two safety checks are the unusual ones. This product sends KakaoTalk messages, issues coupons and moves points, and a test that reached a real provider would do those things for real. The safety checks sat in the gate, ahead of every job that runs API or end-to-end tests. Together with the mock policy for external adapters, they made “tests do not touch live services” something checked on each change and not a habit.

After the gate, two integration jobs ran: one against an in-memory MongoDB replica set, the same tool the point kernel’s transaction tests use, and one against a real Redis in a service container, for the token-rotation tests. A production build, an API smoke test with a MongoDB service and a browser smoke test ran only when the changed paths made them relevant.

Continuous deployment

A merge to main was a deploy. The deploy workflow ran the same six checks again, then three stages.

Build once. The environment was decrypted from an encrypted vault, the application was built, source maps were uploaded to the error monitor and then stripped from the artifact, and the artifact was stored. Deploying and rolling back both used a stored artifact, so what was rolled back to was the exact build that had run before.

Deploy. The workflow announced the start, opened network access to the server for the duration of the job through a short-lived cloud role, ran a preflight, copied the artifact into an incoming folder, and asked the server to activate it.

Activate, on the server. This script is still in use today.

  1. Take a snapshot of the live folder using hard links, which costs almost no disk. Keep the last three.
  2. Sync the incoming folder into the live one.
  3. Install dependencies, with retries.
  4. Back up the database to object storage.
  5. Apply the schema without the flag that permits data loss, so a destructive schema change fails here by design.
  6. Reload the process manager.
  7. Poll the health route and the home page, up to twenty times at five-second intervals.

Any error at any step restores the latest snapshot. The script exits with one of three codes: success, failed and rolled back, or failed with the rollback also failing. Only the third needs a person at once.

A manual rollback was a deploy of an older artifact. It required a typed confirmation and was limited to a list of people.

Staging

A staging server was added in September 2026 with its own branch, folder, process and database. Three guards keep it from touching production.

  • The deploy refuses to run if the staging environment file is identical to production’s.
  • The server refuses to boot in staging mode if its database or Redis address is the production one.
  • Scheduled jobs are off in staging unless switched on, and external adapters default to mocks.

Production and staging deploys shared a concurrency group, so they could not run on the server at the same moment.

The incident path

The last addition connected the error monitor to the pipeline.

  1. An alert arrives in the team’s chat. A person marks it with a reaction to say it is worth investigating.
  2. That starts a triage job, which posts a report in the alert’s thread. The runbook put this at three to five minutes.
  3. If triage classifies the issue as a code fix, a second job has an agent open a draft pull request on a dedicated branch against staging.
  4. A check written for agent-authored pull requests runs lint on the changed files, the type gate, the related tests and any regression test the agent added.
  5. A person reviews and merges. Staging deploys.
  6. A verify job reads the staging smoke results and labels the pull request as verified, failed or needing attention, with a reply in the original thread.

Merging stayed a human action at every stage. The runbook described this as a first-stage trial, and each job had a switch to turn it off.

Tests

KindHow it runs
Unit testsJest, on every change. Part of the gate
Transaction testsJest against an in-memory MongoDB replica set. These cover the point kernel under concurrency
Redis integrationA dedicated run against a real Redis, for the status cache and token rotation
API tests and policy testsJest, including the external-API mock policy and the safety checks themselves
Browser end-to-endPlaywright, grouped into sign-in flows, general flows, a smoke subset, and a separate configuration for staging with its own regression folder
Mobile end-to-endMaestro flows against a staging build of the app
App contract testsOn pull requests to the app repository that touch the contract, the end-to-end flows or the app configuration

What replaced it, and why

On 27 November 2026 every workflow was removed. The commit states the reason: the service is no longer in feature development.

The replacement is one script run from a developer’s machine.

  1. A local gate: lint, the type gate and the unit suite. There is a flag to skip it in an emergency.
  2. A check that the local commit is the head of the main branch.
  3. A local build, using the public build variables read from the server.
  4. Transfer to the server’s incoming folder.
  5. A yes-or-no confirmation.
  6. The same activate script as before, with the same snapshot and automatic restore.
  7. The public health check.

It has rollback and health subcommands and a staging target. The pull-request template now ends with the line that a merge is not a deploy.

The same commit records a second reason for rewriting the old manual script instead of reviving it: it synced with a delete flag that could have removed the server’s secrets folder, and it had no rollback. The new script keeps the snapshot and restore on the server and drops the machinery around it.

What carried over

FromWhat the current script still does
The quality gateLint with zero warnings, the type gate and the unit suite run before a build
Build onceOne build is transferred and activated. Nothing is built on the server
The server scriptHard-link snapshot, database backup, schema apply without data loss, health check, automatic restore
Manual rollbackA rollback subcommand that puts the previous snapshot back
StagingA staging target, with the same guards against production state
The incident pathThe rule that a merge is made by a person, now extended to the deploy itself