Skip to content

Comments

fix(serverless): include entire error chain in msg#4235

Closed
MasterPtato wants to merge 1 commit into02-17-fix_gas_gracefully_handle_corrupt_wffrom
02-19-fix_serverless_include_entire_error_chain_in_msg
Closed

fix(serverless): include entire error chain in msg#4235
MasterPtato wants to merge 1 commit into02-17-fix_gas_gracefully_handle_corrupt_wffrom
02-19-fix_serverless_include_entire_error_chain_in_msg

Conversation

@MasterPtato
Copy link
Contributor

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

@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4235 February 19, 2026 21:14 Destroyed
@railway-app
Copy link

railway-app bot commented Feb 19, 2026

🚅 Deployed to the rivet-pr-4235 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-inspector 🕒 Building (View Logs) Web Feb 19, 2026 at 10:54 pm
frontend-cloud 🕒 Building (View Logs) Web Feb 19, 2026 at 10:54 pm
ladle ❌ Build Failed (View Logs) Web Feb 19, 2026 at 10:54 pm
website 😴 Sleeping (View Logs) Web Feb 19, 2026 at 9:26 pm
mcp-hub ✅ Success (View Logs) Web Feb 19, 2026 at 9:17 pm

Copy link
Contributor Author

MasterPtato commented Feb 19, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 19, 2026

More templates

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4235

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4235

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4235

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4235

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4235

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4235

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4235

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4235

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4235

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4235

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4235

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4235

commit: c194110

@claude
Copy link

claude bot commented Feb 19, 2026

PR Review: fix(serverless): include entire error chain in msg

Summary

This PR makes two meaningful changes: (1) consolidates SSE error handling in conn.rs to capture the full error chain instead of only one or zero levels deep, and (2) a comment clarification and formatting cleanup in config.ts. Overall the changes are correct and an improvement.


engine/packages/pegboard/src/workflows/serverless/conn.rs

Error handling consolidation — good fix

The old code had an asymmetry: sse::Error::Transport errors got one level of source context via err.source(), while all other errors (caught by the catch-all arm) only got the top-level error string. The new approach unifies both arms and uses anyhow::Error::chain() to walk the entire error cause chain for every variant that falls into the generic handler. This is strictly better.

DRAIN_GRACE_PERIOD 5s → 10s

No explanation is provided for this change. Why does the drain grace period need to double? If there's an observed timeout race that prompted this, a comment (or a note in the PR description) would help future maintainers understand the intent. For example:

// 10s chosen to give runners enough time to shut down before the serverless
// platform's hard request deadline
const DRAIN_GRACE_PERIOD: Duration = Duration::from_secs(10);

Minor: redundant inline comment

// Print entire error chain
message: wrapped_err
    .chain()
    ...

The code already says what it does — the comment doesn't add information. Can be removed.

Removed use std::error::Error

Correct removal since the old .source() call that required it is gone.


rivetkit-typescript/packages/rivetkit/src/actor/config.ts

Comment improvement — good

Replacing // This must be less than ACTOR_STOP_THRESHOLD_MS with a reference to engine config > pegboard.actor_stop_threshold is a useful clarification. Also adding the same comment to onDestroyTimeout provides helpful consistency.

Formatting changes

The bulk of this file's diff is a whitespace change inside union type member bodies — removing one level of indentation from properties nested inside | { ... } blocks. The result does look cleaner, but a large formatting-only diff mixed with a functional fix makes the PR harder to review and the git history harder to bisect. These kinds of formatting changes are best committed separately or driven through a shared formatter config (Prettier/ESLint) so they're reproducible and not hand-applied.


Summary of feedback

Error chain fix ✅ Correct and improves debuggability
Grace period bump ⚠️ Needs explanation (comment or PR description)
Comment cleanup ✅ Good
TS formatting noise ⚠️ Consider splitting or automating via formatter

@MasterPtato MasterPtato force-pushed the 02-19-fix_serverless_include_entire_error_chain_in_msg branch from c4c27d9 to c194110 Compare February 19, 2026 22:41
@MasterPtato MasterPtato force-pushed the 02-19-fix_epoxy_make_quorum_sizes_match_paper branch from e7553c7 to 710de07 Compare February 19, 2026 22:41
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4235 February 19, 2026 22:41 Destroyed
@MasterPtato MasterPtato changed the base branch from 02-19-fix_epoxy_make_quorum_sizes_match_paper to graphite-base/4235 February 19, 2026 22:48
@MasterPtato MasterPtato force-pushed the 02-19-fix_serverless_include_entire_error_chain_in_msg branch from c194110 to 004722a Compare February 19, 2026 22:48
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4235 February 19, 2026 22:48 Destroyed
@MasterPtato MasterPtato force-pushed the 02-19-fix_serverless_include_entire_error_chain_in_msg branch from 004722a to b7880e6 Compare February 19, 2026 22:51
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4235 February 19, 2026 22:51 Destroyed
@MasterPtato MasterPtato changed the base branch from graphite-base/4235 to 02-17-fix_gas_gracefully_handle_corrupt_wf February 19, 2026 22:51
@MasterPtato MasterPtato force-pushed the 02-19-fix_serverless_include_entire_error_chain_in_msg branch from b7880e6 to b039198 Compare February 19, 2026 22:53
@MasterPtato MasterPtato force-pushed the 02-17-fix_gas_gracefully_handle_corrupt_wf branch from 0e4f8dc to 233582b Compare February 19, 2026 22:53
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4235 February 19, 2026 22:53 Destroyed
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 19, 2026

Merge activity

  • Feb 19, 10:54 PM UTC: MasterPtato added this pull request to the Graphite merge queue.
  • Feb 19, 10:54 PM UTC: CI is running for this pull request on a draft pull request (#4241) due to your merge queue CI optimization settings.
  • Feb 19, 10:55 PM UTC: Merged by the Graphite merge queue via draft PR: #4241.

graphite-app bot pushed a commit that referenced this pull request Feb 19, 2026
# 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
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