Skip to content

ci(pr): inline annotations and changed-specs review#15755

Merged
dmcilvaney merged 3 commits intomicrosoft:tomls/base/mainfrom
dmcilvaney:damcilva/spec_agent_workflow
Feb 9, 2026
Merged

ci(pr): inline annotations and changed-specs review#15755
dmcilvaney merged 3 commits intomicrosoft:tomls/base/mainfrom
dmcilvaney:damcilva/spec_agent_workflow

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

@dmcilvaney dmcilvaney commented Feb 7, 2026

Add a github action which runs on pull request and adds inline annotations for changed specs based on upstream package standards.

The check uses the Copilot CLI via a GitHub App user and requires the following secrets to be set in the repository:

  • COPILOT_TOKEN: The token for the GitHub App user.

The action will run two sequential copies of the spec review agent with different models to review the changed specs and provide feedback.
A third agent will then combine the feedback from both agents and create inline annotations on the pull request.

Any annotation that is an error will cause the check to fail, while warnings and suggestions will be added as annotations without failing the check.

NOTE: This will only work for non-fork PRs right now, will need to setup an environment to handle that later.

Comment thread .github/workflows/scripts/format_pr_comment.py
Comment thread .github/workflows/scripts/format_pr_comment.py
Comment thread .github/workflows/scripts/format_pr_comment.py
Comment thread .github/workflows/scripts/format_pr_comment.py
Comment thread .github/workflows/scripts/spec_review_schema.py Outdated
Comment thread .github/workflows/scripts/spec_review_schema.py Outdated
Comment thread .github/workflows/spec-review.yml
Comment thread .github/workflows/spec-review.yml Outdated
Comment thread .github/workflows/spec-review.yml Outdated
Add a github action which runs on pull request and adds inline annotations for changed specs based on upstream package standards.

The check uses the Copilot CLI via a GitHub App user and requires the following secrets to be set in the repository:
- COPILOT_TOKEN: The token for the GitHub App user.

The action will run two parallel copies of the spec review agent with different models to review the changed specs and provide feedback.
A third agent will then combine the feedback from both agents and create inline annotations on the pull request.

Any annotation that is an error will cause the check to fail, while warnings and suggestions will be added as annotations without failing the check.
@dmcilvaney dmcilvaney force-pushed the damcilva/spec_agent_workflow branch from cd16099 to 642dd4c Compare February 7, 2026 01:16
@dmcilvaney dmcilvaney marked this pull request as ready for review February 7, 2026 01:20
Copilot AI review requested due to automatic review settings February 7, 2026 01:20
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 a new pull-request GitHub Actions workflow that runs a Copilot-based multi-model RPM spec review, validates the resulting JSON report, and surfaces findings as inline annotations and a PR comment.

Changes:

  • Introduces .github/workflows/spec-review.yml to run on PRs touching **/*.spec (plus workflow_dispatch) and publish annotations/comments/artifacts.
  • Adds a set of helper scripts to run single-/multi-model reviews and to validate/format/annotate the generated report.
  • Adds Python dependency (pydantic>=2.0) for report schema validation.

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/spec-review.yml New PR workflow orchestration for spec review, validation, annotations, commenting, and artifacts.
.github/workflows/scripts/spec_review.sh Runs the Copilot agent for spec review (and synthesis), manages inputs/outputs, validates JSON.
.github/workflows/scripts/spec_review_multi.sh Runs two reviewer passes + synthesis pass and produces intermediate artifacts.
.github/workflows/scripts/spec_review_schema.py Pydantic schema validation + report comparison output.
.github/workflows/scripts/create_check_annotations.py Converts report findings into GitHub workflow-command or Checks-style annotations.
.github/workflows/scripts/format_pr_comment.py Formats report into a PR comment with links and a raw JSON section.
.github/workflows/scripts/_common.py Shared path utilities for annotations/comment formatting.
.github/workflows/scripts/requirements.txt Adds pydantic dependency for the scripts.
.github/workflows/scripts/README.md Local developer guide for running the spec review scripts/CLI.

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

Comment on lines +34 to +38
- name: Test gh auth
env:
GH_TOKEN: ${{ secrets.COPILOT_TOKEN }}
run: |
gh auth status
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

In fork-based PRs, repository secrets (including COPILOT_TOKEN) are not provided, so this step will fail and block the workflow. Consider gating all steps that require COPILOT_TOKEN behind a condition that only runs for same-repo PRs (or when the secret is present), and emit a clear notice when skipped.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will deal with this later

Comment thread .github/workflows/spec-review.yml Outdated
Comment thread .github/workflows/scripts/create_check_annotations.py
Comment thread .github/workflows/scripts/create_check_annotations.py
Comment thread .github/workflows/spec-review.yml
Comment thread .github/workflows/scripts/spec_review.sh Outdated
Comment thread .github/workflows/spec-review.yml
Comment thread .github/workflows/scripts/spec_review.sh
Comment thread .github/workflows/scripts/spec_review_schema.py Outdated
Copy link
Copy Markdown
Contributor

@sameluch sameluch left a comment

Choose a reason for hiding this comment

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

LGTM

@dmcilvaney dmcilvaney merged commit ca3aca5 into microsoft:tomls/base/main Feb 9, 2026
6 checks passed
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.

3 participants