Skip to content

fix: add wf registry command#4714

Merged
NathanFlurry merged 1 commit intomainfrom
04-23-fix_add_wf_registry_command
Apr 27, 2026
Merged

fix: add wf registry command#4714
NathanFlurry merged 1 commit intomainfrom
04-23-fix_add_wf_registry_command

Conversation

@MasterPtato
Copy link
Copy Markdown
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
Copy Markdown

railway-app Bot commented Apr 23, 2026

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

Service Status Web Updated (UTC)
kitchen-sink ❌ Build Failed (View Logs) Web Apr 27, 2026 at 6:04 pm
frontend-cloud 😴 Sleeping (View Logs) Web Apr 27, 2026 at 5:36 pm
website 😴 Sleeping (View Logs) Web Apr 27, 2026 at 2:51 pm
frontend-inspector ❌ Build Failed (View Logs) Web Apr 23, 2026 at 11:51 pm
mcp-hub ✅ Success (View Logs) Web Apr 23, 2026 at 11:51 pm
ladle ❌ Build Failed (View Logs) Web Apr 23, 2026 at 11:50 pm

@railway-app railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-4714 April 23, 2026 23:49 Destroyed
@claude
Copy link
Copy Markdown

claude Bot commented Apr 23, 2026

PR #4714 Review

Summary of changes:

  • Adds a Registry subcommand to the wf CLI that lists all registered workflow names in sorted order
  • Extracts a registry() function from workflow-worker start() so it can be called without starting the worker
  • Fixes envoy_key tracing format from Debug to Display in two places
  • Records namespace_id and envoy_key on the active span in pegboard-envoy after connection init
  • Removes an unused std::time::Duration import from pegboard-runner

Bug: span.record() calls are no-ops (pegboard-envoy/src/lib.rs)

The new span.record(...) calls in handle_websocket will be silently ignored at runtime. In tracing 0.1.x, Span::record() only has effect if the field was pre-declared in the #[tracing::instrument] macro's fields(...) argument. The handle_websocket function uses #[tracing::instrument(skip_all)] with no fields(...) clause, so neither namespace_id nor envoy_key are declared on the span and the record calls are no-ops.

The correct pattern is to declare the fields upfront:

#[tracing::instrument(skip_all, fields(namespace_id, envoy_key))]
async fn handle_websocket(...) {
    span.record("namespace_id", conn.namespace_id.to_string());
    span.record("envoy_key", &conn.envoy_key);
}

Minor Issues

Registry variant missing doc comment

All other SubCommand variants use /// doc comments that clap renders as help text. The Registry variant uses a regular // comment, so engine wf registry --help will show no description. Change to: /// Prints the current workflow registry.

Registry command initializes DB/pools unnecessarily

execute() always creates Pools and DatabaseKv before the match self dispatch, so running engine wf registry incurs a full DB pool initialization even though Registry never uses db. Consider restructuring execute() to only initialize db for variants that need it.

Registry variant style

Minor style inconsistency: all other zero-field variants in this file use the bare form (e.g. Registry rather than Registry {}).


Positive Observations

  • The registry() extraction from workflow-worker::start() is clean. The merge chain is preserved exactly, and .map_err(Into::into) correctly bridges WorkflowError into anyhow::Error.
  • Sorting workflow names before printing is a good UX touch.
  • The ? to % formatting fix for envoy_key is correct. envoy_key is a String so Display avoids redundant quote characters in log output.
  • The Duration import removal from pegboard-runner/src/lib.rs is correct.

@MasterPtato MasterPtato force-pushed the 04-23-fix_add_wf_registry_command branch from dfd9202 to b4e1f50 Compare April 24, 2026 18:20
@MasterPtato MasterPtato force-pushed the 04-23-chore_move_code branch from db1b306 to a696272 Compare April 24, 2026 18:20
@railway-app railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-4714 April 24, 2026 18:20 Destroyed
@MasterPtato MasterPtato force-pushed the 04-23-chore_move_code branch from a696272 to 741b7d4 Compare April 24, 2026 23:02
@MasterPtato MasterPtato force-pushed the 04-23-fix_add_wf_registry_command branch from b4e1f50 to 39b3555 Compare April 24, 2026 23:02
@railway-app railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-4714 April 24, 2026 23:02 Destroyed
@MasterPtato MasterPtato force-pushed the 04-23-chore_move_code branch from 741b7d4 to ff10f7c Compare April 25, 2026 01:07
@MasterPtato MasterPtato force-pushed the 04-23-fix_add_wf_registry_command branch from 39b3555 to 2daf067 Compare April 25, 2026 01:07
@railway-app railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-4714 April 25, 2026 01:07 Destroyed
@MasterPtato MasterPtato force-pushed the 04-23-fix_add_wf_registry_command branch from 2daf067 to f8853a2 Compare April 25, 2026 01:14
@railway-app railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-4714 April 25, 2026 01:14 Destroyed
@MasterPtato MasterPtato force-pushed the 04-23-fix_add_wf_registry_command branch from f8853a2 to 892fc6b Compare April 27, 2026 18:04
@MasterPtato MasterPtato force-pushed the 04-23-chore_move_code branch from ff10f7c to 813532d Compare April 27, 2026 18:04
@railway-app railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-4714 April 27, 2026 18:04 Destroyed
Base automatically changed from 04-23-chore_move_code to main April 27, 2026 20:38
@NathanFlurry NathanFlurry merged commit 892fc6b into main Apr 27, 2026
16 of 49 checks passed
@NathanFlurry NathanFlurry deleted the 04-23-fix_add_wf_registry_command branch April 27, 2026 20:38
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.

2 participants