Skip to content

test(runner-configs): assert envoy protocol version#4791

Closed
NathanFlurry wants to merge 1 commit into04-24-replay/serverless-metadata-errorsfrom
04-24-replay/runner-config-protocol-version-test
Closed

test(runner-configs): assert envoy protocol version#4791
NathanFlurry wants to merge 1 commit into04-24-replay/serverless-metadata-errorsfrom
04-24-replay/runner-config-protocol-version-test

Conversation

@NathanFlurry
Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member Author

NathanFlurry commented Apr 27, 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

claude Bot commented Apr 27, 2026

Code Review: test(runner-configs): assert envoy protocol version

Overview

This PR adds a single integration test — list_runner_configs_includes_envoy_protocol_version — that verifies the protocol_version field is correctly populated with the envoy protocol version when listing runner configs via the public API.


Positives

  • Focused test: Tests exactly one behavior (protocol version propagation in list response) without scope creep.
  • Correct setup helper: Uses setup_test_namespace_with_envoy which is the right helper for envoy-backed tests, consistent with other envoy tests in the suite.
  • Filtered query: Passes runner_name: vec![envoy.pool_name().to_string()] to scope the response to just the envoy's pool, preventing pollution from other test runners.
  • Proper cleanup: Calls envoy.shutdown().await at the end, consistent with other tests that spin up envoys.
  • Correct constant: Uses common::test_envoy::PROTOCOL_VERSION which is a re-export of rivet_envoy_protocol::PROTOCOL_VERSION — the canonical source of truth, matching how other protocol version assertions are written (e.g. api_runner_configs_refresh_metadata.rs).
  • Style: Trailing commas in assert_eq!, lowercase error strings, and overall formatting match the project conventions.

Suggestions

1. Parity gap in the top-level test directory

CLAUDE.md requires: "Any behavior, protocol handling, or test coverage added to one runner should be mirrored in the other runner in the same change whenever possible." There is already a top-level api_runner_configs_refresh_metadata.rs (non-runner path) that tests protocol version behavior, with a parallel version at tests/runner/api_runner_configs_refresh_metadata.rs. There is no top-level api_runner_configs_list.rs. If the non-runner list path also exposes protocol_version, a symmetric test should be added in the same PR. If that path does not support it yet, the gap should be documented in .agent/todo/.

2. No before-state assertion

The test only asserts that protocol_version equals the expected value after setup. A before-vs-after contrast (like api_runner_configs_refresh_metadata.rs does with its expose_protocol_version toggle) is not needed here since this is not a refresh test. As long as setup_test_namespace_with_envoy waits for the envoy to register its metadata before returning, the assertion is deterministic and this is fine as-is.

3. Unused tuple element

The second element of the destructured tuple from setup_test_namespace_with_envoy is silently dropped (let (namespace, _, envoy) = ...). This is idiomatic and consistent with the existing pattern in the file.


Summary

The test is clean, well-scoped, and follows project conventions correctly. The main open question is whether a corresponding test should be added to the non-runner top-level test path. If that path is out of scope for this PR, document the gap in .agent/todo/ per the CLAUDE.md parity requirement.

@github-actions
Copy link
Copy Markdown
Contributor

Preview packages published to npm

Install with:

npm install rivetkit@pr-4791

All packages published as 0.0.0-pr.4791.e602178 with tag pr-4791.

Engine binary is shipped via @rivetkit/engine-cli on linux-x64-musl, linux-arm64-musl, darwin-x64, and darwin-arm64. Windows users should use the release installer or set RIVET_ENGINE_BINARY.

Docker images:

docker pull rivetdev/engine:slim-e602178
docker pull rivetdev/engine:full-e602178
Individual packages
npm install rivetkit@pr-4791
npm install @rivetkit/react@pr-4791
npm install @rivetkit/rivetkit-napi@pr-4791
npm install @rivetkit/workflow-engine@pr-4791

@NathanFlurry NathanFlurry force-pushed the 04-24-replay/runner-config-admin-client branch from f79d907 to 8ac46a2 Compare April 27, 2026 03:27
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/runner-config-protocol-version-test branch from 55071a7 to 2408188 Compare April 27, 2026 03:27
@NathanFlurry NathanFlurry marked this pull request as ready for review April 27, 2026 03:41
@NathanFlurry NathanFlurry changed the base branch from 04-24-replay/runner-config-admin-client to graphite-base/4791 April 27, 2026 03:58
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/runner-config-protocol-version-test branch from 2408188 to 0b216fc Compare April 27, 2026 03:59
@NathanFlurry NathanFlurry changed the base branch from graphite-base/4791 to 04-24-replay/serverless-metadata-errors April 27, 2026 03:59
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/serverless-metadata-errors branch from 0121259 to 65d08ca Compare April 27, 2026 04:35
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/runner-config-protocol-version-test branch from 0b216fc to d66a0b9 Compare April 27, 2026 04:35
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/runner-config-protocol-version-test branch from d66a0b9 to 5b530d1 Compare April 27, 2026 05:37
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/serverless-metadata-errors branch from 581f2f1 to d60686a Compare April 27, 2026 07:30
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/runner-config-protocol-version-test branch 2 times, most recently from d4ab11d to e975b91 Compare April 27, 2026 07:57
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/serverless-metadata-errors branch 2 times, most recently from a6dc766 to a3da1d9 Compare April 27, 2026 08:31
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/runner-config-protocol-version-test branch from e975b91 to 9648497 Compare April 27, 2026 08:31
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/serverless-metadata-errors branch from a3da1d9 to b69ce64 Compare April 27, 2026 17:35
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/runner-config-protocol-version-test branch 2 times, most recently from 0939a5c to 4514b8b Compare April 27, 2026 19:06
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/serverless-metadata-errors branch from 14c2718 to 383f617 Compare April 27, 2026 19:40
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/runner-config-protocol-version-test branch from 4514b8b to 1527048 Compare April 27, 2026 19:40
@NathanFlurry NathanFlurry force-pushed the 04-24-replay/runner-config-protocol-version-test branch from 1527048 to aec3641 Compare April 27, 2026 20:48
@NathanFlurry
Copy link
Copy Markdown
Member Author

Landed in main via stack-merge fast-forward push. Commits are in main; closing to match.

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