Repository navigation
Backport #5328: [cli] Fix BigInt crashes in inspect and stream output - #5338
Merged
Merged
Conversation
Inspecting hydrated payloads or stream chunks containing `BigInt` throws
`Do not know how to serialize a BigInt`. For example, a run returning `{
count: 9007199254740993n }` makes both `workflow inspect run <id>
--json` and `workflow inspect runs --withData` exit 1.
Use a shared JSON formatter that represents BigInt values as decimal
strings, preserving full precision in nested payloads and
newline-delimited stream output. Scalar BigInt values also display in IO
table cells. Includes regression tests and a CLI patch changeset.
- Reproduced both failures with the built CLI and a local run seeded
through the World API using the SDK serializer.
- Verified the rebuilt CLI exits 0 for the same run inspection and table
listing, plus stream inspection in JSON and human-readable modes.
Checked that `9007199254740993n` becomes `"9007199254740993"` and
subsequent stream chunks are still printed.
- `pnpm --filter @workflow/cli test` — 281 tests passed, including 11
new regression cases covering run/step/event/hook hydration, table
cells, and stream output.
- CLI build and typecheck passed; Biome checks passed with existing
warnings; `node scripts/check-changesets.mjs` and `git diff --check`
passed.
- [x] 📦 `pnpm changeset` was run to create a changelog for this PR
(patch).
- [x] 🔒 DCO sign-off passes (`git commit --signoff`).
- [ ] 📝 Ping the Workflow team once the PR is ready and the checklist is
complete.
---------
Signed-off-by: Peter Wielander <[email protected]>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Peter Wielander <[email protected]>
Signed-off-by: Karthik Kalyan <[email protected]>
2 of 3 tasks
🦋 Changeset detectedLatest commit: b7decee The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
VaguelySerious
approved these changes
Nov 9, 2026
VaguelySerious
added a commit
that referenced
this pull request
Nov 10, 2026
The #5328 backport (#5338) added a test that imports showEvent and an exported formatTableValue, which only exist on main. Export formatTableValue and drop the single-event case, since stable has no showEvent. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-Authored-By: Peter Wielander <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated backport of #5328 to
stable(backport job run).AI recommendation: This is a crash fix:
workflow inspectand stream output throwDo not know how to serialize a BigInton payloads containing BigInt values. The sameJSON.stringifycall sites exist unchanged inpackages/cli/src/lib/inspect/{output,stream}.tsonstable, so the bug affects the maintenance line. The fix is small, adds regression tests, and carries a patch changeset.Merge conflicts were resolved by AI (opencode with
anthropic/claude-opus-5.5). Please review the conflict resolution carefully before merging.