Triggered 'Vortex - Test docs' from both per-major test workflows. - #2880
Conversation
'workflow_run' triggers are registered from the default branch only, so this file is the single definition serving branches of every major. Listening for 'Vortex - Test installer' alone leaves the required 'Vortex - Test docs' status unreported on '2.x', which ships 'Vortex - Test CLI' instead, blocking every '2.x' pull request. The artifact download now resolves from the triggering run rather than by workflow name, which selects the most recent successful run across all branches and can yield a binary built from an unrelated commit.
WalkthroughThe documentation workflow now runs after successful installer or CLI test workflows. It selects the matching artifact and PHAR name, retrieves the artifact from the triggering run, and installs the selected binary. ChangesDocumentation binary workflow
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2880 +/- ##
==========================================
- Coverage 86.81% 86.38% -0.43%
==========================================
Files 100 93 -7
Lines 4846 4687 -159
Branches 47 3 -44
==========================================
- Hits 4207 4049 -158
+ Misses 639 638 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/vortex-test-docs.yml:
- Around line 63-77: The workflow must separate untrusted execution from the
privileged workflow_run job: in .github/workflows/vortex-test-docs.yml lines
63-99, move checkout, artifact download/execution, and package scripts into an
unprivileged pull_request job, keeping write permissions and deployment secrets
out of it; in .vortex/tests/zizmor.yml lines 20-22, remove or narrow the
dangerous-triggers exception so it no longer permits this untrusted-code
execution pattern.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: c0539d7f-463f-4a96-9e71-e5cb28c13540
📒 Files selected for processing (2)
.github/workflows/vortex-test-docs.yml.vortex/tests/zizmor.yml
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6a6c6ba072919006761e7a76--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
Summary
vortex-test-docs.ymlis defined once, on the default branch (main), because GitHub only registersworkflow_runtriggers from a repository's default-branch copy of a workflow file, so that single definition has to serve pull requests on every major version's branches. It previously listened only forVortex - Test installer, a workflow that does not exist on the2.xlineage, where the installer was relocated into thedrevops/vortex-clipackage and its test workflow renamed toVortex - Test CLI. As a result the trigger never fired on2.xbranches, the requiredVortex - Test docsstatus was never posted, and every2.xpull request was blocked indefinitely (the failure mode behind PR #2877, for example). This change makes the workflow trigger on bothVortex - Test installerandVortex - Test CLI, derives the artifact name and phar filename from whichever workflow triggered the run, and downloads the artifact byrun_idinstead of by workflow name so it always matches the triggering commit rather than the most recent successful run across all branches.Changes
.github/workflows/vortex-test-docs.ymlVortex - Test CLIalongsideVortex - Test installerto theworkflow_runtrigger list, so the workflow fires regardless of which major produced the triggering run.envvarsBINARY_ARTIFACTandBINARY_FILE, derived fromgithub.event.workflow_run.name, so the artifact name (vortex-installervsvortex-cli) and the downloaded phar filename (installer.pharvsvortex.phar) match whichever workflow triggered the run.run_id: ${{ github.event.workflow_run.id }}instead of byworkflow: vortex-test-installer.yml, because resolving by workflow name returns the most recent successful run across all branches and can download a binary built from an unrelated commit..vortex/tests/zizmor.ymlvortex-test-docsignore-rule comment to describe the trigger generically (a per-major test workflow) instead of naming onlyVortex - Test installer, keeping it accurate now that two workflows can trigger the chained run.Before / After
Before - the trigger list names one workflow, so only
main-lineage runs match, and the artifact is fetched by workflow name (latest successful run on any branch):After - both workflows are listed, the artifact/file names are derived from the triggering run's own name, and the download is pinned to that exact run:
Summary by CodeRabbit
Bug Fixes
Documentation