Skip to content

Break up task_discovery#160

Merged
aleyan merged 10 commits into
mainfrom
clean
May 16, 2026
Merged

Break up task_discovery#160
aleyan merged 10 commits into
mainfrom
clean

Conversation

@aleyan
Copy link
Copy Markdown
Owner

@aleyan aleyan commented May 11, 2026

Summary by CodeRabbit

  • Documentation

    • Updated project plan with a completed checklist entry for the task-discovery refactor.
  • Refactor

    • Reorganized task discovery into a modular, registry-driven system with centralized discovery orchestration.
  • New Features

    • Added discovery support for many formats (Make, Gradle, Maven, npm, Python, CMake, Justfile, Taskfile, Turbo, Docker Compose, GitHub Actions, Travis CI, shell scripts).
    • Deterministic task-name disambiguation and clearer ambiguous-task messages.
  • Bug Fixes

    • Preserve valid tasks when included files fail to parse; surface include/parse errors.

Review Change Stack

@aleyan aleyan changed the title break up task_discovery Break up task_discovery May 11, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Refactors task discovery into a registry-based TaskDiscovery trait, adds per-runner discovery modules, centralizes support and disambiguation logic, and updates orchestration to run registered discoverers and apply name disambiguation.

Changes

Task Discovery Registry & Modularization

Layer / File(s) Summary
TaskDiscovery Trait & Orchestration
src/task_discovery.rs
Declares per-type submodules, defines TaskDiscovery and DiscoveredTasks, and runs registry::registered_discoveries() followed by process_task_disambiguation.
Disambiguation & Support Helpers
src/task_discovery/disambiguation.rs, src/task_discovery/support.rs
Implements task-name counting, runner-derived prefix disambiguation, shadowing application, definition registration, and success/error handlers.
Registry & Module Wiring
src/task_discovery/registry.rs, src/task_discovery.rs
Provide static singleton discoverers and registered_discoveries() to return trait-object references in a fixed order.
Simple Discovery Modules
src/task_discovery/cmake.rs, src/task_discovery/maven.rs, src/task_discovery/npm.rs, src/task_discovery/python.rs, src/task_discovery/docker_compose.rs, src/task_discovery/travis_ci.rs
Single-file detection/parsing pattern; record NotFound or parse results and route via shared handlers.
Medium-Complexity Discovery Modules
src/task_discovery/gradle.rs, src/task_discovery/github_actions.rs, src/task_discovery/make.rs, src/task_discovery/justfile.rs, src/task_discovery/shell_scripts.rs
Handle dual-file Gradle cases, multi-file workflow scanning, recursive Make includes, Justfile variants, and shell-script directory scans.
Complex Discovery Modules
src/task_discovery/taskfile.rs, src/task_discovery/turbo.rs
Recursive Taskfile includes with namespace rules and Turbo multi-config extends resolution with git-aware traversal and package-indexing.
List command display
src/commands/list.rs
Refactor task source label computation into task_source_label and adjust shadow-footnote borrowing; adds unit test.
Tests & Documentation
src/task_discovery.rs, dev_docs/project_plan.md
Adjust test helpers and assertions for modular layout and add completed checklist entry describing the refactor.

Sequence Diagram(s)

sequenceDiagram
  participant CLI as CLI/list command
  participant Registry as registry::registered_discoveries()
  participant Discoverer as TaskDiscovery implementations
  participant Aggregator as DiscoveredTasks
  CLI->>Registry: request discoverers
  CLI->>Discoverer: invoke discover(dir, &mut Aggregator)
  Discoverer->>Aggregator: append tasks/errors/definitions
  CLI->>Aggregator: process_task_disambiguation(&mut)
  Aggregator-->>CLI: return DiscoveredTasks
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • aleyan/dela#152: Adds Turborepo parsing/discovery into an earlier task-discovery version, directly related to the turbo module added here.
  • aleyan/dela#159: Modifies recursive composed-discovery primitives used by Makefile/Taskfile/Turbo implementations present in this PR.

Poem

🐰 I hopped through code and split the old file wide,
Small discoverers march in a tidy registry stride.
Names now wear prefixes so collisions cease,
Tests hum along and disambiguation finds peace.
A little rabbit cheer — discovery runs light.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 32.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: refactoring the monolithic src/task_discovery.rs into a modular registry-based architecture with per-runner discovery modules.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch clean

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

