Repository navigation
Deploy kypp.vu1n.dev from v* tags, not main - #97
Conversation
vu1n
left a comment
There was a problem hiding this comment.
VPS review of 520ef78: 0 finding(s), 0 blocking.
The change adds a tag-triggered release workflow that gates promotion on both test suites and uses a fast-forward-only push. The reported lack of regression coverage identifies no concrete defect, so this finding does not block merging.
1 finding(s) dropped by the check
.github/workflows/release.yml:26Add regression coverage for the release promotion flow: Missing regression coverage alone is not a concrete defect: promote requires both reusable test workflows to succeed via needs: [python, worker], and its non-forced git push rejects moving release backward to an older commit.
vu1n
left a comment
There was a problem hiding this comment.
VPS review of 7a89962: 1 finding(s), 1 blocking.
The change adds tag-gated production releases and skips deployment under Workers Builds. The new clean-checkout gate overlooks untracked migration files, so it does not fully enforce release-only deployment and should be fixed before merging.
1 finding(s) dropped by the check
worker/deploy-production.mjs:15Add automated coverage for the production deployment gate: Missing automated coverage alone establishes no concrete failure: the script checks tags and tracked changes, runs migrations before deployment, and execFileSync throws on migration failure.
| const git = (...a) => execFileSync("git", a, { encoding: "utf8" }).trim(); | ||
| const tag = git("tag", "--points-at", "HEAD", "--list", "v*").split("\n")[0]; | ||
| if (!tag) { console.error("kypp: HEAD is not a v* tag; production deploys only a release"); process.exit(1); } | ||
| if (git("status", "--porcelain", "--untracked-files=no")) { console.error(`kypp: ${tag} has uncommitted changes`); process.exit(1); } |
There was a problem hiding this comment.
P2 Reject untracked deployment inputs before applying migrations
On a tagged local checkout containing an untracked worker/migrations/0013_experiment.sql, this check reports a clean tree. The next command applies that unreleased migration to production because Wrangler reads the migrations directory from disk. Include untracked files in the cleanliness check so the documented clean-tag requirement also protects migration inputs.
There was a problem hiding this comment.
Fixed: the cleanliness check is now plain git status --porcelain, so an untracked file (a stray migration included) refuses the deploy. Checked by tagging locally with an untracked worker/migrations/9999_x.sql: it exits 1 before wrangler runs.
Generated by Claude Code
vu1n
left a comment
There was a problem hiding this comment.
VPS review of 257eac0: 0 finding(s), 0 blocking.
The change moves production deployment to tested v* releases and adds checkout guards. The reported coverage gap establishes no concrete defect, so this finding does not block merging.
1 finding(s) dropped by the check
worker/deploy-production.mjs:10Add automated coverage for the production deployment guard: Missing automated coverage alone establishes no reachable failure: deploy:production invokes the script, which exits for Workers Builds, rejects untagged or dirty checkouts, and synchronously applies migrations before deployment, stopping if migration fails.
Requested by Vu · project thread
Part of moving to push-to-main with tag releases: a push to main must stop being a production deploy.
release.yml(new, onv*tags): runspython.ymlandworker.ymlon the tagged commit, thennpm run deploy:productionundertumbler run, authenticated by the job's GitHub OIDC token (tumbler rowkypp-release, subjectrepo:vu1n/kypp:ref:refs/tags/v*). No Cloudflare secret in GitHub. Then creates the GitHub release.deploy:productionis nowworker/deploy-production.mjs: skips under Workers Builds (WORKERS_CI), which still builds every main push, and otherwise refuses anything but a cleanv*checkout.python.ymlalso runs on push to main; both test workflows gainworkflow_call.Once merged, main stops deploying. Releases deploy only after Vu creates the
kypp-releasetoken row (tumbler admin); until then there's no deploy path, which is fine as long as nothing needs shipping.Verified: YAML parses;
featuremap.py checkclean;deploy-production.mjsskips withWORKERS_CI=1and exits 1 on an untagged checkout. The tag path runs for the first time on the first tag.