Repository navigation
Conversation
|
Thanks for the contribution! Could you rebase on master? The branch is 2 commits behind. We'll review once it's up to date. |
bfe9da4 to
5e2724d
Compare
|
no problem, rebased |
e17ee62 to
0d57ce5
Compare
- ruby_exec() now checks Gemfile content for the tool name before using bundle exec, avoiding unnecessary bundler wrapping for globally-installed tools - Hook rewrite for `bundle exec rails spec` → `rtk rspec` (Rails alias) - 3 new rspec tests: >5 failure cap, text fallback no-summary, invalid JSON Co-Authored-By: Claude Opus 4.6 <[email protected]>
0d57ce5 to
b275eed
Compare
|
Thanks for the clean implementation! This is solid work — JSON parsing, fallback text parser, Gemfile detection, good test coverage. One fix needed before merge:
#[derive(Deserialize)]
struct RspecException {
class: String,
message: String,
#[serde(default)]
backtrace: Vec<String>,
}Some RSpec versions or configurations may omit One-liner fix, everything else LGTM. |
b275eed to
333b844
Compare
|
Thanks you, pszymkowiak, for the kind words. I did the suggested change. |
0280bd2 to
ff86931
Compare
|
Hi @deril, @navidemad! You both have Ruby-related PRs open — #198 (rspec) and #292 (full Ruby+Rails). They'll likely conflict. Could you coordinate? @navidemad, does #292 subsume what #198 does? If so, @deril might want to contribute to #292 directly. Please rebase both on latest master first. |
|
I posted a reply : here |
ff86931 to
7a69bd5
Compare
|
Rebased on latest master — conflicts resolved. @navidemad sounds good to me! Happy for #292 to build on top once this lands. Good luck with the merge! |
65d2a3f to
af05b32
Compare
|
Any update on this one ? |
Unifies 5 competing PRs (rtk-ai#198, rtk-ai#292, rtk-ai#379, rtk-ai#534, rtk-ai#643) into a single coherent implementation. New commands: - rtk rspec: JSON parsing with text fallback (60%+ savings) - rtk rubocop: JSON parsing, group by cop/severity (60%+ savings) - rtk rake test: Minitest state machine parser (85-90% savings) - rtk bundle install: TOML filter, strip Using lines (90%+ savings) Shared infrastructure: ruby_exec(), fallback_tail(), exit_code_from_output(), count_tokens() in utils.rs. Discover/rewrite rules for rspec, rubocop, rake, rails, bundle including bundle exec and bin/ variants. 56 new unit tests + 4 inline TOML tests. All 1035 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Unifies 5 competing PRs (rtk-ai#198, rtk-ai#292, rtk-ai#379, rtk-ai#534, rtk-ai#643) into a single coherent implementation. New commands: - rtk rspec: JSON parsing with text fallback (60%+ savings) - rtk rubocop: JSON parsing, group by cop/severity (60%+ savings) - rtk rake test: Minitest state machine parser (85-90% savings) - rtk bundle install: TOML filter, strip Using lines (90%+ savings) Shared infrastructure: ruby_exec(), fallback_tail(), exit_code_from_output(), count_tokens() in utils.rs. Discover/rewrite rules for rspec, rubocop, rake, rails, bundle including bundle exec and bin/ variants. E2E smoke tests (scripts/test-ruby.sh) covering all 4 commands. 56 new unit tests + 4 inline TOML tests. All 1035 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]>
|
Hey @deril — heads up: we've created a unified PR at #724 that merges all 5 competing Ruby implementations (#198, #292, #379, #534, #643) into a single coherent implementation. Your #[serde(default)] fix on the backtrace field (requested by @pszymkowiak) is incorporated in the unified rspec filter. Thanks for the clean foundation and for being first to the punch on RSpec support! |
…724) * feat(ruby): add Ruby on Rails support (rspec, rubocop, rake, bundle) Unifies 5 competing PRs (#198, #292, #379, #534, #643) into a single coherent implementation. New commands: - rtk rspec: JSON parsing with text fallback (60%+ savings) - rtk rubocop: JSON parsing, group by cop/severity (60%+ savings) - rtk rake test: Minitest state machine parser (85-90% savings) - rtk bundle install: TOML filter, strip Using lines (90%+ savings) Shared infrastructure: ruby_exec(), fallback_tail(), exit_code_from_output(), count_tokens() in utils.rs. Discover/rewrite rules for rspec, rubocop, rake, rails, bundle including bundle exec and bin/ variants. E2E smoke tests (scripts/test-ruby.sh) covering all 4 commands. 56 new unit tests + 4 inline TOML tests. All 1035 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * fix(ruby): use TEST= env var for rake single-file test in smoke tests Rails' `rake test` ignores positional file args; use `TEST=path` syntax. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * docs(ruby): add Ruby module architecture and update attribution Integrate ARCHITECTURE.md Ruby Module Architecture section and CLAUDE.md module table/fork-features from PR #643. Update PR description attribution. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * chore: remove PULL_REQUEST_DESCRIPTION.md from repo PR description lives on GitHub, no need to track in the codebase. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> --------- Signed-off-by: Navid EMAD <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
|
Hi! Two things needed before we can review:
Thanks! |
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit detects renames automatically. If you get import conflicts, update the paths: use crate::git; // now: use crate::cmds::git::git;
use crate::tracking; // now: use crate::core::tracking;
use crate::config; // now: use crate::core::config;
use crate::init; // now: use crate::hooks::init;
use crate::gain; // now: use crate::analytics::gain;Need help rebasing? Tag @aeppling |
|
It can be close, #724 as been merged. |
Adds `rtk rspec` command for Rails/Ruby test suites with 60-90% token savings. - Parse RSpec's `--format json` output (injected automatically) - Auto-detect `bundle exec rspec` when Gemfile contains "rspec" - Compact success: `✓ RSpec: 42 passed (0.12s)` - Failures show: test name, file:line, exception class + message, backtrace (gems stripped) - Cap at 5 failures inline, `... +N more` for the rest - Pending tests shown in count - Fallback text parser when JSON unavailable - 17 unit tests covering all paths and token savings assertions - Hook rewrites: `rspec`, `bundle exec rspec`, `bundle exec rails spec` → `rtk rspec` - Add mise.toml to pin Rust toolchain for mise users Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ield Some RSpec versions omit `backtrace` from JSON output. Without `#[serde(default)]`, deserialization fails entirely and falls back to text parser unnecessarily.
…numbers Replace bare `skip` calls (undefined function) with `skip_test` for Graphite and RSpec conditional sections. Fix duplicate section numbers 30/31/32 introduced when Ruby section was added.
92715d1 to
6ea3e0a
Compare
|
done rebasing @aeppling |
…tk-ai#724) * feat(ruby): add Ruby on Rails support (rspec, rubocop, rake, bundle) Unifies 5 competing PRs (rtk-ai#198, rtk-ai#292, rtk-ai#379, rtk-ai#534, rtk-ai#643) into a single coherent implementation. New commands: - rtk rspec: JSON parsing with text fallback (60%+ savings) - rtk rubocop: JSON parsing, group by cop/severity (60%+ savings) - rtk rake test: Minitest state machine parser (85-90% savings) - rtk bundle install: TOML filter, strip Using lines (90%+ savings) Shared infrastructure: ruby_exec(), fallback_tail(), exit_code_from_output(), count_tokens() in utils.rs. Discover/rewrite rules for rspec, rubocop, rake, rails, bundle including bundle exec and bin/ variants. E2E smoke tests (scripts/test-ruby.sh) covering all 4 commands. 56 new unit tests + 4 inline TOML tests. All 1035 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * fix(ruby): use TEST= env var for rake single-file test in smoke tests Rails' `rake test` ignores positional file args; use `TEST=path` syntax. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * docs(ruby): add Ruby module architecture and update attribution Integrate ARCHITECTURE.md Ruby Module Architecture section and CLAUDE.md module table/fork-features from PR rtk-ai#643. Update PR description attribution. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * chore: remove PULL_REQUEST_DESCRIPTION.md from repo PR description lives on GitHub, no need to track in the codebase. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> --------- Signed-off-by: Navid EMAD <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
…tk-ai#724) * feat(ruby): add Ruby on Rails support (rspec, rubocop, rake, bundle) Unifies 5 competing PRs (rtk-ai#198, rtk-ai#292, rtk-ai#379, rtk-ai#534, rtk-ai#643) into a single coherent implementation. New commands: - rtk rspec: JSON parsing with text fallback (60%+ savings) - rtk rubocop: JSON parsing, group by cop/severity (60%+ savings) - rtk rake test: Minitest state machine parser (85-90% savings) - rtk bundle install: TOML filter, strip Using lines (90%+ savings) Shared infrastructure: ruby_exec(), fallback_tail(), exit_code_from_output(), count_tokens() in utils.rs. Discover/rewrite rules for rspec, rubocop, rake, rails, bundle including bundle exec and bin/ variants. E2E smoke tests (scripts/test-ruby.sh) covering all 4 commands. 56 new unit tests + 4 inline TOML tests. All 1035 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * fix(ruby): use TEST= env var for rake single-file test in smoke tests Rails' `rake test` ignores positional file args; use `TEST=path` syntax. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * docs(ruby): add Ruby module architecture and update attribution Integrate ARCHITECTURE.md Ruby Module Architecture section and CLAUDE.md module table/fork-features from PR rtk-ai#643. Update PR description attribution. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * chore: remove PULL_REQUEST_DESCRIPTION.md from repo PR description lives on GitHub, no need to track in the codebase. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> --------- Signed-off-by: Navid EMAD <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
…tk-ai#724) * feat(ruby): add Ruby on Rails support (rspec, rubocop, rake, bundle) Unifies 5 competing PRs (rtk-ai#198, rtk-ai#292, rtk-ai#379, rtk-ai#534, rtk-ai#643) into a single coherent implementation. New commands: - rtk rspec: JSON parsing with text fallback (60%+ savings) - rtk rubocop: JSON parsing, group by cop/severity (60%+ savings) - rtk rake test: Minitest state machine parser (85-90% savings) - rtk bundle install: TOML filter, strip Using lines (90%+ savings) Shared infrastructure: ruby_exec(), fallback_tail(), exit_code_from_output(), count_tokens() in utils.rs. Discover/rewrite rules for rspec, rubocop, rake, rails, bundle including bundle exec and bin/ variants. E2E smoke tests (scripts/test-ruby.sh) covering all 4 commands. 56 new unit tests + 4 inline TOML tests. All 1035 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * fix(ruby): use TEST= env var for rake single-file test in smoke tests Rails' `rake test` ignores positional file args; use `TEST=path` syntax. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * docs(ruby): add Ruby module architecture and update attribution Integrate ARCHITECTURE.md Ruby Module Architecture section and CLAUDE.md module table/fork-features from PR rtk-ai#643. Update PR description attribution. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> * chore: remove PULL_REQUEST_DESCRIPTION.md from repo PR description lives on GitHub, no need to track in the codebase. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Navid EMAD <[email protected]> --------- Signed-off-by: Navid EMAD <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
commands.md listed only --all and --json for the security meta-command. Both remaining flags were discoverable via --help but absent from the guide, and --scrub-logs is the one that writes to disk, so it is the one most worth documenting. Added both to the meta-command table and a short prose note covering what --scrub-logs actually touches (downgrades.jsonl and supply_chain.jsonl, with a .bak-<ts> copy of each), why it is rarely needed now that commands are redacted at write time, and the flag conflicts clap enforces. Refs: rtk-ai#198 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HXCRs8F7G1fFqYczid9cu7
Ten commits closing rtk-ai#202, rtk-ai#198, rtk-ai#199, #190 (stale), rtk-ai#203 (dup), rtk-ai#195 (nl slice), rtk-ai#237, rtk-ai#207 and rtk-ai#236. Council: codex reviewed the branch — VERDICT SHIP, no criticals, no highs. Its fail-open audit of the read cache came back clean across session-ID spoofing, TOCTOU, symlink swap and --force semantics. Six findings acted on in 12e71b3, including two accuracy corrections to my own docs. The mmax second opinion had not returned at merge time; the Hoff authorised proceeding. The most serious defect on the branch was found by driving the binary, not by review: a read truncated by the large-file cap was later stubbed as though the whole file had been delivered, reporting 65,723 tokens the agent had never seen. Fixed in 6db09ad. Suite: 3399 passing, 0 failing — including the 21 hooks tests that failed on any machine whose umask is not 022 before this branch. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HXCRs8F7G1fFqYczid9cu7
Summary
rtk rspec— compact RSpec output for Rails/Ruby test suites--format jsonoutput and showing only what mattersrspec,bin/rspec,bundle exec rspec,bundle exec rails spec→rtk rspecHow it works
RSpec's
--format jsonis injected automatically (unless the user already passes--format). The JSON is parsed and reduced to:Or on failures:
Key details:
bundle exec rspecwhen a Gemfile mentioningrspecis presentbin/rspecsupported: Rails binstub pattern intercepted by hook/gems/andlib/rspecare skippedRSpec::Expectations::ExpectationNotMetError→ExpectationNotMetError... +N morefor the restTest plan
cargo fmt --all --checkcleancargo clippy --all-targetsclean (0 new warnings)attensi-backend)🤖 Generated with Claude Code