fix: rewrite docker-compose (legacy hyphenated CLI) to rtk docker compose#579
Open
slice-mihird wants to merge 1 commit intortk-ai:developfrom
Open
fix: rewrite docker-compose (legacy hyphenated CLI) to rtk docker compose#579slice-mihird wants to merge 1 commit intortk-ai:developfrom
slice-mihird wants to merge 1 commit intortk-ai:developfrom
Conversation
…pose docker-compose ps/logs/build → rtk docker compose ps/logs/build docker-compose up/down/etc → not rewritten (unsupported, pass through) Adds a new PATTERN and RtkRule for the legacy docker-compose CLI so that users still on the hyphenated binary get the same token savings as docker compose users. Includes 6 tests covering supported and skipped subcommands. Closes rtk-ai#578 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
|
Please retarget this PR to |
Author
|
Done — retargeted to |
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.
Problem
Users on the legacy
docker-composeCLI (hyphenated, v1) get 0% savings — the rewrite registry only handlesdocker compose(space-separated, v2). Fromrtk discoveron a real machine, 40+ runs ofdocker-compose logsare fully missed.Solution
Add a PATTERN and
RtkRulefordocker-composethat maps supported subcommands tortk docker compose:docker-compose psrtk docker compose psdocker-compose logs [service]rtk docker compose logs [service]docker-compose build [service]rtk docker compose build [service]docker-compose updocker-compose downThe filter code in
container.rsalready handles all three supported subcommands — this PR only adds the missing rewrite routing.Changes
src/discover/rules.rs: new pattern +RtkRulefordocker-composesrc/discover/registry.rs: 6 tests (3 supported, 3 skipped)Testing
All 6 new tests cover the supported/skipped split:
Relates to #578.
🤖 Generated with Claude Code