Skip to content

fix(ci): restore executable bits on shell scripts and guard against regressions - #3809

Merged
cixzhang merged 1 commit into
meta:mainfrom
sangwook-dev:fix/sh-executable-bits
Jul 12, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
sangwook-dev:fix/sh-executable-bits

Conversation

@sangwook-dev

Copy link
Copy Markdown
Contributor

Summary

The daily Prune merged branches workflow has failed on every scheduled run since May 18 (30+ consecutive failures) with:

./scripts/prune-branches.sh: Permission denied
##[error]Process completed with exit code 126.

The bulk copyright-header rewrite (1a04b9d, #2193) changed scripts/prune-branches.sh from mode 100755 to 100644, dropping the executable bit the workflow relies on. The same commit also dropped the bit on internal/vibe-tests/scripts/publish-report.sh and smoke-test.sh (not CI-breaking, but same defect).

Because the failure only surfaced in a scheduled workflow, nobody was watching — merged branches have been piling up unpruned for weeks.

Changes

  • Restore 100755 on the three affected *.sh scripts (mode-only change).
  • Add scripts/check-executable-bits.mjs + check:executable-bits to the check:repo chain, so a dropped bit on any tracked *.sh file fails the Lint workflow on the offending PR instead of a scheduled workflow weeks later. Only *.sh files are checked — JS/TS scripts in this repo are always invoked through an explicit interpreter (node x.mjs, npx tsx x.ts), where the bit is irrelevant.

Test plan

  • node scripts/check-executable-bits.mjs fails (exit 1) against the pre-fix index, listing all three files
  • Passes after the mode restore (5 tracked *.sh files, all 100755)
  • pnpm check:repo passes end-to-end
  • ./scripts/prune-branches.sh now executes directly (previously Permission denied)

@vercel

vercel Bot commented Jul 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 11, 2026 12:31pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 11, 2026
…egressions

The bulk copyright-header rewrite (1a04b9d) dropped the executable bit
on three shell scripts. The daily 'Prune merged branches' workflow runs
./scripts/prune-branches.sh directly, so every scheduled run since then
has failed with 'Permission denied' (exit 126) — 30+ consecutive
failures, with merged branches piling up unpruned.

Restore the bit on all three scripts and add check:executable-bits to
the check:repo chain (which lint runs on every PR), so a dropped bit on
any tracked *.sh file fails CI instead of a scheduled workflow weeks
later. Only *.sh files are checked: JS/TS scripts here are always
invoked through an explicit interpreter, where the bit is irrelevant.
@sangwook-dev
sangwook-dev force-pushed the fix/sh-executable-bits branch from a3162b1 to 7bc0cb4 Compare July 11, 2026 12:28
@github-actions github-actions Bot added the community Authored by a community contributor (not on the eng/design team) label Jul 11, 2026

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, yeah these scripts should be executable.

@cixzhang
cixzhang merged commit 29d2b12 into meta:main Jul 12, 2026
19 checks passed
@sangwook-dev
sangwook-dev deleted the fix/sh-executable-bits branch July 12, 2026 05:34

This branch was successfully deployed

1 active deployment
Preview — 7bc0cb49 Deployed Jul 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants