Skip to content

Fix tutorial review-app release and renderer startup - #827

Open
justin808 wants to merge 3 commits into
masterfrom
jg-codex/review-app-runner-memory
Open

justin808 wants to merge 3 commits into
masterfrom
jg-codex/review-app-runner-memory

Conversation

@justin808

@justin808 justin808 commented Sep 15, 2026

Copy link
Copy Markdown
Member

🤖 Codex

Commit-pinned reviewer walkthrough.

The RC5 tutorial review app in #826 built its image but stalled before a release-runner replica appeared, blocking deployed validation (#784). A provider probe with that exact image succeeded at 300m CPU and 2Gi memory, while the prior 300m/1Gi setting failed to start. This PR raises only the review-app one-off runner memory default to 2Gi; CPU and the 900-second deadline stay unchanged.

Once the release job ran, the next workload failed at exec: yarn: not found. The Dockerfile puts Node on PATH, but the renderer workload used a login bash -lc shell that reset PATH in the Ruby slim base image. The workload now uses non-login bash -c and starts node renderer/node-renderer.js directly after the existing cache-seeding rake task. I reproduced the PATH difference in that base image. Its deploy order, probes, ports, and resource settings remain unchanged. The same repairs are also carried by #826, whose RC5 dependency commit is unchanged.

The shared QA review environment had a missing secret reference, which was repaired in the provider dictionary without adding secret values to this repository. This was an external prerequisite for inherited-environment workloads to start.

Local verification passed: .agents/bin/validate (59 Ruby files, no offenses), bin/conductor-exec bin/test-cpflow-github-flow --offline (released review-app contract, renderer template, workflow YAML, actionlint), a YAML check of the non-login Node launch command, and git diff --check. The effective exact-head review-app run built and deployed image a0be59f, completed its 300m/2Gi release runner, made the Node Renderer and Rails ready, passed workload health, and retrieved the URL. Direct checks of the deployed app returned HTTP 200 for / and /server-components; /rsc_payload/LiveActivity returned HTTP 200, application/x-ndjson, and a nonempty three-line stream. The run concluded red only in Finalize deployment status: GitHub created a success deployment status, then its API response returned HTTP 500 with malformed JSON to github-script. The provider app and recorded GitHub deployment status were successful; the workflow conclusion is not being presented as green.

Native usage

a0be59f / implementation
SHARED source interval: 2026-09-15T08:07:13.022Z through 2026-09-15T09:30:42.748Z. Snapshot through the last observed response.
Source selection: host context.
Codex source versions: 0.154.0-alpha.6.2.

Provider Configured model Routed model Effort Input Cached input Output Reasoning output Cache writes Native total
openai gpt-5.6-sol UNKNOWN medium 56329941 55938048 123989 52971 0 56453930

@github-actions

Copy link
Copy Markdown

🚀 Quick Review App Commands

Welcome! Here are the commands you can use in this PR:
They require the repository to have cpflow review apps configured, including the CPLN_TOKEN_STAGING secret.

+review-app-deploy

Deploy your PR branch for testing.

+review-app-delete

Remove the review app when done.

+review-app-help

Show detailed instructions, environment setup, and configuration options.

Comment +review-app-help for full setup details.

@github-actions

Copy link
Copy Markdown

No description provided.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 27bf5904-072d-4c5b-aee3-86a533393af6

📥 Commits

Reviewing files that changed from the base of the PR and between 93afba3 and 03448df.

📒 Files selected for processing (4)
  • .controlplane/readme.md
  • .controlplane/shakacode-team.md
  • .controlplane/templates/node-renderer.yml
  • bin/test-cpflow-github-flow

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


Walkthrough

The control plane starts the Node renderer directly and increases review-app one-off job memory from 1Gi to 2Gi. CPU remains 300m, and the 15-minute timeout remains unchanged.

Changes

Control plane workload updates

Layer / File(s) Summary
Direct Node renderer startup
.controlplane/templates/node-renderer.yml, .controlplane/readme.md, .controlplane/shakacode-team.md, bin/test-cpflow-github-flow
The renderer starts with /usr/local/node/bin/node renderer/node-renderer.js instead of yarn node-renderer. The contract check expects the direct command.
Review-app resource defaults
.controlplane/controlplane.yml
The default memory increases from 1Gi to 2Gi. The default CPU remains 300m, and the 15-minute timeout remains unchanged.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 03448

