Skip to content

tools: wire-app-sources finds --dir among the top-level groups - #15059

Merged
teamleaderleo merged 1 commit into
mainfrom
tools/wire-dir-top-level
Sep 27, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
tools/wire-dir-top-level

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #15057 from its review. wire-app-sources.py looked up the --dir group by the first group whose path matched, so a nested group with the same path (say a Settings group inside another folder) could be picked and every file resolved against the wrong directory. It now takes the group from the project's main group's children, and rejects a nested (Sources/Foo) or missing --dir with a clear error. No directory the guard uses today was affected.

Testing

tests/test_wire_app_sources.py (13 cases) adds a fixture with a nested group also named Sources, listed before the real one; the old lookup picks the nested group and fails this case. It also covers wiring a file into another top-level directory, and the nested and missing --dir errors. --check passes for cmux/Sources, cmuxUITests/cmuxUITests and cmuxTests/cmuxCLITestSupport.

Changelog

none

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fixes wire-app-sources.py resolving --dir against a nested group with the same path, so files get wired into the correct top-level directory.

  • Looks up --dir among the project's main group's children.
  • Rejects nested or missing --dir values with a clear error.
  • Adds tests covering a nested namesake group, another top-level directory, and the new errors.

Written for commit b4647be. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Source files are now wired to the matching top-level project group, avoiding confusion with nested groups that share a name.
    • Requests to wire files using a nested or nonexistent directory now return a clear error instead of matching an unrelated group.

Take the directory's group from the project's top-level groups, so a
nested group with the same path cannot be picked, and reject nested or
missing --dir values. Tests cover another top-level directory, the
namesake case and the errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 979ec00d-3de9-4023-9e5c-2e8cc3c4b5be

📥 Commits

Reviewing files that changed from the base of the PR and between 2207bc8 and b4647be.

📒 Files selected for processing (2)
  • scripts/wire-app-sources.py
  • tests/test_wire_app_sources.py
 _________________________________________________________
< Fun fact: 'idempotent' doesn't mean 'it usually works'. >
 ---------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@teamleaderleo
teamleaderleo merged commit c5024fa into main Sep 27, 2026
54 of 56 checks passed
@teamleaderleo
teamleaderleo deleted the tools/wire-dir-top-level branch September 27, 2026 21:01
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for b4647be4b1: every check was green at merge (15 verified; 16 skipped by policy). Full suite runs on main after merge.

rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 27, 2026
c5024fa tools: wire-app-sources finds --dir among the main group's children (manaflow-ai#15059)
2207bc8 tools: wire-app-sources wires any target; guard cmuxUITests wiring (manaflow-ai#15057)
dc56eb7 ci: swift-package-tests through one lane script, opt-in build-fleet step (hq#794) (manaflow-ai#15042)
bee385d Add an Accent Color setting and use one accent for cmux chrome (manaflow-ai#14988)

# Conflicts:
#	.github/workflows/ci-guards.yml
#	.github/workflows/ci-macos.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant