Skip to content

fix(ai-review): gate Create-PR button on server-computed eligibility (GitHub + flags)#23668

Merged
joaoviana merged 1 commit into
mainfrom
05-29-fix_ai-review_gate_create-pr_button_on_server-computed_eligibility_github_flags_
May 29, 2026
Merged

fix(ai-review): gate Create-PR button on server-computed eligibility (GitHub + flags)#23668
joaoviana merged 1 commit into
mainfrom
05-29-fix_ai-review_gate_create-pr_button_on_server-computed_eligibility_github_flags_

Conversation

@joaoviana
Copy link
Copy Markdown
Contributor

@joaoviana joaoviana commented May 29, 2026

Part 7/9 (fix). Server-computes a per-item writebackEligible (semantic-layer and GitHub project and both flags on); the Create PR button keys off it instead of root-cause alone. Also fast-fails the engine flag before enqueue.

Why server-side: useProjects() doesn't expose the dbt connection type, so the frontend can't tell which projects are GitHub-connected.

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

🧪 Test Selection

✅ Tests that will run

Test Description
Preview Environment Deploys a preview environment for testing
Frontend E2E Tests Runs Cypress app tests
Backend API Tests Runs Vitest API tests
CLI Tests Runs CLI integration and dbt version tests

⏭️ Tests skipped (no relevant file changes detected)

Test How to trigger manually
Timezone Tests Add test-timezone to PR description

Tip: Add test-all to your PR description to run all tests.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

Your preview environment pr-23668 has been deployed.

Preview environment endpoints are available at:

@joaoviana joaoviana force-pushed the 05-29-feat_ai-review_run_writeback_on_worker_with_live_progress_pr6_ branch from 598e162 to df961e4 Compare May 29, 2026 15:47
@joaoviana joaoviana force-pushed the 05-29-fix_ai-review_gate_create-pr_button_on_server-computed_eligibility_github_flags_ branch from 69a8f0f to 9a8078f Compare May 29, 2026 15:47
@joaoviana joaoviana force-pushed the 05-29-fix_ai-review_gate_create-pr_button_on_server-computed_eligibility_github_flags_ branch from 9a8078f to 9918d63 Compare May 29, 2026 16:04
@joaoviana joaoviana force-pushed the 05-29-feat_ai-review_run_writeback_on_worker_with_live_progress_pr6_ branch from df961e4 to 6303b0d Compare May 29, 2026 16:04
@joaoviana joaoviana force-pushed the 05-29-fix_ai-review_gate_create-pr_button_on_server-computed_eligibility_github_flags_ branch from 9918d63 to 1c3325c Compare May 29, 2026 16:40
@joaoviana joaoviana force-pushed the 05-29-feat_ai-review_run_writeback_on_worker_with_live_progress_pr6_ branch from 6303b0d to 256997b Compare May 29, 2026 16:40
@github-actions
Copy link
Copy Markdown

Preview Environment

🌐 URL: https://lightdash-preview-pr-23668.lightdash.okteto.dev

📋 Logs: View in GCP Console

🔧 SSH: ./scripts/okteto-ssh.sh 23668

@joaoviana joaoviana force-pushed the 05-29-feat_ai-review_run_writeback_on_worker_with_live_progress_pr6_ branch from 256997b to e6dce05 Compare May 29, 2026 17:11
@joaoviana joaoviana force-pushed the 05-29-fix_ai-review_gate_create-pr_button_on_server-computed_eligibility_github_flags_ branch from 1c3325c to bfb5668 Compare May 29, 2026 17:11
@joaoviana joaoviana force-pushed the 05-29-feat_ai-review_run_writeback_on_worker_with_live_progress_pr6_ branch from e6dce05 to 610015f Compare May 29, 2026 17:16
@joaoviana joaoviana force-pushed the 05-29-fix_ai-review_gate_create-pr_button_on_server-computed_eligibility_github_flags_ branch from bfb5668 to 6179378 Compare May 29, 2026 17:16
@joaoviana joaoviana force-pushed the 05-29-feat_ai-review_run_writeback_on_worker_with_live_progress_pr6_ branch from 610015f to ff905f4 Compare May 29, 2026 17:17
@joaoviana joaoviana force-pushed the 05-29-fix_ai-review_gate_create-pr_button_on_server-computed_eligibility_github_flags_ branch from 6179378 to a216dda Compare May 29, 2026 17:17
Base automatically changed from 05-29-feat_ai-review_run_writeback_on_worker_with_live_progress_pr6_ to main May 29, 2026 17:17
@joaoviana joaoviana force-pushed the 05-29-fix_ai-review_gate_create-pr_button_on_server-computed_eligibility_github_flags_ branch from a216dda to 1544d83 Compare May 29, 2026 17:21
@joaoviana joaoviana marked this pull request as ready for review May 29, 2026 17:21
@joaoviana joaoviana merged commit 2ecae83 into main May 29, 2026
2 of 3 checks passed
@joaoviana joaoviana deleted the 05-29-fix_ai-review_gate_create-pr_button_on_server-computed_eligibility_github_flags_ branch May 29, 2026 17:21
Comment on lines +254 to +256
} catch {
return null;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The bare catch {} block silently swallows all errors from projectModel.get(). The backend rules require proper error handling and logging: errors should be logged (via Winston) and categorised using the appropriate error classes from errors.ts. At minimum, unexpected errors should be logged at warn/error level so they surface in monitoring.

Spotted by Graphite (based on custom rule: packages/backend rules)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

lightdash-bot pushed a commit that referenced this pull request May 29, 2026
# [0.3055.0](0.3054.0...0.3055.0) (2026-05-29)

### Bug Fixes

* **ai-review:** gate Create-PR button on server-computed eligibility (GitHub + flags) ([#23668](#23668)) ([2ecae83](2ecae83))
* **ai-review:** writeback hardening — progress-write race + resilience ([#23669](#23669)) ([ae39718](ae39718))

### Features

* **ai-review:** review-queue UI — Create PR, dismiss, status + PR link ([#23666](#23666)) ([2866822](2866822))
* **ai-review:** run writeback on worker with live progress (PR6) ([#23667](#23667)) ([c991df5](c991df5))
@lightdash-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 0.3055.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

2 participants