fix(codex): preserve SDD helper executable modes in packaging - #2069
Open
arimu1 wants to merge 1 commit into
Open
fix(codex): preserve SDD helper executable modes in packaging#2069arimu1 wants to merge 1 commit into
arimu1 wants to merge 1 commit into
Conversation
Codex marketplace installs of 6.2.0 left sdd-workspace, task-brief, and review-package non-executable (0644). Keep git 100755 modes in the portal zip/tar stage, assert them in packaging tests, and invoke sdd-workspace via bash from siblings so default OUTFILE still works when extractors drop +x. Fixes obra#2040
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Who is submitting this PR? (required)
What problem are you trying to solve?
Real report in #2040 from @michaelholcomb-creator: Superpowers 6.2.0 installed via the Codex marketplace cache arrived with these SDD helpers at mode
0644(non-executable):skills/subagent-driven-development/scripts/sdd-workspaceskills/subagent-driven-development/scripts/task-briefskills/subagent-driven-development/scripts/review-packageDirect invocation fails with
Permission denied. Running onlytask-brief/review-packagethrough Bash does not fully recover the default-output path, because both scripts previously directly executed their siblingsdd-workspace(which still needs +x).Upstream git already records all three as
100755. The portal packager (scripts/package-codex-plugin.sh) already aims to preserve modes, but:zipfile.extractall) leave helpers at0644even when the archive stores0755— verified locally: same archive → CLI unzip =755, Python extract =644.What does this PR change?
git archive | tar -xpf, re-applychmod a+xfor every staged path that is100755in the packaged ref, and fail closed if any remains non-executable. Accept linked worktrees (.gitfile) as valid checkouts.task-briefandreview-packageinvokesdd-workspacevia"${BASH:-bash}"so default OUTFILE resolution works when helpers are mode-stripped but invoked with Bash.0o755for all three SDD helpers; assert tar.gz modes for all three; add mode-stripped install-path coverage intest-sdd-workspace.sh.Is this change appropriate for the core library?
Yes. This is core Codex packaging infrastructure plus the shared SDD helper scripts every harness uses. It does not add third-party dependencies, domain skills, or project-specific config.
What alternatives did you consider?
bash task-briefstill fails when it directly execs non-executablesdd-workspace.Does this PR contain multiple unrelated changes?
No. All changes are for #2040: preserve/assert SDD helper execute bits in Codex packaging, and make sibling helper invocation work when installers drop +x.
Existing PRs
2040,executable bits SDD,sdd-workspace executable,marketplace package executable,100755,Permission deniedEnvironment tested
New harness support (required if this PR adds a new harness)
N/A — does not add a new harness.
Clean-session transcript for "Let's make a react todo list"
Evaluation
dev; preserve100755in packaging and/or fix install-path resilience.tests/claude-code/test-sdd-workspace.sh(16/16 PASS including new mode-stripped cases);tests/codex/test-package-codex-plugin.sh(all new/mode assertions PASS; one pre-existing zip timestamp timezone assertion still fails on this host — same class as open fix(codex): make package timestamps timezone-independent #2007, not introduced by this change).bash task-briefwith all three at0644failed when resolving default OUTFILE because it directly executedsdd-workspace.100755paths and fails closed; tests assert0o755in the zip for all three helpers + extract +x + tar modes; with helpers at0644,bash task-brief/bash review-packagestill write under.superpowers/sdd/<plan>/.Rigor
superpowers:writing-skillsand completed adversarial pressure testing (paste results below)Not a behavior-shaping skill prose change: only helper scripts (sibling invocation), packaging script, and tests. Adversarial cases: mode-stripped copies (
chmod a-x), direct exec of strippedsdd-workspace(still fails as expected), Python zip extract vs CLI unzip on the produced archive.Human review
Fixes #2040