New state: integrate new state tests into CI#3043
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3043 +/- ##
==========================================
+ Coverage 76.47% 76.49% +0.01%
==========================================
Files 402 402
Lines 36770 36770
==========================================
+ Hits 28120 28127 +7
+ Misses 6673 6666 -7
Partials 1977 1977
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request is stale because it has been open 35 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
This pull request is stale because it has been open 35 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
33d81d5 to
dc23482
Compare
374fcf7 to
1ba0bf0
Compare
b95e87a to
514d9fa
Compare
fcdfbab to
86a5199
Compare
d42bd9c to
4e4d276
Compare
efa09d5 to
5bc5cd6
Compare
dd87a16 to
83e4759
Compare
ed14df4 to
d6ad287
Compare
21084c8 to
86579be
Compare
Signed-off-by: Yaroslav Kukharuk <i.kukharuk@gmail.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Integrates the “new state” test mode into CI by expanding the existing test job matrix to run both old and new state variants and tag Codecov uploads accordingly.
Changes:
- Add a
juno-new-stateboolean axis to the workflow matrix. - Plumb the matrix value into
JUNO_NEW_STATEand job naming for visibility. - Add a Codecov
flagsvalue to distinguish old vs new state coverage uploads.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude finished @brbrr's task in 3m 4s —— View job PR Review: Integrate new state tests into CI
SummaryImportant
See inline comments on Looks good
Nits
|
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| fail_ci_if_error: true | ||
| files: coverage/coverage.old.out,coverage/coverage.new.out | ||
| flags: ${{ matrix.juno_new_state && 'new-state' || 'old-state' }} |
There was a problem hiding this comment.
Both matrix variants upload the same two files — files: coverage.old.out,coverage.new.out on line 73 — differing only by the flags value here. Combined with the env-leak issue noted on the env block above, the new-state flag in Codecov ends up labelling the same artifact pair the old-state flag also labels, so per-flag coverage on Codecov is not actually measuring the two modes separately.
Aligned with the suggestion above: upload one file per matrix run (e.g., coverage.new.out when juno_new_state is true, otherwise coverage.old.out), or drop the matrix axis on ubuntu-latest and do two uploads from a single job — one per flag — pointing at the file actually produced by that mode.
| matrix: | ||
| os: [ubuntu-latest, macos-latest, ubuntu-arm64-4-core] | ||
| juno_new_state: [false, true] | ||
| runs-on: ${{ matrix.os }} | ||
| name: Run Tests${{ matrix.juno_new_state && ' [New State]' || '' }} | ||
| env: | ||
| VM_DEBUG: true | ||
| JUNO_NEW_STATE: ${{ matrix.juno_new_state }} |
There was a problem hiding this comment.
Important — matrix axis is redundant and corrupts coverage on ubuntu-latest.
On ubuntu-latest the test step runs make test-cover, which already executes both modes back-to-back:
test-cover: clean-testcache rustdeps
mkdir -p coverage
go test $(GO_TAGS) -coverpkg=$(PKG) -coverprofile=coverage/coverage.old.out -covermode=atomic $(PKG)
JUNO_NEW_STATE=true go test $(GO_TAGS) -coverpkg=$(PKG) -coverprofile=coverage/coverage.new.out -covermode=atomic $(PKG)Two problems flow from this:
- Double work. With
juno_new_state: [false, true], ubuntu-latest now runs the full coverage matrix twice — 4 full test passes instead of 2 — for the same artifacts. - Env leak corrupts
coverage.old.outwhenmatrix.juno_new_state=true. The first line oftest-coverdoes not unsetJUNO_NEW_STATE, so it inheritstruefrom the job env. The "old" coverage file then actually contains new-state coverage. Theflags: new-stateupload below will therefore include genuine new-state data, but theflags: old-stateupload contains the correct mix — and both runs still upload the same two files, so the codecov flag split is mostly cosmetic.
Suggested fix — pick one:
- (a) Restrict the matrix axis to non-ubuntu runners (
make testhonorsJUNO_NEW_STATEcorrectly), and keepmake test-coverrunning once on ubuntu-latest with one Codecov upload per file/flag. - (b) Refactor
make test-coverto honorJUNO_NEW_STATE(single pass producing one file), then the matrix axis drives both modes uniformly and each upload carries the right flag.
No description provided.