Skip to content

Commit d6a0ba8

Browse files
authored
chore: add rivetkit-native cross-platform builds to pkg-pr-new (#4600)
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes
1 parent d00c2b0 commit d6a0ba8

File tree

472 files changed

+6760
-3017
lines changed

Some content is hidden

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

472 files changed

+6760
-3017
lines changed

.agent/specs/kv-and-native-bridge-remediation-plan.md

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

.agent/specs/publish-flow-unification.md

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

.claude/commands/release.md

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ If no prior RC tags exist for that base version, use `rc.1`. Otherwise, incremen
2323

2424
The final RC version string is `<base_version>-rc.<number>` (e.g., `2.1.6-rc.1`).
2525

26-
Also ask if they want to **reuse engine artifacts** from a previous version. This is common for RC releases or SDK-only changes where the engine hasn't changed. The `--reuse-engine-version` flag accepts either:
27-
- A version string (e.g., `2.1.6`) to reuse artifacts from that tagged release
28-
- A short commit hash (e.g., `bb7f292`) to reuse artifacts from that specific commit
29-
3026
If the user has already provided all these details in their initial message, skip the questions and proceed directly.
3127

3228
## Step 2: Confirm Release Details
@@ -37,53 +33,40 @@ Before proceeding, display the release details to the user and ask for explicit
3733
- New version
3834
- Current branch
3935
- Whether it will be tagged as "latest" (RC releases are never tagged as latest)
40-
- Whether engine artifacts are being reused (and from which version)
4136

4237
Do NOT proceed without user confirmation.
4338

44-
## Step 3: Run the Release Script (Setup Local)
39+
## Step 3: Run the Release Script
4540

46-
The release script handles version bumping, local checks, committing, pushing, and triggering the workflow.
41+
The release script (`scripts/publish/src/local/cut-release.ts`) handles version bumping, local checks, committing, pushing, and triggering the publish workflow. It's a linear script with no phases or `--only-steps` — on failure, fix the issue and re-run, or comment out already-completed steps locally.
4742

4843
For **major**, **minor**, or **patch** releases:
4944

5045
```bash
51-
echo "yes" | ./scripts/release/main.ts --<type> --phase setup-local
46+
pnpm --filter=publish release --<type> --yes
5247
```
5348

5449
For **rc** releases (using explicit version):
5550

5651
```bash
57-
echo "yes" | ./scripts/release/main.ts --version <version> --phase setup-local
58-
```
59-
60-
To **reuse engine artifacts**, add the flag:
61-
62-
```bash
63-
echo "yes" | ./scripts/release/main.ts --version <version> --reuse-engine-version <reuse_version> --phase setup-local
52+
pnpm --filter=publish release --version <version> --no-latest --yes
6453
```
6554

6655
Where `<type>` is `major`, `minor`, or `patch`, and `<version>` is the full version string like `2.1.6-rc.1`.
6756

68-
The `--phase setup-local` runs these steps in order:
69-
1. Confirms release details (interactive prompt - piping "yes" handles this)
70-
2. Updates version in all files (Cargo.toml, package.json files)
71-
3. Generates Fern API specs
72-
4. Runs local checks (type checks, cargo check)
73-
5. Git commits with message `chore(release): update version to X.Y.Z`
74-
6. Git pushes
75-
7. Triggers the GitHub Actions workflow
76-
77-
If local checks fail at step 4, fix the issues in the codebase, then re-run using `--only-steps` to avoid re-running already-completed steps:
78-
79-
```bash
80-
echo "yes" | ./scripts/release/main.ts --version <version> --only-steps run-local-build-and-checks,git-commit,git-push,trigger-workflow
81-
```
57+
The release script runs these steps in order:
58+
1. Resolves target version and auto-detects the `latest` flag
59+
2. Prints the release plan and requires confirmation (`--yes` skips the prompt)
60+
3. Validates git working tree is clean
61+
4. Updates Cargo.toml + example dependency specs via `updateSourceFiles`
62+
5. Rewrites every publishable `package.json` version via `bumpPackageJsons`
63+
6. Runs `./scripts/fern/gen.sh`
64+
7. Runs local build + type-check fail-fast (skip with `--skip-checks`)
65+
8. Commits with `chore(release): update version to X.Y.Z`
66+
9. Pushes (or `gt submit` on a non-main branch)
67+
10. Triggers `.github/workflows/publish.yaml` via `gh workflow run`
8268

83-
If reusing engine, include the flag in retries too:
84-
```bash
85-
echo "yes" | ./scripts/release/main.ts --version <version> --reuse-engine-version <reuse_version> --only-steps run-local-build-and-checks,git-commit,git-push,trigger-workflow
86-
```
69+
If a step fails, fix the underlying issue and re-run the command. The script is idempotent with respect to already-bumped versions.
8770

8871
## Step 4: Monitor the GitHub Actions Workflow
8972

@@ -92,7 +75,7 @@ After the workflow is triggered, wait 5 seconds for it to register, then begin p
9275
### Find the workflow run
9376

9477
```bash
95-
gh run list --workflow=release.yaml --limit=1 --json databaseId,status,conclusion,createdAt,url
78+
gh run list --workflow=publish.yaml --limit=1 --json databaseId,status,conclusion,createdAt,url
9679
```
9780

9881
Verify the run was created recently (within the last 2 minutes) to confirm you are monitoring the correct run. Save the `databaseId` as the run ID.
@@ -132,7 +115,6 @@ Read the failure logs carefully. Common failure categories:
132115
- **Test failures** - Fix the failing tests
133116
- **Publishing failures** (crates.io, npm) - These may be transient; check if retry will help
134117
- **Docker build failures** - Check Dockerfile or build script issues
135-
- **Reuse validation failures** - The reuse version's artifacts may not exist; check Docker manifests and S3 paths
136118
- **Infrastructure/transient failures** (network timeouts, rate limits) - Just re-trigger without code changes
137119

138120
### 5c. Fix and re-push
@@ -152,14 +134,13 @@ IMPORTANT: Use `--force-with-lease` (not `--force`) for safety. Amend the commit
152134
3. Re-trigger the workflow:
153135

154136
```bash
155-
gh workflow run .github/workflows/release.yaml \
137+
gh workflow run .github/workflows/publish.yaml \
156138
-f version=<version> \
157139
-f latest=<true|false> \
158-
-f reuse_engine_version=<reuse_version> \
159140
--ref <branch>
160141
```
161142

162-
Where `<branch>` is the current branch (usually `main`). Set `latest` to `false` for RC releases, `true` for stable releases that are newer than the current latest tag. Only include `-f reuse_engine_version` if reusing engine artifacts.
143+
Where `<branch>` is the current branch (usually `main`). Set `latest` to `false` for RC releases, `true` for stable releases that are newer than the current latest tag.
163144

164145
4. Return to Step 4 to monitor the new run.
165146

@@ -174,15 +155,26 @@ If the workflow has failed **5 times**, stop and report all errors to the user.
174155
When the workflow completes successfully:
175156
1. Print the GitHub Actions run URL
176157
2. Print the new version number
177-
3. Note whether engine artifacts were reused and from which version
158+
159+
## Step 7: Sanity Check
160+
161+
After reporting success, run the sanity check skill against the just-published version to verify the packages actually work end-to-end.
162+
163+
Determine the correct npm tag for the version:
164+
- RC releases: `rc`
165+
- Stable releases tagged as latest: `latest`
166+
- Stable releases not tagged as latest: the exact version string (e.g., `2.3.0`)
167+
168+
Then invoke the `/sanity-check` skill with that version/tag. For example, for an RC release of `2.3.0-rc.1`, sanity check `rivetkit@rc`. For a stable `2.3.0` release, sanity check `rivetkit@latest`.
169+
170+
If the sanity check fails, report the failure to the user with the error details. The release is already published at this point, so a sanity check failure means something is wrong with the published artifacts.
178171

179172
## Important Notes
180173

181174
- The product name is "Rivet". The domain is always `rivet.dev`, never `rivet.gg`.
182175
- Do not include co-authors in any commit messages.
183176
- Use conventional commits style (e.g., `chore(release): update version to X.Y.Z`).
184177
- Keep commit messages to a single line.
185-
- The release script requires `tsx` to run (it's a TypeScript file with a shebang).
186178
- Always work on the current branch. Releases are typically cut from `main`.
187179
- Never push to `main` unless the user explicitly confirms.
188180
- Do not run `cargo fmt` or `./scripts/cargo/fix.sh` automatically.

.gitattributes

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ engine/sdks/rust/data/** linguist-generated=false
1919
engine/sdks/rust/*-protocol/** linguist-generated=false
2020
engine/sdks/rust/envoy-client/** linguist-generated=false
2121
engine/sdks/schemas/** linguist-generated=false
22-
engine/docker/dev/** linguist-generated=true
23-
engine/docker/dev-host/** linguist-generated=true
24-
engine/docker/dev-multidc/** linguist-generated=true
25-
engine/docker/dev-multidc-multinode/** linguist-generated=true
26-
engine/docker/dev-multinode/** linguist-generated=true
22+
self-host/compose/dev/** linguist-generated=true
23+
self-host/compose/dev-host/** linguist-generated=true
24+
self-host/compose/dev-multidc/** linguist-generated=true
25+
self-host/compose/dev-multidc-multinode/** linguist-generated=true
26+
self-host/compose/dev-multinode/** linguist-generated=true
2727

2828
website/public/llms.txt linguist-generated=true
2929
website/public/llms-full.txt linguist-generated=true

.github/workflows/pkg-pr-new.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)