Skip to content

ci: add self-validation to CI [skip changelog]#646

Merged
avifenesh merged 5 commits intomainfrom
ci/add-agnix-validation
Mar 9, 2026
Merged

ci: add self-validation to CI [skip changelog]#646
avifenesh merged 5 commits intomainfrom
ci/add-agnix-validation

Conversation

@avifenesh
Copy link
Copy Markdown
Collaborator

Summary

  • Update .agnix.toml config with additional rule suppressions
  • Add agnix self-validation job to CI using ./ action reference
  • Validates the repo's own agent configurations on push and PR

Test plan

  • CI passes with agnix self-validation step
  • No false positive warnings in agnix output

Add agnix job to CI that uses ./ to validate the repo's own agent
configurations against .agnix.toml on push and PR.
Copilot AI review requested due to automatic review settings March 9, 2026 21:36
@chatgpt-codex-connector
Copy link
Copy Markdown

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
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enhances the continuous integration process by introducing a self-validation step for agent configurations. It ensures that the repository's agent configurations are always valid by running the agnix linter against them in CI. This change also refines the linter's behavior by suppressing specific rules that were generating irrelevant warnings, thereby improving the accuracy and utility of the linting process.

Highlights

  • CI Self-Validation: A new self-validation job has been added to the CI pipeline, which uses the repository's own agnix action to validate agent configurations on every push and pull request.
  • Linter Configuration Update: The .agnix.toml configuration file was updated to include additional rule suppressions, addressing false positive warnings from the linter.
Changelog
  • .agnix.toml
    • Added new rule suppressions to the disabled_rules list, including CDX-AG-005, CC-MEM-009, CC-SK-017, and XML-001, along with explanations for each.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ci.yml
Activity
  • No human activity has occurred on this pull request yet.
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.

Copy link
Copy Markdown
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

Adds an agnix “self-validation” check to CI so the repository validates its own agent configuration/docs on pushes and PRs, and updates .agnix.toml suppressions to keep the new gate green.

Changes:

  • Adds a new agnix job to .github/workflows/ci.yml that runs the repo’s ./ GitHub Action against .agnix.toml.
  • Expands and documents disabled_rules in .agnix.toml to suppress additional rule IDs during self-validation.

Reviewed changes

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

File Description
.github/workflows/ci.yml Adds a new CI job that runs the local agnix composite action for repo self-validation.
.agnix.toml Reformats and expands the disabled rule list to suppress additional rules during self-validation.

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

.agnix.toml Outdated
Comment on lines +42 to +43
"CC-SK-017", # Intentional - version is a client-specific frontmatter field
"XML-001", # <ValidationOutcome> is a Rust type reference, not unclosed XML
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

Disabling XML-001 repo-wide reduces the usefulness of the new self-validation gate and may mask genuine unclosed-tag issues elsewhere. Since the trigger here appears to be Rust generic type syntax like LintResult<ValidationOutcome> in markdown, prefer fixing the docs (wrap the type in backticks or escape </>), or narrowing the suppression to specific paths, so XML balance checking stays active for the rest of the repo.

Copilot uses AI. Check for mistakes.
Comment on lines 28 to +32
# - XP-006: We intentionally have both CLAUDE.md and AGENTS.md
# - VER-001: Version pinning not needed for the linter itself
# - CC-MEM-006: Negative instructions are sometimes necessary in CLAUDE.md
# - PE-003: Weak language in docs is acceptable
disabled_rules = ["XP-001", "XP-002", "XP-003", "XP-006", "VER-001", "CC-MEM-006", "PE-003"]
disabled_rules = [
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The comment block above disabled_rules is now incomplete (it lists only the original suppressions, but the list also includes CDX-AG-005 / CC-MEM-009 / CC-SK-017 / XML-001). Updating the comment to match the new set will help future maintainers understand why these additional rules are suppressed.

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +53
- name: Validate agent configurations
uses: ./
with:
config: '.agnix.toml'
fail-on-error: 'true'
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

This CI job uses the local action (uses: ./) but does not set build-from-source: 'true', so it will validate using the latest released agnix binary rather than the code in this PR. That makes self-validation less reliable for changes to the linter/action and adds an external dependency on release availability. Consider enabling build-from-source (or pinning version explicitly) for this workflow job so it always validates with the PR's implementation.

Copilot uses AI. Check for mistakes.
Comment on lines +39 to +41
"PE-003", # Weak language in docs is acceptable
"CDX-AG-005", # AGENTS.md uses structured code blocks for API documentation
"CC-MEM-009", # CLAUDE.md is intentionally detailed - it's the project memory
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

Disabling CDX-AG-005 globally hides real broken backtick file references in CLAUDE.md/AGENTS.md (e.g., rules.json and VALIDATION-RULES.md are referenced without the knowledge-base/ prefix and do not exist at repo root). It would be better to fix the references so this rule can remain enabled, preserving the value of self-validation for link/file-rot in AGENTS.md.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
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 updates the .agnix.toml configuration to suppress several linter rules, enabling self-validation in the CI pipeline. The reformatting of the disabled_rules list into a multi-line array with comments is a great improvement for readability and maintainability. I've added a couple of suggestions to make the justifications for the disabled rules even more precise, which should help with future maintenance.

Note: Security Review has been skipped due to the limited scope of the PR.

Comment on lines +33 to +35
"XP-001", # We document tool paths, mentioning them is expected
"XP-002", # Same as XP-001
"XP-003", # Same as XP-001
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The comments for XP-001, XP-002, and XP-003 could be more precise. These are distinct rules checking for different conditions (Claude-specific features, Markdown structure, and hard-coded paths, respectively). Using 'Same as XP-001' for two of them can be confusing, and the comment for XP-001 is more applicable to XP-003. For better maintainability, it would be clearer if each rule had a specific justification.

Suggested change
"XP-001", # We document tool paths, mentioning them is expected
"XP-002", # Same as XP-001
"XP-003", # Same as XP-001
"XP-001", # We document Claude-specific features, which this rule flags
"XP-002", # AGENTS.md structure is valid but may trigger this rule
"XP-003", # We document tool paths, which this rule flags

"VER-001", # Version pinning not needed for the linter itself
"CC-MEM-006", # Negative instructions are sometimes necessary
"PE-003", # Weak language in docs is acceptable
"CDX-AG-005", # AGENTS.md uses structured code blocks for API documentation
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The justification for disabling CDX-AG-005 could be more specific. The rule checks for references to missing files, while the comment mentions 'structured code blocks'. A more direct comment would clarify why it's being suppressed, for example, by explaining that the linter is misinterpreting content within code blocks as file paths.

Suggested change
"CDX-AG-005", # AGENTS.md uses structured code blocks for API documentation
"CDX-AG-005", # Linter incorrectly flags crate names in code blocks as missing files

XML-001 suppression was unnecessary (code blocks aren't flagged) and
broke test_cli_reports_xml_fixtures which expects XML-001 output.
@avifenesh avifenesh changed the title ci: add self-validation to CI ci: add self-validation to CI [skip changelog] Mar 9, 2026
@avifenesh avifenesh added the skip-changelog Skip changelog verification label Mar 9, 2026
Copilot AI review requested due to automatic review settings March 9, 2026 22:08
The released v0.16.1 binary flags <ValidationOutcome> as XML-001 in
code blocks, but the current source handles this correctly. Building
from source ensures self-validation uses the latest detection logic.
Copy link
Copy Markdown
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

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


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

Comment on lines +49 to +58
- uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
with:
toolchain: stable

- name: Validate agent configurations
uses: ./
with:
config: '.agnix.toml'
fail-on-error: 'true'
build-from-source: 'true'
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The new agnix job runs the composite action with build-from-source: 'true', which triggers a full cargo build --release -p agnix-cli (see scripts/download.sh). Without a Rust cache step, this will recompile from scratch on every CI run and likely add several minutes. Consider adding Swatinem/rust-cache (similar to the ci job) or switching to build-from-source: 'false' if validating against the latest release is acceptable.

Copilot uses AI. Check for mistakes.
"VER-001", # Version pinning not needed for the linter itself
"CC-MEM-006", # Negative instructions are sometimes necessary
"PE-003", # Weak language in docs is acceptable
"CDX-AG-005", # AGENTS.md uses structured code blocks for API documentation
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

CDX-AG-005 is meant to catch broken backtick-quoted file references in AGENTS.md. It looks like it’s being disabled to accommodate references like parsers/, schemas/, etc., which don’t exist at repo root and will always trigger this rule. If possible, prefer updating those references to the real paths (e.g., crates/agnix-core/src/parsers/) or avoiding backticks for conceptual module names so the rule can remain enabled for catching genuine broken links.

Suggested change
"CDX-AG-005", # AGENTS.md uses structured code blocks for API documentation

Copilot uses AI. Check for mistakes.
LintResult<ValidationOutcome> in prose triggers the unclosed XML tag
rule. Wrapping in inline code backticks fixes this properly instead
of suppressing the rule.
@avifenesh avifenesh merged commit 935cbde into main Mar 9, 2026
7 checks passed
@avifenesh avifenesh mentioned this pull request Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Skip changelog verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants