test(cli): add config file precedence integration tests#488
Open
test(cli): add config file precedence integration tests#488
Conversation
Clarify that the config file is an alternative to CLI arguments for node configuration, and that CLI args take precedence when both are provided. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add integration tests for the config file merge/precedence logic in SequencerNodeArgs::with_config_file(), covering file-only values, CLI overrides, partial configs, dev/db option merging, and hex parsing. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
Benchmark
Details
| Benchmark suite | Current: 11f77b4 | Previous: 6bc4997 | Ratio |
|---|---|---|---|
CompiledClass(fixture)/compress |
2682718 ns/iter (± 58792) |
2750262 ns/iter (± 7746) |
0.98 |
CompiledClass(fixture)/decompress |
2926642 ns/iter (± 14198) |
2933827 ns/iter (± 91332) |
1.00 |
ExecutionCheckpoint/compress |
34 ns/iter (± 9) |
34 ns/iter (± 10) |
1 |
ExecutionCheckpoint/decompress |
25 ns/iter (± 8) |
25 ns/iter (± 5) |
1 |
PruningCheckpoint/compress |
34 ns/iter (± 9) |
34 ns/iter (± 11) |
1 |
PruningCheckpoint/decompress |
26 ns/iter (± 10) |
26 ns/iter (± 5) |
1 |
VersionedHeader/compress |
637 ns/iter (± 16) |
620 ns/iter (± 7) |
1.03 |
VersionedHeader/decompress |
821 ns/iter (± 15) |
820 ns/iter (± 11) |
1.00 |
StoredBlockBodyIndices/compress |
77 ns/iter (± 5) |
77 ns/iter (± 6) |
1 |
StoredBlockBodyIndices/decompress |
35 ns/iter (± 8) |
36 ns/iter (± 7) |
0.97 |
StorageEntry/compress |
153 ns/iter (± 2) |
144 ns/iter (± 1) |
1.06 |
StorageEntry/decompress |
139 ns/iter (± 3) |
137 ns/iter (± 3) |
1.01 |
ContractNonceChange/compress |
147 ns/iter (± 2) |
144 ns/iter (± 2) |
1.02 |
ContractNonceChange/decompress |
239 ns/iter (± 3) |
244 ns/iter (± 5) |
0.98 |
ContractClassChange/compress |
216 ns/iter (± 2) |
203 ns/iter (± 5) |
1.06 |
ContractClassChange/decompress |
257 ns/iter (± 3) |
258 ns/iter (± 12) |
1.00 |
ContractStorageEntry/compress |
158 ns/iter (± 3) |
153 ns/iter (± 4) |
1.03 |
ContractStorageEntry/decompress |
310 ns/iter (± 3) |
308 ns/iter (± 12) |
1.01 |
GenericContractInfo/compress |
128 ns/iter (± 2) |
130 ns/iter (± 6) |
0.98 |
GenericContractInfo/decompress |
105 ns/iter (± 3) |
103 ns/iter (± 2) |
1.02 |
Felt/compress |
83 ns/iter (± 9) |
82 ns/iter (± 10) |
1.01 |
Felt/decompress |
56 ns/iter (± 7) |
60 ns/iter (± 12) |
0.93 |
BlockHash/compress |
81 ns/iter (± 6) |
82 ns/iter (± 9) |
0.99 |
BlockHash/decompress |
56 ns/iter (± 6) |
58 ns/iter (± 14) |
0.97 |
TxHash/compress |
81 ns/iter (± 2) |
81 ns/iter (± 6) |
1 |
TxHash/decompress |
56 ns/iter (± 4) |
58 ns/iter (± 9) |
0.97 |
ClassHash/compress |
81 ns/iter (± 4) |
82 ns/iter (± 8) |
0.99 |
ClassHash/decompress |
56 ns/iter (± 4) |
58 ns/iter (± 10) |
0.97 |
CompiledClassHash/compress |
82 ns/iter (± 5) |
81 ns/iter (± 8) |
1.01 |
CompiledClassHash/decompress |
56 ns/iter (± 5) |
58 ns/iter (± 7) |
0.97 |
BlockNumber/compress |
47 ns/iter (± 2) |
47 ns/iter (± 3) |
1 |
BlockNumber/decompress |
25 ns/iter (± 0) |
26 ns/iter (± 1) |
0.96 |
TxNumber/compress |
47 ns/iter (± 3) |
47 ns/iter (± 2) |
1 |
TxNumber/decompress |
25 ns/iter (± 1) |
26 ns/iter (± 2) |
0.96 |
FinalityStatus/compress |
1 ns/iter (± 0) |
1 ns/iter (± 0) |
1 |
FinalityStatus/decompress |
12 ns/iter (± 0) |
12 ns/iter (± 0) |
1 |
TypedTransactionExecutionInfo/compress |
15948 ns/iter (± 118) |
17805 ns/iter (± 68) |
0.90 |
TypedTransactionExecutionInfo/decompress |
3581 ns/iter (± 94) |
3570 ns/iter (± 83) |
1.00 |
VersionedContractClass/compress |
388 ns/iter (± 5) |
373 ns/iter (± 4) |
1.04 |
VersionedContractClass/decompress |
789 ns/iter (± 6) |
783 ns/iter (± 5) |
1.01 |
MigratedCompiledClassHash/compress |
148 ns/iter (± 8) |
146 ns/iter (± 7) |
1.01 |
MigratedCompiledClassHash/decompress |
140 ns/iter (± 5) |
142 ns/iter (± 6) |
0.99 |
ContractInfoChangeList/compress |
1751 ns/iter (± 26) |
1715 ns/iter (± 32) |
1.02 |
ContractInfoChangeList/decompress |
2081 ns/iter (± 380) |
2112 ns/iter (± 378) |
0.99 |
BlockChangeList/compress |
858 ns/iter (± 67) |
728 ns/iter (± 17) |
1.18 |
BlockChangeList/decompress |
847 ns/iter (± 152) |
840 ns/iter (± 160) |
1.01 |
ReceiptEnvelope/compress |
33295 ns/iter (± 1549) |
30455 ns/iter (± 432) |
1.09 |
ReceiptEnvelope/decompress |
6069 ns/iter (± 449) |
5989 ns/iter (± 316) |
1.01 |
TrieDatabaseValue/compress |
164 ns/iter (± 3) |
164 ns/iter (± 2) |
1 |
TrieDatabaseValue/decompress |
246 ns/iter (± 1) |
251 ns/iter (± 3) |
0.98 |
TrieHistoryEntry/compress |
296 ns/iter (± 5) |
295 ns/iter (± 4) |
1.00 |
TrieHistoryEntry/decompress |
278 ns/iter (± 9) |
271 ns/iter (± 10) |
1.03 |
This comment was automatically generated by workflow using github-action-benchmark.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #488 +/- ##
==========================================
- Coverage 73.32% 69.49% -3.83%
==========================================
Files 209 287 +78
Lines 23132 35193 +12061
==========================================
+ Hits 16961 24458 +7497
- Misses 6171 10735 +4564 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
--configarg help message to clarify file vs CLI precedencecrates/cli/tests/config_file.rscovering theSequencerNodeArgs::with_config_file()merge logic:no_miningbool merge in both directionsDbOptionsfield-level merge (CLI dir override, file migrate preserved)DevOptionsfield-level merge (CLI seed/accounts, file no_fee/no_account_validation)0xff,0x10) via custom deserializerTest plan
cargo nextest run -p katana-cli --test config_file— all 9 tests pass🤖 Generated with Claude Code