Skip to content

refactor: apply PR review feedback — glob members, fix deploy-cli broken links, sync CLAUDE.md#36

Merged
WomB0ComB0 merged 3 commits intomasterfrom
refactor/crates-subdirectory
Apr 8, 2026
Merged

refactor: apply PR review feedback — glob members, fix deploy-cli broken links, sync CLAUDE.md#36
WomB0ComB0 merged 3 commits intomasterfrom
refactor/crates-subdirectory

Conversation

@WomB0ComB0
Copy link
Copy Markdown
Member

@WomB0ComB0 WomB0ComB0 commented Apr 7, 2026

Three issues flagged in review on the crates/ restructuring PR.

Changes

  • Cargo.toml: Replace explicit 10-crate members list with "crates/*" glob — new crates under crates/ are included automatically.
# before
members = [
    "crates/resq-tui",
    "crates/cli",
    ...10 entries...
]

# after
members = ["crates/*"]
  • crates/deploy-cli/AGENTS.md: Remove broken Infrastructure Guide link (pointed to non-existent ../../../infra/AGENTS.md) and replace the rule referencing non-existent infra/docker/ and infra/k8s/overlays/ paths.

  • crates/deploy-cli/CLAUDE.md: Regenerated from AGENTS.md via ./agent-sync.sh rather than edited directly, per the mirror convention. All 10 AGENTS.md/CLAUDE.md pairs confirmed in sync.

WomB0ComB0 and others added 2 commits April 7, 2026 18:23
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>
@github-actions github-actions Bot added size/L C-Documentation Improvements or additions to documentation A-DevOps CI/CD and tooling and removed size/L labels Apr 7, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

This pull request restructures the repository by moving all Rust crates into a top-level crates/ directory. Accompanying updates adjust workspace member paths in Cargo.toml, label mappings in GitHub Actions, relative documentation links across all crate subdirectories, and references in root-level documentation files.

Changes

Cohort / File(s) Summary
Configuration & Build
.claude/settings.local.json, .github/labeler.yml, Cargo.toml
Removed Bash(cargo check:*) permission; updated GitHub labeler crate paths to match new crates/<crate-name>/** structure; adjusted workspace member paths and resq-tui dependency path to reference crates/ subdirectory.
Root Documentation
AGENTS.md, CLAUDE.md, README.md
Updated workspace layout documentation to reflect new crates/ directory structure for all crates (e.g., cli/crates/cli/, resq-tui/crates/resq-tui/); adjusted documentation reference links accordingly.
Crate-level Documentation Links
crates/bin-explorer/..., crates/cleanup/..., crates/cli/..., crates/deploy-cli/..., crates/flame-graph/..., crates/health-checker/..., crates/log-viewer/..., crates/perf-monitor/..., crates/resq-tui/... (both AGENTS.md and CLAUDE.md files)
Updated relative documentation link paths from ../AGENTS.md to ../../AGENTS.md (and ../../../ for deploy-cli's infrastructure reference) to account for crates now residing in subdirectories.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hops with glee, I see the way,
Crates nested deep, in order today!
From scattered roots to folders neat,
The restructure's done—what a treat!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'refactor: move all crates into crates/ subdirectory' clearly and directly summarizes the main change in the changeset: reorganizing the repository structure by moving all crate directories into a new crates/ subdirectory.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/crates-subdirectory

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Cargo.toml
Comment on lines 16 to 27
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",
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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/*",
]

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4c4a637 and 1665be3.

📒 Files selected for processing (105)
  • .claude/settings.local.json
  • .github/labeler.yml
  • AGENTS.md
  • CLAUDE.md
  • Cargo.toml
  • README.md
  • crates/bin-explorer/AGENTS.md
  • crates/bin-explorer/CHANGELOG.md
  • crates/bin-explorer/CLAUDE.md
  • crates/bin-explorer/Cargo.toml
  • crates/bin-explorer/README.md
  • crates/bin-explorer/src/analysis/mod.rs
  • crates/bin-explorer/src/cache.rs
  • crates/bin-explorer/src/lib.rs
  • crates/bin-explorer/src/main.rs
  • crates/bin-explorer/src/tui.rs
  • crates/cleanup/AGENTS.md
  • crates/cleanup/CHANGELOG.md
  • crates/cleanup/CLAUDE.md
  • crates/cleanup/Cargo.toml
  • crates/cleanup/README.md
  • crates/cleanup/src/main.rs
  • crates/cli/AGENTS.md
  • crates/cli/CHANGELOG.md
  • crates/cli/CLAUDE.md
  • crates/cli/Cargo.toml
  • crates/cli/README.md
  • crates/cli/src/commands/audit.rs
  • crates/cli/src/commands/copyright.rs
  • crates/cli/src/commands/cost.rs
  • crates/cli/src/commands/dev.rs
  • crates/cli/src/commands/docs.rs
  • crates/cli/src/commands/explore.rs
  • crates/cli/src/commands/lqip.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/src/commands/pre_commit.rs
  • crates/cli/src/commands/secrets.rs
  • crates/cli/src/commands/tree_shake.rs
  • crates/cli/src/commands/version.rs
  • crates/cli/src/gitignore.rs
  • crates/cli/src/lib.rs
  • crates/cli/src/main.rs
  • crates/cli/src/utils.rs
  • crates/deploy-cli/.gitignore
  • crates/deploy-cli/AGENTS.md
  • crates/deploy-cli/CHANGELOG.md
  • crates/deploy-cli/CLAUDE.md
  • crates/deploy-cli/Cargo.toml
  • crates/deploy-cli/README.md
  • crates/deploy-cli/src/docker.rs
  • crates/deploy-cli/src/k8s.rs
  • crates/deploy-cli/src/main.rs
  • crates/flame-graph/.env.example
  • crates/flame-graph/AGENTS.md
  • crates/flame-graph/CHANGELOG.md
  • crates/flame-graph/CLAUDE.md
  • crates/flame-graph/Cargo.toml
  • crates/flame-graph/README.md
  • crates/flame-graph/src/main.rs
  • crates/health-checker/.env.example
  • crates/health-checker/AGENTS.md
  • crates/health-checker/CHANGELOG.md
  • crates/health-checker/CLAUDE.md
  • crates/health-checker/Cargo.toml
  • crates/health-checker/README.md
  • crates/health-checker/src/integration.rs
  • crates/health-checker/src/main.rs
  • crates/health-checker/src/services.rs
  • crates/log-viewer/.gitignore
  • crates/log-viewer/AGENTS.md
  • crates/log-viewer/CHANGELOG.md
  • crates/log-viewer/CLAUDE.md
  • crates/log-viewer/Cargo.toml
  • crates/log-viewer/README.md
  • crates/log-viewer/src/main.rs
  • crates/log-viewer/src/parser.rs
  • crates/log-viewer/src/sources.rs
  • crates/perf-monitor/AGENTS.md
  • crates/perf-monitor/CHANGELOG.md
  • crates/perf-monitor/CLAUDE.md
  • crates/perf-monitor/Cargo.toml
  • crates/perf-monitor/README.md
  • crates/perf-monitor/src/main.rs
  • crates/resq-dsa/CHANGELOG.md
  • crates/resq-dsa/Cargo.toml
  • crates/resq-dsa/src/bloom.rs
  • crates/resq-dsa/src/count_min.rs
  • crates/resq-dsa/src/graph.rs
  • crates/resq-dsa/src/heap.rs
  • crates/resq-dsa/src/lib.rs
  • crates/resq-dsa/src/trie.rs
  • crates/resq-dsa/tests/complexity.rs
  • crates/resq-tui/AGENTS.md
  • crates/resq-tui/CHANGELOG.md
  • crates/resq-tui/CLAUDE.md
  • crates/resq-tui/Cargo.toml
  • crates/resq-tui/README.md
  • crates/resq-tui/src/console.rs
  • crates/resq-tui/src/detect.rs
  • crates/resq-tui/src/lib.rs
  • crates/resq-tui/src/progress.rs
  • crates/resq-tui/src/spinner.rs
  • crates/resq-tui/src/table.rs
  • crates/resq-tui/src/terminal.rs
  • crates/resq-tui/src/theme.rs

## References
- [README](README.md)
- [Tools Guide](../AGENTS.md)
- [Tools Guide](../../AGENTS.md)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Comment thread crates/cleanup/CLAUDE.md
## References
- [README](README.md)
- [Tools Guide](../AGENTS.md)
- [Tools Guide](../../AGENTS.md)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Comment thread crates/deploy-cli/AGENTS.md Outdated
Comment on lines +44 to +45
- [Infrastructure Guide](../../../infra/AGENTS.md)
- [Tools Guide](../../AGENTS.md)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 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 f

Repository: 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
fi

Repository: 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
done

Repository: 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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

@WomB0ComB0
Copy link
Copy Markdown
Member Author

@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>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

@copilot could you take into account the suggestions from the feedback within this PR thus far, and apply the changes?

Applied all review feedback in commit e2ee4b3:

  1. Cargo.toml: Replaced the explicit 10-crate members list with "crates/*" glob — new crates under crates/ are picked up automatically.
  2. crates/deploy-cli/AGENTS.md: Removed the broken Infrastructure Guide link (was pointing to non-existent ../../../infra/AGENTS.md) and replaced the rule referencing non-existent infra/docker/ and infra/k8s/overlays/ paths.
  3. crates/deploy-cli/CLAUDE.md: Regenerated from AGENTS.md via ./agent-sync.sh instead of being edited directly — all 10 AGENTS.md/CLAUDE.md pairs are now confirmed in sync.

Copilot AI changed the title refactor: move all crates into crates/ subdirectory refactor: apply PR review feedback — glob members, fix deploy-cli broken links, sync CLAUDE.md Apr 8, 2026
@github-actions github-actions Bot added the size/L label Apr 8, 2026
@WomB0ComB0 WomB0ComB0 merged commit 06cea74 into master Apr 8, 2026
13 checks passed
@WomB0ComB0 WomB0ComB0 deleted the refactor/crates-subdirectory branch April 8, 2026 23:43
This was referenced Apr 8, 2026
WomB0ComB0 added a commit that referenced this pull request May 9, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-DevOps CI/CD and tooling C-Documentation Improvements or additions to documentation size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants