Skip to content

Upgrade supported runtimes and strengthen security and image checks - #78

Merged
philipithomas merged 10 commits into
mainfrom
codex/postcard-runtime-upgrade
Sep 6, 2026
Merged

philipithomas merged 10 commits into
mainfrom
codex/postcard-runtime-upgrade

Conversation

@philipithomas

@philipithomas philipithomas commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Postcard's Ruby 3.2, Rails 7.2, Node 18 and CI PostgreSQL 10 releases are outside their upstream support windows. This updates the application to Ruby 3.4.10, Rails 8.1.3.1, Node 24.20.0 and PostgreSQL 16 CI, while retaining the existing Rails defaults and billing schema.

  • Update dependencies addressing 27 security-advisory findings, plus the existing Rails/libvips protections. Pay 5 stays schema-compatible: backport its payment return-link XSS fix, enable Stripe only, and document the two narrowly scoped audit exceptions with mounted-route regression tests.
  • Serve the patched Trix 2.1.19 asset from the audited Rails bundle instead of the vulnerable CDN 2.1.1 override. A real browser test loads the dashboard editor and checks formatting plus malicious pasted-content sanitization.
  • Fix Open Graph rendering at 1128×600. The controller had overwritten the initializer's viewport, producing 800×600 images; browser options now live in one initializer and both image cache versions are bumped.
  • Make Docker/Render/npm installs use the lockfile, use an official Node binary instead of compiling Node, install the matching browser once, exclude local credentials from the Docker context, add a default Puma command, and remove the legacy deploy ping.
  • Run separate SOLO/MULTIUSER jobs through the coverage-aware, network-blocked test entry point, upload independent coverage artifacts, and run current Brakeman and dependency audits. Exercise actual Grover/Puppeteer PNG generation, the Chrome editor regressions, and default production Docker startup/PID/health/cache checks against disposable PostgreSQL.

Validation: 100 Rails tests / 679 assertions pass in each application mode, with no failures, errors, or skips, using the isolated local test database and coverage-aware bin/test entry point. All six real Chrome tests pass locally, including the editor lifecycle, Trix sanitization, and image checks. Zeitwerk eager loading and asset compilation pass; Brakeman reports zero unignored warnings (seven existing suppressions retained); the refreshed dependency audit passes with the two documented Pay exceptions. Synced with main through eabfc6d, retaining the merged #92 regressions, #94 Ghost retirement and serialized-job compatibility tests, and #93 Solid Cache fix. All three current-head checks pass on 7b53e9c: SOLO, MULTIUSER, and the production Docker smoke job, including default startup, PID, health, cold/warm homepage, persisted cache, and browser execution. Both mode-specific coverage artifacts are uploaded: https://github.com/contraptionco/postcard/actions/runs/33989181954.

The Pay major-version migration is tracked in #79 and remains separate because upstream requires subscription-column backfills, STI conversion and association changes. No production services or payment data were changed.

Upstream references: Ruby support, Rails support, Node release schedule, PostgreSQL support, Pay upgrade requirements, Pay return-link fix.

Trix references: upstream patched release, paste sanitization advisory.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 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-05T20:11:42.737977Z 7b53e9c 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.

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

Copy link
Copy Markdown

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: 35ef908f05

ℹ️ 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 .dockerignore Resolved
Comment thread .github/workflows/test.yml Resolved
Comment thread Gemfile.lock Resolved
Comment thread config/initializers/grover.rb Resolved
@philipithomas
philipithomas merged commit 487edf4 into main Sep 6, 2026
3 checks passed
@philipithomas
philipithomas deleted the codex/postcard-runtime-upgrade branch September 6, 2026 20:06
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