Closed ccamel closed 6 days ago
[!IMPORTANT]
Review skipped
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
The pull request includes updates to the go.mod
file, modifying dependency versions and adding new dependencies. It also introduces changes to the interpreter
package's predicate registry, marking some predicates as deprecated while adding a new one. Additionally, several feature files have been updated for consistency in expected output formats, while a new feature file for testing block_header/1
has been introduced. Two feature files have been deleted, and modifications in the test file streamline YAML handling. Finally, new and deprecated predicates have been added or marked in the predicate
package.
File Path | Change Summary |
---|---|
go.mod | Updated dependency versions, added github.com/goccy/go-yaml v1.9.7 and gopkg.in/yaml.v3 v3.0.1 (indirect). |
x/logic/interpreter/registry.go | Deprecated predicates block_height/1 , block_time/1 , chain_id/1 , added new predicate ./3 mapped to engine.Op3 . |
x/logic/keeper/features/asserta_1.feature | Updated expected output formats for variable expressions in scenarios. |
x/logic/keeper/features/assertz_1.feature | Adjusted expected output formats for variable expressions in scenarios. |
x/logic/keeper/features/block_header_1.feature | Added new feature for testing block_header/1 with multiple scenarios. |
x/logic/keeper/features/block_height_1.feature | Deleted file containing tests for block_height/2 . |
x/logic/keeper/features/block_time_1.feature | Deleted file containing tests for block_time/2 . |
x/logic/keeper/features_test.go | Changed YAML import from gopkg.in/yaml.v3 to sigs.k8s.io/yaml , simplified test case structure with new parsing function. |
x/logic/predicate/block.go | Deprecated BlockHeight and BlockTime predicates, retaining core functionality. |
x/logic/predicate/chain.go | Added new BlockHeader predicate, deprecated ChainID predicate. |
go.mod
file, including dependency version updates, which may relate to overall dependency management.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 76.19048%
with 15 lines
in your changes missing coverage. Please review.
Files with missing lines | Patch % | Lines |
---|---|---|
x/logic/predicate/chain.go | 76.19% | 10 Missing and 5 partials :warning: |
@@ Coverage Diff @@
## main #824 +/- ##
==========================================
+ Coverage 42.98% 45.08% +2.09%
==========================================
Files 113 113
Lines 6325 6388 +63
==========================================
+ Hits 2719 2880 +161
+ Misses 3480 3373 -107
- Partials 126 135 +9
Files with missing lines | Coverage Δ | |
---|---|---|
x/logic/interpreter/registry.go | 81.81% <ø> (ø) |
|
x/logic/predicate/block.go | 0.00% <ø> (ø) |
|
x/logic/predicate/chain.go | 74.28% <76.19%> (+17.14%) |
:arrow_up: |
... and 5 files with indirect coverage changes
🚨 Try these New Features:
@coderabbitai resolve
Takes advantage of the support for Dicts introduced in https://github.com/axone-protocol/prolog/pull/17 to expose the current block header in this format through the new
block_header/1
predicate.This includes updating the examples and deprecating the
block_time/1
,block_height/1
, andchain_id/1
predicates which have been retained for compatibility.NB: The
block_header/1
predicate is slightly more costly due to the systematic transformation of the header structure into a PrologDict
and its unification, regardless of how it is subsequently used. This contrasts with predicates likeblock_height/1
, which specifically targeted a single field of the header.Summary by CodeRabbit
Release Notes
New Features
block_header/1
predicate for retrieving current block header properties.Deprecations
BlockHeight
andBlockTime
predicates as deprecated; users are encouraged to useblock_header/1
.block_height/1
,block_time/1
, andchain_id/1
for compatibility.Bug Fixes
asserta/1
andassertz/1
to align with Prolog syntax.Chores