Repository navigation
Commit 11d99bd
test(extensions): pin execute-bit restoration through the archive update route
Copilot review round 6 on #4351 reported that bundled updates lose
executable permissions on POSIX because safe_extract_archive writes ZIP
members without reapplying their recorded modes. The premise about the
extractor is accurate, but the conclusion does not hold: every archive
install funnels into install_from_directory (install_from_zip ->
install_from_archive -> install_from_directory), whose trailing
ensure_executable_scripts() call re-establishes execute bits on every
.specify/extensions/**/*.sh shebang script - pre-existing behavior whose
code comment describes exactly this stripped-mode scenario, and which
covers all POSIX-invoked scripts the bundled extensions ship (.ps1 and
.py files are interpreter-invoked and need no execute bit).
What the report does expose is that nothing pinned this round trip:
deleting the restoration call would have broken bundled updates exactly
as described while CI stayed green. Add the suggested regression test -
build an archive from a source with an executable script via
_archive_extension_directory, install it through install_from_zip, and
assert the installed script's execute bit. POSIX-only (execute bits do
not exist on Windows; the helper no-ops there).
Refs #4345
Assisted-by: Claude Code (model: claude-fable-5, autonomous)
Co-Authored-By: Claude Fable 5 <[email protected]>1 parent 6a7c475 commit 11d99bd
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
199 | 231 | | |
200 | 232 | | |
201 | 233 | | |
| |||
0 commit comments