Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/doc-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,10 @@ jobs:
- name: Run doc-check via Coder Agent Chat
if: steps.check-secrets.outputs.skip != 'true' && steps.check-paths.outputs.skip != 'true'
id: doc-check
# A wait timeout is not a failed review: the chat keeps running in
# Coder and posts its own comment. The next step fails the job for
# every other error.
continue-on-error: true
uses: coder/agents-chat-action@9b3ac42d568e9206f9cd51a97789820d6935cc8d # v0.5.1
with:
coder-url: ${{ secrets.DOC_CHECK_CODER_URL }}
Expand All @@ -459,15 +463,29 @@ jobs:
github-url: ${{ steps.determine-context.outputs.pr_url }}
github-token: ${{ github.token }}
wait: complete
# The chat keeps running in Coder after this job stops watching, so
# a timeout here only turns a finished review red. A review on the
# local model takes 5 to 30 minutes; 40 minutes covers every normal
# run seen so far and leaves the job cap above room for setup.
# The chat keeps running in Coder after this job stops watching.
# When this wait runs out, the job ends with a notice, not a
# failure. When the local model is busy, a review takes longer
# than 40 minutes.
wait-timeout-seconds: "2400"
# The doc-check agent posts its own sticky comment when there
# are findings; failures surface in the workflow run log.
comment-on-issue: "false"

- name: Report a review that is still running
if: always() && steps.doc-check.outcome == 'failure'
env:
ERROR_KIND: ${{ steps.doc-check.outputs.chat-error-kind }}
CHAT_STATUS: ${{ steps.doc-check.outputs.chat-status }}
CHAT_ID: ${{ steps.doc-check.outputs.chat-id }}
run: |
if [[ "${ERROR_KIND}" == "timeout" && ( "${CHAT_STATUS}" == "running" || "${CHAT_STATUS}" == "pending" ) ]]; then
echo "::notice::The doc-check review is still running in chat ${CHAT_ID}. It posts its result on the PR when it finishes."
exit 0
fi
echo "::error::doc-check failed (${ERROR_KIND:-unknown}, chat status '${CHAT_STATUS:-unknown}'). See the step above."
exit 1

# A review workspace left running until autostop holds its share of the
# host, and enough of them at once overload it. Stop it once the chat is
# done; the next run starts it again. Skip when the wait timed out,
Expand Down
Loading