Skip to content

Simplify publish and quality workflows#85

Merged
rtbenfield merged 9 commits into
mainfrom
chore/pr-quality-workflows
Jun 12, 2026
Merged

Simplify publish and quality workflows#85
rtbenfield merged 9 commits into
mainfrom
chore/pr-quality-workflows

Conversation

@rtbenfield

Copy link
Copy Markdown
Contributor

Adds required PR quality automation and simplifies package publishing so CI uses the committed package manifests directly instead of generated staging artifacts.

Changes

  • PR quality: Adds a PR workflow for typecheck, lint, and recursive tests, with pinned GitHub Actions and a local workflow rule documenting that policy.
  • Publishing: Publishes CLI and Compute directly from their package directories, injects CI versions with pnpm, checks registry auth with pnpm, and removes redundant staging/audit scripts from the publish workflows.
  • Package metadata: Adds package-local license files and npm ignore rules so package contents are defined by committed package files rather than transformed manifests.
  • Versioning: Replaces the CLI-specific version resolver with a package-aware resolver that requires an explicit package directory.
  • Docs and agent rules: Updates publishing docs and ADRs for direct package inspection with pnpm, moves CLI-specific agent rules under the CLI package, and adds root package-manager guidance.

Why

Publishing from committed package directories matches conventional npm package workflows and makes package contents easier to review. The package-aware version resolver keeps CLI and Compute release versioning consistent without duplicating scripts, while pnpm-only repo commands keep CI and agent instructions aligned with the workspace package manager.

Publish CLI and Compute packages directly from their package directories instead of staging transformed publish artifacts. Rely on committed package metadata, package-local LICENSE files, .npmignore rules, and prepack builds for package contents.

Add the Compute publish workflow, use the shared package version resolver for both packages, and require explicit package directories when resolving release versions. Switch publishing workflows to pnpm for versioning, registry lookup, authentication checks, and publishing.

Remove the staging publish scripts and their staging-specific tests. Update publishing docs, ADRs, and onboarding guidance to describe direct package inspection with pnpm pack. Add repo agent guidance for pnpm usage in repo commands while preserving npm guidance for user-facing content.
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@rtbenfield, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 hour, 20 minutes, and 55 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f9510485-d9b1-4aba-9b7c-27ce8a47dd91

📥 Commits

Reviewing files that changed from the base of the PR and between 81375f8 and 88fcb89.

📒 Files selected for processing (2)
  • .github/workflows/publish-cli.yml
  • .github/workflows/publish-compute.yml

Walkthrough

This PR migrates the Prisma monorepo from a staged-artifact publishing model to direct pnpm-driven versioning and publishing. A new package-aware version resolver (resolve-package-version.mjs) replaces the CLI-specific resolver, accepting a package directory parameter to generalize version derivation for dev, PR preview, and beta release workflows. The CLI and new compute package workflows are updated to resolve versions, inject them directly into package manifests using pnpm version, and publish from source via pnpm publish instead of staging and publishing from .publish/ directories. Both packages receive .npmignore files to exclude source/test artifacts, license files, and the compute package gains a prepack hook. Documentation across contributor guides, architecture decisions, and testing patterns is updated to reflect the removal of staging steps and the new direct-pnpm workflow.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Simplify publish and quality workflows' accurately summarizes the main changes: simplifying publishing workflows by removing staging artifacts and adding PR quality automation.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale behind publishing simplification, quality automation, package metadata updates, and versioning changes.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/pr-quality-workflows
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch chore/pr-quality-workflows

Comment @coderabbitai help to get the list of available commands and usage tips.

…flows

# Conflicts:
#	.github/workflows/pr-quality.yml
#	packages/cli/tests/publish-prep.test.ts
#	packages/cli/tests/resolve-package-version.test.ts
#	scripts/prepare-cli-publish.mjs
#	scripts/resolve-cli-version.mjs
@rtbenfield rtbenfield marked this pull request as ready for review June 12, 2026 15:45

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/publish-compute.yml:
- Around line 134-137: The "Publish official package to npm" step publishes
without authentication; update the workflow to configure npm auth by adding
registry-url to the existing actions/setup-node step (so setup-node registers
the registry) and set NODE_AUTH_TOKEN in the publish step's environment (env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}) so the pnpm publish command runs
authenticated; locate the "Publish official package to npm" run step and the
earlier actions/setup-node invocation to apply these changes.
- Line 20: Add human-readable display names for the workflow jobs by adding a
name: field for each job key (e.g., publish-dev and publish-official) so the UI
shows a friendly label; update the job definitions where the keys publish-dev
and publish-official are declared to include descriptive name strings like
"Publish (dev)" and "Publish (official)" respectively.
- Around line 99-107: The step with id compute_version sets the shell variable
LATEST but never writes it to the GitHub Actions step outputs, so
steps.compute_version.outputs.latest is undefined; modify the step that defines
LATEST (the block invoking node scripts/resolve-package-version.mjs next-beta)
to also export the value to GITHUB_OUTPUT (e.g., append a line that writes
latest=${LATEST} to "$GITHUB_OUTPUT") so that the step output latest is
available for the summary; ensure the change occurs in the same block that
defines LATEST and preserves the existing call to resolve-package-version.mjs.

In `@AGENTS.md`:
- Line 11: Clarify the guidance "Run root scripts only when they match the
changed surface" by replacing or augmenting it with a concrete rule and example:
state that root-level scripts (e.g., root tsc, root lint, or other monorepo-wide
checks) should only be run when changes touch files outside a single package or
affect shared/config files, and add an example like "avoid running root tsc or
root lint when only package-local code changed; run package-level scripts
instead." Also mention that touching package manifests, build configs, or shared
libs should trigger root scripts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8f23f6c7-51f4-47cf-9b69-3b001e690e2c

📥 Commits

Reviewing files that changed from the base of the PR and between 6907dba and 81375f8.

📒 Files selected for processing (26)
  • .github/workflows/preview-cli-package.yml
  • .github/workflows/publish-cli.yml
  • .github/workflows/publish-compute.yml
  • AGENTS.md
  • README.md
  • docs/architecture/adrs/0001-preview-package-and-publishing.md
  • docs/architecture/package-structure.md
  • docs/onboarding/common-tasks.md
  • docs/onboarding/getting-started.md
  • docs/onboarding/testing.md
  • docs/reference/testing-patterns.md
  • package.json
  • packages/cli/.npmignore
  • packages/cli/AGENTS.md
  • packages/cli/LICENSE
  • packages/cli/tests/publish-prep.test.ts
  • packages/cli/tests/resolve-package-version.test.ts
  • packages/compute/.npmignore
  • packages/compute/LICENSE
  • packages/compute/package.json
  • scripts/prepare-cli-publish.d.mts
  • scripts/prepare-cli-publish.mjs
  • scripts/resolve-cli-version.d.mts
  • scripts/resolve-cli-version.mjs
  • scripts/resolve-package-version.d.mts
  • scripts/resolve-package-version.mjs
💤 Files with no reviewable changes (6)
  • scripts/prepare-cli-publish.d.mts
  • scripts/resolve-cli-version.d.mts
  • scripts/prepare-cli-publish.mjs
  • package.json
  • packages/cli/tests/publish-prep.test.ts
  • scripts/resolve-cli-version.mjs

Comment thread .github/workflows/publish-compute.yml
Comment thread .github/workflows/publish-compute.yml
Comment thread .github/workflows/publish-compute.yml
Comment thread AGENTS.md
@rtbenfield rtbenfield merged commit 333f5e3 into main Jun 12, 2026
8 checks passed
@rtbenfield rtbenfield deleted the chore/pr-quality-workflows branch June 12, 2026 16:41
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