Skip to content

Commit 16433c2

Browse files
intel352claude
andcommitted
fix: assert against sdk.ContractProvider interface directly
Replace anonymous interface assertion with typed sdk.ContractProvider so any future SDK interface additions are caught at compile time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b97abb8 commit 16433c2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

internal/contracts.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package internal
33
import (
44
githubv1 "github.com/GoCodeAlone/workflow-plugin-github/gen"
55
pb "github.com/GoCodeAlone/workflow/plugin/external/proto"
6+
sdk "github.com/GoCodeAlone/workflow/plugin/external/sdk"
67
"google.golang.org/protobuf/reflect/protodesc"
78
"google.golang.org/protobuf/types/descriptorpb"
89
"google.golang.org/protobuf/types/known/structpb"
@@ -190,4 +191,4 @@ var githubContractRegistry = &pb.ContractRegistry{
190191
const githubProtoPkg = "workflow.plugin.github.v1."
191192

192193
// Compile-time assertion: githubPlugin implements sdk.ContractProvider.
193-
var _ interface{ ContractRegistry() *pb.ContractRegistry } = (*githubPlugin)(nil)
194+
var _ sdk.ContractProvider = (*githubPlugin)(nil)

0 commit comments

Comments
 (0)