utafrali commented on code in PR #62528:
URL: https://github.com/apache/doris/pull/62528#discussion_r3086569954


##########
.github/workflows/opencode-review-runner.yml:
##########
@@ -90,6 +93,7 @@ jobs:
               - Build a JSON array of comments like: [{ "path": "<file>", 
"position": <diff_position>, "body": "..." }]
               - Submit via: gh api 
repos/PLACEHOLDER_REPO/pulls/PLACEHOLDER_PR_NUMBER/reviews --input <json_file>
               - The JSON file should contain: 
{"event":"REQUEST_CHANGES","body":"<summary>","comments":[...]}
+          - A complete and detailed review of the entire PR must be conducted, 
identifying all potential issues and submitting corresponding comments. Only 
then can the review work be considered finished. If this standard is not 
strictly met, the review of the remaining parts must continue.
           PROMPT

Review Comment:
   This added instruction -- "If this standard is not strictly met, the review 
of the remaining parts must continue" -- is ambiguous when given to a stateless 
LLM agent. The agent has no mechanism to loop back over work it has already 
submitted; the 55-minute job timeout is the only termination condition. In 
practice this line either has no effect, or it causes the agent to spend its 
remaining time generating redundant output instead of completing gracefully. 
Consider replacing it with a single, concrete completeness criterion such as 
"Every file changed in the diff must have at least one review comment or an 
explicit note that no issues were found."



##########
.github/workflows/opencode-review-runner.yml:
##########
@@ -111,7 +115,7 @@ jobs:
           PROMPT=$(cat /tmp/review_prompt.txt)

Review Comment:
   The `--variant "xhigh"` argument is placed after `2>&1`, which is a shell 
redirection. While bash technically strips redirections from the argument list 
and passes `--variant "xhigh"` to `opencode` correctly, this ordering is 
non-conventional and fragile -- some shells or future refactors could 
misinterpret it.
   
   Move `--variant` before the redirect:
   ```suggestion
             opencode run "$PROMPT" -m "github-copilot/gpt-5.4" --variant 
"xhigh" 2>&1 | tee /tmp/opencode-review.log
   ```



##########
.github/workflows/opencode-review-runner.yml:
##########
@@ -69,7 +69,10 @@ jobs:
       - name: Prepare review prompt
         run: |
           cat > /tmp/review_prompt.txt <<'PROMPT'
-          You are performing an automated code review inside a GitHub Actions 
runner. The gh CLI is available and authenticated via GH_TOKEN. You can comment 
on the pull request.
+          You are performing an automated code review inside a GitHub Actions 
runner. The gh CLI is available and authenticated via GH_TOKEN. 
+          The current directory is the code repository for the PR to be 
reviewed.

Review Comment:
   "Proceed with all subsequent research at the HIGHEST level of thought, 
aiming to identify all issues and submit all comments in JSON format" is vague. 
The phrase "HIGHEST level of thought" is not a defined instruction a model can 
act on. More concretely, asking to submit comments in JSON format here 
conflicts with the detailed GitHub Reviews API format described later in the 
prompt (which uses a specific object with `event`, `body`, and `comments` 
keys). This risks confusing the agent about the expected output format. Remove 
the JSON reference from this line to avoid the contradiction.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to