Add Control Plane GitHub flow#12
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 23 minutes and 2 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (27)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Control Plane review app commands
|
| FakeHackerNewsAPI.start! | ||
| ENV["HN_API_BASE_URL"] = FakeHackerNewsAPI.base_url | ||
| FileUtils.rm_rf(Rails.root.join(".node-renderer-bundles")) | ||
| generated_server_bundle_path = Rails.root.join("app/javascript/generated/server-bundle-generated.js") |
There was a problem hiding this comment.
Bundle cache cleanup targets old path after default changed
Low Severity
The serverBundleCachePath default in node-renderer.js moved from .node-renderer-bundles (at repo root) to tmp/.node-renderer-bundles, but the FileUtils.rm_rf in test_helper.rb still targets the old .node-renderer-bundles path. The pre-test cleanup is now a no-op, so stale cached server bundles at the new location can persist across local test runs, potentially causing tests to use outdated renderer output after JavaScript changes.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 82f8152. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
Bugbot Autofix is ON, but it could not run because on-demand usage is turned off. To enable Bugbot Autofix, turn on on-demand usage and set a spend limit in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d217c2a. Configure here.
| const config = { | ||
| serverBundleCachePath: path.resolve(__dirname, '../.node-renderer-bundles'), | ||
| serverBundleCachePath: | ||
| env.RENDERER_SERVER_BUNDLE_CACHE_PATH || path.resolve(__dirname, '../tmp/.node-renderer-bundles'), |
There was a problem hiding this comment.
Test cleanup targets old bundle cache path
Low Severity
The default serverBundleCachePath changed from ../.node-renderer-bundles to ../tmp/.node-renderer-bundles, but test_helper.rb still runs FileUtils.rm_rf(Rails.root.join(".node-renderer-bundles")) — cleaning the old location. Since tests don't set RENDERER_SERVER_BUNDLE_CACHE_PATH, the renderer uses the new tmp/.node-renderer-bundles path, meaning stale caches there are never cleaned between test runs.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit d217c2a. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d217c2a101
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| cpflow_version: | ||
| description: cpflow gem version | ||
| required: false | ||
| default: "__CPFLOW_VERSION__" |
There was a problem hiding this comment.
Replace cpflow version placeholder before installation
The composite action defaults cpflow_version to "__CPFLOW_VERSION__", but every workflow that uses this action relies on the default and does not pass an override. That makes gem install cpflow -v ${{ inputs.cpflow_version }} resolve to an invalid/nonexistent version string, so environment setup fails before any deploy/cleanup job can run.
Useful? React with 👍 / 👎.
| serverBundleCachePath: | ||
| env.RENDERER_SERVER_BUNDLE_CACHE_PATH || path.resolve(__dirname, '../tmp/.node-renderer-bundles'), |
There was a problem hiding this comment.
Keep renderer cache path consistent with test cache cleanup
The default renderer cache path was changed to tmp/.node-renderer-bundles, but test bootstrapping still deletes the old .node-renderer-bundles directory, so cached server bundles can survive between test runs and serve stale SSR code. This mismatch is introduced by changing the runtime default here without updating the test cleanup path.
Useful? React with 👍 / 👎.


Summary
Validation
Note
Medium Risk
Adds new CI/CD automation (Control Plane review apps, staging deploys, production promotion) and changes the production Docker image build to include Node/pnpm, which can affect deployment behavior and image size. Also patches the Node renderer startup/test harness, which could impact SSR/runtime if misconfigured.
Overview
Adds Control Plane
cpflowscaffolding for opt-in review apps, automatic staging deploys, and manual staging→production promotion, including app/workload templates (railspublic + internalrendererworkload), arelease_script.shto runbin/rails db:prepare, and docs under.controlplane/.Introduces composite GitHub Actions and new
cpflow-*workflows to build/deploy images, post PR comments/deployments, restrict review-app deploys to non-fork PRs, clean up stale review apps, and safely delete review apps.Updates the production
Dockerfileto include a Node runtime and runpnpm installduring build, tightens RSC manifest scanning to./app/javascriptin Webpack configs, hardensclient/node-renderer.jsfor configurable host/workers/cache path (including a Fastify listen patch), and stabilizes tests by ensuring packs are generated and the renderer test server uses an available port.Reviewed by Cursor Bugbot for commit 64a5491. Bugbot is set up for automated code reviews on this repo. Configure here.