🤖 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 `@src/task_discovery/cmake.rs`:
- Around line 26-29: The error arm in the match currently constructs and returns
Err("Error parsing CMakeLists.txt") even though the caller discards the Result;
either propagate the real error or remove the unused Err. Update the Err(error)
branch in src/task_discovery/cmake.rs (the branch that calls
handle_discovery_error(error, cmake_path, TaskDefinitionType::CMake,
discovered)) to one of two fixes: (A) propagate the original error by returning
a Result::Err (e.g., return Err(error.into()) or map it to the function's error
type) so callers can handle it, or (B) simplify the path by removing the
redundant Err(...) and just call handle_discovery_error(...) and return/continue
(making the function behave as a void/() error-reporting path). Choose the
option consistent with the surrounding API and apply to the Err(error) arm only.
- Around line 15-31: discover_cmake_tasks currently returns early when
CMakeLists.txt is missing instead of recording a NotFound status; update
discover_cmake_tasks to push a DiscoveredTask/TaskFileStatus::NotFound entry
into the provided discovered (DiscoveredTasks) with TaskDefinitionType::CMake
(using cmake_path) before returning Ok(()), following the same pattern used by
other discovery modules; ensure the function still returns Ok(()) after
recording the NotFound status so callers get a consistent discovered.definitions
entry for missing files.

In `@src/task_discovery/disambiguation.rs`:
- Line 61: Extract the literal 3 used to compute prefix_length into a named
constant (e.g., MIN_PREFIX_LEN) to avoid the magic number; update the
computation let prefix_length = std::cmp::min(3, short_name.len()) to use that
constant, define MIN_PREFIX_LEN near the top of the module or impl where
disambiguation logic lives, and ensure any tests or other references use the
constant to keep behavior consistent.
- Around line 49-82: generate_runner_prefix currently slices short_name by byte
indices which can panic on multi-byte UTF-8 characters; change all byte-based
slicing to character-based operations: compute lengths with
short_name.chars().count(), build prefixes with
short_name.chars().take(n).collect::<String>() (use
chars().next().unwrap().to_string() for single_char), and iterate length over
character counts rather than byte lengths so prefixes and the loop bounds use
character counts; keep the existing fallback that appends numeric suffixes to
the original short_name.
- Around line 117-133: format_ambiguous_task_error currently omits entries where
Task.disambiguated_name is None; update the loop in format_ambiguous_task_error
to either assert all matching_tasks have disambiguated_name at the start (e.g.,
panic or debug_assert if you prefer) or, preferably, fall back inside the loop
by formatting a fallback line using the task's base name (e.g., task.name or
task.base_name()), task.runner.short_name(), and
task.definition_path().display() when disambiguated_name is None so no matching
task is silently omitted from the error message.

In `@src/task_discovery/github_actions.rs`:
- Around line 76-112: The code currently sets
discovered.definitions.github_actions unconditionally only when any tasks parsed
and always uses workflows_parent (dir/.github/workflows), which is wrong for
zero files and for workflows located elsewhere; change the logic so that if
workflow_files is empty you leave discovered.definitions.github_actions as None,
and when setting discovered.definitions.github_actions after successful parses
compute and store the actual path(s) of the source: for a single parsed file use
the file_path.parent(), for multiple files compute their common parent (or fall
back to the nearest shared ancestor), and set TaskDefinitionFile.path to that
computed directory and TaskDefinitionType::GitHubActions with status
TaskFileStatus::Parsed; keep the existing error collection and task augmentation
(parse_github_actions, ComposedDefinitionSource::composed,
ComposedDefinitionSource.apply_to_task, check_shadowing) unchanged except for
using the actual file parent(s) when creating the TaskDefinitionFile.

In `@src/task_discovery/make.rs`:
- Around line 109-126: The current handling in the
collect_makefile_tasks_recursive caller sets first_error when any included file
fails, which causes the entire root Makefile to be marked ParseError and
discards successfully parsed tasks; change this to either treat include parse
errors as non-fatal warnings by removing the assignment to first_error in the
error branch (keep pushing into include_errors) or make it conditional (set
first_error only if collected_tasks is empty for this root). Update the block
around collect_makefile_tasks_recursive where include_errors and first_error are
updated (referencing symbols collect_makefile_tasks_recursive, include_errors,
first_error, collected_tasks) so that include parse failures do not override
successful task discovery unless no tasks were parsed, or alternatively add a
config flag to control fatal-vs-warning behavior if you prefer configurability.
- Around line 11-15: The discover implementation currently ignores a Result from
discover_makefile_tasks; since discover_makefile_tasks only ever returns Ok(())
and writes errors directly into discovered.errors, change
discover_makefile_tasks' signature from -> Result<(), String> to -> () and
remove any Result construction inside it, then update the TaskDiscovery impl for
MakefileDiscovery::discover to call discover_makefile_tasks(dir, discovered)
without discarding a Result; ensure any places referencing its Result type are
updated accordingly (function name: discover_makefile_tasks, trait impl: impl
TaskDiscovery for MakefileDiscovery, method: discover, and the
DiscoveredTasks.errors usage).

In `@src/task_discovery/registry.rs`:
- Around line 42-49: The helper function run_discovery is dead code; either
remove it or add a doc comment explaining its purpose/intent (e.g., reserved for
tests or external callers) so its presence is justified. If you remove it,
delete the pub(crate) fn run_discovery(...) definition and any
#[allow(dead_code)] attribute; if you keep it, replace the attribute with a
concise /// doc comment describing why run_discovery exists and how it relates
to TaskDiscovery and DiscoveredTasks (for example: used by tests or FFI),
ensuring the comment references TaskDiscovery::discover and DiscoveredTasks so
future maintainers understand its purpose.

In `@src/task_discovery/taskfile.rs`:
- Around line 98-104: The current call to
traversal.traversal_state.mark_visited(current_source.definition_path())
implements a global-per-path memo that prevents legitimate re-inclusion under
different namespaces/flatten modes; replace this with recursion-stack cycle
detection: change the visitation protocol used in the traversal (the code around
traversal.traversal_state and VisitState) so that entering a node marks it as
"visiting" on the current recursion stack and exiting unmarks it (push on enter,
pop on exit), and only treat a path as a cycle/error when it is already marked
"visiting" (not when it was previously fully visited). Update the logic that
currently branches on VisitState::AlreadyVisited/VisitState::New to instead
detect VisitState::Visiting -> handle cycle, otherwise push mark Visiting at
start of recursion and remove/unmark (or mark Visited) when returning so later
independent branches can revisit the same definition_path().

In `@src/task_discovery/turbo.rs`:
- Around line 313-320: The function looks_like_turbo_config_path erroneously
classifies scoped package names like "@scope/pkg" as filesystem paths; update
looks_like_turbo_config_path to exclude entries that start with '@' from the
"contains('/' or '\\')" path check so scoped names are treated as package names
(e.g., add a condition so the contains('/') and contains('\\') checks only apply
when !extend_entry.starts_with('@')). Keep the existing absolute/path-start/dot
checks intact and only adjust the conditions that treat slashes as path
indicators so that scoped packages proceed to package index lookup.
🪄 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: ASSERTIVE

Plan: Pro

Run ID: 55d1a392-f070-4578-a020-5a66b46c7053

📥 Commits

Reviewing files that changed from the base of the PR and between 5b035dd and 4837a70.

📒 Files selected for processing (18)
  • dev_docs/project_plan.md
  • src/task_discovery.rs
  • src/task_discovery/cmake.rs
  • src/task_discovery/disambiguation.rs
  • src/task_discovery/docker_compose.rs
  • src/task_discovery/github_actions.rs
  • src/task_discovery/gradle.rs
  • src/task_discovery/justfile.rs
  • src/task_discovery/make.rs
  • src/task_discovery/maven.rs
  • src/task_discovery/npm.rs
  • src/task_discovery/python.rs
  • src/task_discovery/registry.rs
  • src/task_discovery/shell_scripts.rs
  • src/task_discovery/support.rs
  • src/task_discovery/taskfile.rs
  • src/task_discovery/travis_ci.rs
  • src/task_discovery/turbo.rs

Comment thread src/task_discovery/cmake.rs
Comment thread src/task_discovery/cmake.rs
Comment thread src/task_discovery/disambiguation.rs
Comment thread src/task_discovery/disambiguation.rs Outdated
Comment thread src/task_discovery/disambiguation.rs
Comment thread src/task_discovery/make.rs
Comment thread src/task_discovery/make.rs
Comment thread src/task_discovery/registry.rs Outdated
Comment thread src/task_discovery/taskfile.rs
Comment thread src/task_discovery/turbo.rs
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8a46dd54-0697-4361-ae08-47a3e9c59210

📥 Commits

Reviewing files that changed from the base of the PR and between 4837a70 and 26323cc.

📒 Files selected for processing (7)
  • src/commands/list.rs
  • src/task_discovery.rs
  • src/task_discovery/cmake.rs
  • src/task_discovery/disambiguation.rs
  • src/task_discovery/make.rs
  • src/task_discovery/registry.rs
  • src/task_discovery/turbo.rs

Comment thread src/task_discovery/disambiguation.rs
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/task_discovery/disambiguation.rs (1)

21-47: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Make disambiguated names globally unique, not just group-local.

used_prefixes only dedupes within one base-name group, and the shadowed-task pass starts from an empty set every time. That still allows test to become test-m when another task is already literally named test-m, which leaves the original ambiguous task with no unique selector. Reserve every existing task.name/disambiguated_name first, then choose the first suffix whose full "{name}-{prefix}" is globally unused.

🤖 Prompt for 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.

In `@src/task_discovery/disambiguation.rs` around lines 21 - 47, The
disambiguation currently only ensures uniqueness within each base-name group by
using a per-group used_prefixes and restarting for the shadowed-task pass;
instead reserve all existing task.name and task.disambiguated_name values
globally first (iterate discovered.tasks and insert each name/disambiguated_name
into a global HashSet of reserved_full_names), then when generating a
runner_prefix via generate_runner_prefix (used previously as used_prefixes),
test the full candidate string format!("{}-{}", task.name, prefix) against the
global reserved set and keep trying prefixes until you find one not present,
insert that full name into the global set, and assign it to
task.disambiguated_name; apply this for both the group collision loop
(tasks_by_name) and the shadowed-by loop so no produced "{name}-{prefix}" ever
collides with any existing name.
🤖 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 `@src/task_discovery/make.rs`:
- Around line 18-30: The code currently only checks dir.join("Makefile") and
returns NotFound; update the discovery in src/task_discovery/make.rs to search
the GNU make filename order ["GNUmakefile", "makefile", "Makefile"] and use the
first existing path found; when a file is found, call set_definition with a
TaskDefinitionFile whose path is that discovered PathBuf, definition_type
TaskDefinitionType::Makefile and appropriate status, otherwise keep the NotFound
behavior. Locate the existing makefile_path logic and replace the single check
with an ordered loop/iterator over the three names so the discovered path is
recorded correctly.
- Around line 86-119: collect_makefile_tasks_recursive currently parses all
tasks then processes includes, which enforces first-definition-wins; instead
process file items in original order so later definitions override earlier ones.
Change the routine that calls parse_makefile::parse and
parse_makefile::extract_include_directives to iterate the makefile's top-level
items in source order (or reconstruct order) and for each item: if it's a task,
call current_source.apply_to_task(task) and insert/replace into collected_tasks
(use a name->index map rather than a HashSet seen_task_names so you can
overwrite previous entries); if it's an include, resolve via
current_source.resolve_child and recurse with ComposedDefinitionSource::composed
as you already do. Keep using collect_makefile_tasks_recursive, include_errors,
traversal_state, and preserve existing error wrapping when recursing.

---

Duplicate comments:
In `@src/task_discovery/disambiguation.rs`:
- Around line 21-47: The disambiguation currently only ensures uniqueness within
each base-name group by using a per-group used_prefixes and restarting for the
shadowed-task pass; instead reserve all existing task.name and
task.disambiguated_name values globally first (iterate discovered.tasks and
insert each name/disambiguated_name into a global HashSet of
reserved_full_names), then when generating a runner_prefix via
generate_runner_prefix (used previously as used_prefixes), test the full
candidate string format!("{}-{}", task.name, prefix) against the global reserved
set and keep trying prefixes until you find one not present, insert that full
name into the global set, and assign it to task.disambiguated_name; apply this
for both the group collision loop (tasks_by_name) and the shadowed-by loop so no
produced "{name}-{prefix}" ever collides with any existing name.
🪄 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: ASSERTIVE

Plan: Pro

Run ID: 59b4170b-b1ea-4c84-a884-d31ecc1e2d33

📥 Commits

Reviewing files that changed from the base of the PR and between 26323cc and 8368fb0.

