Skip to content

feat: implement issue #646 — [Phase 3] Add local canonical-AGENTS.md self-validation to CI (informational) - #1060

Merged
don-petry merged 12 commits into
mainfrom
dev-lead/issue-646-20260901-0601
Sep 10, 2026
Merged

don-petry merged 12 commits into
mainfrom
dev-lead/issue-646-20260901-0601

Conversation

@don-petry

@don-petry don-petry commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

User description

Closes #646

Implemented by dev-lead agent. Please review.


CodeAnt-AI Description

Add informational AGENTS.md validation to pull request CI

What Changed

  • Pull requests now check the repository’s canonical AGENTS.md for structural issues
  • Findings appear as GitHub warning annotations, including the affected file and line when available
  • The self-check remains non-blocking and does not fail the CI build
  • Regression tests verify the target file, warning output, and informational behavior

Impact

✅ Earlier visibility into AGENTS.md issues
✅ Clearer file- and line-specific CI warnings
✅ Pull requests remain unblocked by self-check findings

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@don-petry
don-petry requested a review from a team as a code owner September 1, 2026 06:08
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@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.

@codeant-ai

codeant-ai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Incremental review completed 5783c73 Sep 08, 2026 · 12:18 12:18
✅ Incremental review completed 6939ef3 Sep 08, 2026 · 03:39 03:40
✅ Incremental review completed a7c0249 Sep 07, 2026 · 21:18 21:18
✅ Incremental review completed 1a186b7 Sep 07, 2026 · 16:09 16:09
✅ Incremental review completed 1e88f40 Sep 07, 2026 · 15:07 15:08

@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c45ac6f3-f933-4d7e-ac43-30c972d3a8e9

📥 Commits

Reviewing files that changed from the base of the PR and between ce62d4b and 5783c73.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • test/workflows/ci/agents-md-selfcheck.bats

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.

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Sep 1, 2026
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) September 1, 2026 06:09

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

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.

Code Review

This pull request introduces a new BATS test suite (test/workflows/ci/agents-md-selfcheck.bats) to act as a regression guard for the informational AGENTS.md self-check in the CI workflow. The tests verify that the linter script is executed in informational mode, outputs warnings instead of failing, and is properly documented. The review feedback highlights a fragility in the step_block_with helper function, which could incorrectly append subsequent job definitions to a step block, and provides a more robust parsing implementation using indentation checks.

Comment thread test/workflows/ci/agents-md-selfcheck.bats
@don-petry
don-petry disabled auto-merge September 1, 2026 06:10
Comment thread test/workflows/ci/agents-md-selfcheck.bats Outdated
Comment thread test/workflows/ci/agents-md-selfcheck.bats
@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

1 code suggestion

1. The workflow comments already contain ::warning, so this test passes even when the linter output is not converted into GitHub warning annotations.

Incomplete implementation · test/workflows/ci/agents-md-selfcheck.bats:80

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) September 1, 2026 06:11
@don-petry
don-petry disabled auto-merge September 1, 2026 06:12
…lse-positives

Strip comment lines before asserting AGENTS.md appears in the linter step,
and verify the combined `scripts/agents-md-lint.sh … AGENTS.md` invocation
pattern rather than just the script name alone.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@donpetry-bot

Copy link
Copy Markdown
Contributor

CI checks on this PR are still running. Once they complete, re-mention @donpetry-bot to trigger a fresh review.

Posted by the donpetry-bot PR-review cascade.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) September 1, 2026 06:16
@don-petry
don-petry disabled auto-merge September 1, 2026 06:17
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
  - 0 New issues
  - 0 Accepted issues  
  - 0 Security Hotspots
  - 0.0% Coverage on New Code
  - 0.0% Duplication on New Code
- **Tier 1 Blockers:** None
  - All CI checks passing or intentionally skipped (dev-lead/ci-relay, dev-lead/dispatch marked with `[skip ci-relay]`)
  - No CHANGES_REQUESTED reviews
- **Test Status:** All BATS tests passing (6/6)
**No changes required.** The SonarCloud quality gate has passed with zero new issues or security hotspots. There are no actionable code issues identified in the bot's comment, and no Tier 1 blockers to address. The PR is ready.

@don-petry
don-petry enabled auto-merge (squash) September 1, 2026 06:19

@donpetry-bot donpetry-bot left a comment

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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 7f34f901f75f10d5ec65574cb87bd8f1a346969a
Review mode: triage-approved (single reviewer)

Summary

Adds a non-blocking, informational AGENTS.md structural self-check job to ci.yml (Phase 3 of epic #642) plus a bats regression suite pinning its informational contract. Job follows org security standards: SHA-pinned checkout, minimal contents:read permissions, 10-minute timeout, no untrusted-input interpolation. Confirms the triage assessment; all decision gates pass.

Linked issue analysis

Closes #646. All four acceptance criteria are substantively met: (1) the linter runs against the repo's canonical AGENTS.md on every PR in informational mode, (2) findings surface as GitHub ::warning:: annotations (with and without line numbers), (3) the job is documented as deliberately NOT a required status check with promotion deferred to Phase 4 — and a bats test pins that contract, (4) the change is workflow wiring only; ShellCheck and YAML validity checks are green. Note: the issue's Dev Notes named lint.yml as the likely target, but this repo's lint jobs (Lint, ShellCheck) actually live in ci.yml, so placing the job there is the correct interpretation.

Findings

  • No security findings. The new job uses a SHA-pinned actions/checkout, contents:read permissions, a timeout, and no ${{ }} expression interpolation in the run block.
  • Secret scan: the run_secret_scanning MCP tool was not available in this run; the gitleaks CI check passed and the diff contains no credential-like content.
  • Prior review feedback resolved at head: the codeant-ai thread about weak assertions was addressed in commit 7f34f90 — the tests now strip comment lines and assert the combined 'scripts/agents-md-lint.sh … AGENTS.md' invocation pattern, with an author reply on the thread (thread not formally marked resolved, but substantively closed).
  • Minor, non-blocking: the '::warning:: annotations' bats test matches the raw step block including comments, which themselves contain '::warning::', so that single test could pass trivially. The workflow does emit real annotations; consider stripping comments in that test too in a follow-up.

CI status

All code checks green: Lint, ShellCheck, bats (CI Workflow Tests + Dependency Hardening), CodeQL, SonarCloud (quality gate passed, 0 new issues), gitleaks secret scan, Agent Security Scan, AgentShield, duplicate-decl-gate, dependency-audit, and the new AGENTS.md Self-Check job itself. Two CANCELLED entries (dev-lead dispatch / ci-relay) are the authoring agent's own orchestration jobs, not code checks. mergeStateStatus BLOCKED reflects only the pending review requirement.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@don-petry
don-petry disabled auto-merge September 7, 2026 15:08
@don-petry
don-petry enabled auto-merge (squash) September 7, 2026 15:14
@don-petry
don-petry disabled auto-merge September 7, 2026 15:15
@don-petry
don-petry enabled auto-merge (squash) September 7, 2026 16:00
@don-petry
don-petry disabled auto-merge September 7, 2026 16:14
@don-petry
don-petry enabled auto-merge (squash) September 7, 2026 16:16
@don-petry
don-petry disabled auto-merge September 7, 2026 16:16
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
- Quality Gate passed with 0 new issues (no findings to fix)
Files changed: (no changes needed)
Skipped (informational): 0
```
No changes needed — the PR is ready.

@don-petry
don-petry enabled auto-merge (squash) September 7, 2026 16:17
@don-petry
don-petry disabled auto-merge September 7, 2026 21:20
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
- Quality gate passed with no new issues (informational status report)
Files changed: none
Skipped (informational): 1
```
No action needed — the PR is in good standing with all quality gates passing.

@don-petry
don-petry enabled auto-merge (squash) September 7, 2026 21:21
@don-petry
don-petry disabled auto-merge September 7, 2026 22:01
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
- No actionable findings (Quality Gate passed is a status report, not a defect)
Files changed: none
Skipped (informational): 0
```
The SonarCloud Quality Gate passed with zero new issues. This is not an actionable finding—it's a passing status. Per the constraints, I'm not reverting the PR's own changes to "address" a neutral summary, as that would produce a net-zero diff and silently cancel the fix.
**No changes required.** The PR is ready for merge.

@don-petry
don-petry enabled auto-merge (squash) September 7, 2026 22:01
@don-petry
don-petry disabled auto-merge September 8, 2026 03:43
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
- Quality gate passed (informational summary — no actionable defects)
Files changed: none
Skipped (informational): 1
```
**No action required.** This PR has no defects to address. All CI checks pass and the automated review is approved.

@don-petry
don-petry enabled auto-merge (squash) September 8, 2026 03:43
@don-petry
don-petry disabled auto-merge September 8, 2026 03:51
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
- SonarCloud Code Analysis: ✅ success
- No Tier 1 blockers (no failures, timeouts, or CHANGES_REQUESTED reviews)
**Review status:**
- donpetry-bot: ✅ APPROVED (risk: MEDIUM, all decision gates pass)
- No change requests
## Summary
**Bot:** SonarCloud (status report only)  
**Issues addressed:** 0  
**Skipped (informational):** Quality Gate passed — neutral status report, no actionable defects  
**No changes needed** — the PR has passed all quality gates and reviews.

@don-petry
don-petry enabled auto-merge (squash) September 8, 2026 03:51
@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

@don-petry
don-petry disabled auto-merge September 8, 2026 12:27
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
Skipped (informational): 1 — Quality Gate pass (no actionable defects reported)
Files changed: None
No action required — quality gate passed, all CI green, no changes needed
```
The PR is ready to merge from a code quality perspective. All automated checks pass and no corrections are needed.

@don-petry
don-petry enabled auto-merge (squash) September 8, 2026 12:28
@don-petry
don-petry merged commit 76a68b1 into main Sep 10, 2026
26 checks passed
@don-petry
don-petry deleted the dev-lead/issue-646-20260901-0601 branch September 10, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Phase 3] Add local canonical-AGENTS.md self-validation to CI (informational)

2 participants