refactor(mux)!: extract the herdr backend to pbean/bmad-loop-adapter-herdr#146
Conversation
…herdr The herdr backend (engine run path #136, TUI-launch surface #137) moves out of core to pbean/bmad-loop-adapter-herdr before ever shipping in a release. The adapter registers through the bmad_loop.mux_backends entry-point discovery (previous commit): co-install it with bmad-loop and 'herdr' appears in `bmad-loop mux` exactly as before. Core now bundles only tmux — _load_builtin_backends() is tmux-only again. Removed: adapters/herdr_backend.py plus its four test files; they continue as the adapter repo's backend.py + suite, where the live-herdr integration and E2E tests still run. test_backend_registry gains test_win32_bottoms_out_at_tmux_with_no_externals pinning the win32 fallback reversal now that nothing bundled matches win32. Kept deliberately: the seam docstrings, probe.py gate comment, and tui/launch.py note that cite herdr as the external worked example, and the win32-matching rationale comments in tests — an installed external backend may match win32 (the herdr adapter does), so force_tmux_backend and the registry/launch tests pin selection against exactly that leak. Docs: multiplexer-backends.md's herdr section becomes 'External backends' (install recipe + adapter-repo links); README / FEATURES / docs index / setup guide / TUI guide / ROADMAP / porting guide / authoring guide now name herdr as an external adapter and link its operator guide for the seat-level differences (detach chord ctrl+b q, polled logs, state sidecar). CHANGELOG [Unreleased] herdr bullets collapse into one extraction entry. BREAKING CHANGE: bmad_loop.adapters.herdr_backend is gone (it never shipped in a release); install bmad-loop-adapter-herdr alongside bmad-loop instead.
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe PR removes the in-repository Herdr multiplexer and its tests, leaving tmux as the only bundled backend. Documentation and tests now describe externally installed, entry-point-registered backends and the canonical multiplexer target contract. ChangesMultiplexer backend transition
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
|
@CodeRabbit review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@docs/adapter-authoring-guide.md`:
- Around line 101-104: Update the herdr adapter `backend.py` hyperlink in the
authoring guide to target the repository’s
`src/bmad_loop_adapter_herdr/backend.py` file directly, while preserving the
existing link text and surrounding documentation.
In `@docs/multiplexer-backends.md`:
- Around line 4-8: Update the tmux requirement paragraph in the multiplexer
documentation to state that tmux is required for launching, attaching, and
driving runs only when tmux is the selected backend. Preserve the existing
behavior description while making it clear that external backends, such as
Herdr, use their own session mechanism.
In `@README.md`:
- Line 42: Update the README platform requirement to state that a terminal
multiplexer is required, while describing tmux only as the bundled default;
preserve the existing external backend and registry details and align the
wording with docs/setup-guide.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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 885537df-bb5e-435f-88dd-08c4bf780aa2
📒 Files selected for processing (24)
CHANGELOG.mdREADME.mddocs/FEATURES.mddocs/README.mddocs/ROADMAP.mddocs/adapter-authoring-guide.mddocs/multiplexer-backends.mddocs/porting-to-a-new-os.mddocs/setup-guide.mddocs/tui-guide.mdsrc/bmad_loop/adapters/herdr_backend.pysrc/bmad_loop/adapters/multiplexer.pytests/conftest.pytests/test_backend_registry.pytests/test_cli.pytests/test_generic_tmux.pytests/test_herdr_backend.pytests/test_herdr_e2e.pytests/test_herdr_integration.pytests/test_herdr_poller.pytests/test_multiplexer.pytests/test_policy.pytests/test_tui_app.pytests/test_tui_launch.py
💤 Files with no reviewable changes (6)
- src/bmad_loop/adapters/herdr_backend.py
- tests/test_herdr_integration.py
- tests/test_herdr_e2e.py
- tests/test_herdr_poller.py
- tests/test_multiplexer.py
- tests/test_herdr_backend.py
Three CodeRabbit findings on #146, all confirmed: README requirements listed tmux as unconditionally mandatory and multiplexer-backends.md's tmux section said the same — both now say a terminal multiplexer is required with tmux as the bundled default, matching setup-guide.md. The authoring guide's backend.py link pointed at the adapter repo root instead of the file.
Summary
The herdr backend (engine run path #136, TUI-launch surface #137) moves out of core to pbean/bmad-loop-adapter-herdr before ever shipping in a release. The adapter registers through the
bmad_loop.mux_backendsentry-point discovery that #145 added: co-install it with bmad-loop andherdrappears inbmad-loop muxexactly as before. Core now bundles only tmux —_load_builtin_backends()is tmux-only again.Second and final PR of the extraction pair (#145 was the discovery seam).
BREAKING CHANGE:
bmad_loop.adapters.herdr_backendis gone (it never shipped in a release); installbmad-loop-adapter-herdralongside bmad-loop instead.Removed
src/bmad_loop/adapters/herdr_backend.pyplus its four test files (test_herdr_backend,test_herdr_poller,test_herdr_integration,test_herdr_e2e) — they continue as the adapter repo'sbackend.py+ suite, where the live-herdr integration and E2E tests still run (81 tests, CI green there).Kept deliberately
probe.pygate comment, andtui/launch.pynote that cite herdr as the external worked example.force_tmux_backend(all 9 use sites) and the win32-matching rationale comments in the registry/launch tests: an installed external backend may match win32 (the herdr adapter does), so these pin selection against exactly that leak.test_backend_registrygainstest_win32_bottoms_out_at_tmux_with_no_externals, pinning the win32 fallback reversal now that nothing bundled matches win32.Docs
multiplexer-backends.md's herdr section becomes External backends (install recipe + adapter-repo links).ctrl+b q, polled logs, state sidecar).[Unreleased]herdr bullets collapse into one extraction entry; released sections untouched.Tests
24 files, +209/−3186. Full suite: 2248 passed + 1 skipped in both inside-tmux and TMUX-less environments (delta vs #145's 2327 = the extracted herdr tests); full trunk check clean.
After merge
Summary by CodeRabbit
New Features
Documentation
Refactor