Repository navigation
Move the deploy pipelines' multi-line steps into tested scripts - #763
Merged
Merged
Conversation
anth-volk
added this pull request to stack #755
October 12, 2026 20:30
2 tasks done
anth-volk
force-pushed
the
ci-scripts-deploy
branch
from
October 13, 2026 16:56
9dce974 to
192540a
Compare
anth-volk
force-pushed
the
ci-scripts-deploy
branch
3 times, most recently
from
October 14, 2026 14:47
514a55c to
9a3c0d6
Compare
anth-volk
force-pushed
the
ci-scripts-deploy
branch
from
October 14, 2026 17:29
9a3c0d6 to
ea8c6ce
Compare
anth-volk
force-pushed
the
ci-scripts-deploy
branch
4 times, most recently
from
October 14, 2026 20:14
24782e9 to
77d4972
Compare
deploy_entrypoint now captures the stable service state and resolves the candidate metadata with cloud-run-simulation-entry-stable-state.sh and cloud-run-simulation-entry-candidate.sh. Their bodies are the former inline shell unchanged, except that the service name comes from the step's env: instead of an interpolated expression; the $GITHUB_OUTPUT names and values, step ids and job outputs are unchanged. Tests run them against fake gcloud output with the real jq. Building and pushing the image become two single-line steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The UK private-data credential sync was one backslash-continued command and is now one line. The executor app name step substitutes the version inside its single echo instead of through a temporary variable; the output is the same for any version string. This commit originally also moved the update_routing "Publish active routing state" step into a tested modal-publish-routing.sh. #744 replaced that step on main with journaled plan, record and publish steps whose tests read the inline run: text, so those steps stay inline and baselined, and the script and its tests are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
deploy_stage12_v2 now selects the v2 application name and validates the deployed workers with stage12-v2-application-name.sh and stage12-validate-v2-workers.sh, and stage12_v2_ready checks the job results with stage12-deployment-ready.sh. Their bodies are the former inline shell, so they write the same name= and file= outputs, and a failing bundle lookup or validation still fails the step before anything is written. Tests cover the outputs, the exact uv calls, the failure paths and every combination of requested and skipped Stage 12 jobs. The packaged-bundle validation and the v2 manifest publication were one backslash-continued command each and are now one line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
deployment_ready now runs simulation-deployment-ready.sh, the former inline checks unchanged: every phase must succeed, the promotion must succeed when requested and be skipped otherwise, and an existing-stack deployment also needs a successful routing job and a finalize_routing run whose outcome is completed (the checks #744 added). Tests cover each combination; the existing guard test now finds the result checks in the script and the results in the step's env:, and #744's gate tests run the step from the repository root. The deployment summary call was one backslash-continued command and is now one line. That removes the last multi-line run: block this stack inherited from before #743 and #744. The 13 blocks those PRs added stay in the sim.ci.multiline-run-is-script baseline, so the rule stays ratcheted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stage12_v2_ready and deployment_ready now call stage12-deployment-ready.sh and simulation-deployment-ready.sh, but neither job checked out the repository, so on a runner the scripts would not exist and both gates would fail every deployment. Check out first in both jobs, and test that every job in the reusable deploy workflow checks out before it runs a repository script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
force-pushed
the
ci-scripts-deploy
branch
from
October 14, 2026 21:43
77d4972 to
e2c4b7c
Compare
anth-volk
marked this pull request as ready for review
October 14, 2026 21:52
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #761
Same-Repository Draft PR Check
PolicyEngine/policyengine-sim-api, not a personal fork.Summary
Phase 1 step 1.7, part 2: the production deploy pipelines (
simulation-deploy.reusable.yml,simulation-deploy.yml). Stacked on the part 1 PR.Every multi-line block that predates #743 and #744 is fixed. Those two PRs merged to
mainafter this one was written; see After rebasing onto #743 and #744 below.Moved into tested scripts:
cloud-run-simulation-entry-stable-state.shcloud-run-simulation-entry-candidate.shstage12-v2-application-name.shstage12-validate-v2-workers.shstage12-deployment-ready.shsimulation-deployment-ready.shOther changes:
echo.stage12_v2_readyanddeployment_readyjobs now check out the repository before running their scripts. Without the checkout, both gates would have failed every deployment. A test checks that every job running a repository script checks it out first.Behaviour is unchanged, apart from the checkout fix above. A PyYAML comparison of the old and new workflows shows identical job
if/needs/env/outputs/permissions/environmentand identical stepid/if/working-directory. The onlyenv:change addsENTRYPOINT_SERVICE: ${{ inputs.entrypoint_service }}to the two Cloud Run steps. Each script body equals the old inline code, with${{ inputs.* }}replaced by a variable.Points to review:
set -u; every variable they read comes fromenv:or the runner.#!/bin/bash, because an existing executor test requires it formodal-*/simulation-*scripts.After rebasing onto #743 and #744:
modal-publish-routing.shor its tests.simulation-deployment-ready.sh, with tests. Two of Gate releases on a numerical sentinel and make them reversible #744's gate tests now run from the repository root.run:blocks of their own: 7 insimulation-deploy.reusable.yml(sentinel checks and the routing steps) and 6 insimulation-rollback.yml. Their tests read the steps' inline shell from the workflow YAML, so moving them means rewriting those tests. That's left to a follow-up PR. Until then, the 13 stay inrules/baselines/ci-multiline-run.txt, andsim.ci.multiline-run-is-scriptstays ratcheted: the baseline can only shrink, so no new multi-line block can be added.Testing
tests/test_deploy_workflow_scripts.py: 40 tests using fakegcloud/uvand the realjq. They assert exact arguments, the full$GITHUB_OUTPUTtext and exit codes, including failure paths and every combination of job results.test_modal_scripts.py: 60 pass, or 77 including the manifest and package-update tests.guard --base-ref ci-scripts-exceptionspasses.🤖 Generated with Claude Code