Skip to content

Resolve the CI-script exceptions outside the deploy pipeline - #3895

Merged
anth-volk merged 4 commits into
masterfrom
ci-scripts-exceptions
Oct 14, 2026
Merged

anth-volk merged 4 commits into
masterfrom
ci-scripts-exceptions

Conversation

@anth-volk

Copy link
Copy Markdown
Collaborator

Fixes #3893

Summary

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

  • alembic-v1-check.yml: the folded pytest command is now one line.
  • pr.yml: apt-get update and the Redis install are now two single-line steps.
  • sync-cloud-run-secrets.yml: the master-only gate is a new tested script, require_git_ref.sh. The existing workflow test now checks that it runs before authentication.
  • cleanup_cloud_run_images.sh gets tests with a fake gcloud: keep the newest N, dry run, within the limit, and failed deletes.
  • deploy_observability_collector.sh: the GITHUB_OUTPUT writes are grouped (shellcheck SC2129). Behaviour is unchanged.
  • Baselines:
    • The multi-line baseline drops from 10 to 7; the rest are in the deploy pipeline.
    • The untested-script and shellcheck baselines are now empty, so api.ci.workflow-scripts-tested and api.ci.shell-scripts-pass-shellcheck move from ratcheted to enforced.
  • Tool: once a CI rule is enforced, the ci-scripts guard still attributes its findings to that rule rather than [registry]. scripts/rules/ stays byte-identical with sim's copy.

Testing

  • New tests in tests/unit/test_workflow_guard_scripts.py: 6 pass. The related workflow and deploy-script tests pass too (139).
  • python scripts/run_quality_guards.py: all three guards pass. guard --base-ref rules-followups passes.
  • Before the baselines were trimmed, the guard flagged each fixed entry as stale, which shows the ratchet working.
  • python -m unittest discover -s scripts/rules/tests -t .: 75 pass.
  • ruff format/ruff check and actionlint are clean. All scripts pass shellcheck.

🤖 Generated with Claude Code

@anth-volk
anth-volk added this pull request to stack #3888 October 12, 2026 20:30
@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.58%. Comparing base (91b279d) to head (197b28e).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3895       +/-   ##
===========================================
+ Coverage   45.25%   87.58%   +42.33%     
===========================================
  Files         183      198       +15     
  Lines       11085    12223     +1138     
  Branches     1907     2161      +254     
===========================================
+ Hits         5016    10706     +5690     
+ Misses       5647      921     -4726     
- Partials      422      596      +174     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anth-volk
anth-volk force-pushed the ci-scripts-exceptions branch from 95427f1 to 04ea2b9 Compare October 13, 2026 16:56
@anth-volk
anth-volk removed this pull request from stack #3888 October 13, 2026 19:26
@anth-volk
anth-volk added this pull request to stack #3917 October 13, 2026 19:26
@anth-volk
anth-volk force-pushed the ci-scripts-exceptions branch from 04ea2b9 to cdfa056 Compare October 14, 2026 13:52
@anth-volk
anth-volk force-pushed the ci-scripts-exceptions branch 3 times, most recently from 7d5b7c3 to 8b6d1f4 Compare October 14, 2026 18:08
Base automatically changed from rules-followups to master October 14, 2026 19:44
@anth-volk
anth-volk force-pushed the ci-scripts-exceptions branch from 8b6d1f4 to 3617d28 Compare October 14, 2026 19:47
anth-volk and others added 3 commits October 15, 2026 00:04
- alembic-v1-check.yml: the folded pytest command becomes one line.
- pr.yml: split apt-get update and the Redis install into two steps.
- sync-cloud-run-secrets.yml: the master-only gate becomes
  require_git_ref.sh, tested, and checked before authentication.
- cleanup_cloud_run_images.sh: add tests with a fake gcloud.
- deploy_observability_collector.sh: group the GITHUB_OUTPUT writes
  (shellcheck SC2129); behaviour unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The multi-line baseline drops from 10 to 7 (the deploy pipeline remains).
The untested-script and shellcheck baselines are empty, so
api.ci.workflow-scripts-tested and api.ci.shell-scripts-pass-shellcheck
move from ratcheted to enforced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 (<repo>.ci.multiline-run-is-script, ...).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8f85864 replaced the inline, if-guarded "Require master branch" step in
sync-cloud-run-secrets.yml with a call to .github/scripts/require_git_ref.sh,
but left the step ahead of actions/checkout. The script is not in the
workspace until the checkout runs, so every run of the Cloud Run secret sync,
including runs from master, would have failed with "No such file or
directory" before syncing anything.

The gate now runs directly after the checkout and still before GCP
authentication, so a run from any other branch stops before it can
authenticate.

The workflow test only asserted that the gate comes before authentication,
which the broken ordering satisfied. It now also asserts that the checkout
comes before the gate; against the old ordering it fails with
"assert 765 < 625".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anth-volk
anth-volk marked this pull request as ready for review October 14, 2026 21:52
@anth-volk
anth-volk requested a review from a team as a code owner October 14, 2026 21:52
@anth-volk
anth-volk merged commit e93da19 into master Oct 14, 2026
26 of 28 checks passed
@anth-volk
anth-volk deleted the ci-scripts-exceptions branch October 14, 2026 21:52

This branch was successfully deployed

1 active deployment
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