Skip to content

DO NOT MERGE: rivetkit test#4991

Closed
abcxff wants to merge 1 commit into05-06-_slop_fix_rivetkit_remove_async_drizzle_db_proxyfrom
05-07-donotmerge_rivetkit_test
Closed

DO NOT MERGE: rivetkit test#4991
abcxff wants to merge 1 commit into05-06-_slop_fix_rivetkit_remove_async_drizzle_db_proxyfrom
05-07-donotmerge_rivetkit_test

Conversation

@abcxff
Copy link
Copy Markdown
Contributor

@abcxff abcxff commented May 7, 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

@railway-app
Copy link
Copy Markdown

railway-app Bot commented May 7, 2026

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

Service Status Web Updated (UTC)
frontend-inspector ❌ Build Failed (View Logs) Web May 7, 2026 at 5:12 pm
frontend-cloud ❌ Build Failed (View Logs) Web May 7, 2026 at 5:10 pm
kitchen-sink ❌ Build Failed (View Logs) Web May 7, 2026 at 5:09 pm
website 😴 Sleeping (View Logs) Web May 7, 2026 at 7:34 am
ladle ❌ Build Failed (View Logs) Web May 7, 2026 at 1:29 am
mcp-hub ✅ Success (View Logs) Web May 7, 2026 at 1:27 am

@railway-app railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-4991 May 7, 2026 01:27 Destroyed
Copy link
Copy Markdown
Contributor Author

abcxff commented May 7, 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

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

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 7, 2026

PR Review: DO NOT MERGE — rivetkit test (diagnostic tracing)

Note: This is a DRAFT diagnostic PR explicitly marked "DO NOT MERGE". The review below focuses on what would need to change before these debugging aids could ship in any form.


Overview

This PR adds extensive tracing instrumentation across the gateway/envoy/core request path to diagnose a bug in how in-flight requests are handled. It also includes a handful of standalone improvements:

  • Manual Debug impls for ToActor, ToEnvoyMessage, and DispatchCommand
  • Debug derive added to SqliteRequest
  • keep_awake promise rejection downgraded from warn! to debug!
  • Better public vs. internal error differentiation in lib.rs

Issues that must be fixed before merging

1. Debug traces logged at warn! level (critical)

All "DEBUG-TRACE:" messages in pegboard-gateway2/src/lib.rs and shared_state.rs use tracing::warn!. This poisons the WARN level with noise that has nothing to do with actionable warnings. These must be tracing::trace! or tracing::debug! — or removed entirely once the bug is identified.

// Bad — all of these should be trace!/debug!, not warn!
tracing::warn!(..., "DEBUG-TRACE: handle_request_inner entered");
tracing::warn!(..., "DEBUG-TRACE: subscribed to actor2::Stopped");
// ... (dozens more)

2. Existing debug! calls upgraded to warn! for no reason

Several legitimate tracing::debug! calls in shared_state.rs were changed to tracing::warn!, for example GC removal and message dispatch logs. These should be reverted to debug!.

3. other => catch-all arm still violates the enum exhaustiveness rule

The change from _ => to other => in the ToRivetTunnelMessageKind match in lib.rs is still a catch-all — it just names the value. Per CLAUDE.md:

Never use a _ => fall-through arm when matching on a Rust enum. Enumerate every variant explicitly.

All variants of protocol::ToRivetTunnelMessageKind should be listed explicitly so adding a new variant is a compile error instead of a silent behavior change.


Standalone improvements (worth keeping)

Debug impls for internal types (actor.rs, envoy.rs, task.rs): Well-written; appropriately uses finish_non_exhaustive() to omit large/sensitive fields. These can ship independently.

SqliteRequest Debug derive (sqlite.rs): Straightforward and useful.

trace! logs in actor_inner and envoy_loop: Using the correct trace! level for high-frequency per-message logs. These are appropriate as-is.

keep_awake promise rejection: warn!debug! (actor_context.rs): Correct downgrade — a rejected keep_awake promise is not an actionable system warning.

Public vs. internal error split (lib.rs): Good intent. Public/user-facing errors at debug! avoids filling error logs with expected client errors. Two nits:

  • The public-error branch drops error_chain, which was present in the original. Consider keeping it at debug! level even for public errors — it helps trace why a public error was generated.
  • has_metadata = error.metadata().is_some() was silently removed from both branches. Mildly useful for log filtering; worth restoring in the internal branch.

PendingHibernation | Hibernating arm split (shared_state.rs): Splitting the combined match arm into two separate arms is logically equivalent and makes per-state tracing possible. No behavioral change.


Summary

Area Verdict
"DEBUG-TRACE:" at warn! level Must fix — revert to trace!/debug! or remove after diagnosis
Existing debug! bumped to warn! Must fix — revert
other => catch-all arm Should fix — enumerate all enum variants explicitly
Debug impls for internal types Keep — good standalone addition
trace! per-message logs in envoy/actor loops Keep
keep_awake warn → debug Keep
Public/internal error split Keep (minor nit on error_chain and has_metadata removal)

@abcxff abcxff changed the title donotmerge: rivetkit test DO NOT MERGE: rivetkit test May 7, 2026
@abcxff abcxff force-pushed the 05-07-donotmerge_rivetkit_test branch from ebd53c4 to e844d5e Compare May 7, 2026 17:07
@abcxff abcxff force-pushed the 05-06-_slop_fix_rivetkit_surface_raw_error_messages_instead_of_generic branch from 5b11eab to 593a7ba Compare May 7, 2026 17:07
@railway-app railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-4991 May 7, 2026 17:07 Destroyed
@abcxff abcxff changed the base branch from 05-06-_slop_fix_rivetkit_surface_raw_error_messages_instead_of_generic to graphite-base/4991 May 7, 2026 17:09
@abcxff abcxff force-pushed the graphite-base/4991 branch from 593a7ba to c58ef25 Compare May 7, 2026 17:09
@abcxff abcxff force-pushed the 05-07-donotmerge_rivetkit_test branch from e844d5e to 360b613 Compare May 7, 2026 17:09
@railway-app railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-4991 May 7, 2026 17:09 Destroyed
@abcxff abcxff changed the base branch from graphite-base/4991 to 05-06-_slop_fix_rivetkit_remove_async_drizzle_db_proxy May 7, 2026 17:09
@abcxff abcxff closed this May 7, 2026
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