Repository navigation
test(codex): verify public apply keeps mode 0700 - #807
Merged
Merged
Conversation
Co-authored-by: Codex <noreply@openai.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #807 +/- ##
==========================================
+ Coverage 82.35% 83.53% +1.18%
==========================================
Files 26 26
Lines 1213 1215 +2
==========================================
+ Hits 999 1015 +16
+ Misses 214 200 -14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
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.
Trigger
A user reported mode flipping on another Mac when public and private
chezmoi applyruns manage the same directories.Change
~/.codexat mode0755, copies the publicprivate_dot_codexsource entry, creates a minimal private-source fixture, and applies public → private → public to an isolated destination, asserting mode0700after every pass.private_attribute to every active shared target below, including the merged directory mode alignment change. This pull request adds the requested regression coverage; it does not need additional source renames.Private directory inventory and public overlap
The private permissions change sets the following 26 directories to mode
0700. The public ownership column accounts for public ignore rules. Theprivate_attribute removes group and other permissions, as described in the chezmoi source state attributes documentation.~/.aws~/.codex0700viaprivate_on the current public base~/.codex/hooks~/.config0700viaprivate_on the current public base~/.config/agents~/.config/alias0700viaprivate_on the current public base~/.config/chezmoi-private~/.config/fnox~/.config/mise0700viaprivate_on the current public base~/.config/mise/conf.d~/.config/work~/.local0700viaprivate_on the current public base~/.local/bin0700viaprivate_on the current public base~/.local/bin/work~/.local/bin/work/*.d(2 directories)~/.mise~/.ssh0700viaprivate_on the current public base~/.ssh/work.d~/.ssh/work.d/*(7 directories)The wildcard rows represent all private-only directories in those groups; no public-managed overlap is omitted.
Apply-order verification
Using an isolated temporary
HOME, separate source, cache, and persistent-state paths, and--include=dirs --exclude=externals,scripts --recursive=false --refresh-externals=never, I applied each active public target, then each private target, then each active public target again. The first public pass confirmed all 7 active shared targets were mode0700; the private pass confirmed all 26 private directories were mode0700; the final public pass confirmed all 26 remained mode0700.Work outside this diff
No real-machine apply, runtime permission change, or merge was performed. All apply checks targeted a temporary
HOME.Verified
make setupmake formatpython3 -m unittest discover -s tests/python(18 tests)~/.codexdirectory from0755to0700on macOS and Ubuntu.Not verified
Unrelated changes
None.