Add auto_review CI trigger #4

Open
jwilger wants to merge 2 commits from add-auto-review-ci into main
Owner

Summary

  • Trigger auto_review on ready_for_review PR events.
  • Use AUTO_REVIEW_GATEWAY_URL as a repository variable and AR_CI_REVIEW_TOKEN as the CI review secret.
  • Preserve the existing deterministic CI gate before requesting semantic review and report clearer gateway authorization/failure diagnostics.

Verification

  • actionlint -ignore 'element of "steps" section is alias node' -ignore 'step must run script with "run" section or run action with "uses" section' .forgejo/workflows/ci.yml

Note: ignored diagnostics are for the pre-existing *install_nix YAML anchor pattern.

## Summary - Trigger auto_review on `ready_for_review` PR events. - Use `AUTO_REVIEW_GATEWAY_URL` as a repository variable and `AR_CI_REVIEW_TOKEN` as the CI review secret. - Preserve the existing deterministic CI gate before requesting semantic review and report clearer gateway authorization/failure diagnostics. ## Verification - `actionlint -ignore 'element of "steps" section is alias node' -ignore 'step must run script with "run" section or run action with "uses" section' .forgejo/workflows/ci.yml` Note: ignored diagnostics are for the pre-existing `*install_nix` YAML anchor pattern.
Add auto_review CI trigger
All checks were successful
CI / Format check (pull_request) Successful in 6s
CI / Clippy (pull_request) Successful in 16s
CI / Dependency policy (pull_request) Successful in 10s
CI / Test (pull_request) Successful in 22s
CI / Acceptance (pull_request) Successful in 22s
CI / Build (pull_request) Successful in 25s
CI / Request auto_review semantic review (pull_request) Successful in 1s
auto_review auto_review: no findings
5fb1184558
auto-review requested changes 2026-05-19 14:54:09 -07:00
Dismissed
auto-review left a comment

This PR enhances the CI workflow by adding a trigger for the ready_for_review event and improves diagnostics for the auto_review process. The changes appear safe to merge, with improved error handling and configuration checks.

Walkthrough

  • Event Trigger: Added ready_for_review to the list of pull request events that trigger the CI workflow, ensuring actions are taken when a PR is marked ready for review.
  • Environment Variables: Updated the environment variable names to use AUTO_REVIEW_GATEWAY_URL and AR_CI_REVIEW_TOKEN, aligning with repository variables and secrets.
  • Error Handling: Improved error messages and handling for authorization failures and other HTTP errors during the auto_review request, providing clearer diagnostics.

LLM usage and cost

Pre-merge checks

  • PR metadata quality: failed
  • Rationale: The title does not use an imperative verb or a conventional commit prefix. It should start with a verb like 'Add', 'Implement', or follow a conventional commit format.
  • Offending text: Add auto_review CI trigger
This PR enhances the CI workflow by adding a trigger for the `ready_for_review` event and improves diagnostics for the auto_review process. The changes appear safe to merge, with improved error handling and configuration checks. ## Walkthrough - **Event Trigger**: Added `ready_for_review` to the list of pull request events that trigger the CI workflow, ensuring actions are taken when a PR is marked ready for review. - **Environment Variables**: Updated the environment variable names to use `AUTO_REVIEW_GATEWAY_URL` and `AR_CI_REVIEW_TOKEN`, aligning with repository variables and secrets. - **Error Handling**: Improved error messages and handling for authorization failures and other HTTP errors during the auto_review request, providing clearer diagnostics. ## LLM usage and cost - Reasoning (gpt-4o) in=1734 out=299 cost=$0.013155 - Cheap (gpt-4o-mini) in=398 out=53 cost=$0.000092 Estimated total USD: $0.013246 via https://api.openai.com and https://api.openai.com ## Pre-merge checks - PR metadata quality: failed - Rationale: The title does not use an imperative verb or a conventional commit prefix. It should start with a verb like 'Add', 'Implement', or follow a conventional commit format. - Offending text: Add auto_review CI trigger
Author
Owner

@auto-review wrote in #4 (comment):

This PR enhances the CI workflow by adding a trigger for the ready_for_review event and improves diagnostics for the auto_review process. The changes appear safe to merge, with improved error handling and configuration checks.

Walkthrough

  • Event Trigger: Added ready_for_review to the list of pull request events that trigger the CI workflow, ensuring actions are taken when a PR is marked ready for review.
  • Environment Variables: Updated the environment variable names to use AUTO_REVIEW_GATEWAY_URL and AR_CI_REVIEW_TOKEN, aligning with repository variables and secrets.
  • Error Handling: Improved error messages and handling for authorization failures and other HTTP errors during the auto_review request, providing clearer diagnostics.

LLM usage and cost

Pre-merge checks

  • PR metadata quality: failed
  • Rationale: The title does not use an imperative verb or a conventional commit prefix. It should start with a verb like 'Add', 'Implement', or follow a conventional commit format.
  • Offending text: Add auto_review CI trigger

It literally meets the "should start with a verb like 'Add'" criteria. @auto-review

@auto-review wrote in https://git.johnwilger.com/Slipstream/eddy/pulls/4#issuecomment-8753: > This PR enhances the CI workflow by adding a trigger for the `ready_for_review` event and improves diagnostics for the auto_review process. The changes appear safe to merge, with improved error handling and configuration checks. > > ## [](#walkthrough)Walkthrough > * **Event Trigger**: Added `ready_for_review` to the list of pull request events that trigger the CI workflow, ensuring actions are taken when a PR is marked ready for review. > * **Environment Variables**: Updated the environment variable names to use `AUTO_REVIEW_GATEWAY_URL` and `AR_CI_REVIEW_TOKEN`, aligning with repository variables and secrets. > * **Error Handling**: Improved error messages and handling for authorization failures and other HTTP errors during the auto_review request, providing clearer diagnostics. > > ## [](#llm-usage-and-cost)LLM usage and cost > * Reasoning (gpt-4o) in=1734 out=299 cost=$0.013155 > * Cheap (gpt-4o-mini) in=398 out=53 cost=$0.000092 > Estimated total USD: $0.013246 via https://api.openai.com and https://api.openai.com > > ## [](#pre-merge-checks)Pre-merge checks > * PR metadata quality: failed > * Rationale: The title does not use an imperative verb or a conventional commit prefix. It should start with a verb like 'Add', 'Implement', or follow a conventional commit format. > * Offending text: Add auto_review CI trigger It *literally* meets the "should start with a verb like 'Add'" criteria. @auto-review
Owner

The diff updates the CI workflow in the ci.yml file primarily by adding support for the ready_for_review trigger in the pull request event types (line 5). Additionally, it modifies environment variables used for the auto-review functionality:

  1. The AUTO_REVIEW_ACTION_TOKEN is replaced with AR_CI_REVIEW_TOKEN (lines 7 and 14), changing the token reference to a secret variable.
  2. The echo statements in the workflow steps have been updated to accurately reflect the changes in naming and provide more context (lines 16-20).

Further enhancements include improved error handling for the HTTP response status when requesting an auto-review, checking for specific status codes (lines 25-34). This makes the workflow more robust by providing clearer failure messages and appropriate exit codes.

The diff updates the CI workflow in the `ci.yml` file primarily by adding support for the `ready_for_review` trigger in the pull request event types (line 5). Additionally, it modifies environment variables used for the auto-review functionality: 1. The `AUTO_REVIEW_ACTION_TOKEN` is replaced with `AR_CI_REVIEW_TOKEN` (lines 7 and 14), changing the token reference to a secret variable. 2. The `echo` statements in the workflow steps have been updated to accurately reflect the changes in naming and provide more context (lines 16-20). Further enhancements include improved error handling for the HTTP response status when requesting an auto-review, checking for specific status codes (lines 25-34). This makes the workflow more robust by providing clearer failure messages and appropriate exit codes.
Author
Owner

@auto-review wrote in #4 (comment):

The diff updates the CI workflow in the ci.yml file primarily by adding support for the ready_for_review trigger in the pull request event types (line 5). Additionally, it modifies environment variables used for the auto-review functionality:

  1. The AUTO_REVIEW_ACTION_TOKEN is replaced with AR_CI_REVIEW_TOKEN (lines 7 and 14), changing the token reference to a secret variable.
  2. The echo statements in the workflow steps have been updated to accurately reflect the changes in naming and provide more context (lines 16-20).

Further enhancements include improved error handling for the HTTP response status when requesting an auto-review, checking for specific status codes (lines 25-34). This makes the workflow more robust by providing clearer failure messages and appropriate exit codes.

OK, but since the pr metadata isn't actually a problem, I'd sure appreciate an approval. @auto-review

@auto-review wrote in https://git.johnwilger.com/Slipstream/eddy/pulls/4#issuecomment-8755: > The diff updates the CI workflow in the `ci.yml` file primarily by adding support for the `ready_for_review` trigger in the pull request event types (line 5). Additionally, it modifies environment variables used for the auto-review functionality: > > 1. The `AUTO_REVIEW_ACTION_TOKEN` is replaced with `AR_CI_REVIEW_TOKEN` (lines 7 and 14), changing the token reference to a secret variable. > 2. The `echo` statements in the workflow steps have been updated to accurately reflect the changes in naming and provide more context (lines 16-20). > > Further enhancements include improved error handling for the HTTP response status when requesting an auto-review, checking for specific status codes (lines 25-34). This makes the workflow more robust by providing clearer failure messages and appropriate exit codes. OK, but since the pr metadata isn't actually a problem, I'd sure appreciate an approval. @auto-review
Owner

The changes in the diff update the CI workflow configuration in the .forgejo/workflows/ci.yml file. The following key modifications were made:

  1. Trigger Types Update: Added ready_for_review to the pull request trigger types on line 5:

    types: [opened, synchronize, reopened, ready_for_review]
    
  2. Environment Variables Change:

    • The variable for the Auto Review Action Token has been changed from AUTO_REVIEW_ACTION_TOKEN to AR_CI_REVIEW_TOKEN (lines 11 and 17):
    AUTO_REVIEW_ACTION_TOKEN: ${{ secrets.AUTO_REVIEW_ACTION_TOKEN }} -> AR_CI_REVIEW_TOKEN: ${{ secrets.AR_CI_REVIEW_TOKEN }}
    
  3. Condition Checks Updated: The script checks for the new AR_CI_REVIEW_TOKEN instead of AUTO_REVIEW_ACTION_TOKEN in the conditional statements and messages (lines 19, 23, 27, 31).

  4. Improved Error Handling: The error messages for skipped and failed requests were enhanced to clarify the specific token being checked (lines 21 and 36).

These updates primarily enhance functionality for the auto review feature by adjusting trigger conditions and refining token handling logic.

The changes in the diff update the CI workflow configuration in the `.forgejo/workflows/ci.yml` file. The following key modifications were made: 1. **Trigger Types Update**: Added `ready_for_review` to the pull request trigger types on line 5: ```yaml types: [opened, synchronize, reopened, ready_for_review] ``` 2. **Environment Variables Change**: - The variable for the Auto Review Action Token has been changed from `AUTO_REVIEW_ACTION_TOKEN` to `AR_CI_REVIEW_TOKEN` (lines 11 and 17): ```yaml AUTO_REVIEW_ACTION_TOKEN: ${{ secrets.AUTO_REVIEW_ACTION_TOKEN }} -> AR_CI_REVIEW_TOKEN: ${{ secrets.AR_CI_REVIEW_TOKEN }} ``` 3. **Condition Checks Updated**: The script checks for the new `AR_CI_REVIEW_TOKEN` instead of `AUTO_REVIEW_ACTION_TOKEN` in the conditional statements and messages (lines 19, 23, 27, 31). 4. **Improved Error Handling**: The error messages for skipped and failed requests were enhanced to clarify the specific token being checked (lines 21 and 36). These updates primarily enhance functionality for the auto review feature by adjusting trigger conditions and refining token handling logic.
Author
Owner

@auto-review re-review

@auto-review re-review
Owner

Queued a forced review at 5fb1184558. This intentionally bypasses CI gating; watch the commit-status badge for progress.

Queued a forced review at 5fb11845584e22c0400e037f70654e97fcfb9fe7. This intentionally bypasses CI gating; watch the commit-status badge for progress.
auto-review left a comment

This PR enhances the CI workflow by adding a trigger for the ready_for_review event and improves diagnostics for the auto_review process. The changes appear safe to merge, with improved error handling and configuration checks.

Walkthrough

  • Event Trigger: Added ready_for_review to the list of pull request events that trigger the CI workflow, ensuring actions are taken when a PR is marked ready for review.
  • Environment Variables: Updated the environment variable names to use AUTO_REVIEW_GATEWAY_URL and AR_CI_REVIEW_TOKEN, aligning with repository variables and secrets.
  • Error Handling: Improved error messages and handling for authorization failures and other HTTP errors during the auto_review request, providing clearer diagnostics.

LLM usage and cost

Pre-merge checks

  • PR metadata quality: failed
  • Rationale: The title does not use an imperative verb or a conventional commit prefix. It should start with a verb like 'Add' or follow a conventional commit format.
  • Offending text: Add auto_review CI trigger
This PR enhances the CI workflow by adding a trigger for the `ready_for_review` event and improves diagnostics for the auto_review process. The changes appear safe to merge, with improved error handling and configuration checks. ## Walkthrough - **Event Trigger**: Added `ready_for_review` to the list of pull request events that trigger the CI workflow, ensuring actions are taken when a PR is marked ready for review. - **Environment Variables**: Updated the environment variable names to use `AUTO_REVIEW_GATEWAY_URL` and `AR_CI_REVIEW_TOKEN`, aligning with repository variables and secrets. - **Error Handling**: Improved error messages and handling for authorization failures and other HTTP errors during the auto_review request, providing clearer diagnostics. ## LLM usage and cost - Reasoning (gpt-4o) in=2856 out=387 cost=$0.020085 - Cheap (gpt-4o-mini) in=1619 out=92 cost=$0.000298 Estimated total USD: $0.020383 via https://api.openai.com and https://api.openai.com ## Pre-merge checks - PR metadata quality: failed - Rationale: The title does not use an imperative verb or a conventional commit prefix. It should start with a verb like 'Add' or follow a conventional commit format. - Offending text: Add auto_review CI trigger
Author
Owner

@auto-review wrote in #4 (comment):

This PR enhances the CI workflow by adding a trigger for the ready_for_review event and improves diagnostics for the auto_review process. The changes appear safe to merge, with improved error handling and configuration checks.

Walkthrough

  • Event Trigger: Added ready_for_review to the list of pull request events that trigger the CI workflow, ensuring actions are taken when a PR is marked ready for review.
  • Environment Variables: Updated the environment variable names to use AUTO_REVIEW_GATEWAY_URL and AR_CI_REVIEW_TOKEN, aligning with repository variables and secrets.
  • Error Handling: Improved error messages and handling for authorization failures and other HTTP errors during the auto_review request, providing clearer diagnostics.

LLM usage and cost

Pre-merge checks

  • PR metadata quality: failed
  • Rationale: The title does not use an imperative verb or a conventional commit prefix. It should start with a verb like 'Add' or follow a conventional commit format.
  • Offending text: Add auto_review CI trigger

@auto-review It literally starts with the word "Add".

@auto-review wrote in https://git.johnwilger.com/Slipstream/eddy/pulls/4#issuecomment-9206: > This PR enhances the CI workflow by adding a trigger for the `ready_for_review` event and improves diagnostics for the auto_review process. The changes appear safe to merge, with improved error handling and configuration checks. > > ## [](#walkthrough)Walkthrough > * **Event Trigger**: Added `ready_for_review` to the list of pull request events that trigger the CI workflow, ensuring actions are taken when a PR is marked ready for review. > * **Environment Variables**: Updated the environment variable names to use `AUTO_REVIEW_GATEWAY_URL` and `AR_CI_REVIEW_TOKEN`, aligning with repository variables and secrets. > * **Error Handling**: Improved error messages and handling for authorization failures and other HTTP errors during the auto_review request, providing clearer diagnostics. > > ## [](#llm-usage-and-cost)LLM usage and cost > * Reasoning (gpt-4o) in=2856 out=387 cost=$0.020085 > * Cheap (gpt-4o-mini) in=1619 out=92 cost=$0.000298 > Estimated total USD: $0.020383 via https://api.openai.com and https://api.openai.com > > ## [](#pre-merge-checks)Pre-merge checks > * PR metadata quality: failed > * Rationale: The title does not use an imperative verb or a conventional commit prefix. It should start with a verb like 'Add' or follow a conventional commit format. > * Offending text: Add auto_review CI trigger @auto-review It literally starts with the word "Add".
Owner

The diff shows several modifications in the CI workflow configuration:

  1. Pull Request Types:

    • Added ready_for_review to the types of pull request events that trigger the CI workflow. This is reflected in line 5.
  2. Environment Variables:

    • AUTO_REVIEW_ACTION_TOKEN is replaced with AR_CI_REVIEW_TOKEN in lines 9 and 12. It also updates the condition in environment checks and review requests to use this new variable.
  3. Step Names and Messages:

    • The step that checks if auto review configuration is available has been renamed from "Skip when auto_review secrets are not configured" to "Skip when auto_review configuration is not available" (line 13). The echo messages in this step and the auto review request step have been updated to reference the new token and clarify error messages (lines 14 and 32).
  4. Error Handling:

    • Additional checks have been added for HTTP response status codes after the curl command to handle 401, 403, and general error response codes more explicitly at lines 34-41.

These changes enhance the CI process by improving clarity and security checks regarding the integration with an auto review system.

The diff shows several modifications in the CI workflow configuration: 1. **Pull Request Types**: - Added `ready_for_review` to the types of pull request events that trigger the CI workflow. This is reflected in line 5. 2. **Environment Variables**: - `AUTO_REVIEW_ACTION_TOKEN` is replaced with `AR_CI_REVIEW_TOKEN` in lines 9 and 12. It also updates the condition in environment checks and review requests to use this new variable. 3. **Step Names and Messages**: - The step that checks if auto review configuration is available has been renamed from "Skip when auto_review secrets are not configured" to "Skip when auto_review configuration is not available" (line 13). The echo messages in this step and the auto review request step have been updated to reference the new token and clarify error messages (lines 14 and 32). 4. **Error Handling**: - Additional checks have been added for HTTP response status codes after the curl command to handle 401, 403, and general error response codes more explicitly at lines 34-41. These changes enhance the CI process by improving clarity and security checks regarding the integration with an auto review system.
Merge branch 'main' into add-auto-review-ci
All checks were successful
CI / Clippy (pull_request) Successful in 16s
CI / Dependency policy (pull_request) Successful in 10s
CI / Acceptance (pull_request) Successful in 22s
CI / Build (pull_request) Successful in 25s
CI / Request auto_review semantic review (pull_request) Successful in 1s
auto_review auto_review: 2 warnings
CI / Format check (pull_request) Successful in 6s
CI / Test (pull_request) Successful in 22s
dfb034a7e1
auto-review left a comment

The PR introduces significant changes by integrating the opencode-rgr-loop and opencode-forgejo plugins, shifting towards using rgr_loop for orchestration and removing certain tools from plugins. These changes appear safe to merge, but ensure that all dependencies and configurations are correctly set up and tested.

Walkthrough

Δ since 5fb1184:

  • Plugin Integration:

    • Integrated opencode-rgr-loop and opencode-forgejo plugins in opencode.json.
    • Removed several tools from auto-review-forgejo.ts and discipline-guardrails.ts, indicating a shift towards using rgr_loop for orchestration.
  • Documentation and Configuration Updates:

    • Updated various .md files to reflect the new plugin usage and removed references to deprecated tools.
    • Ensure all documentation and configurations are consistent with the new workflow.
  • Testing:

    • Updated tests to reflect changes in RGR cycle management, ensuring rgr_loop handles these responsibilities.

LLM usage and cost

Pre-merge checks

  • PR metadata quality: failed
  • Rationale: The title does not use an imperative verb or a conventional commit prefix. It should start with a verb like 'Add', 'Implement', or follow a conventional commit format.
  • Offending text: Add auto_review CI trigger
The PR introduces significant changes by integrating the `opencode-rgr-loop` and `opencode-forgejo` plugins, shifting towards using `rgr_loop` for orchestration and removing certain tools from plugins. These changes appear safe to merge, but ensure that all dependencies and configurations are correctly set up and tested. ## Walkthrough ### Δ since 5fb1184: - **Plugin Integration**: - Integrated `opencode-rgr-loop` and `opencode-forgejo` plugins in `opencode.json`. - Removed several tools from `auto-review-forgejo.ts` and `discipline-guardrails.ts`, indicating a shift towards using `rgr_loop` for orchestration. - **Documentation and Configuration Updates**: - Updated various `.md` files to reflect the new plugin usage and removed references to deprecated tools. - Ensure all documentation and configurations are consistent with the new workflow. - **Testing**: - Updated tests to reflect changes in RGR cycle management, ensuring `rgr_loop` handles these responsibilities. ## LLM usage and cost - Reasoning (gpt-4o) in=13694 out=618 cost=$0.077740 - Cheap (gpt-4o-mini) in=10667 out=88 cost=$0.001653 Estimated total USD: $0.079393 via https://api.openai.com and https://api.openai.com ## Pre-merge checks - PR metadata quality: failed - Rationale: The title does not use an imperative verb or a conventional commit prefix. It should start with a verb like 'Add', 'Implement', or follow a conventional commit format. - Offending text: Add auto_review CI trigger
Owner

🟡 Warning: The removal of forgejo_inline_reply_payload and forgejo_review_api_recipe tools from the auto-review-forgejo.ts plugin may affect functionality that relies on these tools. Ensure that their removal does not break any existing workflows or integrations.

🟡 **Warning:** The removal of `forgejo_inline_reply_payload` and `forgejo_review_api_recipe` tools from the `auto-review-forgejo.ts` plugin may affect functionality that relies on these tools. Ensure that their removal does not break any existing workflows or integrations.
Owner

🟡 Warning: The removal of RGR cycle management tools from discipline-guardrails.ts suggests a shift towards using rgr_loop. Ensure that all workflows and documentation are updated to reflect this change and that the rgr_loop tool is fully operational and tested.

🟡 **Warning:** The removal of RGR cycle management tools from `discipline-guardrails.ts` suggests a shift towards using `rgr_loop`. Ensure that all workflows and documentation are updated to reflect this change and that the `rgr_loop` tool is fully operational and tested.
All checks were successful
CI / Clippy (pull_request) Successful in 16s
CI / Dependency policy (pull_request) Successful in 10s
CI / Acceptance (pull_request) Successful in 22s
CI / Build (pull_request) Successful in 25s
CI / Request auto_review semantic review (pull_request) Successful in 1s
auto_review auto_review: 2 warnings
CI / Format check (pull_request) Successful in 6s
CI / Test (pull_request) Successful in 22s
This pull request has changes requested by an official reviewer.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin add-auto-review-ci:add-auto-review-ci
git switch add-auto-review-ci
Sign in to join this conversation.
No description provided.