Commit f6bc374
Improve reliability of CI debugging scripts (#2056)
## Summary
This PR addresses the remaining reliability improvements from #1975 for
the CI debugging scripts.
**Changes made:**
- ✅ Add bounds check for array access in `bin/ci-run-failed-specs`
- Ensures the `UNIQUE_SPECS` array is not empty before accessing index 0
- Prevents potential errors with `set -u` (unset variable checking)
- ✅ Document Ruby version requirement in `bin/ci-switch-config`
- Clarifies that `script/convert` runs with the current Ruby
installation (not the target version)
- Documents Ruby 2.6+ compatibility requirement
**Already fixed in previous commits:**
- ✅ Removed `eval` from both scripts (uses case statement and array
execution instead)
- ✅ Added dependency checks (`gh`, `jq`, `bundle`)
- ✅ Improved git restore error handling
These changes improve script reliability without changing functionality.
All security concerns from the original issue have been addressed.
## Test plan
- [x] Verified bash syntax with `bash -n`
- [x] All linting passes (`bundle exec rubocop`, `yarn run eslint`,
`yarn start format.listDifferent`)
- [x] Pre-commit and pre-push hooks pass
- [x] Scripts maintain existing functionality
Closes #1975
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0d87578 commit f6bc374
2 files changed
+10
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
260 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| |||
0 commit comments