Skip to content

ci(workflows): v1.3.0 — coolify-deploy can skip the wait and run a pre-deploy step [FACT-2001] - #5

Merged
practical-bot merged 1 commit into
mainfrom
ci/fact-2001-v1.3.0
Nov 17, 2026
Merged

practical-bot merged 1 commit into
mainfrom
ci/fact-2001-v1.3.0

Conversation

@jcotillo

Copy link
Copy Markdown
Contributor

Why

PracticalWorks is past its 2,000 free Actions minutes. Each frontdesk deploy bills ~10 minutes across three hosted jobs: build 5, a separate env sync 1, and the Coolify deploy 4, most of it idle polling. These two inputs let a caller cut the deploy to one job of under a minute.

What changed

  • coolify-deploy.yml takes wait (boolean, default true, so every existing caller is unchanged). With false, scripts/coolify-deploy.mjs posts the webhook, writes the deployment-uuid output and exits. It refuses health-url in that mode, because the URL would never be polled.
  • pre-deploy-run (default empty): a shell command run in a checkout of the caller's commit, after Infisical exports and setup-node, before the webhook. That folds frontdesk's env sync into the deploy job. The caller checkout happens before the .pw-shared checkout, so it can't clean that one away.
  • Script fallback refs move to v1.3.0 (the README-newest test pins this), and the README gets a v1.3.0 row plus documentation for both inputs.

After merge this needs the tag v1.3.0 on the merge commit. frontdesk's PR pins it.

Verification

  • node --test scripts/*.test.mjs: 30 pass, 0 fail. New tests cover wait: false (one POST, uuid output, no polls), refusing health-url with wait: false, and that the caller checkout comes before the shared one and the pre-deploy step runs after secrets/node and before the webhook.
  • actionlint: the only findings are job.workflow_sha / job.workflow_repository, which actionlint does not know yet. They are unchanged from main.

Refs: FACT-2001

🤖 Generated with Claude Code

…e-deploy step [FACT-2001]

coolify-deploy.yml takes `wait` (default true, so existing callers are
unchanged) and `pre-deploy-run`. With wait false the job posts the
webhook, outputs the deployment uuid and exits: the caller is billed
for seconds instead of the ~3 minutes Coolify takes, and something off
the runner watches the deployment (for frontdesk, the factory door).
health-url is refused with wait false, since it would never be polled.

pre-deploy-run runs a shell command in a checkout of the caller's commit
after Infisical and Node are set up, before the webhook, so an env sync
folds into the deploy job instead of a separate job with its own
one-minute minimum.

The script fallback refs move to v1.3.0.

Refs: FACT-2001

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jcotillo jcotillo added the merge:queued Hand this PR to the factory merge queue label Nov 17, 2026

@practical-bot practical-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review

The current FACT-2001 card is newer than the earlier PR comments: I judged this head against the current acceptance criteria and the split delivery recorded on the card. This PR correctly implements the .github v1.3.0 slice: wait defaults to true, wait: false posts once and returns the deployment UUID without polling, health-url is rejected when no wait occurs, and pre-deploy-run runs in the caller checkout after secrets/Node setup and before the webhook. The fallback ref and README release row are updated consistently. The tests also cover the new no-wait behavior and workflow ordering.

Claim ledger

  • “node --test scripts/*.test.mjs: 30 pass, 0 fail.” — PASS. Command: node --test scripts/*.test.mjs. Output: 1..30, # tests 30, # pass 30, # fail 0.
  • “New tests cover wait: false (one POST, uuid output, no polls), refusing health-url with wait: false, and that the caller checkout comes before the shared one and the pre-deploy step runs after secrets/node and before the webhook.” — PASS. The changed tests are 30 and 31 in scripts/coolify-deploy.test.mjs and scripts/workflows.test.mjs; the same 30-test command passed.
  • “actionlint: the only findings are job.workflow_sha / job.workflow_repository, which actionlint does not know yet. They are unchanged from main.” — UNVERIFIED in this review workspace: command actionlint returned sh: 1: actionlint: not found (exit 127). The PR CI guard / check and guard-tests both passed on head 037c72a; the local absence is an environment limitation, not a PR finding.

The PR checks were read in full: guard / check and guard-tests passed on head 037c72a. The local test command independently passed. git diff --check also passed.

REVIEWED DIFF: base=main files=6 lines=102

NEEDS VERIFICATION: After the dependent frontdesk and factory changes merge, the newest frontdesk Build & Push Docker Image run on main has exactly two jobs, the deploy job finishes in under a minute, and frontdesk /health answers 200.

REVIEW VERDICT: approve

@practical-bot
practical-bot merged commit 62b11bc into main Nov 17, 2026
2 checks passed
@practical-bot

Copy link
Copy Markdown

Review evidence for FACT-2001 on head 037c72aedb62ef8adecde53cfacc3aec4a899369:

  • node --test scripts/*.test.mjs: 30 passed, 0 failed.
  • PR CI guard / check and guard-tests: passed on this head.
  • git diff --check: passed.
  • actionlint: unavailable in this review workspace (command not found); the PR CI checks passed, so this is an environment limitation rather than a PR finding.
  • Reviewed diff: base main, 6 files, 102 changed lines.
  • Post-merge verification remains: newest frontdesk main run has exactly two jobs, deploy finishes under one minute, and /health returns 200.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge:queued Hand this PR to the factory merge queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants