Skip to content

Forward-port OSS npm license metadata fix - #4794

Merged
justin808 merged 2 commits into
mainfrom
jg-codex/forward-port-oss-license-metadata
Jul 26, 2026
Merged

Forward-port OSS npm license metadata fix#4794
justin808 merged 2 commits into
mainfrom
jg-codex/forward-port-oss-license-metadata

Conversation

@justin808

@justin808 justin808 commented Jul 26, 2026

Copy link
Copy Markdown
Member

Why

Forward-port the OSS npm license correction from the release/17.0.1 train so main does not regress after the ephemeral release branch is removed.

Release-branch source: #4792 (e9567c207e9c30ac9b956a1ed4306a4381e584cc).

What changed

  • Cherry-picked the release fix with -x.
  • Declares react-on-rails as MIT and includes the package-local MIT license.
  • Keeps the real packed-artifact license guard on the ongoing development line.

Verification

  • pnpm install --frozen-lockfile
  • pnpm --filter react-on-rails test — 27 suites, 367 tests
  • pnpm exec eslint packages/react-on-rails/scripts/check-package-license.mjs
  • pnpm exec prettier --check packages/react-on-rails/package.json packages/react-on-rails/LICENSE.md packages/react-on-rails/scripts/check-package-license.mjs
  • git diff --check origin/main...HEAD
  • Pre-push hooks

Changelog

The release entry is handled by the dedicated 17.0.1.rc.0 changelog PR against release/17.0.1; its release closeout will be forward-ported separately.

Summary by CodeRabbit

  • Documentation
    • Updated licensing docs to explicitly declare the package as MIT and reference the included license file.
    • Added/updated MIT license text with copyright spanning 2015–2025.
  • Chores
    • Ensure the package publishes the MIT LICENSE.md.
    • Added an automated license/package compliance check that runs before tests, verifying license text and package contents.

Merge qualification

  • Release mode / phase: development / beta; beta gate satisfied.
  • Labels: ready-for-hosted-ci — optimized hosted CI completed for the current head.
  • Changelog classification: deferred_to_update_changelog — release-branch entry is already published and final closeout will be reconciled separately.
  • Current-head review coverage: Claude and CodeRabbit working (2 systems).
  • Degraded review coverage: Copilot quota exhausted; Greptile and Codex produced no current-head artifact after the docs follow-up commit. Their older-head output is advisory only.

Confidence note:

  • Validated: pnpm install --frozen-lockfile; pnpm --filter react-on-rails test (27 suites / 367 tests); focused artifact guard (0.45s); ESLint; Prettier; git diff --check origin/main...HEAD; pre-push hooks.
  • Evidence: current-head required and optimized hosted checks passed; Claude and CodeRabbit found no confirmed blocker; all five review threads were replied to and resolved.
  • UNKNOWN: none affecting merge safety.
  • Residual risk: none beyond normal package-metadata rollout; the public RC tarball independently verifies MIT metadata and the packaged license.

Ensure the OSS npm tarball declares MIT and ships an independently verified MIT-only license.

(cherry picked from commit e9567c2)
Copilot AI review requested due to automatic review settings July 26, 2026 00:36

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The package now includes an MIT license file, declares MIT metadata, publishes the license, documents the declaration, and validates packed package contents before running Jest tests.

Changes

Package License Compliance

Layer / File(s) Summary
MIT license packaging
packages/react-on-rails/LICENSE.md, packages/react-on-rails/package.json, docs/DIRECTORY_LICENSING.md
Adds the MIT license text, updates package metadata to "MIT", includes LICENSE.md in published files, and updates licensing documentation.
Packed license validation
packages/react-on-rails/scripts/check-package-license.mjs, packages/react-on-rails/package.json
Packs the package into a temporary archive, validates license metadata and contents, checks for prohibited phrases, cleans up temporary files, and runs before Jest tests.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: copilot

🚥 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.
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 clearly matches the main change: forward-porting an OSS npm license metadata fix.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg-codex/forward-port-oss-license-metadata

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.

@greptile-apps

greptile-apps Bot commented Jul 26, 2026

Copy link
Copy Markdown

Greptile Summary

Corrects the OSS npm package’s license metadata.

  • Declares react-on-rails as MIT licensed.
  • Adds the package-local MIT license to published artifacts.
  • Adds a packed-artifact test that verifies the published metadata and license contents.

Confidence Score: 5/5

The pull request appears safe to merge with no actionable defects identified.

The package metadata and bundled license now agree with the repository’s OSS licensing, and the new guard validates the actual packed artifact without introducing a recursive package lifecycle or CI failure path.

Important Files Changed

Filename Overview
packages/react-on-rails/LICENSE.md Adds the MIT license text consistent with the repository’s authoritative OSS license.
packages/react-on-rails/package.json Declares the package as MIT licensed, includes the license in packed artifacts, and incorporates the artifact guard into package tests.
packages/react-on-rails/scripts/check-package-license.mjs Packs the package in a temporary directory and validates both its license metadata and shipped license text.

Reviews (1): Last reviewed commit: "Fix OSS npm package license metadata (#4..." | Re-trigger Greptile

@justin808

Copy link
Copy Markdown
Member Author

+ci-run-hosted

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Hosted CI Requested

Triggered 9 workflow(s) for d7cdd52a7da0.
Skipped 0 workflow(s) with equivalent exact-head coverage.
Mode: optimized hosted CI (path-selected by script/ci-changes-detector).
Added ready-for-hosted-ci, so future commits will keep running optimized hosted CI until +ci-stop-hosted is used.

View progress in the Actions tab.

@github-actions github-actions Bot added the ready-for-hosted-ci Run optimized hosted GitHub CI for this PR label Jul 26, 2026
Comment thread packages/react-on-rails/package.json
Comment thread packages/react-on-rails/scripts/check-package-license.mjs

@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: d7cdd52a7d

ℹ️ 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/react-on-rails/package.json
@claude

claude Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review summary

Reviewed this as a forward-port of the OSS npm license fix (MIT for packages/react-on-rails, Pro packages correctly left as SEE LICENSE IN LICENSE.md). Verified:

  • packages/react-on-rails-pro/package.json and packages/react-on-rails-pro-node-renderer/package.json still declare "SEE LICENSE IN LICENSE.md" — the MIT switch is correctly scoped to the OSS package only.
  • The new packages/react-on-rails/LICENSE.md content matches the MIT-only excerpt of the repo root LICENSE.md (the root file additionally documents the dual-license scope, which is appropriate for the monorepo root vs. the published package).
  • check-package-license.mjs uses execFileSync (no shell interpolation) for tar/pnpm, so no command-injection concern there, and cleans up its temp dir in a finally.

Two things worth addressing before merge (left as inline comments):

  1. Performance/dev-loop regression: test now runs test:package-license first, which shells out to pnpm packprepublishOnly → full clean + tsc rebuild on every test invocation, both locally and in each CI matrix leg — even though CI already runs a workspace-wide pnpm build immediately before this step. This check only matters at publish/release time and would fit better as its own step than as a prerequisite of the hot test script.
  2. Duplication risk: the script hard-codes the full expected license text (expectedOssMitLicense) instead of reading LICENSE.md directly, so the license text now needs to be kept in sync by hand in two files.

Neither is a correctness bug in the license-fix itself — the metadata change and guard both work as intended — but the test script coupling will slow down routine pnpm test runs going forward.

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react-on-rails/client bundled (gzip) 63.58 KB (0%)
react-on-rails/client bundled (gzip) (time) 63.58 KB (0%)
react-on-rails/client bundled (brotli) 54.59 KB (0%)
react-on-rails/client bundled (brotli) (time) 54.59 KB (0%)
react-on-rails-pro/client bundled (gzip) 64.96 KB (0%)
react-on-rails-pro/client bundled (gzip) (time) 64.96 KB (0%)
react-on-rails-pro/client bundled (brotli) 55.77 KB (0%)
react-on-rails-pro/client bundled (brotli) (time) 55.77 KB (0%)
registerServerComponent/client bundled (gzip) 135.45 KB (0%)
registerServerComponent/client bundled (gzip) (time) 135.45 KB (+0.01% 🔺)
registerServerComponent/client bundled (brotli) 81.77 KB (0%)
registerServerComponent/client bundled (brotli) (time) 81.77 KB (0%)
wrapServerComponentRenderer/client bundled (gzip) 127.9 KB (0%)
wrapServerComponentRenderer/client bundled (gzip) (time) 127.9 KB (0%)
wrapServerComponentRenderer/client bundled (brotli) 75 KB (0%)
wrapServerComponentRenderer/client bundled (brotli) (time) 75 KB (0%)

Copilot AI review requested due to automatic review settings July 26, 2026 00:47

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread packages/react-on-rails/scripts/check-package-license.mjs
Comment thread packages/react-on-rails/package.json
@claude

claude Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review summary

Reviewed this as a forward-port of the OSS npm license metadata fix (#4792). The core change is sound and fixes a real bug: before this PR, packages/react-on-rails/package.json declared "license": "SEE LICENSE IN LICENSE.md" but had no package-local LICENSE.md and didn't include one in files, so the published npm tarball referenced a license file that didn't exist in the package. Declaring MIT directly and shipping a package-local LICENSE.md (MIT-only, no Pro/commercial text) resolves that correctly, and the docs/DIRECTORY_LICENSING.md update stays consistent with the actual metadata.

Left two inline comments on check-package-license.mjs / package.json, both code-quality/maintainability rather than blocking:

  1. Duplicated license text — the script hardcodes a byte-for-byte copy of LICENSE.md's contents instead of reading the file from disk, so the two can drift out of sync for reasons unrelated to what the check is meant to catch.
  2. pnpm pack wired into test — running an actual package pack (spawning pnpm pack + tar, stdio: 'inherit') on every pnpm test invocation adds an external binary dependency, couples the check to build lifecycle scripts (prepare/prepack), and has no timeout if either subprocess hangs. Might read better as a separate CI step than as part of the unit test run.

No security concerns — the script uses execFileSync (no shell interpolation) and only touches a freshly created temp directory that's cleaned up in a finally block. No behavioral/runtime code paths are touched by this PR outside of packaging metadata and a new test-only script.

@justin808

Copy link
Copy Markdown
Member Author

Address-review summary

Scan scope: full PR history through 2026-07-26T05:27:36Z; no previous address-review cutoff.

Mattered

Optional

Skipped

  • CodeRabbit/Greptile/Claude/Codex summaries, CI command/status comments, size report, and Copilot quota notices were status, positive-summary, duplicate, stale-head, or non-actionable evidence. No code action required.

Deferred-work tracking: dropped; the two optional suggestions are not worth separate follow-up.

All five review threads are resolved. Current-head Claude and CodeRabbit artifacts plus green hosted CI provide the independent merge signal.

Next default scan starts after this comment. Say check all reviews to rescan the full PR.

@justin808
justin808 added this pull request to the merge queue Jul 26, 2026
Merged via the queue into main with commit a835dbc Jul 26, 2026
62 checks passed
@justin808
justin808 deleted the jg-codex/forward-port-oss-license-metadata branch July 26, 2026 05:32
@justin808 justin808 mentioned this pull request Jul 27, 2026
17 tasks
justin808 added a commit that referenced this pull request Jul 31, 2026
…t-policy

* origin/main: (33 commits)
  Fix ci-required base ref for PR merge-ref checkouts (#4819)
  Honor response charset and reject non-2xx HTTP-served SSR bundles (#4817)
  [Pro] Redact RSC render-error metadata on the fetched (client-navigation) payload path (#4821)
  Forward-port the 17.0.1 changelog section to main (#4814)
  Handle selector metacharacters in renderComponent DOM IDs (#4808)
  [Pro] Prevent caching RSC renders with errors (#4804)
  Agents: trust Copilot review identities (#4807)
  Agents: bind fleet closeout to generated pack (#4805)
  Docs: ADR 0002 — Skills-in-package over MCP for agent-native DX (#4735)
  Scope GitHub release commands to the origin repository (#4803)
  Forward-port OSS npm license metadata fix (#4794)
  Add golden-output gate for the serverWebpackConfig generator template (#4790)
  Cover the rspack CSS SSR generator fixes and de-duplicate the loader path (#4788)
  Configure agent workflow repo policy (#4785)
  Forward-port gh include mixed framing from #4684 (#4784)
  Release: enforce one-change forward-port closeout (#4783)
  Forward-port multi-URL rolling-deploy seeding to main (#4782)
  Docs: clarify React 18 streaming without RSC (#4780)
  Docs: forward-port v17 upgrade and generator gate guidance (#4781)
  Record the final React on Rails 17.0.0 changelog (#4742)
  ...

# Conflicts:
#	AGENTS.md
#	internal/contributor-info/release-train-runbook.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-hosted-ci Run optimized hosted GitHub CI for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants