cleanup consensus cap - #2310
Draft
cedric-cordenier wants to merge 1 commit into
Draft
Conversation
Contributor
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the concrete OCR3 consensus capability implementation from pkg/capabilities/consensus/ocr3 and updates the generic requests Store/Handler tests to use local test-only request/response fixtures, avoiding a dependency on the OCR3 package.
Changes:
- Replace
ocr3.ReportRequest/ReportResponseusage inrequeststests withtestReportRequest/testReportResponsefixtures. - Move/adjust test fixtures into the
requests_testpackage for isolated testing of the generic Store/Handler APIs. - Delete the OCR3 consensus capability implementation files and associated tests/fixtures under
pkg/capabilities/consensus/ocr3.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/capabilities/consensus/requests/store_test.go | Update Store tests to use local testReportRequest fixture types. |
| pkg/capabilities/consensus/requests/store_stats_test.go | Update stats collector Store test to use testReportRequest. |
| pkg/capabilities/consensus/requests/handler_test.go | Update Handler tests to use testReportRequest/testReportResponse. |
| pkg/capabilities/consensus/requests/fixtures_test.go | Introduce testReportRequest/testReportResponse fixtures in requests_test. |
| pkg/capabilities/consensus/ocr3/value_map_encoder.go | Delete OCR3 encoder implementation. |
| pkg/capabilities/consensus/ocr3/value_map_encoder_test.go | Delete OCR3 encoder tests. |
| pkg/capabilities/consensus/ocr3/validation_service.go | Delete OCR3 validation service stub. |
| pkg/capabilities/consensus/ocr3/transmitter.go | Delete OCR3 contract transmitter implementation. |
| pkg/capabilities/consensus/ocr3/transmitter_test.go | Delete OCR3 transmitter tests. |
| pkg/capabilities/consensus/ocr3/testdata/fixtures/capability/test.yaml | Remove OCR3 capability fixture. |
| pkg/capabilities/consensus/ocr3/testdata/fixtures/capability/schema.json | Remove OCR3 capability schema fixture. |
| pkg/capabilities/consensus/ocr3/reporting_plugin.go | Delete OCR3 reporting plugin implementation. |
| pkg/capabilities/consensus/ocr3/reporting_plugin_test.go | Delete OCR3 reporting plugin tests. |
| pkg/capabilities/consensus/ocr3/ocr3.go | Delete OCR3 capability entrypoint/provider implementation. |
| pkg/capabilities/consensus/ocr3/ocr3_test.go | Delete OCR3 provider tests. |
| pkg/capabilities/consensus/ocr3/models.go | Delete OCR3 config/input model types. |
| pkg/capabilities/consensus/ocr3/factory.go | Delete OCR3 reporting plugin factory. |
| pkg/capabilities/consensus/ocr3/capability.go | Delete OCR3 executable capability implementation. |
| pkg/capabilities/consensus/ocr3/capability_test.go | Delete OCR3 capability tests. |
| pkg/capabilities/consensus/ocr3/benchmark_test.go | Delete OCR3 benchmarks. |
| pkg/capabilities/consensus/ocr3/batching.go | Delete OCR3 batching/size-calculation helpers. |
| pkg/capabilities/consensus/ocr3/batching_test.go | Delete OCR3 batching tests. |
Suppressed comments (1)
pkg/capabilities/consensus/requests/fixtures_test.go:64
- Copy() dereferences Observations and OverriddenEncoderConfig without nil checks. Several tests construct testReportRequest without setting one or both fields (e.g. store tests that only set WorkflowExecutionID/ExpiresAt), so calling Store.Get/FirstN/All will panic when Copy() runs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Requires
Supports