Skip to content

fix: reduce Cypress CI memory pressure with larger runner#2036

Merged
nick-inkeep merged 1 commit intomainfrom
fix/cypress-ci-memory
Feb 16, 2026
Merged

fix: reduce Cypress CI memory pressure with larger runner#2036
nick-inkeep merged 1 commit intomainfrom
fix/cypress-ci-memory

Conversation

@nick-inkeep
Copy link
Collaborator

@nick-inkeep nick-inkeep commented Feb 16, 2026

Summary

  • Upgrades CI runner from ubuntu-latest (2 vCPU / 7GB) to ubuntu-16gb (4 vCPU / 16GB) to eliminate Chrome Renderer OOM crashes (30% failure rate)
  • Lowers V8 heap from 4096MB to 2048MB — the 4GB setting exceeded available memory on the old runner
  • Disables video recording (video: false) to save ~200MB memory overhead
  • Adds CYPRESS_NO_COMMAND_LOG=1 to prevent DOM snapshot accumulation in headless CI
  • Removes dead video upload step and cleanup handler (no longer needed with video disabled)

Test plan

  • Verify the ubuntu-16gb runner label is configured in GitHub org settings
  • Confirm Cypress tests pass on the new runner without Chrome crashes
  • Monitor next 10 runs for crash rate (target: 0% vs previous 30%)

🤖 Generated with Claude Code

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

⚠️ No Changeset found

Latest commit: 45d9cd9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 16, 2026

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

Project Deployment Actions Updated (UTC)
agents-api Ready Ready Preview, Comment Feb 16, 2026 5:38pm
agents-docs Ready Ready Preview, Comment Feb 16, 2026 5:38pm
agents-manage-ui Ready Ready Preview, Comment Feb 16, 2026 5:38pm

Request Review

Copy link
Contributor

@claude claude 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 Summary

(0) Total Issues | Risk: Low

This PR makes well-reasoned changes to address Cypress CI memory pressure. The approach is sound: upgrading to a larger runner, reducing V8 heap limits to appropriate levels, and disabling video recording to reduce memory overhead. The code cleanup (removing dead video upload step and after:spec handler) is consistent with the configuration changes.

💭 Consider (2) 💭

💭 1) .github/workflows/cypress.yml Verify ubuntu-16gb runner is configured in org settings

Issue: The ubuntu-16gb runner label is used for the first time in this repository. While this is a valid GitHub-hosted larger runner label format, larger runners require GitHub Team or Enterprise plan and explicit configuration in org/repo settings.

Why: If the label is misconfigured, the workflow will queue indefinitely waiting for a runner that doesn't exist. The PR test plan already notes this verification step — just ensuring it's on the radar.

Refs:

💭 2) .github/workflows/cypress.yml Consider adding timeout-minutes for the job

Issue: The Cypress workflow job lacks a timeout-minutes setting. E2E tests can hang indefinitely due to browser crashes, network issues, or test flakiness.

Why: Without a timeout, the job could consume runner minutes until GitHub's 6-hour default timeout. Given this PR specifically addresses OOM crash issues, adding an explicit timeout (e.g., timeout-minutes: 30) would provide a safety net if crashes still occur.

Fix: Add timeout-minutes: 30 to the job definition:

jobs:
  ci:
    runs-on: ubuntu-16gb
    timeout-minutes: 30

Refs:


✅ APPROVE

Summary: Clean, well-reasoned fix for CI memory pressure. The changes are internally consistent (video disabled → video upload removed → cleanup handler removed) and the memory optimizations are appropriate for the new runner size. The two "Consider" items are optional hardening suggestions rather than blocking concerns. Ship it! 🚀

Discarded (5)
Location Issue Reason Discarded
.github/workflows/cypress.yml Missing explicit permissions: block Pre-existing pattern — ci.yml and other workflows also lack this. Consistent with repo conventions.
.github/workflows/cypress.yml:52 Actions pinned to mutable tags instead of SHAs Pre-existing pattern across all workflows in repo. Not introduced by this PR.
cypress.config.ts:35 V8 heap limit reduced to 2048MB Positive observation — this is the intended fix, not an issue.
cypress.config.ts:23 Video disabled removes debugging aid Informational — PR accounts for this (screenshots still captured). Reasonable tradeoff.
action.yml:90-96 Video upload step removal Positive observation — correct cleanup of dead code.
Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-devops 7 0 2 0 0 0 5
Total 7 0 2 0 0 0 5

Copy link
Contributor

@claude claude 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 Summary

(0) Total Issues | Risk: Low

This is a delta re-review scoped to changes since the last automated review. The delta (commit c0594749) refines the initial Cypress memory optimization approach by:

  1. Re-enabled video recording (video: true) — preserves debugging capability for failed tests
  2. Restored video upload step — ensures failure videos are captured as artifacts
  3. Restored after:spec cleanup handler — follows Cypress best practice to delete videos for passing tests, reducing artifact size
  4. Removed aggressive Chrome flags (--disable-dev-shm-usage, --disable-gpu, --js-flags=--max-old-space-size=2048) — these are unnecessary with the larger runner and were potentially causing issues rather than solving them

The delta changes are well-reasoned: with the larger runner (ubuntu-16gb), the aggressive memory-saving flags become unnecessary, and reverting to a cleaner configuration with video recording enabled provides better debugging capability without sacrificing stability.

🕐 Pending Recommendations (2)

The following items from the prior review remain open as optional suggestions:


✅ APPROVE

Summary: Clean refinement to the Cypress CI configuration. The delta changes correctly restore video recording and cleanup handlers while removing unnecessary Chrome flags that were overcomplicating the solution. The core fix (larger runner + CYPRESS_NO_COMMAND_LOG=1) remains intact. Ship it! 🚀

Discarded (1)
Location Issue Reason Discarded
.github/composite-actions/cypress-e2e/action.yml:99 Actions pinned to mutable tags (v4) instead of SHAs Pre-existing pattern across all workflows in repo. Consistent with repo conventions.
Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-devops 1 0 0 0 0 0 1
Total 1 0 0 0 0 0 1

Note: Delta re-review with minimal scope. Single reviewer dispatched for CI/infrastructure changes.

Copy link
Contributor

@claude claude 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 Summary

(0) Total Issues | Risk: Low

This is a delta re-review scoped to changes since commit c0594749 (1 commit: cd5b54e4 "perf: speed up Cypress CI pipeline").

The delta introduces well-reasoned performance optimizations to the Cypress E2E infrastructure:

  1. timeout-minutes: 30 added — Addresses the prior review's "Consider" suggestion for explicit job timeout protection
  2. Simplified dependency install — Removed redundant cd agents-manage-ui && pnpm install step; single pnpm install --frozen-lockfile at root is sufficient
  3. Explicit setup steps — Split monolithic pnpm setup-dev into pnpm db:migrate + pnpm db:auth:init, improving visibility into CI step failures
  4. pnpm exec cypress install — Changed from npx to pnpm exec for consistency with the monorepo's package manager
  5. Chrome performance flags — Added standard headless optimization flags (--disable-extensions, --disable-background-networking, --metrics-recording-only, --no-first-run, --mute-audio, etc.)
  6. Cypress performance settings — Added waitForAnimations: false and scrollBehavior: false to speed up test execution
  7. Removed cy.wait(500) anti-pattern — Eliminated arbitrary wait in login command, following Cypress best practices
  8. --no-runner-ui flag — Disables the runner UI in headless mode for reduced overhead

All changes are internally consistent and follow CI/Cypress best practices. The prior review's two "Consider" suggestions have been addressed.


✅ APPROVE

Summary: Clean set of performance optimizations for the Cypress CI pipeline. The delta changes address prior feedback and introduce no new concerns. The split of setup-dev into explicit steps improves debuggability, the Chrome flags are standard Puppeteer recommendations, and removing cy.wait(500) follows Cypress best practices. Ship it! 🚀

Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-devops 0 0 0 0 0 0 0
Total 0 0 0 0 0 0 0

Note: Delta re-review with minimal scope. Single reviewer dispatched for CI/infrastructure changes. Prior review suggestions have been addressed in this commit.

Copy link
Contributor

@claude claude 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 Summary

(0) Total Issues | Risk: Low

This is a delta re-review scoped to changes since commit cd5b54e4 (1 commit: caf3d96b "fix: remove --disable-background-networking and redundant Chrome flags").

The delta further simplifies the Chrome launch configuration by removing 5 flags that are redundant in headless CI:

Removed Flag Reason Redundant
--disable-background-networking Chrome already minimizes networking in headless mode
--disable-default-apps No default apps load in headless CI
--disable-sync Google account sync is not active in headless mode
--metrics-recording-only Telemetry flag with no meaningful impact in headless CI
--no-first-run First-run dialogs don't appear in headless mode

The remaining flags (--no-sandbox, --disable-features=IsolateOrigins,site-per-process, --disable-extensions, --disable-translate, --mute-audio) represent an appropriate minimal set for stable headless Chrome in CI:

  • --no-sandbox — Required for running Chrome as root in CI containers
  • --disable-features=IsolateOrigins,site-per-process — Memory optimization that reduces process count
  • --disable-extensions / --disable-translate / --mute-audio — Standard cleanup flags

✅ APPROVE

Summary: Clean delta that removes genuinely redundant Chrome flags. The PR has evolved through 4 commits to a well-reasoned final state: larger runner (ubuntu-16gb) with a minimal Chrome flag set. Prior review feedback (timeout-minutes, runner verification) has been addressed. Ready to ship! 🚀

Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-devops 0 0 0 0 0 0 0
Total 0 0 0 0 0 0 0

Note: Minimal delta re-review. Single reviewer dispatched for CI/infrastructure changes. The removed flags are validated as redundant for headless Chrome in CI.

Copy link
Contributor

@claude claude 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 Summary

(0) Total Issues | Risk: Low

This is a delta re-review scoped to changes since commit caf3d96b. The delta consists of a single commit:

e01c4307 ci: re-trigger Cypress workflow after Actions budget increase

This is an empty commit with zero code changes — it exists solely to re-trigger the Cypress CI workflow after the GitHub Actions budget was increased.

No new code to review.

The PR's substantive changes were reviewed and approved across 4 prior review cycles. All "Consider" suggestions from earlier reviews have been addressed:

  • timeout-minutes: 30 added (commit cd5b54e4)
  • ✅ Runner label verification noted in test plan

✅ APPROVE

Summary: Empty commit to re-trigger CI — no code changes to review. The PR remains well-structured and ready to ship. 🚀

Reviewers (0)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
Total 0 0 0 0 0 0 0

Note: No reviewers dispatched — delta contains zero code changes (empty CI trigger commit).

Copy link
Contributor

@claude claude 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 Summary

(0) Total Issues | Risk: Low

This is a delta re-review scoped to changes since commit e01c4307. The delta consists of a single commit:

26644379 ci: re-trigger after budget propagation

This is an empty commit with zero code changes — it exists solely to re-trigger the Cypress CI workflow after the GitHub Actions budget was propagated.

No new code to review.

The PR's substantive changes were reviewed and approved across 5 prior review cycles. All "Consider" suggestions from earlier reviews have been addressed:

  • timeout-minutes: 30 added (commit cd5b54e4)
  • ✅ Runner label verification noted in test plan

✅ APPROVE

Summary: Empty commit to re-trigger CI — no code changes to review. The PR remains well-structured and ready to ship. 🚀

Reviewers (0)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
Total 0 0 0 0 0 0 0

Note: No reviewers dispatched — delta contains zero code changes (empty CI trigger commit).

@github-actions github-actions bot deleted a comment from claude bot Feb 16, 2026
Copy link
Contributor

@claude claude 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 Summary

(0) Total Issues | Risk: Low

This PR improves Cypress E2E test reliability in CI through a well-reasoned set of optimizations:

  1. timeout-minutes: 30 — Provides a safety net for hung tests (addresses prior "Consider" feedback)
  2. Simplified dependency install — Single pnpm install --frozen-lockfile instead of redundant cd step
  3. pnpm exec for Cypress — Consistent with monorepo package manager conventions
  4. Minimal Chrome flags — Clean set (--no-sandbox, --disable-features=IsolateOrigins,site-per-process, --disable-extensions, --disable-translate, --mute-audio) replacing aggressive memory-saving flags
  5. CYPRESS_NO_COMMAND_LOG=1 — Reduces DOM snapshot accumulation in headless CI
  6. waitForAnimations: false + --no-runner-ui — Speeds up test execution
  7. Removed cy.wait(500) anti-pattern — Follows Cypress best practices

Notable Observations

  • PR description is outdated — mentions disabling video (video: false), but video is enabled (video: true) with an after:spec handler to delete videos for passing tests (which is the Cypress-recommended approach)
  • Runner temporarily rolled backubuntu-16gb mentioned in description, but code uses ubuntu-latest with TODO comment pending enterprise billing propagation

The changes have been iteratively refined through 12 prior review cycles, all approving. All prior "Consider" suggestions have been addressed in the current code.


✅ APPROVE

Summary: Clean, well-reasoned CI/DevOps improvements for Cypress E2E test reliability. The changes are internally consistent, follow best practices, and have been thoroughly reviewed. The only outstanding item is the runner upgrade (blocked on enterprise billing), which is appropriately documented with a TODO comment. Ship it and monitor for OOM crashes — if they persist on ubuntu-latest, prioritize getting the billing sorted for ubuntu-16gb. 🚀

Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-devops 0 0 0 0 0 0 0
Total 0 0 0 0 0 0 0

Note: Single reviewer dispatched for CI/infrastructure changes. Zero findings returned — the PR is clean and has been well-refined through prior iterations.

Copy link
Contributor

@claude claude 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 Summary

(0) Total Issues | Risk: Low

This PR optimizes Cypress E2E test reliability and performance in CI through a well-reasoned set of changes:

  1. Runner upgradeubuntu-16gb provides 16GB RAM (vs ~7GB on ubuntu-latest), giving Chrome processes sufficient memory headroom
  2. timeout-minutes: 30 — Explicit safety net for hung tests (previously defaulted to GitHub's 6-hour limit)
  3. Simplified dependency install — Single pnpm install --frozen-lockfile instead of redundant cd/install step
  4. pnpm exec for Cypress — Consistent with monorepo package manager conventions
  5. Chrome flags rationalized — Removed cargo-cult flags (--disable-dev-shm-usage, --disable-gpu, --js-flags) in favor of a minimal effective set (--no-sandbox, --disable-features=IsolateOrigins,site-per-process, --disable-extensions, --disable-translate, --mute-audio)
  6. CYPRESS_NO_COMMAND_LOG=1 — Prevents DOM snapshot accumulation in headless CI (significant memory savings)
  7. waitForAnimations: false — Speeds up test execution by skipping CSS animation waits
  8. --no-runner-ui flag — Reduces overhead in headless mode
  9. Removed cy.wait(500) anti-pattern — Follows Cypress best practices (arbitrary waits are flaky)

Notable Observations

  • ubuntu-16gb is unique to this workflow — all other CI workflows use ubuntu-latest. This is appropriate given the memory-intensive nature of browser-based E2E testing.
  • PR description is slightly outdated — mentions video: false, but the actual code uses video: true with an after:spec handler that deletes videos for passing tests (the Cypress-recommended approach).
  • 13 prior automated reviews — All approved. Prior "Consider" suggestions (timeout-minutes, runner verification) have been addressed.

✅ APPROVE

Summary: Clean, well-reasoned CI/DevOps improvements for Cypress E2E test reliability. The changes are internally consistent, follow best practices, and have been thoroughly reviewed. The ubuntu-16gb runner is justified for memory-intensive browser testing, and the Chrome flag rationalization removes unnecessary cargo-cult settings. Ship it! 🚀

Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-devops 0 0 0 0 0 0 0
Total 0 0 0 0 0 0 0

Note: Single reviewer dispatched for pure CI/infrastructure changes. Zero findings returned — the PR is clean and has been well-refined through 13 prior review iterations.

@github-actions github-actions bot deleted a comment from claude bot Feb 16, 2026
Copy link
Contributor

@claude claude 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 Summary

(0) Total Issues | Risk: Low

This is a delta re-review scoped to changes since commit ef60b76b. The delta consists of a single commit:

04fbe57a ci: trigger with ubuntu-16gb runner

This is an empty commit with zero code changes — it exists solely to re-trigger the Cypress CI workflow now that the ubuntu-16gb runner label has been configured in the GitHub org settings.

No new code to review.

The PR's substantive changes were reviewed and approved across 14 prior review cycles. All prior "Consider" suggestions have been addressed:

  • timeout-minutes: 30 added
  • ✅ Runner label (ubuntu-16gb) now configured and active

✅ APPROVE

Summary: Empty commit to re-trigger CI with the larger runner — no code changes to review. The PR is well-refined through extensive prior iterations and ready to ship. The ubuntu-16gb runner should provide the memory headroom needed to eliminate Chrome OOM crashes. 🚀

Reviewers (0)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
Total 0 0 0 0 0 0 0

Note: No reviewers dispatched — delta contains zero code changes (empty CI trigger commit).

- Add experimentalMemoryManagement, numTestsKeptInMemory: 0, waitForAnimations: false
- Replace ineffective Chrome flags (--disable-dev-shm-usage, --disable-gpu,
  --js-flags=--max-old-space-size=4096) with targeted ones (--disable-extensions,
  --disable-translate, --mute-audio)
- Add --no-runner-ui to headless Cypress runs to reduce memory overhead
- Remove unnecessary cy.wait(500) from login command
- Add timeout-minutes: 30 to workflow, CYPRESS_NO_COMMAND_LOG: 1
- Fix composite action: use pnpm exec instead of npx, add step name
- Simplify duplicate pnpm install to single frozen-lockfile call

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@claude claude 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 Summary

(0) Total Issues | Risk: Low

This PR optimizes the Cypress E2E CI workflow to address Chrome OOM crashes and improve test reliability. The changes are well-reasoned and follow CI/Cypress best practices:

  1. Runner upgradeubuntu-16gb provides 16GB RAM (vs ~7GB on ubuntu-latest), giving Chrome processes sufficient memory headroom for browser-based E2E testing
  2. timeout-minutes: 30 — Explicit safety net for hung tests (addresses prior "Consider" feedback)
  3. Simplified dependency install — Single pnpm install --frozen-lockfile instead of redundant cd/install step
  4. pnpm exec for Cypress — Consistent with monorepo package manager conventions
  5. Chrome flags rationalized — Removed cargo-cult flags (--disable-dev-shm-usage, --disable-gpu, --js-flags) in favor of a minimal effective set (--no-sandbox, --disable-features=IsolateOrigins,site-per-process, --disable-extensions, --disable-translate, --mute-audio)
  6. CYPRESS_NO_COMMAND_LOG=1 — Prevents DOM snapshot accumulation in headless CI (significant memory savings)
  7. waitForAnimations: false — Speeds up test execution by skipping CSS animation waits
  8. --no-runner-ui flag — Reduces overhead in headless mode
  9. Removed cy.wait(500) anti-pattern — Follows Cypress best practices (arbitrary waits are flaky)

Notable Observations

  • ubuntu-16gb is unique to this workflow — all other CI workflows use ubuntu-latest. This is appropriate given the memory-intensive nature of browser-based E2E testing.
  • PR description is slightly outdated — mentions video: false, but the actual code uses video: true with an after:spec handler that deletes videos for passing tests (the Cypress-recommended approach).
  • 15 prior automated reviews — All approved. Prior "Consider" suggestions (timeout-minutes, runner verification) have been addressed in the current code.

✅ APPROVE

Summary: Clean, well-reasoned CI/DevOps improvements for Cypress E2E test reliability. The changes are internally consistent, follow best practices, and have been thoroughly refined through multiple iterations. The ubuntu-16gb runner is justified for memory-intensive browser testing, and the Chrome flag rationalization removes unnecessary cargo-cult settings. Ship it! 🚀

Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-devops 0 0 0 0 0 0 0
Total 0 0 0 0 0 0 0

Note: Single reviewer dispatched for pure CI/infrastructure changes. Zero findings returned — the PR is clean and has been well-refined through 15 prior review iterations.

@github-actions github-actions bot deleted a comment from claude bot Feb 16, 2026
@nick-inkeep nick-inkeep merged commit 71f6c10 into main Feb 16, 2026
10 of 11 checks passed
@nick-inkeep nick-inkeep deleted the fix/cypress-ci-memory branch February 16, 2026 18:02
dimaMachina pushed a commit that referenced this pull request Feb 19, 2026
- Add experimentalMemoryManagement, numTestsKeptInMemory: 0, waitForAnimations: false
- Replace ineffective Chrome flags (--disable-dev-shm-usage, --disable-gpu,
  --js-flags=--max-old-space-size=4096) with targeted ones (--disable-extensions,
  --disable-translate, --mute-audio)
- Add --no-runner-ui to headless Cypress runs to reduce memory overhead
- Remove unnecessary cy.wait(500) from login command
- Add timeout-minutes: 30 to workflow, CYPRESS_NO_COMMAND_LOG: 1
- Fix composite action: use pnpm exec instead of npx, add step name
- Simplify duplicate pnpm install to single frozen-lockfile call

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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

Comments