No concrete merge-blocking risk remains; the remaining deployment check is normal end-to-end validation.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the two main changes: review-app release jobs and renderer startup. The word "tutorial" is not reflected in the changes, but it does not make the title unrelated.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg-codex/review-app-runner-memory

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@justin808

Copy link
Copy Markdown
Member Author

+review-app-deploy

@github-actions

Copy link
Copy Markdown

No description provided.

# retain a 15-minute server-side active deadline.
runner_job_default_cpu: "300m"
runner_job_default_memory: "1Gi"
runner_job_default_memory: "2Gi"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good empirically-justified fix for the one-off runner job. One thing worth double-checking: the persistent rails workload template (.controlplane/templates/rails.yml:26) still requests only 1Gi as its baseline memory for booting the same Rails image (with capacityAI: true to grow it afterward). If a 1Gi cold start was hitting a startup-probe/connection failure for the one-off runner here, the persistent workload's very first boot on a fresh review app could plausibly hit the same problem before capacityAI has a chance to scale it up — worth confirming that path is actually distinct (no startup probe on rails.yml, or otherwise already covered) rather than assuming it's fine because it hasn't failed yet.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🤖 Codex (configured gpt-5.6-sol, medium): Confirmed in the effective head a0be59f review app: the persistent Rails workload retained 300m/1Gi, produced a replica, became ready and readyLatest, and served / and /server-components with HTTP 200. Its separate startup path worked; no Rails memory change was needed.

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review summary

This is a minimal, well-scoped config change: bumps runner_job_default_memory for QA/review-app one-off jobs from 1Gi to 2Gi (CPU and 900s timeout unchanged). A few notes:

Code quality: Clean, scoped to the qa-react-webpack-rails-tutorial app only (via the <<: *common alias override) — does not affect staging or production, which don't set runner_job_default_memory at all. Comment update accurately reflects the new value.

Correctness/verification: The PR description cites concrete repro data (isolated Control Plane job with the same image failed at 300m/1Gi with a startup-probe connection failure, succeeded at 300m/2Gi), which is solid evidence for the fix. Left an inline note on a related consistency question: .controlplane/templates/rails.yml still bases the persistent rails workload on 1Gi (with capacityAI: true to grow it afterward) — worth confirming the initial cold boot of that workload isn't exposed to the same startup failure mode, since it boots the same Rails image.

Security: No security implications — this is a resource-request tuning change only.

Performance/cost: Doubles the memory reservation for review-app one-off jobs (migrations via release_script.sh). Since these are ephemeral, short-lived jobs (900s timeout) on QA apps only, the cost impact should be negligible relative to reliability gained.

No blocking issues found.

@greptile-apps

greptile-apps Bot commented Sep 15, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge because the resource increase is narrowly scoped to QA review-app one-off jobs and introduces no identified correctness or security issue.

Summary

Raises the QA review-app one-off runner memory default from 1Gi to 2Gi so Rails release jobs can start reliably.

  • Leaves the 300m CPU request unchanged.
  • Leaves the 900-second active deadline unchanged.
  • Updates the adjacent configuration comment to document the memory requirement.

Reviews (1) · Last reviewed commit: "Give review release jobs enough memory t..."

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

❌ Review App Deployment Failed

Deployment failed for PR #827, commit 93afba3

🎮 Control Plane Console
📋 View Failed Action Build and Deploy Logs

@github-actions
github-actions Bot temporarily deployed to review/qa-react-webpack-rails-tutorial-827 September 15, 2026 08:30 Destroyed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T09:20:55.479622Z a0be59f New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@justin808

Copy link
Copy Markdown
Member Author

+review-app-delete

@github-actions

Copy link
Copy Markdown

No description provided.

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

✅ Review App Deleted

Review app for PR #827 is deleted

🎮 Control Plane Console
📋 View Workflow Logs

@justin808

Copy link
Copy Markdown
Member Author

+review-app-deploy

@github-actions

Copy link
Copy Markdown

No description provided.

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

❌ Review App Deployment Failed

Deployment failed for PR #827, commit 93afba3

🎮 Control Plane Console
📋 View Failed Action Build and Deploy Logs

@github-actions
github-actions Bot temporarily deployed to review/qa-react-webpack-rails-tutorial-827 September 15, 2026 08:56 Destroyed
@github-actions

Copy link
Copy Markdown

No description provided.

@justin808

Copy link
Copy Markdown
Member Author

+review-app-delete

@github-actions

Copy link
Copy Markdown

No description provided.

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

✅ Review App Deleted

Review app for PR #827 is deleted

🎮 Control Plane Console
📋 View Workflow Logs

@justin808

Copy link
Copy Markdown
Member Author

+review-app-deploy

@github-actions

Copy link
Copy Markdown

No description provided.

@justin808 justin808 changed the title Give review-app release jobs enough memory to start Rails images Fix tutorial review-app release and renderer startup Sep 15, 2026
set -e
bundle exec rake react_on_rails_pro:pre_seed_renderer_cache
exec yarn node-renderer
exec /usr/local/node/bin/node renderer/node-renderer.js

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This works around the symptom rather than the cause. The container is launched via bash -lc (line 24), which makes bash act as a login shell and source /etc/profile. Debian's default /etc/profile unconditionally overwrites PATH (e.g. PATH="/usr/local/bin:/usr/bin:/bin:..." for non-root), which wipes out /usr/local/node/bin — the directory the Dockerfile adds via ENV PATH=/usr/local/node/bin:$PATH (.controlplane/Dockerfile:17). That's almost certainly why plain yarn node-renderer (and even bare node) couldn't be found here, while bundle still resolves fine because it lives in /usr/local/bin, which Debian's profile keeps.

Hardcoding the absolute path fixes this one exec, but:

  • It's now duplicated across 4 files (this template, readme.md, shakacode-team.md, bin/test-cpflow-github-flow) that all need to stay in sync if the Node install location in the Dockerfile ever changes.
  • Any future command added to this same script that relies on /usr/local/node/bin (another yarn/npx call, etc.) will silently hit "command not found" again.

