Skip to content

fix(reusable): correct preflight script path to .openci/.github/scripts/#149

Merged
YiWang24 merged 2 commits into
mainfrom
fix/preflight-script-path
May 5, 2026
Merged

fix(reusable): correct preflight script path to .openci/.github/scripts/#149
YiWang24 merged 2 commits into
mainfrom
fix/preflight-script-path

Conversation

@YiWang24

@YiWang24 YiWang24 commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #148

Root Cause

All reusable workflows vendor OpenCI into .openci/ via resolve-openci, so scripts land at .openci/.github/scripts/. But four workflows were calling bash .github/scripts/preflight-secrets.sh — referencing the caller repo's own tree where the scripts don't exist — causing exit 127 on the Probe secrets step.

reusable-pr.yml had an additional issue: the preflight job had no OpenCI vendor step at all, so there was nothing to call.

Changes

File Fix
reusable-ci.yml Path: .github/.openci/.github/
reusable-stg.yml Path: .github/.openci/.github/ (2 calls)
reusable-prd.yml Path: .github/.openci/.github/ (2 calls)
reusable-pr.yml preflight Add resolve-openci step + fix path
reusable-pr.yml verify-sha Add resolve-openci step + fix path

Test plan

  • BATS suite passes (731 tests)
  • verify-sha hook passes
  • actionlint passes
  • Demo repo: PR workflow Probe secrets step completes without exit 127

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Summary by CodeRabbit

  • Chores
    • Updated continuous integration workflows to use centralized deployment scripts, improving consistency across the build and deployment pipeline.

YiWang24 added 2 commits May 4, 2026 21:51
Scripts live in OpenCI and are vendored to .openci/ by resolve-openci.
All four callers were referencing .github/scripts/ (the caller repo's own
tree, where the scripts don't exist), causing exit 127 on Probe secrets.

- reusable-ci.yml:  resolve-openci already ran; just fix the path
- reusable-stg.yml: resolve-openci already ran; just fix the path (2 calls)
- reusable-prd.yml: resolve-openci already ran; just fix the path (2 calls)
- reusable-pr.yml:  preflight had no OpenCI vendor at all; add
                    resolve-openci step before Probe secrets and fix path.
                    Same fix applied to verify-sha job.

Fixes #148
@qodo-code-review

Copy link
Copy Markdown
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9be1f521-88a6-42e2-8401-ba330d5e8942

📥 Commits

Reviewing files that changed from the base of the PR and between 8ed5397 and 5056d04.

📒 Files selected for processing (4)
  • .github/workflows/reusable-ci.yml
  • .github/workflows/reusable-pr.yml
  • .github/workflows/reusable-prd.yml
  • .github/workflows/reusable-stg.yml

📝 Walkthrough

Walkthrough

This PR redirects script invocations across four reusable GitHub Actions workflows to use a vendored OpenCI repository checkout at .openci/.github/scripts/ instead of local .github/scripts/ paths. The reusable-pr.yml workflow also adds explicit OpenCI checkout steps to enable this redirection.

Changes

Workflow Script Path Migration to Vendored OpenCI

Layer / File(s) Summary
OpenCI Checkout Setup
.github/workflows/reusable-pr.yml
Adds "Resolve OpenCI ref and checkout" steps in the preflight and verify-sha jobs to prepare the vendored OpenCI workspace before running scripts.
Preflight Secrets Script Migration
.github/workflows/reusable-ci.yml, reusable-pr.yml, reusable-prd.yml, reusable-stg.yml
Updates all invocations of preflight-secrets.sh from .github/scripts/ to .openci/.github/scripts/, applied consistently across four reusable workflows.
Verify-SHA Script Migration
.github/workflows/reusable-pr.yml
Updates the verify-sha job to invoke verify-sha-consistency.sh from the vendored .openci/.github/scripts/ path instead of the local .github/scripts/ path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Possibly related PRs

  • YiAgent/OpenCI#3: Introduces the initial OpenCI vendoring strategy and updates workflow steps to invoke scripts from the .openci/ path.
  • YiAgent/OpenCI#87: Bumps the vendored OpenCI revision in these same reusable workflows, directly related to the scripts being sourced.
  • YiAgent/OpenCI#133: Modifies OpenCI ref resolution and checkout patterns in reusable workflows to support the same vendoring integration.

Suggested labels

area:ci

Poem

🐰 The workflow scripts now hop from local paths,
To the OpenCI warren, via .openci/ trails,
A tidy vendored checkout, clean and bold—
Four reusable workflows, singing in harmony,
Preflight and verify-sha, from one shared source!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/preflight-script-path

Comment @coderabbitai help to get the list of available commands and usage tips.

@YiWang24 YiWang24 merged commit 3046cfc into main May 5, 2026
13 of 15 checks passed
@YiWang24 YiWang24 deleted the fix/preflight-script-path branch May 5, 2026 01:54
@sonarqubecloud

sonarqubecloud Bot commented May 5, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: preflight-secrets.sh path should use .openci/ prefix after checkout

1 participant