Skip to content

_build_test_path fallback branch never executes (dead code in critic_agent.py) #23

Description

@VinaySampath14

In src/agents/critic_agent.py, the _build_test_path function has dead
code in its else branch:

if os.path.exists(full_path):
    node_ids.append(test_id)
    seen_files.add(file_part)
else:
    # File not found at this commit — fall back to file name only
    if file_part not in seen_files and os.path.exists(full_path):
        seen_files.add(file_part)

The inner os.path.exists(full_path) check in the else branch will always
return False — we only reach the else when os.path.exists(full_path) is
already False. The fallback never runs.

Fix: remove the redundant os.path.exists(full_path) check from the else
branch so the fallback actually executes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions