Skip to content

fix(rewrite): skip unsupported find predicates#676

Open
TechWizard9999 wants to merge 1 commit intortk-ai:developfrom
TechWizard9999:fix/rewrite-skip-unsupported-find-predicates
Open

fix(rewrite): skip unsupported find predicates#676
TechWizard9999 wants to merge 1 commit intortk-ai:developfrom
TechWizard9999:fix/rewrite-skip-unsupported-find-predicates

Conversation

@TechWizard9999
Copy link
Copy Markdown
Contributor

Description

Fix rewrite behavior for find commands that use unsupported compound predicates/actions. Instead of rewriting those to rtk find (which then errors), we now pass them through as native find.

Related Issue

Closes #664

Changes Made

  • added an unsupported-flag guard in rewrite path for find
  • skip rewrite when command includes unsupported predicates/actions such as:
    • -not, -exec, -execdir, -ok, -okdir, -delete, -prune, -fls, -fprint, -fprintf, -quit
  • added regression tests for -not and -exec
  • added changelog entry under Unreleased bug fixes

Files Changed

Testing

  • cargo fmt --all --check
  • rtk cargo clippy --all-targets (2 pre-existing warnings in untouched files)
  • rtk cargo test
  • rtk cargo test discover::registry::tests::test_rewrite_find_skips_unsupported_not
  • rtk cargo test discover::registry::tests::test_rewrite_find_skips_unsupported_exec

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated
  • No breaking changes introduced

cc @pszymkowiak for review

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 20, 2026

CLA assistant check
All committers have signed the CLA.

@TechWizard9999
Copy link
Copy Markdown
Contributor Author

@pszymkowiak could you please review this and let me know if anything needs to change?

@aeppling
Copy link
Copy Markdown
Contributor

Hey

We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes src/ from a flat layout into subfolders.

No logic changes — only file moves and import path updates.

What you need to do

Rebase your branch on develop when receiving this comment:

git fetch origin && git rebase origin/develop

Git 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

@TechWizard9999 TechWizard9999 force-pushed the fix/rewrite-skip-unsupported-find-predicates branch from 550d7d3 to c6db1d9 Compare March 27, 2026 01:48
@TechWizard9999
Copy link
Copy Markdown
Contributor Author

Rebased on latest develop per the refactor notice and force-updated this branch.

@pszymkowiak could you please re-review when convenient?

@TechWizard9999 TechWizard9999 force-pushed the fix/rewrite-skip-unsupported-find-predicates branch from c6db1d9 to ef00665 Compare March 30, 2026 03:20
Signed-off-by: Roopesh <roopesh1724989@gmail.com>
@TechWizard9999 TechWizard9999 force-pushed the fix/rewrite-skip-unsupported-find-predicates branch from ef00665 to df6674f Compare April 15, 2026 14:11
@TechWizard9999
Copy link
Copy Markdown
Contributor Author

Rebased on latest develop and force-pushed with conflict resolution.\n\nRetested the unsupported find predicate behavior included in this PR.\n\n@pszymkowiak @FlorianBruniaux please re-review when convenient.

@TechWizard9999
Copy link
Copy Markdown
Contributor Author

Quick maintainer ping after rebase and validation rerun. @pszymkowiak @FlorianBruniaux please re-review when convenient.

@chathurabuddi
Copy link
Copy Markdown

@aeppling @pszymkowiak @FlorianBruniaux kindly merge this?

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.

5 participants