Skip to content

Resolve the CI-script exceptions outside the deploy pipelines - #762

Merged
anth-volk merged 6 commits into
mainfrom
ci-scripts-exceptions
Oct 14, 2026
Merged

anth-volk merged 6 commits into
mainfrom
ci-scripts-exceptions

Conversation

@anth-volk

Copy link
Copy Markdown
Contributor

Fixes #760

Same-Repository Draft PR Check

  • This PR is a draft.
  • This PR is from a branch in PolicyEngine/policyengine-sim-api, not a personal fork.

Summary

Phase 1 step 1.7, part 1. Stacked on #757; the deploy-pipeline part is the next PR in the stack.

  • pr.yml:
    • The test steps use working-directory instead of cd.
    • The ruff format loop is now one uv run ruff format --check projects/*/src libs/*/src. It checks the same 131 files and now reports every unformatted directory, not just the first.
    • "Start services" is a new tested script, start-local-services.sh. As before, it exits 0 even if the services never come up; a test pins that.
    • The integration-test install and run are separate steps.
  • pr-image-smoke.yml: one line. The chmod was redundant, because the script is committed executable; a new test checks that every directly-run workflow script is executable.
  • publish-clients.yml: a new tested script, build-simulation-api-client.sh, takes RUN_NUMBER from env:.
  • Tests for the four untested scripts: the three dependency-update scripts are tested with fake gh, git and date, and update-policyengine-package.sh is now named in an executor test.
  • modal-precompute.sh: fixes SC2016 with byte-identical output, which a new assertion checks.
  • Baselines:
    • The multi-line baseline drops from 20 to 13.
    • The untested-script and shellcheck baselines are now empty, so those two rules are enforced.
  • Tool: the same ci-scripts attribution fix as the API. scripts/rules/ is byte-identical.

Testing

  • Entry tests: 185 pass. Executor test_modal_scripts.py plus the package-update tests: 74 pass.
  • Both guards pass, and guard --base-ref rules-followups passes. Rules tool unittest: 75 pass.
  • actionlint is clean; the earlier SC2086 note is gone. YAML parses, ruff format is clean, and the uv.lock files are unchanged.

🤖 Generated with Claude Code

@anth-volk
anth-volk added this pull request to stack #755 October 12, 2026 20:30
@anth-volk
anth-volk force-pushed the ci-scripts-exceptions branch from 77b5ce0 to d37053f Compare October 13, 2026 16:56
@anth-volk
anth-volk force-pushed the ci-scripts-exceptions branch 4 times, most recently from 49047a4 to 0754e3d Compare October 14, 2026 15:56
@anth-volk
anth-volk force-pushed the ci-scripts-exceptions branch 3 times, most recently from c1a4b0b to 4ff84e1 Compare October 14, 2026 19:46
Base automatically changed from rules-followups to main October 14, 2026 20:04
@anth-volk
anth-volk force-pushed the ci-scripts-exceptions branch from 4ff84e1 to 28b92f5 Compare October 14, 2026 20:04
anth-volk and others added 6 commits October 15, 2026 00:14
Print the local-run hint with escaped double quotes instead of single quotes
(SC2016). The message is byte-identical; a test now asserts it. With its only
baseline entry gone, sim.ci.shell-scripts-pass-shellcheck is enforced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run the three update-dependencies.yml scripts with fake gh, git and date
commands first on PATH and assert on every call and $GITHUB_OUTPUT value,
covering the open-PR and new-branch paths and their failures. A small
support module installs fakes that record their exact arguments.

update-policyengine-package.sh was already exercised through a fixture
module; name it in the executor test that checks the workflow runs it.

With its baseline empty, sim.ci.workflow-scripts-tested is enforced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Test matrix: run uv sync and pytest with the step's working-directory
  instead of cd.
- Lint: check every src directory with one ruff format --check call; it
  checks the same files as the loop and reports every unformatted directory
  instead of stopping at the first.
- Integration: start and wait for the local services with a tested
  start-local-services.sh, and split installing the integration test
  dependencies from running the tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
publish-clients.yml now versions and builds the simulation API client with a
tested build-simulation-api-client.sh, reading the run number from the step's
env: instead of interpolating it into shell. pr-image-smoke.yml drops the
redundant chmod: modal-image-smoke.sh is committed executable, and a test now
checks that every script a workflow runs directly is executable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sync scripts/rules with policyengine-api. Once a CI-script rule is enforced
it has no baseline, so its findings were reported as [registry]; fall back
to the rule whose id ends in the check's name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anth-volk
anth-volk force-pushed the ci-scripts-exceptions branch from 28b92f5 to 54fb7e8 Compare October 14, 2026 20:14
@anth-volk
anth-volk marked this pull request as ready for review October 14, 2026 21:43
@anth-volk
anth-volk requested a review from a team as a code owner October 14, 2026 21:43
@anth-volk
anth-volk merged commit ce94c89 into main Oct 14, 2026
14 checks passed
@anth-volk
anth-volk deleted the ci-scripts-exceptions branch October 14, 2026 21:43
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.

Resolve the CI-script exceptions outside the deploy pipeline

1 participant