Skip to content

test: cover resolve_validation_root file-input path behavior (#450)#455

Merged
avifenesh merged 5 commits intomainfrom
feature/resolve-validation-root-450
Feb 15, 2026
Merged

test: cover resolve_validation_root file-input path behavior (#450)#455
avifenesh merged 5 commits intomainfrom
feature/resolve-validation-root-450

Conversation

@avifenesh
Copy link
Collaborator

Summary

  • Adds 7 integration tests covering the file-input branch of resolve_validation_root at pipeline.rs:885
  • Tests exercise validate_project(), validate_project_rules(), and validate_project_with_registry() with file paths instead of directory paths
  • Covers: single-file validation scoping, diagnostic production, valid-file no-errors, project-level rule scoping, unknown file type handling, registry variant, and nonexistent file edge case
  • Updates test count in CLAUDE.md/AGENTS.md (2600+ to 3400+) and adds CHANGELOG entry

Test plan

  • cargo test --package agnix-core --test lib_tests -- file_input - all 7 new tests pass
  • cargo test - full suite green (3400+ tests, 0 failures)
  • CLAUDE.md/AGENTS.md parity test passes

Closes #450

Copilot AI review requested due to automatic review settings February 15, 2026 15:02
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @avifenesh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the testing coverage for the core validation pipeline by introducing new integration tests. These tests ensure that the system correctly handles file paths as input for validation, rather than just directory paths, thereby improving the robustness and reliability of the validation process across various scenarios, including edge cases like unknown file types and nonexistent paths.

Highlights

  • New Integration Tests: Added 7 integration tests to cover the file-input branch of resolve_validation_root at pipeline.rs:885.
  • Validation Function Coverage: Tests exercise validate_project(), validate_project_rules(), and validate_project_with_registry() with file paths instead of directory paths.
  • Edge Case Handling: The new tests cover single-file validation scoping, diagnostic production, valid-file no-errors, project-level rule scoping, unknown file type handling, registry variant, and nonexistent file edge cases.
  • Documentation and Changelog Updates: Updated the test count in CLAUDE.md and AGENTS.md from 2600+ to 3400+ and added a corresponding entry to CHANGELOG.md.
Changelog
  • CHANGELOG.md
    • Added an entry for resolve_validation_root file-input tests, detailing the 7 new integration tests covering single-file validation mode, unknown file type handling, project-level rule scoping, and nonexistent file edge cases.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Rust formatter requires breaking long chained method calls across multiple lines to maintain code style consistency.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive integration tests for the file-input branch of resolve_validation_root (pipeline.rs:885), filling a test coverage gap identified in issue #450. When a file path is passed to validation functions, the code extracts the parent directory as the validation root while walking only that specific file.

Changes:

  • Added 7 integration tests exercising file-input behavior for validate_project(), validate_project_rules(), and validate_project_with_registry()
  • Updated test count from 2600+ to 3400+ in CLAUDE.md and AGENTS.md
  • Added CHANGELOG entry documenting the new test coverage

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
crates/agnix-core/tests/lib_tests.rs Added 7 integration tests covering single-file validation scoping, diagnostic production, valid-file handling, project-level rule scoping, unknown file type behavior, registry variant, and nonexistent file edge case
CLAUDE.md Updated test count from 2600+ to 3400+ passing tests
AGENTS.md Updated test count from 2600+ to 3400+ passing tests
CHANGELOG.md Added entry documenting new resolve_validation_root file-input test coverage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a comprehensive set of integration tests for file-based validation in resolve_validation_root. The tests cover various scenarios, including single-file validation, diagnostic generation, handling of different file types, and edge cases like nonexistent paths. The changes are well-structured and improve test coverage for an important part of the validation pipeline. The documentation and changelog updates are also appropriate. The minor suggestion to improve the debuggability of an assertion message in one of the new tests aligns with repository rules and has been retained.

Include actual diagnostics in assertion failure message to align with repository debuggability guidelines. This makes test failures more informative by showing the unexpected values.
@avifenesh avifenesh merged commit 26f6fe7 into main Feb 15, 2026
25 checks passed
@avifenesh avifenesh deleted the feature/resolve-validation-root-450 branch February 15, 2026 15:31
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.

tests: cover resolve_validation_root file-input path behavior

2 participants