refactor: apply PR review feedback — glob members, fix deploy-cli broken links, sync CLAUDE.md#36
Conversation
Reorganize workspace so crate directories live under `crates/` instead of cluttering the repo root. Root now contains only config, docs, and the single `crates/` folder. Updated: - Cargo.toml workspace members and resq-tui path dependency - .github/labeler.yml glob paths - AGENTS.md, CLAUDE.md, README.md directory references - Per-crate AGENTS.md/CLAUDE.md relative links to root docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis pull request restructures the repository by moving all Rust crates into a top-level Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
Code Review
This pull request refactors the workspace by moving all crates into a new crates/ subdirectory, updating configuration files, documentation, and internal dependency paths accordingly. Feedback was provided regarding an improvement opportunity in Cargo.toml to use glob patterns for workspace members, which would enhance maintainability.
| members = [ | ||
| "resq-tui", | ||
| "cli", | ||
| "deploy-cli", | ||
| "health-checker", | ||
| "log-viewer", | ||
| "perf-monitor", | ||
| "flame-graph", | ||
| "bin-explorer", | ||
| "cleanup", | ||
| "resq-dsa", | ||
| "crates/resq-tui", | ||
| "crates/cli", | ||
| "crates/deploy-cli", | ||
| "crates/health-checker", | ||
| "crates/log-viewer", | ||
| "crates/perf-monitor", | ||
| "crates/flame-graph", | ||
| "crates/bin-explorer", | ||
| "crates/cleanup", | ||
| "crates/resq-dsa", | ||
| ] |
There was a problem hiding this comment.
For workspaces where all crates are located in a single subdirectory like crates/, it is a common best practice to use a glob pattern for the members list. This improves maintainability by automatically including any new crates added to the directory without requiring manual updates to the root Cargo.toml.
members = [
"crates/*",
]
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@crates/bin-explorer/CLAUDE.md`:
- Line 44: The CLAUDE.md mirror was edited directly (changing the Tools Guide
link); instead update the source file crates/bin-explorer/AGENTS.md with the
intended change (e.g., the Tools Guide link modification) and then run the
regeneration script ./agent-sync.sh to propagate the change into CLAUDE.md; do
not commit manual edits to CLAUDE.md—use AGENTS.md as the authoritative source
and regenerate the mirror.
In `@crates/cleanup/CLAUDE.md`:
- Line 42: Don't edit crates/cleanup/CLAUDE.md directly; instead update the
source file crates/cleanup/AGENTS.md with the intended change for the "Tools
Guide" entry and then run the synchronization script ./agent-sync.sh to
propagate the change into CLAUDE.md so the mirror (CLAUDE.md) is updated
correctly.
In `@crates/deploy-cli/AGENTS.md`:
- Around line 44-45: The AGENTS.md in crates/deploy-cli contains a broken
"Infrastructure Guide" link pointing to ../../../infra/AGENTS.md and also
references non-existent infra/docker/ and infra/k8s/overlays/ paths; update
crates/deploy-cli/AGENTS.md by either removing the "Infrastructure Guide" bullet
or changing its target to a valid existing document (for example point it to
../../AGENTS.md or another real infra doc), and remove or correct the
infra/docker and infra/k8s/overlays references so all links point to actual
files in the repo (search for the "Infrastructure Guide" line and the
infra/docker and infra/k8s/overlays mentions to locate the exact spots).
In `@crates/deploy-cli/CLAUDE.md`:
- Line 45: The change to the mirrored file CLAUDE.md should not be edited
directly; instead apply the same edit (update the Tools Guide link entry
currently changed in CLAUDE.md) to the source file AGENTS.md in
crates/deploy-cli, then regenerate the mirror by running the sync script
./agent-sync.sh so CLAUDE.md is updated automatically; do not commit edits
directly to CLAUDE.md.
🪄 Autofix (Beta)
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: defaults
Review profile: CHILL
Plan: Pro
Run ID: bace793d-d5d7-4186-a337-7e4f093baa86
📒 Files selected for processing (105)
.claude/settings.local.json.github/labeler.ymlAGENTS.mdCLAUDE.mdCargo.tomlREADME.mdcrates/bin-explorer/AGENTS.mdcrates/bin-explorer/CHANGELOG.mdcrates/bin-explorer/CLAUDE.mdcrates/bin-explorer/Cargo.tomlcrates/bin-explorer/README.mdcrates/bin-explorer/src/analysis/mod.rscrates/bin-explorer/src/cache.rscrates/bin-explorer/src/lib.rscrates/bin-explorer/src/main.rscrates/bin-explorer/src/tui.rscrates/cleanup/AGENTS.mdcrates/cleanup/CHANGELOG.mdcrates/cleanup/CLAUDE.mdcrates/cleanup/Cargo.tomlcrates/cleanup/README.mdcrates/cleanup/src/main.rscrates/cli/AGENTS.mdcrates/cli/CHANGELOG.mdcrates/cli/CLAUDE.mdcrates/cli/Cargo.tomlcrates/cli/README.mdcrates/cli/src/commands/audit.rscrates/cli/src/commands/copyright.rscrates/cli/src/commands/cost.rscrates/cli/src/commands/dev.rscrates/cli/src/commands/docs.rscrates/cli/src/commands/explore.rscrates/cli/src/commands/lqip.rscrates/cli/src/commands/mod.rscrates/cli/src/commands/pre_commit.rscrates/cli/src/commands/secrets.rscrates/cli/src/commands/tree_shake.rscrates/cli/src/commands/version.rscrates/cli/src/gitignore.rscrates/cli/src/lib.rscrates/cli/src/main.rscrates/cli/src/utils.rscrates/deploy-cli/.gitignorecrates/deploy-cli/AGENTS.mdcrates/deploy-cli/CHANGELOG.mdcrates/deploy-cli/CLAUDE.mdcrates/deploy-cli/Cargo.tomlcrates/deploy-cli/README.mdcrates/deploy-cli/src/docker.rscrates/deploy-cli/src/k8s.rscrates/deploy-cli/src/main.rscrates/flame-graph/.env.examplecrates/flame-graph/AGENTS.mdcrates/flame-graph/CHANGELOG.mdcrates/flame-graph/CLAUDE.mdcrates/flame-graph/Cargo.tomlcrates/flame-graph/README.mdcrates/flame-graph/src/main.rscrates/health-checker/.env.examplecrates/health-checker/AGENTS.mdcrates/health-checker/CHANGELOG.mdcrates/health-checker/CLAUDE.mdcrates/health-checker/Cargo.tomlcrates/health-checker/README.mdcrates/health-checker/src/integration.rscrates/health-checker/src/main.rscrates/health-checker/src/services.rscrates/log-viewer/.gitignorecrates/log-viewer/AGENTS.mdcrates/log-viewer/CHANGELOG.mdcrates/log-viewer/CLAUDE.mdcrates/log-viewer/Cargo.tomlcrates/log-viewer/README.mdcrates/log-viewer/src/main.rscrates/log-viewer/src/parser.rscrates/log-viewer/src/sources.rscrates/perf-monitor/AGENTS.mdcrates/perf-monitor/CHANGELOG.mdcrates/perf-monitor/CLAUDE.mdcrates/perf-monitor/Cargo.tomlcrates/perf-monitor/README.mdcrates/perf-monitor/src/main.rscrates/resq-dsa/CHANGELOG.mdcrates/resq-dsa/Cargo.tomlcrates/resq-dsa/src/bloom.rscrates/resq-dsa/src/count_min.rscrates/resq-dsa/src/graph.rscrates/resq-dsa/src/heap.rscrates/resq-dsa/src/lib.rscrates/resq-dsa/src/trie.rscrates/resq-dsa/tests/complexity.rscrates/resq-tui/AGENTS.mdcrates/resq-tui/CHANGELOG.mdcrates/resq-tui/CLAUDE.mdcrates/resq-tui/Cargo.tomlcrates/resq-tui/README.mdcrates/resq-tui/src/console.rscrates/resq-tui/src/detect.rscrates/resq-tui/src/lib.rscrates/resq-tui/src/progress.rscrates/resq-tui/src/spinner.rscrates/resq-tui/src/table.rscrates/resq-tui/src/terminal.rscrates/resq-tui/src/theme.rs
| ## References | ||
| - [README](README.md) | ||
| - [Tools Guide](../AGENTS.md) | ||
| - [Tools Guide](../../AGENTS.md) |
There was a problem hiding this comment.
Do not edit mirrored CLAUDE.md directly.
Line 44 modifies a generated mirror file. Please update crates/bin-explorer/AGENTS.md and regenerate with ./agent-sync.sh so the mirror stays authoritative.
As per coding guidelines AGENTS.md is the source of truth for the local CLAUDE.md mirror — never edit CLAUDE.md directly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@crates/bin-explorer/CLAUDE.md` at line 44, The CLAUDE.md mirror was edited
directly (changing the Tools Guide link); instead update the source file
crates/bin-explorer/AGENTS.md with the intended change (e.g., the Tools Guide
link modification) and then run the regeneration script ./agent-sync.sh to
propagate the change into CLAUDE.md; do not commit manual edits to CLAUDE.md—use
AGENTS.md as the authoritative source and regenerate the mirror.
| ## References | ||
| - [README](README.md) | ||
| - [Tools Guide](../AGENTS.md) | ||
| - [Tools Guide](../../AGENTS.md) |
There was a problem hiding this comment.
Avoid direct edits in mirrored CLAUDE.md.
Line 42 should be updated via crates/cleanup/AGENTS.md, then propagated with ./agent-sync.sh rather than editing this mirror manually.
As per coding guidelines AGENTS.md is the source of truth for the local CLAUDE.md mirror — never edit CLAUDE.md directly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@crates/cleanup/CLAUDE.md` at line 42, Don't edit crates/cleanup/CLAUDE.md
directly; instead update the source file crates/cleanup/AGENTS.md with the
intended change for the "Tools Guide" entry and then run the synchronization
script ./agent-sync.sh to propagate the change into CLAUDE.md so the mirror
(CLAUDE.md) is updated correctly.
| - [Infrastructure Guide](../../../infra/AGENTS.md) | ||
| - [Tools Guide](../../AGENTS.md) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the infra directory location and the correct relative path
echo "=== Repository structure ==="
tree -L 2 -d -I 'target|node_modules' || find . -maxdepth 2 -type d -name 'infra' -o -name 'crates'
echo -e "\n=== Checking if infra exists at repo root ==="
if [ -f "infra/AGENTS.md" ]; then
echo "✓ infra/AGENTS.md exists at repo root"
echo " Correct path from crates/deploy-cli/: ../../infra/AGENTS.md"
else
echo "✗ infra/AGENTS.md not found at repo root"
fi
echo -e "\n=== Searching for infra/AGENTS.md location ==="
fd -t f "AGENTS.md" infra 2>/dev/null || find . -path "*/infra/AGENTS.md" -type fRepository: resq-software/crates
Length of output: 506
🏁 Script executed:
#!/bin/bash
echo "=== Searching for any 'infra' directory ==="
find . -type d -name 'infra' 2>/dev/null | head -20
echo -e "\n=== Searching for any AGENTS.md files ==="
find . -name 'AGENTS.md' -type f 2>/dev/null
echo -e "\n=== Reading the crates/deploy-cli/AGENTS.md file around lines 40-50 ==="
if [ -f "crates/deploy-cli/AGENTS.md" ]; then
wc -l crates/deploy-cli/AGENTS.md
echo "---"
sed -n '35,50p' crates/deploy-cli/AGENTS.md
fiRepository: resq-software/crates
Length of output: 991
🏁 Script executed:
#!/bin/bash
echo "=== Checking references in other crates' AGENTS.md files ==="
for file in ./crates/*/AGENTS.md ./AGENTS.md; do
if [ -f "$file" ]; then
echo -e "\n--- $file ---"
grep -E "\[.*Guide\]|Infrastructure|Tools" "$file" || echo "(no matches)"
fi
doneRepository: resq-software/crates
Length of output: 926
🏁 Script executed:
#!/bin/bash
echo "=== Git history for deploy-cli/AGENTS.md ==="
git log -p --follow -S "Infrastructure Guide" -- crates/deploy-cli/AGENTS.md 2>/dev/null | head -100
echo -e "\n=== Recent commits for deploy-cli/AGENTS.md ==="
git log --oneline -n 10 -- crates/deploy-cli/AGENTS.md 2>/dev/null
echo -e "\n=== Current git status ==="
git status crates/deploy-cli/AGENTS.md 2>/dev/null || echo "(not a git repo or file status unavailable)"Repository: resq-software/crates
Length of output: 311
🏁 Script executed:
#!/bin/bash
echo "=== Checking pre-refactoring state of AGENTS.md ==="
git show 1665be3^:deploy-cli/AGENTS.md 2>/dev/null | tail -20 || echo "Cannot retrieve pre-refactoring version"
echo -e "\n=== Checking what changed in the refactoring ==="
git show 1665be3 -- deploy-cli/AGENTS.md 2>/dev/null | grep -A5 -B5 "infra" || echo "No infra-related changes in the diff"
echo -e "\n=== Full diff for deploy-cli/AGENTS.md in that commit ==="
git show 1665be3 -- crates/deploy-cli/AGENTS.md 2>/dev/null | head -150 || echo "Cannot retrieve diff"Repository: resq-software/crates
Length of output: 2844
Remove or correct the broken Infrastructure Guide link.
The Infrastructure Guide link on line 44 points to ../../../infra/AGENTS.md, which does not exist. There is no infra/ directory anywhere in the repository. The Tools Guide link on line 45 correctly references ../../AGENTS.md (the root-level AGENTS.md file).
Either remove the Infrastructure Guide link or correct it to point to an actual document in the repository.
Note: The same file references infra/docker/ and infra/k8s/overlays/ on line 27, which also do not exist.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@crates/deploy-cli/AGENTS.md` around lines 44 - 45, The AGENTS.md in
crates/deploy-cli contains a broken "Infrastructure Guide" link pointing to
../../../infra/AGENTS.md and also references non-existent infra/docker/ and
infra/k8s/overlays/ paths; update crates/deploy-cli/AGENTS.md by either removing
the "Infrastructure Guide" bullet or changing its target to a valid existing
document (for example point it to ../../AGENTS.md or another real infra doc),
and remove or correct the infra/docker and infra/k8s/overlays references so all
links point to actual files in the repo (search for the "Infrastructure Guide"
line and the infra/docker and infra/k8s/overlays mentions to locate the exact
spots).
| - [Infrastructure Guide](../../infra/AGENTS.md) | ||
| - [Tools Guide](../AGENTS.md) | ||
| - [Infrastructure Guide](../../../infra/AGENTS.md) | ||
| - [Tools Guide](../../AGENTS.md) |
There was a problem hiding this comment.
CLAUDE.md mirror should not be hand-edited.
Line 45 is a direct change in a mirrored file. Apply this in crates/deploy-cli/AGENTS.md and regenerate via ./agent-sync.sh.
As per coding guidelines AGENTS.md is the source of truth for the local CLAUDE.md mirror — never edit CLAUDE.md directly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@crates/deploy-cli/CLAUDE.md` at line 45, The change to the mirrored file
CLAUDE.md should not be edited directly; instead apply the same edit (update the
Tools Guide link entry currently changed in CLAUDE.md) to the source file
AGENTS.md in crates/deploy-cli, then regenerate the mirror by running the sync
script ./agent-sync.sh so CLAUDE.md is updated automatically; do not commit
edits directly to CLAUDE.md.
|
@copilot could you take into account the suggestions from the feedback within this PR thus far, and apply the changes? |
…s, sync CLAUDE.md) Agent-Logs-Url: https://github.com/resq-software/crates/sessions/95f87982-dcf3-41f4-95ef-ea2906c1e1ae Co-authored-by: WomB0ComB0 <95197809+WomB0ComB0@users.noreply.github.com>
Applied all review feedback in commit
|
…ed) (#81) - auto-merge.yml: replace github.actor_id check with the immutable pull_request payload (github.event.pull_request.user.login). The actor context can be subverted on workflow re-runs, while user.login on the pull_request event is fixed at trigger time. - release-plz.yml: drop the explicit checkout `token` input and set persist-credentials: false. release-plz-action consumes GITHUB_TOKEN from the step's env block for git push and API calls, so persisting the credential in .git/config only widens the leak surface.
Three issues flagged in review on the
crates/restructuring PR.Changes
Cargo.toml: Replace explicit 10-cratememberslist with"crates/*"glob — new crates undercrates/are included automatically.crates/deploy-cli/AGENTS.md: Remove brokenInfrastructure Guidelink (pointed to non-existent../../../infra/AGENTS.md) and replace the rule referencing non-existentinfra/docker/andinfra/k8s/overlays/paths.crates/deploy-cli/CLAUDE.md: Regenerated fromAGENTS.mdvia./agent-sync.shrather than edited directly, per the mirror convention. All 10 AGENTS.md/CLAUDE.md pairs confirmed in sync.