Skip to content

Extend Dependabot workflow to auto-fix build, lint, and test failures#323

Merged
umair-ably merged 1 commit intomainfrom
fix/dependabot-auto-fix
Apr 15, 2026
Merged

Extend Dependabot workflow to auto-fix build, lint, and test failures#323
umair-ably merged 1 commit intomainfrom
fix/dependabot-auto-fix

Conversation

@umair-ably
Copy link
Copy Markdown
Collaborator

@umair-ably umair-ably commented Apr 15, 2026

Summary

Test plan

- Add test step (pnpm test:unit) so Claude can diagnose and fix test
  failures from dependency bumps (e.g. React 18→19 in PR #308)
- Move git config before any commit steps so Claude's commits work
  even when lockfile is unchanged
- Fix pipefail in build/lint steps so exit codes propagate through tee
- Fix output capture: use GITHUB_OUTPUT with heredoc delimiters instead
  of shell substitution (which doesn't work in with: values)
- Truncate logs to last 200 lines to avoid GITHUB_OUTPUT size limits
- Use accurate fallback messages instead of misleading "succeeded" text
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli-web-cli Ready Ready Preview, Comment Apr 15, 2026 0:21am

Request Review

Copy link
Copy Markdown

@claude-code-ably-assistant claude-code-ably-assistant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: Extend Dependabot workflow to auto-fix build, lint, and test failures

Overview: Adds a pnpm test:unit step to the Dependabot auto-fix workflow, captures test output alongside build/lint output, and feeds it to Claude. Also centralises the "needs fixing" check into a dedicated step. Clean, focused change.


One concern worth addressing

Job timeout may be too tight now

The job has timeout-minutes: 15 (line 15). That budget now needs to cover: dependency install + lockfile regen + build + lint + unit tests + Claude (--max-turns 30). If a dependency bump causes tests to hang or regress in a slow-to-fail way (e.g., network-dependent tests that weren't mocked before), the job could time out before Claude even runs — which defeats the purpose of the workflow.

Consider bumping to timeout-minutes: 25 or adding a per-step timeout on the test step (e.g., timeout-minutes: 5) to bound the worst case.


Everything else looks correct

  • Step logic is sound: steps.test.outcome is 'skipped' (not 'failure') when build fails, so the == "failure" check in "Check if fixes needed" won't produce false positives.
  • Test runs when lint fails: Intentional — gives Claude more diagnostic context when multiple things break from a single dep bump. Correct call.
  • $GITHUB_OUTPUT heredoc pattern: Correct. The tail -n 200 truncation is a sensible guard against size limits.
  • set -o pipefail: Applied correctly in all three run steps; exit codes propagate through tee.
  • Prompt update: Accurate and actionable — Claude now knows to verify with pnpm test:unit as well.

The change is well-structured and addresses a real gap (React 18→19 test failures wouldn't have been caught before). Just bump the timeout before merging.

@umair-ably umair-ably requested a review from sacOO7 April 15, 2026 12:23
Copy link
Copy Markdown
Contributor

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can check claude comment about increasing timeout-minutes: 15 + failing security audit/
Since, we only included extra testing step, will approve the PR.

@umair-ably umair-ably merged commit 1b5118b into main Apr 15, 2026
10 of 12 checks passed
@umair-ably umair-ably deleted the fix/dependabot-auto-fix branch April 15, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants