Skip to content

fix(pegboard): unpack global runner config keys correctly#4623

Merged
MasterPtato merged 1 commit intomainfrom
04-12-fix_pegboard_unpack_global_runner_config_keys_correctly
Apr 13, 2026
Merged

fix(pegboard): unpack global runner config keys correctly#4623
MasterPtato merged 1 commit intomainfrom
04-12-fix_pegboard_unpack_global_runner_config_keys_correctly

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

@claude
Copy link
Copy Markdown

claude bot commented Apr 13, 2026

PR Review: fix(pegboard): unpack global runner config keys correctly

Summary: Minimal, targeted bug fix correcting a mismatch between TuplePack and TupleUnpack for GlobalDataKey.

Root Cause

In GlobalDataKey::TuplePack, the key is packed with 7 tuple elements: RUNNER, CONFIG, GLOBAL, DATA, dc_label, namespace_id, name. The old TupleUnpack only consumed 6 elements, skipping DATA. This would silently corrupt key parsing: DATA (value 4, stored as usize) would be misread as dc_label (a u16), and all downstream fields would shift incorrectly.

Fix

Adds the missing usize for DATA to align unpack with pack. Correct and minimal.

Verification Against Peer Keys

Cross-checked all other key types in the file against their pack/unpack tuple arity:

  • DataKey: pack 5 elements, unpack 5 elements (correct)
  • ByVariantKey: pack 6 elements, unpack 6 elements (correct)
  • ProtocolVersionKey: pack 6 elements, unpack 6 elements (correct)
  • GlobalDataKey after fix: pack 7 elements, unpack 7 elements (correct)

Notes

  • No test coverage added (checklist item unchecked). A round-trip test packing and unpacking a GlobalDataKey and asserting field equality would guard against future regressions of this class of bug.
  • The mismatch would only surface at runtime when a GlobalDataKey is read back from the database, making it a latent data corruption issue rather than an immediately visible compile-time failure.

Overall: LGTM. The fix is clearly correct.

@NathanFlurry NathanFlurry force-pushed the 04-12-fix_pegboard_unpack_global_runner_config_keys_correctly branch from 41a7073 to 1c4bc6c Compare April 13, 2026 02:28
@NathanFlurry NathanFlurry force-pushed the 04-12-fix_pegboard-gateway_enforce_tunnel_message_state branch from 3dac32a to 8a24a45 Compare April 13, 2026 02:28
@NathanFlurry NathanFlurry marked this pull request as ready for review April 13, 2026 05:06
@NathanFlurry NathanFlurry force-pushed the 04-12-fix_pegboard_unpack_global_runner_config_keys_correctly branch from 1c4bc6c to a481581 Compare April 13, 2026 05:38
@NathanFlurry NathanFlurry force-pushed the 04-12-fix_pegboard-gateway_enforce_tunnel_message_state branch from 8a24a45 to 3ea8872 Compare April 13, 2026 05:38
@NathanFlurry NathanFlurry force-pushed the 04-12-fix_pegboard_unpack_global_runner_config_keys_correctly branch from a481581 to f7b03f5 Compare April 13, 2026 05:50
@NathanFlurry NathanFlurry force-pushed the 04-12-fix_pegboard-gateway_enforce_tunnel_message_state branch from 3ea8872 to d1b99aa Compare April 13, 2026 05:50
@NathanFlurry NathanFlurry force-pushed the 04-12-fix_pegboard_unpack_global_runner_config_keys_correctly branch from f7b03f5 to 839c3e4 Compare April 13, 2026 07:03
@github-actions
Copy link
Copy Markdown
Contributor

Preview packages published to npm

Install with:

npm install rivetkit@pr-4623

All packages published as 0.0.0-pr.4623.3b66064 with tag pr-4623.

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-3b66064
docker pull rivetdev/engine:full-3b66064
Individual packages
npm install rivetkit@pr-4623
npm install @rivetkit/react@pr-4623
npm install @rivetkit/rivetkit-native@pr-4623
npm install @rivetkit/sqlite-wasm@pr-4623
npm install @rivetkit/workflow-engine@pr-4623

Copy link
Copy Markdown
Contributor

MasterPtato commented Apr 13, 2026

Merge activity

  • Apr 13, 8:40 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 13, 8:52 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 13, 8:53 PM UTC: @MasterPtato merged this pull request with Graphite.

@MasterPtato MasterPtato changed the base branch from 04-12-fix_pegboard-gateway_enforce_tunnel_message_state to graphite-base/4623 April 13, 2026 20:48
@MasterPtato MasterPtato changed the base branch from graphite-base/4623 to main April 13, 2026 20:50
@MasterPtato MasterPtato force-pushed the 04-12-fix_pegboard_unpack_global_runner_config_keys_correctly branch from 3efe10c to 9b6bb7f Compare April 13, 2026 20:51
@MasterPtato MasterPtato merged commit d27cbe1 into main Apr 13, 2026
17 of 21 checks passed
@MasterPtato MasterPtato deleted the 04-12-fix_pegboard_unpack_global_runner_config_keys_correctly branch April 13, 2026 20:53
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