Repository navigation
Keep a Subdirectory Out of the Scaffold's Unclaimed Secret Files - #4075
Conversation
The scaffold's widened directory scan counted every entry, so a subdirectory read as an unclaimed secret file, and one carrying a wrong-scope name stopped the run. A subdirectory now keeps its name taken, so nothing is created over it, without ever reading as a stray or as unclaimed. A symlink still reads as a file at its name whatever it resolves to, since that is the file lib/sh/secrets.sh refuses. Co-Authored-By: Claude Opus 5.5 <[email protected]>
configure.sh apply refuses any entry at a wrong-scope name, a directory included, so the scaffold stopping there is the two agreeing. Only the unclaimed list now leaves a subdirectory out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified, and the change includes targeted handling and regression tests for directory, wrong-scope, and symlink cases.
No open issues 🎉
What changed in this PR
This pull request updates secret scaffolding so subdirectories are not reported as unclaimed secret files while preserving wrong-scope and symlink handling.
Changes:
- Excludes subdirectories from unclaimed results while keeping their names occupied.
- Preserves blocking behavior for wrong-scope entries and symlink handling.
- Adds regression tests for directory and symlink cases.
| File | Description |
|---|---|
| tests/test_resolve_secrets.py | Adds regression tests covering expected and unclaimed subdirectories, wrong-scope directories, and symlink behavior. |
| spec/resolve_secrets.py | Updates scaffold scanning to exclude subdirectories from unclaimed results while retaining their names as occupied. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4075 +/- ##
========================================
Coverage 82.33% 82.34%
========================================
Files 38 38
Lines 12947 12951 +4
========================================
+ Hits 10660 10664 +4
Misses 2287 2287
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:
|
|
@coderabbitai review |
|
/review |
Action not completed
|
Fixes review findings on promotion #4070.
Summary
spec/resolve_secrets.pyscaffold: the directory scan counted every entry, so a subdirectory such asnotes/was listed as an unclaimed secret file. A subdirectory is now never unclaimed. Its name still counts as taken, so nothing is created over it, and an expected name held by one still reads as present, whichlib/sh/secrets.shthen refuses as no regular file.repo-config/configure.shplan_secretsrefuses any entry at a wrong-scope name ([ -e ] || [ -L ]), a directory included, so the scaffold stopping there keeps the two agreeing.lib/sh/secrets.shrefuses by name. Anis_file()filter would drop a dangling symlink or one to a directory, and theO_EXCLcreate over that name would then stop the run part way through.tests/test_resolve_secrets.py: a test that fails without the fix (subdirectories at an unclaimed and an expected name), one pinning that a wrong-scope subdirectory stops the run, and one pinning the symlink reading.Verification
python -m unittest discover -s tests -p test_resolve_secrets.py: 61 tests pass, and the subdirectory test fails against the unfixedscaffold.ruff check,ruff format --check,mypy, and the diff-scoped prose gate pass.Closes on promotion: none
🤖 Generated with Claude Code