test(cbor): Populate golden cases for all structs the encoder handles - #4049
test(cbor): Populate golden cases for all structs the encoder handles#4049RafaelGranza wants to merge 1 commit into
Conversation
Reviewing PR #4049
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor/encoder-to-utils-cbor #4049 +/- ##
==================================================================
- Coverage 79.30% 79.17% -0.13%
==================================================================
Files 465 465
Lines 35786 35795 +9
==================================================================
- Hits 28381 28342 -39
- Misses 7396 7444 +48
Partials 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ed2c758 to
8a32e4f
Compare
|
Claude finished @RafaelGranza's task in 4m 55s —— View job Reviewing PR #4049
SummaryClean, no issues found. This PR adds populated golden cases for the CBOR encoder/decoder covering Checked:
No correctness, concurrency, or resource-safety concerns — this is additive test-only content with no production code changes. |
Standalone PR ReviewPR-Agent could not safely update the persistent review. This standalone result will not replace the canonical review. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|

User description
Adds cases for every struct CBOR encodes in production, and its populated version.
The golden test also asserts the decoded value equals the expected struct, so the Go side is covered too.
No need to do the check bucket by bucket.
PR Type
Tests
Description
Add populated golden cases for encoder structs
Add transaction, state, journal, and metadata coverage
Add expected CBOR bytes for new golden cases
File Walkthrough
golden_test.go
Expand populated CBOR golden test casesutils/cbor/v1/golden_test.go
migrationpackage forSchemaMetadatagolden casecore,pathdb, andmigrationstructson_disk_bytes.json
Add expected CBOR bytes for new casesutils/cbor/v1/testdata/on_disk_bytes.json
StateUpdate, journal, andSchemaMetadatabytes