Skip to content

CS-11009: remove deprecated PRERENDER_PAGE_POOL_SIZE env var#4726

Open
habdelra wants to merge 3 commits intomainfrom
cs-11009-remove-prerender-page-pool-size
Open

CS-11009: remove deprecated PRERENDER_PAGE_POOL_SIZE env var#4726
habdelra wants to merge 3 commits intomainfrom
cs-11009-remove-prerender-page-pool-size

Conversation

@habdelra
Copy link
Copy Markdown
Contributor

@habdelra habdelra commented May 8, 2026

Summary

Follow-up to CS-10976. The dynamic-pool config (PRERENDER_PAGE_POOL_MIN/_MAX) is live in staging+prod, so the legacy PRERENDER_PAGE_POOL_SIZE env var has no runtime effect — when both MIN and MAX are set, page-pool.ts ignores options.maxPages (which is what the env var feeds). This removes the consumer side; the matching infra PR (cardstack/infra#687) drops the SSM wiring.

  • prerender-app.ts:79 — drop the env var read; the options.maxPages fallback now defaults to 5 (only hit by tests, since deployed envs set MIN/MAX and local dev sets MIN=MAX=4)
  • mise-tasks/lib/env-vars.sh — set PRERENDER_PAGE_POOL_MIN and _MAX (=4) instead of PAGE_POOL_SIZE. PRERENDER_AFFINITY_TAB_MAX falls back to its in-code default (5), which clamps to MAX=4 — same effective value as before.
  • Documentation updated in README.md, docs/aws-operations.md (rollback section now points operators at restoring previous MIN/MAX values, per the ticket's guidance), and the indexing-diagnostics skill's tuning table.
  • Comment cleanup in page-pool.ts (the legacy else branch in the constructor stays — it's still reached by tests that don't set MIN/MAX env vars and pass options.maxPages directly).

Operational order

  1. Land this PR + the infra PR (cardstack/infra#687, which removes PRERENDER_PAGE_POOL_SIZE from the ECS task wiring).
  2. After 2-week soak per the ticket: aws --profile <env> ssm delete-parameter --name /<env>/boxel/PRERENDER_PAGE_POOL_SIZE for staging and prod.
  3. Force a new deployment of boxel-prerender-server-<env> so running tasks no longer have the env var present.

Test plan

  • pnpm lint passes in packages/realm-server
  • Local dev (mise run dev) boots prerender server with PRERENDER_PAGE_POOL_MIN=4 / _MAX=4 and works end-to-end against base realm cards
  • No grep hits remain for PRERENDER_PAGE_POOL_SIZE outside node_modules

🤖 Generated with Claude Code

The dynamic-pool config (MIN/MAX) is live in staging+prod, and the
legacy PRERENDER_PAGE_POOL_SIZE env var has no runtime effect when
MIN/MAX are set. Drop the consumer side here so the env var is fully
dead once the matching infra PR removes the SSM wiring.

- prerender-app.ts: drop the env var read; use a hardcoded default 5
  for the maxPages fallback (only hit by tests, since deployed envs
  set MIN/MAX and local dev sets MIN=MAX=4)
- mise-tasks/lib/env-vars.sh: set PRERENDER_PAGE_POOL_MIN/_MAX=4
  instead of PRERENDER_PAGE_POOL_SIZE; AFFINITY_TAB_MAX falls back
  to its in-code default (5, clamped to MAX=4)
- README, aws-operations rollback section, and indexing-diagnostics
  skill: switch references to MIN/MAX
- page-pool.ts: comment cleanup

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4414cf4ae3

ℹ️ 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".

Comment thread packages/realm-server/prerender/prerender-app.ts
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the deprecated PRERENDER_PAGE_POOL_SIZE environment variable from the prerender server’s configuration surface, updating local dev defaults and operational/docs to rely on the dynamic pool envelope (PRERENDER_PAGE_POOL_MIN / PRERENDER_PAGE_POOL_MAX) instead.

Changes:

  • Dropped PRERENDER_PAGE_POOL_SIZE consumption in the prerender server app wiring and updated related comments.
  • Updated local dev env defaults to set PRERENDER_PAGE_POOL_MIN/MAX (instead of the legacy size var).
  • Refreshed documentation and operator guidance to describe the dynamic pool envelope and rollback procedure.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Updates dev defaults and prerender env var documentation to reference PRERENDER_PAGE_POOL_MIN/MAX instead of PRERENDER_PAGE_POOL_SIZE.
packages/realm-server/prerender/prerender-app.ts Removes legacy env var read for pool sizing (now options.maxPages ?? 5).
packages/realm-server/prerender/page-pool.ts Comment cleanup to remove references to the deprecated env var and clarify fixed-size behavior.
mise-tasks/lib/env-vars.sh Switches dev defaults from PRERENDER_PAGE_POOL_SIZE to PRERENDER_PAGE_POOL_MIN/MAX.
docs/aws-operations.md Updates operator procedure/rollback guidance to focus on restoring previous envelope values.
.claude/skills/indexing-diagnostics/SKILL.md Updates tuning table to describe PRERENDER_PAGE_POOL_MIN/MAX instead of the deprecated size var.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/realm-server/prerender/prerender-app.ts Outdated
Comment thread README.md Outdated
Comment thread .claude/skills/indexing-diagnostics/SKILL.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   1h 43m 43s ⏱️ - 4m 26s
2 643 tests ±0  2 628 ✅ ±0  15 💤 ±0  0 ❌ ±0 
2 662 runs  ±0  2 647 ✅ ±0  15 💤 ±0  0 ❌ ±0 

Results for commit be7eb64. ± Comparison against earlier commit 4f8b2be.

Realm Server Test Results

    1 files  ±0      1 suites  ±0   13m 59s ⏱️ +30s
1 298 tests ±0  1 298 ✅ +3  0 💤 ±0  0 ❌  - 3 
1 377 runs  ±0  1 377 ✅ +3  0 💤 ±0  0 ❌  - 3 

Results for commit be7eb64. ± Comparison against earlier commit 4f8b2be.

@habdelra habdelra requested a review from a team May 8, 2026 22:02
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.

3 participants