Skip to content

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

Draft
anth-volk wants to merge 3 commits into
rules-followupsfrom
ci-scripts-exceptions
Draft

anth-volk wants to merge 3 commits into
rules-followupsfrom
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 and others added 3 commits October 13, 2026 00:07
- 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>
@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.56%. Comparing base (344702f) to head (95427f1).

Additional details and impacted files
@@               Coverage Diff                @@
##           rules-followups    #3895   +/-   ##
================================================
  Coverage            87.56%   87.56%           
================================================
  Files                  198      198           
  Lines                12211    12211           
  Branches              2159     2159           
================================================
  Hits                 10692    10692           
  Misses                 922      922           
  Partials               597      597           

☔ 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.

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