Skip to content

ci: have AI review check contributing rules - #846

Open
yaythomas wants to merge 1 commit into
mainfrom
ci/ai-review-enforce-contributing-rules
Open

yaythomas wants to merge 1 commit into
mainfrom
ci/ai-review-enforce-contributing-rules

Conversation

@yaythomas

Copy link
Copy Markdown
Contributor

Issue #, if available

None.

Description of changes

The AI review prompt reads CONTRIBUTING.md, but it focuses on code defects and requires a concrete code fix. Rule 9 instead requires reviewers to reject a broken approach without prescribing detailed code changes.

The prompt now checks rules 1 through 9, defines approach findings, reads required design information from the pull request description, and anchors every finding to an added line.

Related: JavaScript SDK PR #1104: have the AI review check the contributing rules.

Design

  • Design note (rule 3): not needed. This changes no feature, option, or public API.
  • Simpler option (rule 2): a focus bullet alone leaves the concrete-fix conflict unresolved.
  • Root cause (rule 5): the prompt has no valid format for rejecting an approach.
  • Net change: 0 source lines and 0 public API members. The prompt grows by 16 lines.

Assumptions

  • Verified: both SDKs use the same shared workflow. It reviews the base checkout and requires added-line finding ranges.
  • Unverified: how often Codex will report violations of judgment-based rules.

Decisions not covered by the issue or design note

  • Approach findings rank below broken SDK invariants because invariant violations affect runtime behavior.
  • The Python root AGENTS.md remains applicable because it contains contributor and replay requirements.

Checklist

  • Every new branch has a test that fails without it (rule 4): no code branches were added.
  • For a bug fix, the first commit adds a failing test (rule 5): this is not a code bug fix.
  • Every edited test expectation is listed (rule 5): no test expectations changed.

Testing

  • hatch run test:all .github/scripts/tests/test_ai_pr_review_workflow.py (2 passed)
  • git diff --check
  • hatch run python .github/scripts/lintcommit.py

The prompt takes effect after merge because reviews read the base revision.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The review prompt reads CONTRIBUTING.md, but its focus and finding
format cover only code defects. This lets correct changes bypass the
repository approach rules.

Require the reviewer to evaluate every change against rules 1 through 9.
Define approach findings so they use an added-line anchor without asking
for detailed code changes.
@yaythomas
yaythomas deployed to ai-pr-review-runtime October 26, 2026 07:51 — with GitHub Actions Active
@yaythomas
yaythomas deployed to ai-pr-review-runtime October 26, 2026 07:52 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. Static inspection only; the existing workflow tests do not validate how reviewers follow the added prompt instructions.

Reviewed commit df1c7f9eccb0c255a172c1fe09e70c3a0d6a97e9. Workflow run

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — df1c7f9e Deployed Oct 26, 2026 by yaythomas via ai-pr-review / Codex review / Generate Codex review #2462
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.

2 participants