📒 Files selected for processing (3)
  • src/task_discovery.rs
  • src/task_discovery/disambiguation.rs
  • src/task_discovery/make.rs

Comment thread src/task_discovery/make.rs Outdated
Comment thread src/task_discovery/make.rs
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/task_discovery/make.rs (1)

90-123: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Preserve include ordering when resolving duplicate targets.

This still parses every target in current_source before following any include, then seen_task_names keeps the first definition forever. That makes duplicate resolution effectively first-definition-wins, but included makefiles are read in place: if the root defines test, then later includes another file that also defines test, the included definition should win. Here it never can, so definition_path() and later disambiguation can point at the wrong task. Please collect top-level items in source order and replace earlier entries when a later definition of the same target is encountered. Adding a regression test for “target before include, same target redefined in include” would lock this down.

🤖 Prompt for 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.

In `@src/task_discovery/make.rs` around lines 90 - 123, The current implementation
parses all tasks first then processes includes, causing first-definition-wins;
instead process top-level entries in source order (tasks and include directives
interleaved) so later definitions replace earlier ones. Change
collect_makefile_tasks_recursive to obtain an ordered sequence (or merge
parse_makefile::parse results with parse_makefile::extract_include_directives by
their positions) and iterate that sequence: when you encounter a task, use a map
seen_task_index: HashMap<String, usize> to check if the task name already exists
in collected_tasks and replace the existing entry at that index (and update any
definition_path via current_source.apply_to_task), otherwise push and record its
index; when you encounter an include, recurse into
collect_makefile_tasks_recursive as before so included tasks can override prior
entries. Also add a regression test for “target before include, same target
redefined in include” to ensure the included definition wins.
🤖 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 `@src/task_discovery/make.rs`:
- Around line 20-23: The discovery currently picks the first path where
path.exists(), which can match directories named like makefiles; change the
filter to require a real file by replacing the exists() check with is_file() so
MAKEFILE_NAMES.iter().map(|name| dir.join(name)).find(...) only returns actual
makefiles (the let Some(makefile_path) binding).

---

Duplicate comments:
In `@src/task_discovery/make.rs`:
- Around line 90-123: The current implementation parses all tasks first then
processes includes, causing first-definition-wins; instead process top-level
entries in source order (tasks and include directives interleaved) so later
definitions replace earlier ones. Change collect_makefile_tasks_recursive to
obtain an ordered sequence (or merge parse_makefile::parse results with
parse_makefile::extract_include_directives by their positions) and iterate that
sequence: when you encounter a task, use a map seen_task_index: HashMap<String,
usize> to check if the task name already exists in collected_tasks and replace
the existing entry at that index (and update any definition_path via
current_source.apply_to_task), otherwise push and record its index; when you
encounter an include, recurse into collect_makefile_tasks_recursive as before so
included tasks can override prior entries. Also add a regression test for
“target before include, same target redefined in include” to ensure the included
definition wins.
🪄 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: ASSERTIVE

Plan: Pro

Run ID: 6f47e3ad-5980-4e77-8a57-3fb45050db5b

📥 Commits

Reviewing files that changed from the base of the PR and between 8368fb0 and 663fce6.

📒 Files selected for processing (2)
  • src/task_discovery.rs
  • src/task_discovery/make.rs

Comment thread src/task_discovery/make.rs Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 `@src/task_discovery/make.rs`:
- Around line 20-30: The code currently treats any failure to read a directory
as TaskFileStatus::NotFound; update discover_makefile_tasks (and the similar
block around the 74-89 range) to explicitly handle fs::read_dir errors: call
fs::read_dir(dir) and match the Result—if Ok, proceed as before; if Err(e), call
set_definition with TaskFileStatus::NotReadable and include the error (or its
kind) in any logs/metadata so permission/I/O failures aren't collapsed into
NotFound; keep using find_makefile_path and set_definition as the insertion
points to set the correct TaskFileStatus.
🪄 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: ASSERTIVE

Plan: Pro

Run ID: 5860acbd-6410-4358-914d-8ed403864f48

📥 Commits

Reviewing files that changed from the base of the PR and between 663fce6 and 0967ae8.

📒 Files selected for processing (3)
  • src/commands/list.rs
  • src/task_discovery.rs
  • src/task_discovery/make.rs

Comment thread src/task_discovery/make.rs
@aleyan aleyan merged commit 155a21a into main May 16, 2026
9 checks passed
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