Skip to content

DO NOT MERGE: queue diagnose#5050

Draft
abcxff wants to merge 1 commit into
05-09-fix_workflow-engine_only_commit_step_state_after_successfrom
05-12-do_not_merge_queue_diagnose
Draft

DO NOT MERGE: queue diagnose#5050
abcxff wants to merge 1 commit into
05-09-fix_workflow-engine_only_commit_step_state_after_successfrom
05-12-do_not_merge_queue_diagnose

Conversation

@abcxff
Copy link
Copy Markdown
Contributor

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

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

Service Status Web Updated (UTC)
kitchen-sink ❌ Build Failed (View Logs) Web May 14, 2026 at 6:09 pm
frontend-cloud ❌ Build Failed (View Logs) Web May 13, 2026 at 8:19 pm
frontend-inspector ❌ Build Failed (View Logs) Web May 13, 2026 at 8:11 pm
ladle ❌ Build Failed (View Logs) Web May 12, 2026 at 5:53 pm
mcp-hub ✅ Success (View Logs) Web May 12, 2026 at 5:48 pm
website ❌ Build Failed (View Logs) Web May 12, 2026 at 5:47 pm

Copy link
Copy Markdown
Contributor Author

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

@abcxff abcxff mentioned this pull request May 12, 2026
11 tasks
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 12, 2026

Code Review: DO NOT MERGE — Queue Diagnostics

Note: This is a draft diagnostic PR. Review focuses on issues that would need addressing before any production landing.


Overview

This PR adds temporary diagnostic instrumentation across the queue subsystem — tracing::warn! calls in Rust (queue.rs) and logger().debug / this.log("debug", ...) calls in TypeScript (native.ts, context.ts) — all prefixed with DEBUG_QUEUE to trace message flow through enqueue, next_batch, try_receive_batch, and list_message_entries.


Issues

Critical (before any merge)

  • Wrong log level in Rust. Every diagnostic trace uses tracing::warn! instead of tracing::debug! or tracing::trace!. warn is reserved for actionable operational problems per the repo's logging conventions. Flooding warn-level telemetry with DEBUG_QUEUE messages will trigger alerts in production and make real warnings harder to spot. TypeScript counterparts correctly use debug level — Rust should match.

  • Log messages violate casing convention. CLAUDE.md requires all log messages to be lowercase unless referencing a specific code symbol. Messages like "DEBUG_QUEUE enqueue_message: config" and "DEBUG_QUEUE try_receive_batch: listed messages" contain uppercase tokens that are not code symbols. If this ever graduates to permanent traces, they'll need to be lowercased.

Minor / Nitpick

  • has_preload variable (around line 590 in queue.rs) is a correct and necessary fix — preload.is_some() must be captured before the value is moved into preload.as_ref(). This is a valid standalone improvement independent of the diagnostics.

  • list_message_entries refactor — extracting entries into a local variable and returning it explicitly is slightly cleaner than the original chained .context() return. Worth keeping if this function is ever touched again.

  • Structured fields are correct. All new Rust traces use named fields (metadata_size, will_reject, kv_message_count, etc.) rather than embedding values in the message string. That matches the project's tracing style.


Summary

The diagnostic intent is clear and the instrumentation covers the right call sites. Two changes are required before landing any part of this:

  1. Replace all tracing::warn! with tracing::debug! (or tracing::trace! for the hot-path list_message_entries sites).
  2. Lowercase all log messages.

The has_preload capture and the list_message_entries refactor are clean and could be extracted into a separate, mergeable commit.

@abcxff abcxff force-pushed the 05-09-fix_workflow-engine_only_commit_step_state_after_success branch from 2c029c2 to 9b64fa5 Compare May 12, 2026 18:03
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from 90567e2 to 8545743 Compare May 12, 2026 18:03
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from 8545743 to f7733df Compare May 12, 2026 18:44
@abcxff abcxff force-pushed the 05-09-fix_workflow-engine_only_commit_step_state_after_success branch from 9b64fa5 to 0eb8f51 Compare May 12, 2026 18:44
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from f7733df to 1474a34 Compare May 12, 2026 20:01
@abcxff abcxff changed the base branch from 05-09-fix_workflow-engine_only_commit_step_state_after_success to graphite-base/5050 May 13, 2026 02:56
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from 1474a34 to 0a70a7c Compare May 13, 2026 02:56
@abcxff abcxff changed the base branch from graphite-base/5050 to 05-13-fix_rivetkit_keep_actor_alive_while_workflow_waits_for_queue_messages May 13, 2026 02:56
@abcxff abcxff changed the base branch from 05-13-fix_rivetkit_keep_actor_alive_while_workflow_waits_for_queue_messages to graphite-base/5050 May 13, 2026 17:12
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from 0a70a7c to c83ddd3 Compare May 13, 2026 17:12
@abcxff abcxff force-pushed the graphite-base/5050 branch from dcedee1 to fbaeef3 Compare May 13, 2026 17:12
@abcxff abcxff changed the base branch from graphite-base/5050 to 05-13-fix_rivetkit_decode_bridge_errors_with_actor_null May 13, 2026 17:12
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from 0219bd2 to b67bb8e Compare May 13, 2026 18:31
@abcxff abcxff force-pushed the 05-09-fix_workflow-engine_only_commit_step_state_after_success branch from 31975cf to 26b0baa Compare May 13, 2026 18:31
@abcxff abcxff force-pushed the 05-09-fix_workflow-engine_only_commit_step_state_after_success branch from 26b0baa to 1344263 Compare May 13, 2026 18:49
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from b67bb8e to 4fe1e9c Compare May 13, 2026 18:50
@abcxff abcxff changed the base branch from 05-09-fix_workflow-engine_only_commit_step_state_after_success to graphite-base/5050 May 13, 2026 19:11
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from 4fe1e9c to ac8e61e Compare May 13, 2026 19:11
@abcxff abcxff force-pushed the graphite-base/5050 branch from 1344263 to 24e1828 Compare May 13, 2026 19:11
@abcxff abcxff changed the base branch from graphite-base/5050 to 05-12-temp_fix_wasm-pack May 13, 2026 19:12
@abcxff abcxff changed the base branch from 05-12-temp_fix_wasm-pack to graphite-base/5050 May 13, 2026 20:07
@abcxff abcxff force-pushed the graphite-base/5050 branch from 24e1828 to 42fadeb Compare May 13, 2026 20:07
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from ac8e61e to 23dc483 Compare May 13, 2026 20:07
@abcxff abcxff changed the base branch from graphite-base/5050 to 05-09-fix_workflow-engine_only_commit_step_state_after_success May 13, 2026 20:08
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from 23dc483 to 27da53c Compare May 13, 2026 20:09
@abcxff abcxff force-pushed the 05-09-fix_workflow-engine_only_commit_step_state_after_success branch from 42fadeb to 2258fbe Compare May 13, 2026 20:09
@abcxff abcxff force-pushed the 05-09-fix_workflow-engine_only_commit_step_state_after_success branch from 2258fbe to aa538e5 Compare May 13, 2026 20:16
@abcxff abcxff force-pushed the 05-12-do_not_merge_queue_diagnose branch from 27da53c to 7e10972 Compare May 13, 2026 20:16
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 14, 2026

The existing review (comment 4433242763 from 2026-05-12) remains accurate after re-review on 2026-05-14. No code changes were made to the PR since the initial review. Key finding: all 7 Rust diagnostic log statements use tracing::warn! instead of tracing::debug! or tracing::trace!, which is the primary issue to fix before this branch influences any production-targeting code.

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