Skip to content

tests: cover resolve_validation_root file-input path behavior #450

@avifenesh

Description

@avifenesh

Issue from /audit-project

Severity: Medium
Category: Tests
Effort: Medium

Description

resolve_validation_root file-path mode lacks direct regression coverage; current tests mainly validate directory roots.

Current Behavior

let candidate = if path.is_file() { path.parent().unwrap_or(Path::new(".")) } else { path };

Proposed Fix

Add tests that pass a file path into validate_project and validate_project_rules, asserting parent-directory traversal behavior.

Impact

Protects CLI file-input behavior from subtle regressions in root resolution.

Files

  • crates/agnix-core/src/pipeline.rs:885

Audit Reference

  • Queue ID: AUD-005

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions