fix(procedures): traverse symlinked store dirs (find -H) - #36
Merged
Conversation
The titw claude-target projection lives under $TITW_HOME and is bridged into the corpus root as a symlink at titw/. A bare find treats the symlinked store as a file and silently scans nothing; -H follows command-line symlink arguments on both BSD and GNU find. Regression test added (measured on macOS: find link = 0 files, find -H link = 1).
📝 WalkthroughWalkthrough
ChangesQuery-records symlink support
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/procedures/scripts/query-records.sh`:
- Line 177: Mark both vendored divergence sites with literal PLUGIN ADAPTATION
comments: annotate the find -H change in
plugins/procedures/scripts/query-records.sh at lines 177-177, and annotate the
added symlink traversal regression test in
plugins/procedures/hooks/tests/query-records.bats at lines 751-751.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 4d81d6b1-7b72-4c6d-9c91-4e4682312b7a
📒 Files selected for processing (2)
plugins/procedures/hooks/tests/query-records.batsplugins/procedures/scripts/query-records.sh
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.
What
query-records.shscans each store withfind "$d". When a store dir is a symlink — which is exactly how the titw claude-target projection ($TITW_HOME/targets/claude/active) is bridged into the corpus root attitw/— a barefindtreats the symlink as a file and silently finds nothing. One flag fixes it:find -Hfollows symlinks given as command-line arguments (POSIX; verified on BSD and GNU find).Measured on macOS 25.5.0:
Why now
procedures 0.3.0 shipped the titw vendor store, but a live
titw install && titw syncprojects outside~/.claudeand needs the symlink bridge — without this fix the store lists in--list-storesyet returns zero records.Test
New bats regression test: a record under a symlinked
titw/store must be found by keyword (fails on barefind, passes with-H). Full suite green locally.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests