Skip to content

refactor(cf-v2): one persistent-dev delivery job (fold manual dispatch into the delivery workflow) - #92

Merged
ClaudiaFang merged 1 commit into
mainfrom
claude/merge-persistent-dev-job-99f7ed
Nov 6, 2026
Merged

ClaudiaFang merged 1 commit into
mainfrom
claude/merge-persistent-dev-job-99f7ed

Conversation

@ClaudiaFang

Copy link
Copy Markdown
Member

What

The engine had two jobs named persistent-dev (both shown as "persistent-dev" per app in the Actions UI):

  1. delivery_persistent_dev - automatic DAG delivery via _cf-worker-delivery.yml
  2. persistent-dev - manual workflow_dispatch handler via _cf-worker-persistent-dev.yml

Now there is one. delivery_persistent_dev also fires for the protected dispatch and passes manual: true. _cf-worker-delivery.yml gains a manual boolean input and a manual job that runs instead of deploy / smoke / rollback. _cf-worker-persistent-dev.yml is deleted (no longer called). Nested check shows as persistent-dev / manual.

Preserved behaviours

  • Manual-only: the call's if has an extra branch requiring workflow_dispatch, dispatch_target == persistent-dev, hybrid, non-empty persistent_dev_ref, github.ref == persistent_dev_ref, not a verify phase; it never runs on a push. The engine still re-checks the ref (tested with the gate bypassed).
  • No automatic recovery / ledger: engine manual mode (stage all, no rollback step) or, with empty dev_build_cmd, the legacy two-command contract, which never touches the last-good ledger.
  • Environment <app>/dev is still a property of the manual job, so protection rules and approvals apply.
  • Concurrency: same group cfv2-dev-<repo>-<d1_lock_scope|app>, cancel-in-progress: false.
  • Permissions: the manual job keeps contents: read, deployments: write (not the delivery anchor's pull-requests: write); no Preview secrets referenced.
  • Automatic path unchanged: its if branch, migration/smoke/ledger/rollback and descriptor are untouched; deploy/smoke/rollback only gain && !inputs.manual.
  • Public interface: no workflow_call input/output/secret of _cf-worker-v2.yml changed, so callers need no change. The delivery workflow is internal (new optional manual input).

Tests

Updated test-workflow-contract.py and test-jobs.py (manual job executed for real via delivery_persistent_dev -> manual; new checks for the combined if, manual flag, permissions, groups, no recovery), and dropped the stale path from cf-worker-v2-ci.yml/docs.

  • scripts/cf-preview/test.sh full -> PASSED (full) (fast + 91s chain; contract 578 PASS, 0 FAIL). Baseline on origin/main was also green.
  • actionlint 1.7.12 (same as CI) on the 6 engine workflows: rc=0; shellcheck on scripts and composite actions: clean.
  • Callers checked against this branch's engine (copied to scratch, @v2 rewritten to local; callers not edited): innovation-apps diet-manager.yml + notification-hub.yml and heaven-monorepo origin/main cicd.yml -> actionlint rc=0. firstsun-blog uses _cf-worker-template.yml, not the v2 engine.

Not verified: a real GitHub run of the dispatch (needs a scratch caller run); the v2 tag is untouched, callers only pick this up when the tag is moved.

🤖 Generated with Claude Code

…ivery workflow

The engine had two jobs named `persistent-dev`: `delivery_persistent_dev` (automatic DAG
delivery) and a separate `persistent-dev` job calling `_cf-worker-persistent-dev.yml`
(manual workflow_dispatch). There is now ONE: `delivery_persistent_dev` also fires for the
protected dispatch and passes `manual: true`; `_cf-worker-delivery.yml` runs its new `manual`
job instead of deploy / smoke / rollback. `_cf-worker-persistent-dev.yml` is deleted.

Preserved: manual-only (dispatch, hybrid, non-empty persistent_dev_ref, github.ref ==
persistent_dev_ref, never on push or in a verify call); engine manual mode (no automatic
recovery) or the legacy two-command contract (never in the last-good ledger); `<app>/dev`
Environment; same concurrency group; narrower permissions (contents read, deployments
write); the automatic path and every public workflow_call input/output/secret unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@ClaudiaFang
ClaudiaFang marked this pull request as ready for review November 6, 2026 02:42
@ClaudiaFang
ClaudiaFang merged commit 9557b80 into main Nov 6, 2026
1 check passed
@ClaudiaFang
ClaudiaFang deleted the claude/merge-persistent-dev-job-99f7ed branch November 6, 2026 02:42
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