Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
cc3a331
WIP: counter latency monitor
NathanFlurry May 10, 2026
9142f9c
feat(rivetkit-core): expose metrics endpoint
NathanFlurry May 11, 2026
8bdeddf
fix(sqlite): fence remote requests by generation
NathanFlurry May 11, 2026
5d40220
fix(runtime): avoid bounded dispatch channel stalls
NathanFlurry May 11, 2026
2598769
fix(rivetkit): expose client actor metadata
NathanFlurry May 11, 2026
85df17c
feat(kitchen-sink): add load testing harness
NathanFlurry May 11, 2026
32d1ca7
docs(serverless): document timeout tuning
NathanFlurry May 11, 2026
3dd80ae
feat(rivetkit): expose low-cardinality metrics routes
NathanFlurry May 11, 2026
85574f4
feat(rivetkit): add current actor metrics
NathanFlurry May 11, 2026
87713a7
fix(rivetkit): require engine ping for health
NathanFlurry May 11, 2026
457f772
fix(wasm): point wasm-pack build to new wasm-bindgen repo
abcxff May 11, 2026
2f15b9d
fix(envoy-client): dont abort drain after 20s
MasterPtato May 12, 2026
74b63a3
fix(rivetkit-core): decrement active actor metrics
NathanFlurry May 12, 2026
d81c233
fix(rivetkit): use engine actor stop threshold for shutdown
NathanFlurry May 12, 2026
0598852
feat(kitchen-sink): rust counter-latency harness
NathanFlurry May 12, 2026
912fa41
chore(kitchen-sink): counter actor + sigterm probe tweaks
NathanFlurry May 12, 2026
61ce292
feat(kitchen-sink): ws-ping fast-path on tunnel-stress + load-test-agent
NathanFlurry May 18, 2026
bad4e09
chore(kitchen-sink): agent load test
NathanFlurry May 20, 2026
aeccadf
test(depot-client): batch atomic cap repro
NathanFlurry May 20, 2026
8a3bb31
test(depot-client): natural reopen warm pidx repro
NathanFlurry May 20, 2026
93eaee4
[SLOP(claude-opus-4-7)] feat(envoy-client): add observability metrics…
NathanFlurry May 21, 2026
1c0b6d3
Fix actor generation validation for sqlite
NathanFlurry May 21, 2026
2113967
Cargo fmt
MasterPtato May 22, 2026
3a5cde0
[slopfix] perf(rivetkit): coalesce c.state serialization to once per …
MasterPtato May 29, 2026
de8afbc
LFS
MasterPtato Jun 1, 2026
e22dcf8
feat(rivetkit): add startup sqlite coldstart metrics
NathanFlurry Jun 1, 2026
495e84c
chore: fmt
NathanFlurry Jun 2, 2026
f92c558
chore: remove git lfs asset tracking
NathanFlurry Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .agent/notes/driver-test-progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,11 @@ Scope: DB driver tests only
- 2026-05-08 16:52 PDT raw-websocket [native/local/bare]: PASS (16 passed, 14.0s). Covers raw websocket callback tracking.
- 2026-05-08 16:52 PDT actor-conn-state [native/local/bare]: PASS (11 passed, 10.9s). Covers connection lifecycle and disconnect accounting through the work registry.
- 2026-05-08 16:52 PDT actor-sleep-db [native/local/bare]: PASS (26 passed, 70.9s). Covers DB close timing during sleep shutdown and waitUntil state persistence.
- 2026-05-09 04:48 PDT DB TESTS RERUN STARTED [native only] - validating async websocket close handler behavior.
- 2026-05-09 04:48 PDT actor-db rerun [native]: PASS (13 passed, 104 skipped, 18.3s).
- 2026-05-09 04:48 PDT actor-db-raw rerun [native]: PASS (5 passed, 40 skipped, 4.9s).
- 2026-05-09 04:48 PDT actor-db-pragma-migration rerun [native]: PASS (4 passed, 32 skipped, 4.3s).
- 2026-05-09 04:48 PDT actor-sleep-db rerun [native]: PASS (26 passed, 208 skipped, 63.8s). Includes `async websocket close handler can use c.db before sleep completes` and `async websocket addEventListener close handler can use c.db before sleep completes`.
- 2026-05-09 04:48 PDT actor-db-stress rerun [native]: PASS (5 passed, 40 skipped, 31.3s).
- 2026-05-09 04:48 PDT actor-db-init-order rerun [native]: PASS (6 passed, 48 skipped, 6.3s).
- 2026-05-09 04:48 PDT DB TESTS RERUN COMPLETE [native only] - 6/6 DB file groups passed. Async close handler tests included.
2 changes: 2 additions & 0 deletions .claude/reference/content-frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Required fields:
Optional fields:

- `keywords` (string array)
- `image` (`true` or `{ format: string }`) — hero image flag. Presence means the post has a hero image in R2 at `website/blog/{post-slug}/image.{format}`; use `image: true` for the default `image.png` or `image: { format: "gif" }` for another extension. The URL is derived from the slug and dimensions are fixed (2:1), so do not write `src`, `width`, or `height`. Resolved by `website/src/lib/postImage.ts`.
- `unpublished` (boolean)
13 changes: 8 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Do not add Git LFS filters here. jj can snapshot raw working-tree bytes
# without running Git LFS clean filters, so large public assets belong in R2.

* text eol=lf
*.png binary
*.jpg binary
*.jpeg binary
*.gif filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tar.gz filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
engine/packages/test-snapshot-gen/snapshots/** filter=lfs diff=lfs merge=lfs -text
*.gif binary
*.tar binary
*.tar.gz binary
*.tgz binary
*.sst binary

**/Cargo.lock linguist-generated=true

Expand Down
Binary file removed .github/media/quotes/posts/1902835527977439591.jpg
Binary file not shown.
Binary file removed .github/media/quotes/posts/1909278348812952007.png
Binary file not shown.
Binary file removed .github/media/quotes/users/Chinoman10_.jpg
Binary file not shown.
Binary file removed .github/media/quotes/users/Social_Quotient.jpg
Binary file not shown.
Binary file removed .github/media/quotes/users/alistaiir.jpg
Binary file not shown.
Binary file removed .github/media/quotes/users/devgerred.jpg
Binary file not shown.
Binary file removed .github/media/quotes/users/j0g1t.jpg
Binary file not shown.
Binary file removed .github/media/quotes/users/localfirstnews.jpg
Binary file not shown.
Binary file removed .github/media/quotes/users/samgoodwin89.jpg
Binary file not shown.
Binary file removed .github/media/quotes/users/samk0_com.jpg
Binary file not shown.
Binary file removed .github/media/quotes/users/uripont_.jpg
Binary file not shown.
Binary file removed .github/media/screenshots/inspector.png
Binary file not shown.
Binary file removed .github/media/screenshots/studio/simple.png
Binary file not shown.
Binary file removed .github/media/studio-video-demo5.png
Binary file not shown.
84 changes: 36 additions & 48 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,42 +217,42 @@ jobs:
if-no-files-found: error

# ---------------------------------------------------------------------------
# build-wasm — wasm package artifact built in parallel with native artifacts
# build-wasm — disabled
# ---------------------------------------------------------------------------
build-wasm:
needs: [context]
name: "Build rivetkit-wasm"
runs-on: depot-ubuntu-24.04-8
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
lfs: ${{ needs.context.outputs.trigger == 'release' }}
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
rustflags: ""
- uses: Swatinem/rust-cache@v2
with:
shared-key: "rivetkit-wasm-publish"
cache-on-failure: true
- name: Install wasm package dependencies
run: pnpm install --frozen-lockfile --filter=@rivetkit/rivetkit-wasm
- name: Build wasm package
run: pnpm --filter=@rivetkit/rivetkit-wasm build
- name: Upload wasm package artifact
uses: actions/upload-artifact@v4
with:
name: wasm-package
path: rivetkit-typescript/packages/rivetkit-wasm/pkg
if-no-files-found: error
# build-wasm:
# needs: [context]
# name: "Build rivetkit-wasm"
# runs-on: depot-ubuntu-24.04-8
# permissions:
# contents: read
# steps:
# - uses: actions/checkout@v4
# with:
# lfs: ${{ needs.context.outputs.trigger == 'release' }}
# - run: corepack enable
# - uses: actions/setup-node@v4
# with:
# node-version: "22"
# cache: pnpm
# - uses: actions-rust-lang/setup-rust-toolchain@v1
# with:
# toolchain: stable
# target: wasm32-unknown-unknown
# rustflags: ""
# - uses: Swatinem/rust-cache@v2
# with:
# shared-key: "rivetkit-wasm-publish"
# cache-on-failure: true
# - name: Install wasm package dependencies
# run: pnpm install --frozen-lockfile --filter=@rivetkit/rivetkit-wasm
# - name: Build wasm package
# run: pnpm --filter=@rivetkit/rivetkit-wasm build
# - name: Upload wasm package artifact
# uses: actions/upload-artifact@v4
# with:
# name: wasm-package
# path: rivetkit-typescript/packages/rivetkit-wasm/pkg
# if-no-files-found: error

# ---------------------------------------------------------------------------
# docker-images — per-arch runtime images pushed to Docker Hub
Expand Down Expand Up @@ -319,12 +319,11 @@ jobs:
# publish — npm publish + R2 upload + Docker manifest + release tail
# ---------------------------------------------------------------------------
publish:
needs: [context, build, build-wasm, docker-images]
needs: [context, build, docker-images]
name: "Publish"
if: |
!cancelled() &&
needs.build.result == 'success' &&
needs.build-wasm.result == 'success' &&
needs.docker-images.result == 'success'
runs-on: depot-ubuntu-24.04-8
permissions:
Expand Down Expand Up @@ -364,17 +363,6 @@ jobs:
path: engine-artifacts
pattern: engine-*
merge-multiple: true
- name: Download wasm package artifact
uses: actions/download-artifact@v4
with:
name: wasm-package
path: rivetkit-typescript/packages/rivetkit-wasm/pkg
- name: Validate wasm package artifact
run: |
test -f rivetkit-typescript/packages/rivetkit-wasm/pkg/rivetkit_wasm.js
test -f rivetkit-typescript/packages/rivetkit-wasm/pkg/rivetkit_wasm.d.ts
test -f rivetkit-typescript/packages/rivetkit-wasm/pkg/rivetkit_wasm_bg.wasm

- name: Place native binaries in platform packages
run: |
NATIVE_DIR=rivetkit-typescript/packages/rivetkit-napi
Expand Down
9 changes: 9 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Design constraints, invariants, and reference commands for the Rivet monorepo. F

- Avoid raw `f64` fields in vbare protocol schemas that use hashable maps; generated Rust derives `Eq`/`Hash`, so encode floats as fixed bytes or an ordered wrapper.
- Version converters must manually map fields between versions; never use serialize-deserialize round trips such as `transcode_version` or `serde_bare::to_vec` plus `from_slice`.
- RivetKit client/server protocol compatibility assumes the server/runtime is newer than the client; clients send their latest request protocol version, and servers handle older-client compatibility and negotiation.

When talking about "Rivet Actors" make sure to capitalize "Rivet Actor" as a proper noun and lowercase "actor" as a generic noun.

Expand Down Expand Up @@ -79,6 +80,14 @@ docker-compose up -d

**Never push to `main` unless explicitly specified by the user.**

## Assets

- Large public dashboard and website media belongs in the `rivet-assets` R2 bucket, not Git.
- Use object keys shaped like `dashboard/{group}/{asset-name}` for dashboard media and `website/blog/{post}/{asset-name}` for blog or changelog post media.
- Upload with `op://Engineering/rivet-assets R2 Upload/{username,password}` and `aws s3 cp <file> s3://rivet-assets/<key> --endpoint-url https://2a94c6a0ced8d35ea63cddc86c2681e7.r2.cloudflarestorage.com`.
- For blog or changelog hero media, upload the file to R2 as `website/blog/{post-slug}/image.{ext}` and set frontmatter `image: true` (or `image: { format: "gif" }` for a non-png). The URL is derived from the slug and dimensions are fixed at a 2:1 ratio, so do not write the absolute URL, width, or height. Resolved by `website/src/lib/postImage.ts`.
- Do not use Git LFS in this repo; jj can snapshot raw working-tree bytes.

## Frontend Visual Changes

- For any frontend visual change, use the `agent-browser` skill to view the result in a browser instead of working blind. If it is not installed, prompt the user to install it.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ One primitive that adapts to agents, workflows, collaboration, and more.
Powerful debugging and monitoring tools from local development to production at scale.

<p align="center">
<img src="./.github/media/screenshots/inspector.png" alt="Rivet Inspector" width="800" />
<img src="https://assets.rivet.dev/github/media/screenshots/inspector.png" alt="Rivet Inspector" width="800" />
</p>

- **SQLite Viewer** — Browse and query your actor's SQLite database in real-time
Expand Down
8 changes: 4 additions & 4 deletions docs-internal/engine/SQLITE_METRICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
- `sqlite_commit_dirty_page_count{path}`: Histogram of dirty page counts per commit path.
- `sqlite_commit_dirty_bytes{path}`: Histogram of raw dirty-page bytes per commit path.
- `sqlite_udb_ops_per_commit{path}`: Histogram of UniversalDB operations per commit path.
- `sqlite_commit_envoy_dispatch_duration_seconds`: Pegboard-envoy histogram for websocket frame arrival to `depot` dispatch.
- `sqlite_commit_envoy_response_duration_seconds`: Pegboard-envoy histogram for `depot` return to websocket response send.
- `envoy_sqlite_commit_dispatch_duration_seconds`: Pegboard-envoy histogram for websocket frame arrival to `depot` dispatch.
- `envoy_sqlite_commit_response_duration_seconds`: Pegboard-envoy histogram for `depot` return to websocket response send.
- `sqlite_commit_phases`: Actor inspector labeled timing metric exposed from `/inspector/metrics`. Values are `request_build`, `serialize`, `transport`, and `state_update`.

## Scrape Points
Expand All @@ -23,8 +23,8 @@

## Diagnosis

- High `decode_request` or `sqlite_commit_envoy_dispatch_duration_seconds` usually means envoy-side validation or actor lookup is slow before storage work starts.
- High `decode_request` or `envoy_sqlite_commit_dispatch_duration_seconds` usually means envoy-side validation or actor lookup is slow before storage work starts.
- High `meta_read` or `pidx_read` points at UniversalDB read pressure or cache misses.
- High `ltx_encode` means commit encoding and compression are doing real work. Check dirty page counts and raw dirty bytes together.
- High `udb_write`, `meta_write`, or `sqlite_commit_envoy_response_duration_seconds` points at write-path latency after encode.
- High `udb_write`, `meta_write`, or `envoy_sqlite_commit_response_duration_seconds` points at write-path latency after encode.
- A healthy actor should show non-zero `sqlite_commit_phases` totals after commits in `/inspector/metrics`. If SQL runs but those timings stay zero, the native VFS metrics path is broken.
6 changes: 3 additions & 3 deletions docs-internal/engine/TEST_SNAPSHOTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `test-snapshot-gen` crate (`engine/packages/test-snapshot-gen/`) provides:
1. **A binary** (`test-snapshot-gen`) that runs scenarios to generate RocksDB snapshots.
2. **A library** (`test_snapshot`) that loads those snapshots into test infrastructure.

Snapshots capture the entire UDB state (epoxy, gasoline, pegboard, etc.) for each replica in a multi-node cluster. They are stored as raw RocksDB checkpoint directories tracked by git LFS.
Snapshots capture the entire UDB state (epoxy, gasoline, pegboard, etc.) for each replica in a multi-node cluster. They are stored as raw RocksDB checkpoint directories checked in as normal fixture files.

## Generating Snapshots

Expand Down Expand Up @@ -140,6 +140,6 @@ let replica_paths = load_snapshot("epoxy-v1", test_id).unwrap();
4. A `metadata.json` file is written with the commit hash, branch name, and timestamp.
5. The test loader copies the checkpoint directory to `$TMPDIR/rivet-test-{test_id}-{dc_label}`, which is the same path that `rivet_test_deps::setup_single_datacenter` creates. Since the directory already exists with data, the RocksDB driver opens it and finds the pre-populated state.

## Git LFS
## Git

All files under `engine/packages/test-snapshot-gen/snapshots/` are tracked by git LFS (configured in `.gitattributes`). Make sure git LFS is installed before committing snapshots.
All files under `engine/packages/test-snapshot-gen/snapshots/` are checked in directly. Keep scenarios small enough that generated snapshots stay lightweight.
2 changes: 1 addition & 1 deletion engine/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ When changing a versioned VBARE schema, follow the existing migration pattern.

## Test snapshots

Use `test-snapshot-gen` to generate and load RocksDB snapshots of the full UDB KV store for migration and integration tests. Scenarios produce per-replica RocksDB checkpoints stored under `engine/packages/test-snapshot-gen/snapshots/` (git LFS tracked). In tests, use `test_snapshot::SnapshotTestCtx::from_snapshot("scenario-name")` to boot a cluster from snapshot data. See `docs-internal/engine/TEST_SNAPSHOTS.md` for the full guide.
Use `test-snapshot-gen` to generate and load RocksDB snapshots of the full UDB KV store for migration and integration tests. Scenarios produce per-replica RocksDB checkpoints stored under `engine/packages/test-snapshot-gen/snapshots/` as normal checked-in fixture files. In tests, use `test_snapshot::SnapshotTestCtx::from_snapshot("scenario-name")` to boot a cluster from snapshot data. See `docs-internal/engine/TEST_SNAPSHOTS.md` for the full guide.

## Engine test flakes

Expand Down
8 changes: 4 additions & 4 deletions engine/packages/config/src/config/pegboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pub struct Pegboard {

impl Pegboard {
pub fn base_retry_timeout(&self) -> usize {
self.base_retry_timeout.unwrap_or(2000)
self.base_retry_timeout.unwrap_or(2_000)
}

pub fn actor_allocation_threshold(&self) -> i64 {
Expand All @@ -177,7 +177,7 @@ impl Pegboard {
}

pub fn actor_retry_duration_threshold(&self) -> i64 {
self.actor_retry_duration_threshold.unwrap_or(300_000)
self.actor_retry_duration_threshold.unwrap_or(5 * 60 * 1000)
}

pub fn retry_reset_duration(&self) -> i64 {
Expand All @@ -202,7 +202,7 @@ impl Pegboard {
}

pub fn serverless_base_retry_timeout(&self) -> usize {
self.serverless_base_retry_timeout.unwrap_or(2000)
self.serverless_base_retry_timeout.unwrap_or(2_000)
}

pub fn serverless_retry_reset_duration(&self) -> i64 {
Expand Down Expand Up @@ -237,7 +237,7 @@ impl Pegboard {

pub fn gateway_response_start_timeout_ms(&self) -> u64 {
self.gateway_response_start_timeout_ms
.unwrap_or(5 * 60 * 1000) // 5 minutes
.unwrap_or(5 * 60 * 1000)
}

pub fn gateway_update_ping_interval_ms(&self) -> u64 {
Expand Down
Loading
Loading