Skip to content

Commit 21f282b

Browse files
MasterPtatoNathanFlurry
authored andcommitted
Remove slop
1 parent 7f92c1f commit 21f282b

5 files changed

Lines changed: 14 additions & 35 deletions

File tree

.claude/skills/sanity-check/SKILL.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ Run a quick end-to-end sanity check of a published rivetkit version: copy the he
1515

1616
## Inputs
1717
1. **Version or tag** (required) — explicit pkg-pr-new preview, npm dist-tag, or semver. If not provided in the user's message, ask for it.
18-
2. **Additional test behavior** (optional) — e.g., "also verify workflows persist" or "check that KV works." If provided, extend `src/index.ts` + `test.mjs` using the menu in "Extending with custom tests" below.
18+
2. **Engine mode** (optional, defaults to bundled) — the hello-world example's `registry.start()` only spawns the bundled engine binary when `RIVET_RUN_ENGINE=1` is set. Without it, the runtime boots in serverful mode and immediately fails trying to connect to a non-existent engine at `:6420` (`get local datacenters``Connection refused`).
19+
- **bundled engine** (default): export `RIVET_RUN_ENGINE=1` before `node test.mjs`. Pairs the published `@rivetkit/engine-cli` binary with the published `rivetkit` runtime — what you want for end-to-end version verification.
20+
- **external engine**: only use if the user explicitly says they have their own engine already running on `:6420` (e.g. `self-host/compose/dev`). Do not set the env var.
21+
3. **Additional test behavior** (optional) — e.g., "also verify workflows persist" or "check that KV works." If provided, extend `src/index.ts` + `test.mjs` using the menu in "Extending with custom tests" below.
1922

2023
## Usage
2124
- `/sanity-check <version>` — run in a temp directory on the host
@@ -151,22 +154,25 @@ try {
151154

152155
### 3. Install + run
153156

154-
**Default (host):**
157+
**Default (host, bundled engine):**
155158
```bash
156159
cd "$SANITY_DIR"
157160
npm install
158-
node test.mjs
161+
RIVET_RUN_ENGINE=1 node test.mjs
159162
```
160163

164+
Drop `RIVET_RUN_ENGINE=1` only if the user explicitly said they're running an external engine on `:6420`.
165+
161166
If you need to inspect a failure after the fact, tee the output:
162167
```bash
163-
node test.mjs 2>&1 | tee /tmp/sanity-check.log
168+
RIVET_RUN_ENGINE=1 node test.mjs 2>&1 | tee /tmp/sanity-check.log
164169
echo "exit=$?"
165170
```
166171

167172
**Docker mode:**
168173
```bash
169174
docker run --rm \
175+
-e RIVET_RUN_ENGINE=1 \
170176
-v "$SANITY_DIR":/app \
171177
-w /app \
172178
node:22 \

engine/sdks/rust/envoy-client/src/actor.rs

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -408,39 +408,12 @@ async fn begin_stop(
408408
_http_request_tasks: &mut JoinSet<()>,
409409
reason: protocol::StopActorReason,
410410
) -> StopProgress {
411-
// A Lost stop must surface as Stopped(Error). The runner side detected its
412-
// own WS to pegboard-envoy was unhealthy and gave up on the actor; that is
413-
// not a graceful exit. If we emitted Stopped(Ok) here, pegboard's
414-
// `handle_stopped` would see Stopped(Ok) from `Transition::Running` (no
415-
// prior `ActorIntent` was sent) and take `Decision::Destroy`, wiping the
416-
// actor and its KV after every transient WS flap that exceeds
417-
// `envoy_lost_threshold`.
418-
let (mut stop_code, mut stop_message) = if let Some(err) = ctx.error.clone() {
419-
(protocol::StopCode::Error, Some(err))
420-
} else if matches!(reason, protocol::StopActorReason::Lost) {
421-
(
422-
protocol::StopCode::Error,
423-
Some("envoy connection lost".to_string()),
424-
)
411+
let mut stop_code = if ctx.error.is_some() {
412+
protocol::StopCode::Error
425413
} else {
426-
(protocol::StopCode::Ok, None)
414+
protocol::StopCode::Ok
427415
};
428-
429-
let reason_label = stop_actor_reason_label(&reason);
430-
tracing::info!(
431-
?reason,
432-
?stop_code,
433-
error = ?ctx.error,
434-
"actor stopping"
435-
);
436-
crate::metrics::METRICS
437-
.actor_stop_total
438-
.with_label_values(&[reason_label])
439-
.inc();
440-
crate::metrics::METRICS
441-
.actor_lifetime_seconds
442-
.with_label_values(&[reason_label])
443-
.observe(ctx.started_at.elapsed().as_secs_f64());
416+
let mut stop_message = ctx.error.clone();
444417
let (stop_tx, mut stop_rx) = oneshot::channel();
445418

446419
let stop_result = ctx
-51.2 MB
Loading

frontend/vendor/rivet-cloud.tgz

-184 KB
Binary file not shown.
-4.5 MB
Loading

0 commit comments

Comments
 (0)