Skip to content

refactor: Comment on Claude review failures in PR workflow#410

Merged
ainsleyclark merged 1 commit intomainfrom
codex/handle-missing-credits-error-gracefully
Feb 7, 2026
Merged

refactor: Comment on Claude review failures in PR workflow#410
ainsleyclark merged 1 commit intomainfrom
codex/handle-missing-credits-error-gracefully

Conversation

@ainsleyclark
Copy link
Contributor

Motivation

  • Ensure the CLAUDE code-review step can fail without leaving contributors uninformed by posting a visible failure note on the pull request.
  • Provide the failure reason in a collapsible <details> accordion so the PR timeline stays concise while exposing useful debugging info when needed.

Description

  • Add a Prepare Claude review failure comment step to .github/workflows/pr.yaml that builds a comment_body output containing an HTML marker and a <details> accordion with the best-available error text, conditional on steps.claude-review.outcome == 'failure' and github.event_name == 'pull_request'.
  • Add a Comment on PR step that uses the repository action ./.github/actions/pr-comment to post or update the failure comment on the PR, passing the prepared comment_body and the PR number.
  • Mirror the same two steps in the generator template internal/templates/.github/workflows/pr.yaml.tmpl using {{ ghExpr }} and {{ ghSecret }} helpers so generated projects receive identical behaviour.
  • Use an HTML comment marker <!-- claude-review-failure --> to enable idempotent updates/minimisation of previous failure comments.

Testing

  • Ran pnpm build, which failed due to Corepack being unable to download pnpm because of a proxy/403 error (network restriction).
  • Ran go run ../../main.go update, which failed because the Go 1.25.3 toolchain download was forbidden by the network proxy.
  • Ran go fmt ./..., which failed for the same Go toolchain download restriction.
  • Ran go test ./..., which failed for the same Go toolchain download restriction.

Codex Task

@ainsleyclark ainsleyclark changed the title Comment on Claude review failures in PR workflow refactor: Comment on Claude review failures in PR workflow Feb 7, 2026
@codecov
Copy link

codecov bot commented Feb 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.94%. Comparing base (7f6b060) to head (b190854).
⚠️ Report is 496 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #410      +/-   ##
==========================================
+ Coverage   64.59%   69.94%   +5.35%     
==========================================
  Files         154      185      +31     
  Lines        6064     7394    +1330     
==========================================
+ Hits         3917     5172    +1255     
+ Misses       2064     2025      -39     
- Partials       83      197     +114     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ainsleyclark ainsleyclark merged commit 8c95579 into main Feb 7, 2026
5 of 6 checks passed
@ainsleyclark ainsleyclark deleted the codex/handle-missing-credits-error-gracefully branch February 7, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant