Skip to content

Commit e4baeff

Browse files
committed
Merge remote-tracking branch 'origin/main' into dependabot/npm_and_yarn/npm-security-dd6aeadc3f
* origin/main: (34 commits) fix(pro-dummy): make manual node-renderer validation reliable (#3200) [codex] Add Markdown Prettier CI check (#3242) Add /stress-test Claude Code command for adversarial QA (#3207) Document examples catalog and naming plan (#3191) test(dummy): enable StrictMode in OSS and Pro dummies (#3206) ci: exclude bot-blocking URLs from lychee link check (#3214) Remove stale Coveralls integration (#3204) docs: normalize external GitHub repo slugs in links and generators (#3198) docs: add Example Migrations page (#3125) (#3197) docs: warn about react_component helper collision with react-rails (#3143) (#3160) docs: legacy Webpacker and migration-fit guidance (#3138) (#3157) fix(specs): boot dummy specs without readline and drop redundant pnpm workspace (#3190) docs: add RSC migration success stories page (#1985) (#3162) Fix Bencher reporting permanently broken on pushes to main (#3148) docs: add example migrations guide (#3126) docs: remove defunct guavapass.com reference (#3199) chore: remove redundant --rsc-pro install generator flag (#3105) ci: warn (don't fail) on Bencher main regression (#3168) test: enable RSpec --profile to surface slowest package tests (#3176) fix(node-renderer): expose performance in VM context when supportModules (#3158) ...
2 parents 8ff0d01 + 61a98b7 commit e4baeff

172 files changed

Lines changed: 4622 additions & 1116 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/workflows/address-review.md

Lines changed: 47 additions & 30 deletions
Large diffs are not rendered by default.

.claude/commands/address-review.md

Lines changed: 91 additions & 51 deletions
Large diffs are not rendered by default.

.claude/commands/stress-test.md

Lines changed: 617 additions & 0 deletions
Large diffs are not rendered by default.

.claude/docs/analysis/RSPACK_IMPLEMENTATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Rspack Generator Option Implementation
22

3-
This document summarizes the implementation of the `--rspack` option for the React on Rails generator, based on the patterns from [PR #20 in react_on_rails-demos](https://github.com/shakacode/react_on_rails-demos/pull/20).
3+
This document summarizes the implementation of the `--rspack` option for the React on Rails generator, based on the patterns from [PR #20 in react-on-rails-demos](https://github.com/shakacode/react-on-rails-demos/pull/20).
44

55
## Overview
66

.claude/docs/conductor-compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ bin/conductor-exec git commit -m "message" # Pre-commit hooks work correctly
105105

106106
## Reference
107107

108-
See [react_on_rails-demos#105](https://github.com/shakacode/react_on_rails-demos/issues/105) for detailed problem analysis and solution development.
108+
See [react-on-rails-demos#105](https://github.com/shakacode/react-on-rails-demos/issues/105) for detailed problem analysis and solution development.

.claude/docs/manual-dev-environment-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Automated tests can pass while the development environment is completely broken. CI starts services explicitly and runs in a controlled environment — it does not exercise `bin/dev`, Procfile orchestration, or the actual browser experience. This guide ensures agents verify the dev environment works end-to-end before submitting a PR.
44

5-
**Related:** [PR Testing Guide](pr-testing-guide.md), [Testing Build Scripts](testing-build-scripts.md)
5+
**Related:** [PR Testing Guide](pr-testing-guide.md), [Testing Build Scripts](testing-build-scripts.md), [Validating Node Renderer Changes](validating-node-renderer-changes.md)
66

77
## The Rule
88

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Validating Node Renderer Changes
2+
3+
Manual validation checklist for changes under `packages/react-on-rails-pro-node-renderer/src/**`.
4+
5+
**Why this exists:** the Pro dummy app consumes the _built_ renderer at
6+
`packages/react-on-rails-pro-node-renderer/lib/**`. Editing TypeScript under `src/` does
7+
nothing until that lib output is regenerated, so a correct fix can look broken (or worse,
8+
a regression can look fine because the dummy is still running stale lib output).
9+
10+
**Related:** [Manual Dev Environment Testing](manual-dev-environment-testing.md)
11+
12+
## When This Applies
13+
14+
If your PR touches **any** of these, run through the checklist below:
15+
16+
- `packages/react-on-rails-pro-node-renderer/src/**`
17+
- `packages/react-on-rails-pro-node-renderer/package.json` (especially `protocolVersion`,
18+
`exports`, or runtime dependencies)
19+
- Any worker pool, JWT auth, integrations (Sentry/Honeybadger), or VM-context code in the
20+
renderer
21+
22+
## Pre-flight: Toolchain
23+
24+
Ruby 3.3.x is the documented baseline for the Pro dummy app, and this workflow
25+
has also been verified on Ruby 3.4.8. On Ruby 3.5+, the dummy's Gemfile pulls in
26+
`ostruct`, `logger`, and `benchmark` as explicit gems for stdlib compatibility.
27+
If a newer Ruby hits unrelated incompatibilities, fall back to the documented
28+
Ruby version.
29+
30+
```bash
31+
cd react_on_rails_pro/spec/dummy
32+
bundle install
33+
34+
# Optional fallback if your local Ruby fails:
35+
mise shell ruby@3.3.7 # or rbenv/asdf equivalent
36+
bundle install
37+
```
38+
39+
## Step 1: Rebuild the Renderer Package
40+
41+
Pick **one** of these depending on how you plan to iterate:
42+
43+
**One-shot rebuild (recommended for a single validation pass):**
44+
45+
```bash
46+
pnpm --filter react-on-rails-pro-node-renderer run build
47+
```
48+
49+
**Or use the dummy's convenience script:**
50+
51+
```bash
52+
cd react_on_rails_pro/spec/dummy
53+
pnpm run node-renderer:fresh # builds, then starts the renderer standalone
54+
```
55+
56+
This starts the renderer in the foreground on port 3800. For a full-stack dummy
57+
run, either stop it before Step 2 and let `bin/dev` start the renderer, or leave
58+
it running and comment out the `node-renderer:` line in `Procfile.dev` before
59+
running `bin/dev`.
60+
61+
**Watch mode (recommended when iterating on the renderer source):**
62+
63+
Either uncomment the `node-renderer-build` line in `react_on_rails_pro/spec/dummy/Procfile.dev`,
64+
or in a separate terminal run:
65+
66+
```bash
67+
pnpm --filter react-on-rails-pro-node-renderer run build-watch
68+
```
69+
70+
> If you skip this step, the dummy app will silently keep using the previous lib build.
71+
> Symptoms: a fix you just applied does not change behavior, or a regression you expected
72+
> to see does not appear.
73+
74+
## Step 2: Start the Dummy App
75+
76+
```bash
77+
cd react_on_rails_pro/spec/dummy
78+
bin/dev
79+
```
80+
81+
Verify:
82+
83+
- [ ] `bin/dev` starts without `overlay.sockPort should be a number` (webpack-dev-server)
84+
- [ ] `bin/dev` starts without `cannot load such file -- ostruct` (Rails precompile)
85+
- [ ] All Procfile.dev processes are healthy after 30 seconds
86+
- [ ] The `node-renderer` process logs that it bound to port 3800
87+
88+
## Step 3: Exercise the SSR Endpoints
89+
90+
For PRs touching streaming, hydration, RSC, or VM-context code, hit the routes that
91+
actually exercise the renderer (not just static pages):
92+
93+
- [ ] `http://localhost:3000/stream_native_metadata` — renders without `ReferenceError`
94+
(e.g. `performance is not defined`) in the renderer logs
95+
- [ ] `http://localhost:3000/hybrid_metadata_streaming` — same
96+
- [ ] Any route specifically related to your change
97+
98+
For each route:
99+
100+
- [ ] Page returns 200 and renders SSR content (view-source shows component markup)
101+
- [ ] No errors in the `node-renderer` Procfile pane
102+
- [ ] No errors in the Rails server log
103+
- [ ] No errors in the browser console
104+
105+
## Step 4: Confirm You Tested the New Code
106+
107+
It is easy to validate stale lib output without realizing it. Confirm:
108+
109+
- [ ] The built `lib/` file corresponding to your edit is newer than the `src/`
110+
file you changed. Compare the specific files with `stat` or use a
111+
per-file freshness check, for example:
112+
`find packages/react-on-rails-pro-node-renderer/lib -newer packages/react-on-rails-pro-node-renderer/src/<changed-file>.ts | head`
113+
- [ ] If you used watch mode, you saw a rebuild line in the watcher output after your
114+
most recent edit
115+
- [ ] Restart the `node-renderer` Procfile process after the rebuild — `node` does not
116+
hot-reload required modules
117+
118+
## Reporting Results in the PR
119+
120+
```markdown
121+
## Node Renderer Validation
122+
123+
- [x] Rebuilt `react-on-rails-pro-node-renderer` package
124+
- [x] Verified the rebuilt `lib/` file is newer than the changed `src/` file
125+
- [x] `bin/dev` starts cleanly
126+
- [x] `/stream_native_metadata` renders without errors
127+
- [x] `/hybrid_metadata_streaming` renders without errors
128+
- [x] No errors in node-renderer logs
129+
```
130+
131+
If you cannot validate manually (e.g. no local Ruby toolchain), say so explicitly and
132+
note that the change is type-checked / unit-tested only.

.github/workflows/actionlint.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,21 @@ jobs:
4949
5050
if git diff --name-only "$DIFF_BASE" ${{ github.sha }} 2>/dev/null | grep -q '^.github/workflows'; then
5151
echo "changed=true" >> "$GITHUB_OUTPUT"
52-
response=$(curl -sf https://api.github.com/repos/rhysd/actionlint/releases/latest)
53-
if [ $? -eq 0 ]; then
52+
# Pinned fallback used when the GitHub API call fails (rate limit / outage)
53+
# so the cache key stays stable and the download step still has a version to pin to.
54+
echo "::warning::GitHub API unavailable; falling back to pinned actionlint $fallback_version. Consider updating this pin."
55+
fallback_version="v1.7.7"
56+
if response=$(curl -sf -H "Authorization: token ${{ github.token }}" https://api.github.com/repos/rhysd/actionlint/releases/latest); then
5457
actionlint_version=$(echo "$response" | jq -r .tag_name)
55-
if [ -z "$actionlint_version" ]; then
56-
echo "Failed to parse Actionlint version"
57-
exit 1
58+
if [ -z "$actionlint_version" ] || [ "$actionlint_version" = "null" ]; then
59+
echo "Failed to parse Actionlint version; using pinned fallback $fallback_version"
60+
actionlint_version="$fallback_version"
5861
fi
59-
echo "actionlint_version=\"$actionlint_version\"" >> "$GITHUB_OUTPUT"
62+
else
63+
echo "curl to GitHub API failed; using pinned fallback $fallback_version"
64+
actionlint_version="$fallback_version"
6065
fi
66+
echo "actionlint_version=$actionlint_version" >> "$GITHUB_OUTPUT"
6167
fi
6268
- name: Setup Actionlint
6369
if: steps.check-workflows.outputs.changed == 'true'

0 commit comments

Comments
 (0)