Skip to content

Fix test failure with gojq 0.12.19 - use int instead of int32#266

Merged
ricardozanini merged 1 commit into
serverlessworkflow:mainfrom
ricardozanini:fix-gojq-int32-test-failure
Jun 26, 2026
Merged

Fix test failure with gojq 0.12.19 - use int instead of int32#266
ricardozanini merged 1 commit into
serverlessworkflow:mainfrom
ricardozanini:fix-gojq-int32-test-failure

Conversation

@ricardozanini

Copy link
Copy Markdown
Member

Summary

Root Cause

gojq v0.12.18 introduced a breaking change that stopped numeric normalization for concurrent execution. This means int32 values are no longer automatically normalized to int, causing evaluation errors.

gojq only supports these types:

  • nil, bool, int, float64, *big.Int, string, []any, map[string]any

When the test passes []int32{2, 3, 4}, gojq v0.12.19 throws:

jq evaluation error: %!v(PANIC=Error method: invalid type: int32 (2))

Changes

Changed line 405 in impl/runner_test.go:

- "numbers": []int32{2, 3, 4},
+ "numbers": []int{2, 3, 4},

Test Plan

All tests pass after this change:

✓ github.com/serverlessworkflow/sdk-go/v3/impl	2.635s	coverage: 80.1% of statements

References

🤖 Generated with Claude Code

gojq v0.12.18 introduced a breaking change that stopped numeric
normalization for concurrent execution. This means int32 values are
no longer automatically normalized to int, causing evaluation errors.

Changed []int32 to []int in the SUM_Numbers test to use gojq's
supported numeric type.

Related: gojq changelog v0.12.18 "stop numeric normalization"

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@ricardozanini ricardozanini merged commit e5c5e89 into serverlessworkflow:main Jun 26, 2026
3 checks passed
@ricardozanini ricardozanini deleted the fix-gojq-int32-test-failure branch June 26, 2026 19:31
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