From 9edd6eb4dffd09b41a041b614d05c8f07d091437 Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Mon, 16 Nov 2026 02:48:00 -0800 Subject: [PATCH 1/2] fix(workflows): name the workflow storage transactions RivetKit's SQLite profiler logs "SQLite transaction is unnamed" for each transaction shape that has no static name, so release-style workflows log it on their step storage writes. Name the driver's two transactions so the profiler can group their transaction, storage and commit performance across executions: - `workflow-batch-state`: live step writes committed with actor state - `workflow-batch`: control writes RivetKit 3.1.1 applies the name to `workflow-batch` today. It does not yet forward `name` for `experimental.includeState` transactions, so step writes keep logging the warning until RivetKit passes the name through. Co-Authored-By: Claude Opus 5.5 --- packages/workflows/src/rivetkit/driver.ts | 3 ++- packages/workflows/tests/rivetkit/driver.test.ts | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/workflows/src/rivetkit/driver.ts b/packages/workflows/src/rivetkit/driver.ts index a174fd4..9a37065 100644 --- a/packages/workflows/src/rivetkit/driver.ts +++ b/packages/workflows/src/rivetkit/driver.ts @@ -185,10 +185,11 @@ class WorkflowStorage { if (includeState) { await this.#db.transaction(commit, { + name: "workflow-batch-state", experimental: { includeState: true }, }); } else { - await this.#db.transaction(commit); + await this.#db.transaction(commit, { name: "workflow-batch" }); } } } diff --git a/packages/workflows/tests/rivetkit/driver.test.ts b/packages/workflows/tests/rivetkit/driver.test.ts index 83b755b..25e66d2 100644 --- a/packages/workflows/tests/rivetkit/driver.test.ts +++ b/packages/workflows/tests/rivetkit/driver.test.ts @@ -55,6 +55,7 @@ describe("RivetKit workflow driver", () => { await driver.batch([write(), write(3, 4)]); expect(db.transaction).toHaveBeenCalledOnce(); expect(db.transaction.mock.calls[0]?.[1]).toEqual({ + name: "workflow-batch-state", experimental: { includeState: true }, }); }); @@ -63,7 +64,9 @@ describe("RivetKit workflow driver", () => { const { controlDriver, db } = createSubject(); await controlDriver.batch([write()]); expect(db.transaction).toHaveBeenCalledOnce(); - expect(db.transaction.mock.calls[0]?.[1]).toBeUndefined(); + expect(db.transaction.mock.calls[0]?.[1]).toEqual({ + name: "workflow-batch", + }); }); test("reads, lists, and deletes byte-compatible rows", async () => { From 2e47430aac11d0c07c217a0cec9f02501cf906ab Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Mon, 16 Nov 2026 02:50:28 -0800 Subject: [PATCH 2/2] ci(release): mark prerelease versions as GitHub prereleases The publish workflow created every GitHub release as a full release, so release candidates such as `1.0.0-rc.1` showed as regular releases and could take the "Latest" badge. Pass `--prerelease` when the version has a semver prerelease suffix. npm dist-tags are unchanged. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8ee8b9a..ec418da 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -76,4 +76,8 @@ jobs: set -euo pipefail git tag "v$VERSION" git push origin "v$VERSION" - gh release create "v$VERSION" --generate-notes --title "v$VERSION" + if [[ "$VERSION" == *-* ]]; then + gh release create "v$VERSION" --generate-notes --title "v$VERSION" --prerelease + else + gh release create "v$VERSION" --generate-notes --title "v$VERSION" + fi