feat(integration): Go-native runner for YAML integration tests (POC)#3537
feat(integration): Go-native runner for YAML integration tests (POC)#3537amir-deris wants to merge 14 commits into
Conversation
PR SummaryMedium Risk Overview The “Mint & Staking & Bank Module” CI matrix job now runs
Reviewed by Cursor Bugbot for commit 7994319. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3537 +/- ##
==========================================
- Coverage 59.17% 58.13% -1.05%
==========================================
Files 2226 2140 -86
Lines 183561 173771 -9790
==========================================
- Hits 108615 101014 -7601
+ Misses 65165 63756 -1409
+ Partials 9781 9001 -780
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
- Run go mod tidy to move gopkg.in/yaml.v3 from indirect to direct deps - Fix shell quoting in CI YAML: replace single quotes in -run regex with escaped double quotes to avoid breaking the echo '...' wrapper in the test runner script Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d74cb62. Configure here.
|
Not a blocker, and explicitly not a regression in this PR — flagging a pre-existing coverage gap that this work happened to surface, so it's tracked rather than lost. While reviewing I compared the full suite against what CI actually invokes: 27 YAML files exist, but only 23 are referenced by any CI workflow. Four are orphaned (run by no matrix row):
The first three look accidental, not deliberate:
This PR faithfully preserves the existing coverage — the Go Suggested follow-up (independent of this PR, and applies to both harnesses): wire these three back into CI — in the Python matrix today, and in the Go |
@bdchatham Thanks for great feedback, I didn't notice that some of these yaml files are unused actually. It seems these yaml files that are unused were added in this old pr: #949 and not a new thing. I will enable them in the go runner to eliminate this gap. |
masih
left a comment
There was a problem hiding this comment.
Nice; glad to see python replacement!
This reminds me: why this PR doesn't remove the python runner?
| "python3 integration_test/scripts/runner.py integration_test/staking_module/staking_test.yaml", | ||
| "python3 integration_test/scripts/runner.py integration_test/bank_module/send_funds_test.yaml", | ||
| "python3 integration_test/scripts/runner.py integration_test/mint_module/mint_test.yaml" | ||
| "go test -tags yaml_integration -v -timeout 10m ./integration_test/runner/... -run \"TestMintModule|TestStakingModule|TestBankModule\"" |
There was a problem hiding this comment.
Please use top level CI timeout (defaults to 30m) or extrapolate via env var.
| t.Helper() | ||
| data, err := os.ReadFile(path) //nolint:gosec | ||
| if err != nil { | ||
| t.Fatalf("read %s: %v", path, err) |
There was a problem hiding this comment.
Use testify? Ditto for the rest of the file.
| for i, inp := range tc.Inputs { | ||
| container := inp.Node | ||
| if container == "" { | ||
| container = opts.DefaultContainer |
There was a problem hiding this comment.
non-blocker: I recommend using functional options pattern. That way all defaults are in one place and a lot clearer to reason about gaps in config. Otherwise we end up with zero-value checks across multiple functions which works but easy to miss gaps or manage what the default options should be.
| "export PATH=$PATH:"+extraPath+" && "+cmd) | ||
| c = exec.Command("docker", args...) //nolint:gosec | ||
| } else { | ||
| c = exec.Command("/bin/bash", "-c", cmd) |
There was a problem hiding this comment.
We don't know what the shell is going to be. ideally we should parameterise this, or interpret it from runtime PATH, or stick with sh and make sure commands are compatible with it.
This also completely breaks on non-unix based systems but that's OK for us today.

Summary
integration_test/runner/— a Go-native driver for the existing YAML integration test suite that replaces the Pythonrunner.pyfor covered modulesMotivation
The Python runner has a few pain points:
exit(1)) with no subtest isolation-runflag to target a single test case without editing filesprint()statements with no structured test reportingThe Go runner addresses all of these through standard
go testintegration.How it works
Each YAML file maps to a
t.Runsubtest, so failures are isolated and the full-voutput shows every command and its captured output. The eval verifier usesbig.Int → float64 → stringcomparison (in that order) to handle the large token supply integers in the existing YAML assertions without float64 precision loss.Run a single module locally (requires a running cluster):
Target a single test case: