Skip to content

feat(deploy): add remoteIaCProvider adapter for gRPC plugin IaC dispatch#429

Merged
intel352 merged 2 commits intomainfrom
feat/remote-iac-provider-adapter
Apr 21, 2026
Merged

feat(deploy): add remoteIaCProvider adapter for gRPC plugin IaC dispatch#429
intel352 merged 2 commits intomainfrom
feat/remote-iac-provider-adapter

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

Companion to workflow-plugin-digitalocean PR #1.

RemoteModule (the object returned by ModuleFactories()["iac.provider"]) implements InvokeService for cross-process dispatch but does not directly satisfy interfaces.IaCProvider. The type assertion added in PR #428 (mod.(interfaces.IaCProvider)) always fails with a *RemoteModule.

This PR replaces that assertion with two adapter types:

  • remoteIaCProvider — implements interfaces.IaCProvider by routing Name, Version, Initialize, and ResourceDriver(type) through InvokeService. Methods not needed by the deploy path (Plan, Apply, Destroy, etc.) return a clear error pointing at wfctl infra apply.
  • remoteResourceDriver — implements interfaces.ResourceDriver by routing Update and HealthCheck through InvokeService using the arg convention the DO plugin expects (resource_type, ref_name, ref_type, spec_name, spec_type, spec_config). Create/Read/Delete return actionable errors.
  • remoteServiceInvoker local interface — satisfied by *external.RemoteModule, avoiding a direct import of the concrete type.

Test plan

  • TestRemoteIaCProvider_Name / Initialize_RoutesViaInvoker / Initialize_PropagatesError
  • TestRemoteIaCProvider_ResourceDriver_ReturnsRemoteDriver
  • TestRemoteResourceDriver_Update_RoutesViaInvoker / _PropagatesError
  • TestRemoteResourceDriver_HealthCheck_Healthy / _Unhealthy
  • Compile-time var _ interfaces.IaCProvider = (*remoteIaCProvider)(nil) assertion
  • Full ./cmd/wfctl/... suite passes; go vet clean

🤖 Generated with Claude Code

RemoteModule (the result of ModuleFactories()["iac.provider"]) implements
service invocation via InvokeService but does NOT directly satisfy
interfaces.IaCProvider. Replace the failing type assertion with a
remoteIaCProvider wrapper that routes each IaCProvider method call through
InvokeService, and a remoteResourceDriver that routes Update/HealthCheck.

- remoteIaCProvider: Name, Version, Initialize, ResourceDriver; all other
  methods (Plan, Apply, etc.) return a clear error pointing at wfctl infra apply
- remoteResourceDriver: Update and HealthCheck fully wired; Create/Read/Delete
  return actionable errors
- Tests cover happy-path dispatch, error propagation, and the compile-time
  guarantee that remoteIaCProvider satisfies interfaces.IaCProvider

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 21, 2026 00:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a remoteIaCProvider/remoteResourceDriver adapter layer so wfctl deploy can use external (gRPC) IaC provider plugins whose iac.provider module factory returns a *external.RemoteModule (service-invocation based) rather than an object directly implementing interfaces.IaCProvider.

Changes:

  • Replace the failing interfaces.IaCProvider type assertion in discoverAndLoadIaCProvider with a remoteServiceInvoker-based adapter.
  • Implement remoteIaCProvider and remoteResourceDriver to route deploy-relevant calls via InvokeService.
  • Add unit tests for the new adapters.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
cmd/wfctl/deploy_providers.go Wrap external plugin iac.provider modules with a service-invocation adapter implementing interfaces.IaCProvider / interfaces.ResourceDriver.
cmd/wfctl/deploy_remote_provider_test.go Adds tests for adapter routing/error propagation and a compile-time interface assertion.

}

func (r *remoteIaCProvider) Destroy(_ context.Context, _ []interfaces.ResourceRef) (*interfaces.DestroyResult, error) {
return nil, fmt.Errorf("IaCProvider.Destroy not supported via remote deploy — use wfctl infra apply")
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IaCProvider.Destroy returns an error that tells users to run wfctl infra apply, but there is a dedicated wfctl infra destroy command. This message is likely to misdirect users trying to tear down infra; update it to point at the destroy flow (or otherwise clarify the correct command).

Suggested change
return nil, fmt.Errorf("IaCProvider.Destroy not supported via remote deploy — use wfctl infra apply")
return nil, fmt.Errorf("IaCProvider.Destroy not supported via remote deploy — use wfctl infra destroy")

Copilot uses AI. Check for mistakes.
return nil, fmt.Errorf("ResourceDriver.Read not yet supported via remote deploy — use wfctl infra apply")
}
func (d *remoteResourceDriver) Delete(_ context.Context, _ interfaces.ResourceRef) error {
return fmt.Errorf("ResourceDriver.Delete not yet supported via remote deploy — use wfctl infra apply")
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ResourceDriver.Delete errors with "use wfctl infra apply", but deletions/teardown are typically handled by wfctl infra destroy in this CLI. Consider adjusting the guidance (or making it explicit why apply is the right next step) so users aren’t sent to the wrong command.

Suggested change
return fmt.Errorf("ResourceDriver.Delete not yet supported via remote deploy — use wfctl infra apply")
return fmt.Errorf("ResourceDriver.Delete not yet supported via remote deploy — use wfctl infra destroy")

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +26
func (f *fakeRemoteInvoker) InvokeService(method string, _ map[string]any) (map[string]any, error) {
if errStr, ok := f.errors[method]; ok {
return nil, errString(errStr)
}
if res, ok := f.methods[method]; ok {
return res, nil
}
return map[string]any{}, nil
}
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fake invoker ignores the args passed to InvokeService, so the tests don’t actually verify the argument contract (resource_type, ref_name, spec_config, etc.) that the adapter is responsible for. Capture the incoming args per method (e.g., store lastArgs[method]) and assert the expected keys/values in the Update/HealthCheck/Initialize tests.

Copilot generated this review using guidance from organization custom instructions.
Comment on lines +165 to +173
// TestDiscoverAndLoadIaCProvider_WrapsModuleAsRemoteIaCProvider verifies that
// when a plugin's iac.provider module does NOT directly implement IaCProvider
// (the normal case for gRPC plugins), discoverAndLoadIaCProvider wraps it in
// remoteIaCProvider instead of failing the type assertion.
func TestDiscoverAndLoadIaCProvider_WrapsModuleAsRemoteIaCProvider(t *testing.T) {
// This is covered end-to-end by the plugin tests; here we just confirm that
// remoteIaCProvider satisfies interfaces.IaCProvider at compile time.
var _ interfaces.IaCProvider = (*remoteIaCProvider)(nil)
}
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestDiscoverAndLoadIaCProvider_WrapsModuleAsRemoteIaCProvider claims to verify wrapping behavior, but it only contains a compile-time interface assertion, so it will pass regardless of discoverAndLoadIaCProvider logic. Either rename it to reflect what it actually checks (e.g., interface satisfaction) and/or move the compile-time assertion to package scope, or add a real behavioral test that exercises discoverAndLoadIaCProvider with a fake module implementing remoteServiceInvoker.

Suggested change
// TestDiscoverAndLoadIaCProvider_WrapsModuleAsRemoteIaCProvider verifies that
// when a plugin's iac.provider module does NOT directly implement IaCProvider
// (the normal case for gRPC plugins), discoverAndLoadIaCProvider wraps it in
// remoteIaCProvider instead of failing the type assertion.
func TestDiscoverAndLoadIaCProvider_WrapsModuleAsRemoteIaCProvider(t *testing.T) {
// This is covered end-to-end by the plugin tests; here we just confirm that
// remoteIaCProvider satisfies interfaces.IaCProvider at compile time.
var _ interfaces.IaCProvider = (*remoteIaCProvider)(nil)
}
// Ensure remoteIaCProvider continues to satisfy interfaces.IaCProvider.
// Wrapping behavior for discoverAndLoadIaCProvider is covered by higher-level
// plugin tests; this is only a compile-time interface assertion.
var _ interfaces.IaCProvider = (*remoteIaCProvider)(nil)

Copilot uses AI. Check for mistakes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:245: parsing iteration count: invalid syntax
baseline-bench.txt:298020: parsing iteration count: invalid syntax
baseline-bench.txt:618358: parsing iteration count: invalid syntax
baseline-bench.txt:926672: parsing iteration count: invalid syntax
baseline-bench.txt:1254630: parsing iteration count: invalid syntax
baseline-bench.txt:1569610: parsing iteration count: invalid syntax
benchmark-results.txt:245: parsing iteration count: invalid syntax
benchmark-results.txt:292788: parsing iteration count: invalid syntax
benchmark-results.txt:572848: parsing iteration count: invalid syntax
benchmark-results.txt:920312: parsing iteration count: invalid syntax
benchmark-results.txt:1249338: parsing iteration count: invalid syntax
benchmark-results.txt:1541716: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 7763 64-Core Processor                
                            │ baseline-bench.txt │
                            │       sec/op       │
InterpreterCreation-4              3.168m ± 230%
ComponentLoad-4                    3.690m ±   5%
ComponentExecute-4                 1.975µ ±   1%
PoolContention/workers-1-4         1.105µ ±   2%
PoolContention/workers-2-4         1.102µ ±   3%
PoolContention/workers-4-4         1.099µ ±   1%
PoolContention/workers-8-4         1.102µ ±   1%
PoolContention/workers-16-4        1.121µ ±   6%
ComponentLifecycle-4               3.690m ±   0%
SourceValidation-4                 2.299µ ±   1%
RegistryConcurrent-4               809.3n ±   5%
LoaderLoadFromString-4             3.779m ±   1%
geomean                            17.77µ

                            │ baseline-bench.txt │
                            │        B/op        │
InterpreterCreation-4               2.027Mi ± 0%
ComponentLoad-4                     2.180Mi ± 0%
ComponentExecute-4                  1.203Ki ± 0%
PoolContention/workers-1-4          1.203Ki ± 0%
PoolContention/workers-2-4          1.203Ki ± 0%
PoolContention/workers-4-4          1.203Ki ± 0%
PoolContention/workers-8-4          1.203Ki ± 0%
PoolContention/workers-16-4         1.203Ki ± 0%
ComponentLifecycle-4                2.183Mi ± 0%
SourceValidation-4                  1.984Ki ± 0%
RegistryConcurrent-4                1.133Ki ± 0%
LoaderLoadFromString-4              2.182Mi ± 0%
geomean                             15.25Ki

                            │ baseline-bench.txt │
                            │     allocs/op      │
InterpreterCreation-4                15.68k ± 0%
ComponentLoad-4                      18.02k ± 0%
ComponentExecute-4                    25.00 ± 0%
PoolContention/workers-1-4            25.00 ± 0%
PoolContention/workers-2-4            25.00 ± 0%
PoolContention/workers-4-4            25.00 ± 0%
PoolContention/workers-8-4            25.00 ± 0%
PoolContention/workers-16-4           25.00 ± 0%
ComponentLifecycle-4                 18.07k ± 0%
SourceValidation-4                    32.00 ± 0%
RegistryConcurrent-4                  2.000 ± 0%
LoaderLoadFromString-4               18.06k ± 0%
geomean                               183.3

cpu: AMD EPYC 9V74 80-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                 3.462m ± 179%
ComponentLoad-4                       3.714m ±   2%
ComponentExecute-4                    1.849µ ±   2%
PoolContention/workers-1-4            1.047µ ±   1%
PoolContention/workers-2-4            1.050µ ±   3%
PoolContention/workers-4-4            1.042µ ±   1%
PoolContention/workers-8-4            1.052µ ±   1%
PoolContention/workers-16-4           1.046µ ±   1%
ComponentLifecycle-4                  3.726m ±   2%
SourceValidation-4                    2.156µ ±   3%
RegistryConcurrent-4                  796.7n ±   6%
LoaderLoadFromString-4                3.698m ±   2%
geomean                               17.28µ

                            │ benchmark-results.txt │
                            │         B/op          │
InterpreterCreation-4                  2.027Mi ± 0%
ComponentLoad-4                        2.180Mi ± 0%
ComponentExecute-4                     1.203Ki ± 0%
PoolContention/workers-1-4             1.203Ki ± 0%
PoolContention/workers-2-4             1.203Ki ± 0%
PoolContention/workers-4-4             1.203Ki ± 0%
PoolContention/workers-8-4             1.203Ki ± 0%
PoolContention/workers-16-4            1.203Ki ± 0%
ComponentLifecycle-4                   2.183Mi ± 0%
SourceValidation-4                     1.984Ki ± 0%
RegistryConcurrent-4                   1.133Ki ± 0%
LoaderLoadFromString-4                 2.182Mi ± 0%
geomean                                15.25Ki

                            │ benchmark-results.txt │
                            │       allocs/op       │
InterpreterCreation-4                   15.68k ± 0%
ComponentLoad-4                         18.02k ± 0%
ComponentExecute-4                       25.00 ± 0%
PoolContention/workers-1-4               25.00 ± 0%
PoolContention/workers-2-4               25.00 ± 0%
PoolContention/workers-4-4               25.00 ± 0%
PoolContention/workers-8-4               25.00 ± 0%
PoolContention/workers-16-4              25.00 ± 0%
ComponentLifecycle-4                    18.07k ± 0%
SourceValidation-4                       32.00 ± 0%
RegistryConcurrent-4                     2.000 ± 0%
LoaderLoadFromString-4                  18.06k ± 0%
geomean                                  183.3

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 7763 64-Core Processor                
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                  287.4n ± 0%
CircuitBreakerExecution_Success-4          21.56n ± 0%
CircuitBreakerExecution_Failure-4          66.06n ± 0%
geomean                                    74.25n

                                  │ baseline-bench.txt │
                                  │        B/op        │
CircuitBreakerDetection-4                 144.0 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │
                                  │     allocs/op      │
CircuitBreakerDetection-4                 1.000 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

cpu: AMD EPYC 9V74 80-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     298.1n ± 4%
CircuitBreakerExecution_Success-4             22.65n ± 0%
CircuitBreakerExecution_Failure-4             70.92n ± 0%
geomean                                       78.24n

                                  │ benchmark-results.txt │
                                  │         B/op          │
CircuitBreakerDetection-4                    144.0 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

                                  │ benchmark-results.txt │
                                  │       allocs/op       │
CircuitBreakerDetection-4                    1.000 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 7763 64-Core Processor                
                                 │ baseline-bench.txt │
                                 │       sec/op       │
JQTransform_Simple-4                     971.2n ± 20%
JQTransform_ObjectConstruction-4         1.479µ ±  1%
JQTransform_ArraySelect-4                3.398µ ±  1%
JQTransform_Complex-4                    38.34µ ±  1%
JQTransform_Throughput-4                 1.806µ ±  1%
SSEPublishDelivery-4                     72.64n ±  1%
geomean                                  1.705µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
JQTransform_Simple-4                   1.273Ki ± 0%
JQTransform_ObjectConstruction-4       1.773Ki ± 0%
JQTransform_ArraySelect-4              2.625Ki ± 0%
JQTransform_Complex-4                  16.22Ki ± 0%
JQTransform_Throughput-4               1.984Ki ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │
                                 │     allocs/op      │
JQTransform_Simple-4                     10.00 ± 0%
JQTransform_ObjectConstruction-4         15.00 ± 0%
JQTransform_ArraySelect-4                30.00 ± 0%
JQTransform_Complex-4                    324.0 ± 0%
JQTransform_Throughput-4                 17.00 ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

cpu: AMD EPYC 9V74 80-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
JQTransform_Simple-4                        960.0n ± 17%
JQTransform_ObjectConstruction-4            1.465µ ±  2%
JQTransform_ArraySelect-4                   3.578µ ±  2%
JQTransform_Complex-4                       42.27µ ±  5%
JQTransform_Throughput-4                    1.811µ ±  1%
SSEPublishDelivery-4                        64.84n ±  3%
geomean                                     1.710µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
JQTransform_Simple-4                      1.273Ki ± 0%
JQTransform_ObjectConstruction-4          1.773Ki ± 0%
JQTransform_ArraySelect-4                 2.625Ki ± 0%
JQTransform_Complex-4                     16.22Ki ± 0%
JQTransform_Throughput-4                  1.984Ki ± 0%
SSEPublishDelivery-4                        0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                 │ benchmark-results.txt │
                                 │       allocs/op       │
JQTransform_Simple-4                        10.00 ± 0%
JQTransform_ObjectConstruction-4            15.00 ± 0%
JQTransform_ArraySelect-4                   30.00 ± 0%
JQTransform_Complex-4                       324.0 ± 0%
JQTransform_Throughput-4                    17.00 ± 0%
SSEPublishDelivery-4                        0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
cpu: AMD EPYC 7763 64-Core Processor                
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                   1.111µ ±  2%
SchemaValidation_AllFields-4                1.668µ ± 15%
SchemaValidation_FormatValidation-4         1.612µ ±  2%
SchemaValidation_ManySchemas-4              1.812µ ±  3%
geomean                                     1.525µ

                                    │ baseline-bench.txt │
                                    │        B/op        │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │
                                    │     allocs/op      │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

cpu: AMD EPYC 9V74 80-Core Processor                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                       1.069µ ± 2%
SchemaValidation_AllFields-4                    1.627µ ± 7%
SchemaValidation_FormatValidation-4             1.570µ ± 2%
SchemaValidation_ManySchemas-4                  1.575µ ± 2%
geomean                                         1.440µ

                                    │ benchmark-results.txt │
                                    │         B/op          │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

                                    │ benchmark-results.txt │
                                    │       allocs/op       │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 7763 64-Core Processor                
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.254µ ± 13%
EventStoreAppend_SQLite-4                  1.368m ±  9%
GetTimeline_InMemory/events-10-4           13.72µ ±  3%
GetTimeline_InMemory/events-50-4           76.58µ ±  2%
GetTimeline_InMemory/events-100-4          148.1µ ± 18%
GetTimeline_InMemory/events-500-4          627.5µ ±  0%
GetTimeline_InMemory/events-1000-4         1.282m ±  1%
GetTimeline_SQLite/events-10-4             107.3µ ±  1%
GetTimeline_SQLite/events-50-4             247.8µ ±  1%
GetTimeline_SQLite/events-100-4            419.5µ ±  1%
GetTimeline_SQLite/events-500-4            1.780m ±  1%
GetTimeline_SQLite/events-1000-4           3.491m ±  2%
geomean                                    222.7µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                 780.5 ± 10%
EventStoreAppend_SQLite-4                 1.984Ki ±  2%
GetTimeline_InMemory/events-10-4          7.953Ki ±  0%
GetTimeline_InMemory/events-50-4          46.62Ki ±  0%
GetTimeline_InMemory/events-100-4         94.48Ki ±  0%
GetTimeline_InMemory/events-500-4         472.8Ki ±  0%
GetTimeline_InMemory/events-1000-4        944.3Ki ±  0%
GetTimeline_SQLite/events-10-4            16.74Ki ±  0%
GetTimeline_SQLite/events-50-4            87.14Ki ±  0%
GetTimeline_SQLite/events-100-4           175.4Ki ±  0%
GetTimeline_SQLite/events-500-4           846.1Ki ±  0%
GetTimeline_SQLite/events-1000-4          1.639Mi ±  0%
geomean                                   67.28Ki

                                   │ baseline-bench.txt │
                                   │     allocs/op      │
EventStoreAppend_InMemory-4                  7.000 ± 0%
EventStoreAppend_SQLite-4                    53.00 ± 0%
GetTimeline_InMemory/events-10-4             125.0 ± 0%
GetTimeline_InMemory/events-50-4             653.0 ± 0%
GetTimeline_InMemory/events-100-4           1.306k ± 0%
GetTimeline_InMemory/events-500-4           6.514k ± 0%
GetTimeline_InMemory/events-1000-4          13.02k ± 0%
GetTimeline_SQLite/events-10-4               382.0 ± 0%
GetTimeline_SQLite/events-50-4              1.852k ± 0%
GetTimeline_SQLite/events-100-4             3.681k ± 0%
GetTimeline_SQLite/events-500-4             18.54k ± 0%
GetTimeline_SQLite/events-1000-4            37.29k ± 0%
geomean                                     1.162k

cpu: AMD EPYC 9V74 80-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.183µ ± 18%
EventStoreAppend_SQLite-4                     1.008m ±  7%
GetTimeline_InMemory/events-10-4              12.79µ ±  1%
GetTimeline_InMemory/events-50-4              71.08µ ± 23%
GetTimeline_InMemory/events-100-4             110.3µ ±  1%
GetTimeline_InMemory/events-500-4             576.2µ ±  1%
GetTimeline_InMemory/events-1000-4            1.187m ±  5%
GetTimeline_SQLite/events-10-4                87.75µ ±  1%
GetTimeline_SQLite/events-50-4                233.1µ ±  0%
GetTimeline_SQLite/events-100-4               405.6µ ±  1%
GetTimeline_SQLite/events-500-4               1.773m ±  1%
GetTimeline_SQLite/events-1000-4              3.471m ±  1%
geomean                                       200.3µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                    824.5 ± 10%
EventStoreAppend_SQLite-4                    1.982Ki ±  2%
GetTimeline_InMemory/events-10-4             7.953Ki ±  0%
GetTimeline_InMemory/events-50-4             46.62Ki ±  0%
GetTimeline_InMemory/events-100-4            94.48Ki ±  0%
GetTimeline_InMemory/events-500-4            472.8Ki ±  0%
GetTimeline_InMemory/events-1000-4           944.3Ki ±  0%
GetTimeline_SQLite/events-10-4               16.74Ki ±  0%
GetTimeline_SQLite/events-50-4               87.14Ki ±  0%
GetTimeline_SQLite/events-100-4              175.4Ki ±  0%
GetTimeline_SQLite/events-500-4              846.1Ki ±  0%
GetTimeline_SQLite/events-1000-4             1.639Mi ±  0%
geomean                                      67.58Ki

                                   │ benchmark-results.txt │
                                   │       allocs/op       │
EventStoreAppend_InMemory-4                     7.000 ± 0%
EventStoreAppend_SQLite-4                       53.00 ± 0%
GetTimeline_InMemory/events-10-4                125.0 ± 0%
GetTimeline_InMemory/events-50-4                653.0 ± 0%
GetTimeline_InMemory/events-100-4              1.306k ± 0%
GetTimeline_InMemory/events-500-4              6.514k ± 0%
GetTimeline_InMemory/events-1000-4             13.02k ± 0%
GetTimeline_SQLite/events-10-4                  382.0 ± 0%
GetTimeline_SQLite/events-50-4                 1.852k ± 0%
GetTimeline_SQLite/events-100-4                3.681k ± 0%
GetTimeline_SQLite/events-500-4                18.54k ± 0%
GetTimeline_SQLite/events-1000-4               37.29k ± 0%
geomean                                        1.162k

Benchmarks run with go test -bench=. -benchmem -count=6.
Regressions ≥ 20% are flagged. Results compared via benchstat.

@intel352 intel352 merged commit 2ecdfe6 into main Apr 21, 2026
18 checks passed
@intel352 intel352 deleted the feat/remote-iac-provider-adapter branch April 21, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants