Skip to content

chore: improve debugging for runners#4219

Open
MasterPtato wants to merge 1 commit into02-12-fix_add_max_prunes_to_prunerfrom
02-13-chore_improve_debugging_for_runners
Open

chore: improve debugging for runners#4219
MasterPtato wants to merge 1 commit into02-12-fix_add_max_prunes_to_prunerfrom
02-13-chore_improve_debugging_for_runners

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
Copy link

railway-app bot commented Feb 18, 2026

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

Service Status Web Updated (UTC)
website ✅ Success (View Logs) Web Feb 19, 2026 at 8:47 am
ladle ❌ Build Failed (View Logs) Web Feb 18, 2026 at 2:30 am
frontend-cloud ❌ Build Failed (View Logs) Web Feb 18, 2026 at 2:25 am
mcp-hub ✅ Success (View Logs) Web Feb 18, 2026 at 2:24 am
frontend-inspector ❌ Build Failed (View Logs) Web Feb 18, 2026 at 2:24 am

Copy link
Contributor Author

MasterPtato commented Feb 18, 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.

@claude
Copy link

claude bot commented Feb 18, 2026

PR Review: chore: improve debugging for runners

Overall, this is a clean and focused PR that improves observability for the pegboard runner components. The changes are small, targeted, and follow the project's tracing conventions. A few notes below.


Correctness

tunnel_to_ws_task.rs (gateway): .as_ref() fix

// Before
tracing::warn!(reason=?drop_rx.borrow(), "garbage collected");
// After
tracing::warn!(reason=?drop_rx.borrow().as_ref(), "garbage collected");

This is a genuine correctness fix, not just a style change. Ref<T> implements Debug by delegating to the inner T, but calling .as_ref() here avoids a potential issue with the borrow's Debug output including wrapper noise. More importantly, it avoids holding the Ref guard any longer than necessary since .as_ref() dereferences before the ? format argument is evaluated. Good catch.


Tracing Improvements

Explicit span names added

Adding name="..." to all the #[tracing::instrument] macros is a good improvement — without it, the span name defaults to the function name (task), which would be ambiguous in traces given that multiple functions share the same name across modules.

ray_id and req_id fields added

Consistently adding ray_id=?ctx.ray_id() and req_id=?ctx.req_id() makes it much easier to correlate spans across a distributed trace. This follows the existing pattern seen elsewhere in the codebase.


Minor Observations

Indentation in actor_event_demuxer.rs

The added #[tracing::instrument(...)] attribute at line 110 uses spaces, but the surrounding file appears to use tabs (per the project's rustfmt.toml requirement of hard tabs for Rust). This may just be a display artifact in the diff viewer, but worth double-checking that the file uses consistent tab indentation.

Indentation in ping_task.rs body

Looking at the full file (e.g., lines 23-48), the function body appears to use 4-space indentation rather than hard tabs. This is pre-existing and not introduced by this PR, but it's worth noting if a formatting pass is planned.

util/wf/mod.rs indentation tweak

// Before: 3 spaces after the tree branch character
format!("{}{c}   ", "  ".repeat(indent))
// After: 5 spaces
format!("{}{c}     ", "  ".repeat(indent))

This aligns the body indentation with the tree connector prefix for improved readability in the print_history output. The change is fine, but a brief comment explaining why the specific number of spaces was chosen would help future readers (e.g., // 5 spaces aligns body text after the '├──' connector).


Summary

No blocking issues. The correctness fix and observability improvements are solid. The PR is straightforward and ready for merge once the reviewer is satisfied.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 18, 2026

More templates

@rivetkit/cloudflare-workers

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

@rivetkit/framework-base

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

@rivetkit/next-js

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

@rivetkit/react

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

rivetkit

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

@rivetkit/sql-loader

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

@rivetkit/sqlite-vfs

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

@rivetkit/traces

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

@rivetkit/workflow-engine

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

@rivetkit/virtual-websocket

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

@rivetkit/engine-runner

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

@rivetkit/engine-runner-protocol

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

commit: 5a68f06

@graphite-app graphite-app bot force-pushed the 02-12-fix_add_max_prunes_to_pruner branch from 6804587 to 9561940 Compare February 18, 2026 02:29
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

Comments