Skip to content

fix(ci): resolve smoke test race condition and add explicit CodeQL workflow#308

Merged
rhuanbarreto merged 1 commit into
mainfrom
fix/ci-smoke-test-race-and-codeql
May 11, 2026
Merged

fix(ci): resolve smoke test race condition and add explicit CodeQL workflow#308
rhuanbarreto merged 1 commit into
mainfrom
fix/ci-smoke-test-race-and-codeql

Conversation

@rhuanbarreto
Copy link
Copy Markdown
Contributor

Summary

  • Smoke test race condition: On release-commit pushes to main, the Validate and Release workflows trigger concurrently. The smoke tests naively used gh release view to get the latest tag, but the release binaries hadn't been uploaded yet — causing a 404. Fixed by iterating gh release list --limit 5 and selecting the first release with the expected platform asset (archgate-win32-x64.zip / archgate-linux-x64.tar.gz).
  • Explicit CodeQL workflow: GitHub's CodeQL "default setup" silently skipped PR chore(deps): update devdependencies (non-major) #279 (Renovate deps update), dropping the Scorecard SAST score from 10 to 9 (alert #14). Added .github/workflows/codeql.yml that runs on push, PR, and weekly schedule to guarantee coverage.
  • codeql-action bump: Updated codeql-action/upload-sarif in scorecard.yml from v4.35.3 to v4.35.4 for consistency.

Post-merge action

After merging, disable the CodeQL "default setup" in Settings > Code security > Code scanning to avoid duplicate analyses.

Test plan

  • Validate workflow passes (lint, typecheck, format, test, ADR check, knip, build)
  • Windows smoke test passes — install.ps1 step finds a release with uploaded assets
  • Linux smoke test passes — install.sh step finds a release with uploaded assets
  • CodeQL workflow triggers on this PR and produces analyses for both javascript-typescript and actions

…rkflow

The Validate and Release workflows trigger concurrently on release-commit
pushes to main. Smoke tests that naively query the latest release tag get
a 404 because release-binaries.yml hasn't uploaded the platform assets yet.

Fix the race by iterating recent releases and selecting the first one that
has the expected asset uploaded. Also add an explicit CodeQL workflow to
replace GitHub's default setup, which silently skipped PR #279 and dropped
the Scorecard SAST score to 9/10.

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: d7ba226
Status: ✅  Deploy successful!
Preview URL: https://8123f943.archgate-cli.pages.dev
Branch Preview URL: https://fix-ci-smoke-test-race-and-c.archgate-cli.pages.dev

View logs

@sentry
Copy link
Copy Markdown

sentry Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@rhuanbarreto
Copy link
Copy Markdown
Contributor Author

Note: Disabled the CodeQL "default setup" via the API (gh api repos/archgate/cli/code-scanning/default-setup -X PATCH -f state=not-configured) — it conflicted with the new explicit workflow (CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled). Re-ran the failed jobs; they should pass now. No post-merge action needed.

@rhuanbarreto rhuanbarreto merged commit f88bb7e into main May 11, 2026
13 of 15 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/ci-smoke-test-race-and-codeql branch May 11, 2026 22:49
@archgatebot archgatebot Bot mentioned this pull request May 11, 2026
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