fix(rivetkit): fix BigInt serialization in inspector workflow history and state deserialization#5058
Conversation
…y and state deserialization
|
🚅 Deployed to the rivet-pr-5058 environment in rivet-frontend
|
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR Review: fix(rivetkit): BigInt serialization in inspector workflow history and state deserializationSummary: This PR addresses two related BigInt/JSON serialization issues in the inspector path, plus adds Code Quality
The change from
Correct direction — the inspector HTTP endpoint needs JSON-safe output and workflow history can contain BigInts or Uint8Arrays from CBOR-encoded data. The // jsonSafe does a full JSON.stringify/JSON.parse round-trip.
// For large workflow histories this is O(n) in history size on every
// inspector poll. The TODO comment acknowledges this — just flag it
// in case history grows large before the CBOR migration lands.This is acceptable for the inspector path (which is diagnostic/debugging traffic, not hot-path), but worth tracking. Potential Issues
Either the Type transparency after
Minor
VerdictThe core logic changes are correct and fix a real bug. The main concern is the orphaned 🤖 Generated with Claude Code |

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: