Skip to content

Deploy kypp.vu1n.dev from v* tags, not main - #97

Merged
vu1n merged 3 commits into
mainfrom
claude/project-thread-aivb1g
Nov 11, 2026
Merged

vu1n merged 3 commits into
mainfrom
claude/project-thread-aivb1g

Conversation

@vu1n

@vu1n vu1n commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

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, on v* tags): runs python.yml and worker.yml on the tagged commit, then npm run deploy:production under tumbler run, authenticated by the job's GitHub OIDC token (tumbler row kypp-release, subject repo:vu1n/kypp:ref:refs/tags/v*). No Cloudflare secret in GitHub. Then creates the GitHub release.
  • deploy:production is now worker/deploy-production.mjs: skips under Workers Builds (WORKERS_CI), which still builds every main push, and otherwise refuses anything but a clean v* checkout.
  • python.yml also runs on push to main; both test workflows gain workflow_call.
  • Docs: worker README deploy section, hosted-worker gotcha.

Once merged, main stops deploying. Releases deploy only after Vu creates the kypp-release token row (tumbler admin); until then there's no deploy path, which is fine as long as nothing needs shipping.

Verified: YAML parses; featuremap.py check clean; deploy-production.mjs skips with WORKERS_CI=1 and exits 1 on an untagged checkout. The tag path runs for the first time on the first tag.

@vu1n vu1n self-assigned this Nov 11, 2026

@vu1n vu1n left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:26 Add 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 vu1n left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:15 Add 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.

Comment thread worker/deploy-production.mjs Outdated
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); }

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 vu1n left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:10 Add 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.

@vu1n
vu1n merged commit c072c42 into main Nov 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant