Skip to content

feat(ci): enable AI review commands and activity events - #697

Open
zhongkechen wants to merge 2 commits into
mainfrom
fix/ai-review-command-triggers
Open

feat(ci): enable AI review commands and activity events#697
zhongkechen wants to merge 2 commits into
mainfrom
fix/ai-review-command-triggers

Conversation

@zhongkechen

Copy link
Copy Markdown
Contributor

Summary

  • mirror the pinned reusable AI review workflow's supported event triggers
  • enable authorized /ai review commands through pull request issue comments
  • record activity for submitted, edited, or dismissed reviews and created, edited, or deleted review comments
  • add regression coverage for the caller event contract

Follow-up to #695.

Validation

  • parsed the modified workflow with PyYAML
  • ran both AI review workflow regression assertions directly
  • ran git diff --check
  • ran .github/scripts/lintcommit.py

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime August 31, 2026 18:53 — with GitHub Actions Active
@zhongkechen
zhongkechen had a problem deploying to ai-pr-review-runtime August 31, 2026 19:07 — with GitHub Actions Failure
@zhongkechen
zhongkechen had a problem deploying to ai-pr-review-runtime August 31, 2026 19:07 — with GitHub Actions Failure
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime August 31, 2026 19:31 — with GitHub Actions Active
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime August 31, 2026 19:31 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. Residual risk is limited to live GitHub event/reusable-workflow integration, which the text-based regression test does not exercise.

Reviewed commit 8596f320dfea932f036536332d8910516e090f61. Workflow run

@github-actions

Copy link
Copy Markdown
Contributor

Claude AI review

This PR only touches two files: the ai-pr-review.yml reusable-workflow caller and its regression test. It adds pull_request_review, pull_request_review_comment, and issue_comment to the existing pull_request_target trigger set, matching the description ("mirror the pinned reusable AI review workflow's supported event triggers").

Verification performed:

  • Confirmed the added on: block in .github/workflows/ai-pr-review.yml exactly matches the literal string asserted by the new test_ai_pr_review_caller_subscribes_to_supported_events test (byte-for-byte, including indentation and event types: lists), so the test will pass and does exercise the actual change.
  • The event types chosen for each trigger (submitted, edited, dismissed for pull_request_review; created, edited, deleted for pull_request_review_comment; created only for issue_comment) are valid, complete GitHub Actions type enumerations for those events.
  • No changes were made to permissions:, secrets:, or the with: inputs passed to the reusable workflow, so the caller's authorization/permission surface is unchanged apart from the new event types that can now reach it.
  • The new test follows the existing brittle-but-established convention (plain substring match on the raw YAML text) already used by test_ai_pr_review_caller_grants_reusable_workflow_permissions, so it is consistent with house style rather than a new regression.
  • No core SDK, testing, OTel, or examples packages are touched, so determinism/replay, serialization, and public-API concerns from AGENTS.md do not apply to this change.

No confirmed defects found in the diffed lines.

Residual risk (not blocking, for awareness): correctness of the new triggers ultimately depends on the pinned reusable workflow (aws/aws-durable-execution-ci/.github/workflows/ai-pr-review.yml@8de63fa6...) correctly scoping issue_comment handling to pull-request comments and enforcing commenter authorization before acting — that logic lives outside this repository and isn't exercised by any test here. If that downstream authorization is ever weakened, this caller would now deliver issue_comment/pull_request_review/pull_request_review_comment events (including on non-PR issues, for issue_comment) into a job that still carries contents: write, pull-requests: write, id-token: write, and secrets: inherit. Also, the new regression test validates the change only via literal text containment rather than parsing the YAML on: mapping, so an equivalent but differently formatted trigger block would fail the test even though it were functionally correct.

Reviewed commit 8596f320dfea932f036536332d8910516e090f61. Workflow run

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.

1 participant