feat(proto): implement ProtoAdapters — 15/15 integration tests pass#100
Closed
ottobot-ai wants to merge 1 commit into
Closed
Annotations
1 error
|
You have commit messages with errors
⧗ input: feat(proto): implement ProtoAdapters + fix integration tests (15/15 pass)
Implements full bidirectional serialization between Scala fiber types and
proto binary format (on-chain storage). Wire format boundary maintained:
DL1 JSON API stays Circe, proto binary for on-chain storage only.
## ProtoAdapters.scala (new)
- FiberStatus ↔ ProtoFiberStatus (bidirectional, Left on UNSPECIFIED)
- SnapshotOrdinal / FiberOrdinal / Hash / Address / StateId converters
- Circe Json ↔ com.google.protobuf.struct.Value bridge (via fold)
- JsonLogicValue / JsonLogicExpression ↔ Protobuf Value (via Circe)
- StateMachineDefinition ↔ ProtoStateMachineDefinition (JSON Struct)
- AccessControlPolicy ↔ ProtoAccessControlPolicy (3 variants)
- EmittedEvent / EventReceipt / OracleInvocation converters
- StateMachineFiberRecord toProto + fromProto (Either[String, T])
- ScriptFiberRecord toProto + fromProto (Either[String, T])
## ProtoAdaptersIntegrationTest.scala (fixed)
- Fixed import paths: xyz.kd5ujc.schema.* (was xyz.kd5ujc.ottochain.*)
- Fixed State constructor: State(id = StateId(...), isFinal = false)
- Fixed StateMachineDefinition.states: Map[StateId, State]
- Fixed Transition: guard/effect are required JsonLogicExpression
- Fixed StateMachineFiberRecord: added previousUpdateOrdinal field
- Fixed ScriptFiberRecord: added creationOrdinal/latestUpdateOrdinal
- Fixed EventReceipt: all required fields (ordinal, fromState, toState, etc.)
- Fixed Address construction: refineV[DAGAddressRefined].unsafeFrom()
- Replaced EitherValues (ScalaTest) with IO-based getRight/getLeft helpers
- All 15 tests now compile and pass
Closes card 699621e4 (Integration Tests: Verify generated types with fiber engine)
✖ header must not be longer than 72 characters, current length is 73 [header-max-length]
✖ found 1 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
|
The logs for this run have expired and are no longer available.
Loading