A more robust fix would be to drop the -l (use bash -c here, matching the Dockerfile's own CMD ["bash", "-c", ...] at line 89, which does not use a login shell) so the image's PATH survives, letting you keep exec yarn node-renderer (or plain node ...) instead of a hardcoded path.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🤖 Codex (configured gpt-5.6-sol, medium): Agreed. I reproduced the PATH reset with bash -lc in the same Ruby slim base image and confirmed bash -c retains /usr/local/node/bin. Head a0be59f now uses bash -c and exec node renderer/node-renderer.js; the exact-head review app reached Node Renderer readiness and passed deployed HTTP/RSC checks. The offline template contract was updated and passed.

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review

Small, well-scoped config PR combining two fixes for the review-app deployment pipeline. Overall looks reasonable — flagging one item and a couple of minor notes.

runner_job_default_memory: 1Gi → 2Gi

Correctly scoped to qa-react-webpack-rails-tutorial* review apps only (match_if_app_name_starts_with: true), so this doesn't touch staging/production defaults. Low risk, and the PR description documents the empirical verification (startup-probe failure at 1Gi, success at 2Gi). No concerns here.

yarn node-renderer/usr/local/node/bin/node renderer/node-renderer.js

Left an inline comment with the main concern: this looks like it's papering over a root cause rather than fixing it. The node-renderer.yml container command runs via bash -lc (a login shell), which sources /etc/profile — and Debian's default profile unconditionally resets PATH, dropping the /usr/local/node/bin entry the Dockerfile adds. That's consistent with yarn (and plain node) not being found, while bundle still works because it lives in /usr/local/bin.

Hardcoding the absolute path fixes this specific exec, but:

  • It's now duplicated across 4 files (node-renderer.yml, readme.md, shakacode-team.md, bin/test-cpflow-github-flow) that must be kept in sync if the image's Node install path ever changes.
  • Any future command in that same script depending on PATH (another yarn/npx invocation) will hit the same silent failure.

Suggest switching bash -lcbash -c in node-renderer.yml (matching the Dockerfile's own non-login CMD ["bash", "-c", ...]) so the baked-in PATH survives and yarn node-renderer (or bare node ...) can be used directly, avoiding the hardcoded path and its duplication.

Minor

  • No security implications noted — these are internal deployment/infra config changes, not app code.
  • No performance concerns beyond the intended memory bump.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

❌ Review App Deployment Failed

Deployment failed for PR #827, commit 03448df

🎮 Control Plane Console
📋 View Failed Action Build and Deploy Logs

@github-actions
github-actions Bot temporarily deployed to review/qa-react-webpack-rails-tutorial-827 September 15, 2026 09:15 Destroyed
@justin808

Copy link
Copy Markdown
Member Author

+review-app-delete

@github-actions

Copy link
Copy Markdown

No description provided.

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

✅ Review App Deleted

Review app for PR #827 is deleted

🎮 Control Plane Console
📋 View Workflow Logs

@github-actions

Copy link
Copy Markdown

No description provided.

@justin808

Copy link
Copy Markdown
Member Author

+review-app-deploy

@github-actions

Copy link
Copy Markdown

No description provided.

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

🚀 Deploying to Control Plane...

Deploying Waiting for deployment to be ready...

📝 View Deploy Logs
🎮 Control Plane Console

@github-actions
github-actions Bot temporarily deployed to review/qa-react-webpack-rails-tutorial-827 September 15, 2026 09:19 Destroyed
@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Summary

This is a narrowly-scoped, well-tested infra/config fix. Both root causes check out against the actual image:

  • Memory bump (1Gi → 2Gi) for review-app one-off runner jobs (controlplane.yml): plausible given the described probe reproduction. Only used in one place, comment updated to match.
  • bash -lcbash -c for the node-renderer workload (templates/node-renderer.yml): this is the right fix. .controlplane/Dockerfile sets ENV PATH=/usr/local/node/bin:$PATH at build time, and Debian-based images commonly reset PATH for login shells via PAM (/etc/login.defs ENV_PATH/ENV_SUPATH), which explains the yarn: not found failure under -lc. Notably, the same image's default single-container CMD (Dockerfile line 89) already runs node renderer/node-renderer.js directly via non-login bash -c from WORKDIR /app — so this change brings the separate renderer workload in line with an already-proven code path, not a new untested pattern.
  • yarn node-renderernode renderer/node-renderer.js: behaviorally equivalent — package.json's node-renderer script is literally "node renderer/node-renderer.js" — and arguably an improvement, since it avoids an extra yarn wrapper process between the shell and the renderer for signal handling.
  • The companion test (bin/test-cpflow-github-flow) was updated in lockstep with the template change, so future drift between the two will be caught.

No security concerns — no secrets were added to the repo, consistent with the PR description.

Minor, non-blocking note: doubling the review-app runner memory default is a real resource/cost increase for every review-app deploy/delete job, not just the currently-stuck one. Worth a quick sanity check that this fits within the staging org's provider quota, but not a reason to block given the reproduced failure without it.

Nice, well-verified fix overall.

@justin808 justin808 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🤖 Codex walkthrough for head a0be59f952e41a394271dfb7b587d7ed0df59d79

The review app built the RC5 image but its 300m/1Gi release runner never exposed a replica. The QA runner default now uses 2Gi memory with the same CPU and 900-second deadline. An isolated provider job using the exact RC5 image completed at 300m/2Gi and failed at 300m/1Gi; the real #827 release execution also completed with the new memory setting.

The next workload previously exited after cache seeding with exec: yarn: not found. In the Ruby slim base image, bash -lc resets the Dockerfile's Node PATH; bash -c keeps it. The renderer template now uses the non-login shell and the same direct Node entrypoint as the Dockerfile fallback. The offline contract check pins that launch command and keeps the existing port, probes, deploy order, and resource ratio. The Control Plane docs and team note describe the corrected command.

Local validation passed: 59 Ruby files with no RuboCop offenses, the released review-app contract and renderer template check, workflow YAML/actionlint, a Ruby slim PATH reproduction, and git diff --check. The shared QA environment's missing secret reference was repaired in its provider dictionary without committing secret values. The exact-head provider deployment completed its release runner, renderer and Rails readiness, health, and URL retrieval; /, /server-components, and a nonempty RSC NDJSON payload returned HTTP 200. GitHub recorded a success deployment status but returned an HTTP 500 malformed response during the final github-script status step, leaving that workflow conclusion red; the PR description links both records and does not call the workflow green. The deployment configuration can be rolled back by reverting this PR if a default-branch rollout later regresses.

@justin808

Copy link
Copy Markdown
Member Author

+review-app-delete

@github-actions

Copy link
Copy Markdown

No description provided.

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

✅ Review App Deleted

Review app for PR #827 is deleted

🎮 Control Plane Console
📋 View Workflow Logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant