Skip to content

Cloud-SDK Plan #2 — PR 1: IaCServeOptions.Modules + .Steps + mapBackedProvider adapter#683

Merged
intel352 merged 3 commits into
mainfrom
feat/plugin-modules-on-iac-sdk
May 15, 2026
Merged

Cloud-SDK Plan #2 — PR 1: IaCServeOptions.Modules + .Steps + mapBackedProvider adapter#683
intel352 merged 3 commits into
mainfrom
feat/plugin-modules-on-iac-sdk

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • Extends sdk.ServeIaCPlugin to also serve module + step factories: adds IaCServeOptions.Modules map[string]sdk.ModuleProvider + Steps map[string]sdk.StepProvider; thin mapBackedProvider adapter (~30 LOC) implements PluginProvider + ModuleProvider + StepProvider by delegating to the supplied maps; iacPluginServiceBridge constructs newGRPCServer(mapBackedProvider) when those fields are non-nil so grpc_server.go's existing PluginService Module/Step lifecycle is reused unchanged.
  • Backwards compatible (zero-value options = current behavior); single registered pb.PluginServiceServer; no proto change.
  • Closes the architectural gap surfaced mid-execution of the locked B/C/D plan (docs/plans/2026-05-14-cloud-sdk-extraction-bcd.md): plugins served via ServeIaCPlugin couldn't register module/step factories. Per decisions/0038.

Plan 2 PR 1 of docs/plans/2026-05-15-plugin-modules-on-iac.md (locked sha256 8964f744d0ca, 5 PRs / 19 tasks; PR 2/3 unblock after this merges + workflow v0.53.0 tag is cut).

Test plan

  • 3 unit tests in iacserver_modules_test.go: delegate-path round-trip; zero-value Unimplemented invariant; NilBroker_NoMessagePublisherCall regression guard locking the v1 Non-Goal in code
  • 1 bufconn end-to-end test in iac_modules_e2e_test.go: pb.PluginServiceClient.GetModuleTypes + CreateModule round-trip — same gRPC dispatch the engine's adapter uses
  • GOWORK=off go build ./... && GOWORK=off go test ./... green (no regression)
  • No structpb/Any introduced (iac.proto invariant)
  • spec + quality review passed (zero Critical/Important)

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 15, 2026 06:20
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

This PR extends the external plugin IaC SDK entrypoint (sdk.ServeIaCPlugin) so typed-IaC plugins can additionally expose module and step factories via the existing PluginService module/step lifecycle RPCs (without proto changes), using a thin mapBackedProvider adapter and an optional delegate inside the IaC PluginService bridge.

Changes:

  • Added IaCServeOptions.Modules and IaCServeOptions.Steps to allow serving module/step factories from IaC plugins.
  • Updated iacPluginServiceBridge to optionally forward module/step RPCs to grpc_server.go’s existing grpcServer implementation.
  • Added unit + bufconn tests covering delegation behavior, backward-compat (Unimplemented on zero-value), and a regression guard around message broker plumbing.

Reviewed changes

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

File Description
plugin/external/sdk/iacserver.go Adds IaCServeOptions.Modules/Steps, mapBackedProvider, and delegate-forwarding methods on the IaC PluginService bridge.
plugin/external/sdk/iacserver_modules_test.go Unit tests verifying delegate wiring, zero-value backward compatibility, and a nil-broker regression guard.
plugin/external/sdk/iac_modules_e2e_test.go Bufconn end-to-end test exercising pb.PluginServiceClient GetModuleTypes/CreateModule round-trip through the IaC bridge.
Comments suppressed due to low confidence (1)

plugin/external/sdk/iacserver.go:378

  • mapBackedProvider.StepTypes ranges over a Go map, so the returned list order is nondeterministic. To avoid flaky behavior and keep type listings stable across runs, sort the collected keys before returning.
// StepTypes returns the keys of the steps map.
func (p *mapBackedProvider) StepTypes() []string {
	out := make([]string, 0, len(p.steps))
	for name := range p.steps {
		out = append(out, name)
	}
	return out

Comment thread plugin/external/sdk/iacserver.go Outdated
Comment on lines +354 to +360
// ModuleTypes returns the keys of the modules map.
func (p *mapBackedProvider) ModuleTypes() []string {
out := make([]string, 0, len(p.modules))
for name := range p.modules {
out = append(out, name)
}
return out
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 0bca646 — sort.Strings on mapBackedProvider.ModuleTypes/StepTypes (real determinism bug); new TestIaCBridge_ModuleStepTypes_Deterministic regression test.

Comment on lines +92 to +99
go func() { _ = s.Serve(lis) }()
t.Cleanup(s.Stop)
conn, err := grpc.NewClient("passthrough://bufnet",
grpc.WithContextDialer(func(ctx context.Context, _ string) (net.Conn, error) {
return lis.DialContext(ctx)
}),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 0bca646 — bufconn dial target normalized to passthrough:///bufnet (canonical gRPC URI form, aligns with in-tree convention).

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 42.85714% with 40 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
plugin/external/sdk/iacserver.go 42.85% 37 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:276: parsing iteration count: invalid syntax
baseline-bench.txt:441760: parsing iteration count: invalid syntax
baseline-bench.txt:861497: parsing iteration count: invalid syntax
baseline-bench.txt:1261056: parsing iteration count: invalid syntax
baseline-bench.txt:1644574: parsing iteration count: invalid syntax
baseline-bench.txt:2019671: parsing iteration count: invalid syntax
benchmark-results.txt:276: parsing iteration count: invalid syntax
benchmark-results.txt:351268: parsing iteration count: invalid syntax
benchmark-results.txt:893180: parsing iteration count: invalid syntax
benchmark-results.txt:1203912: parsing iteration count: invalid syntax
benchmark-results.txt:1467952: parsing iteration count: invalid syntax
benchmark-results.txt:1771058: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 7763 64-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                  5.683m ± 61%
ComponentLoad-4                        3.569m ±  1%
ComponentExecute-4                     1.946µ ±  1%
PoolContention/workers-1-4             1.087µ ±  2%
PoolContention/workers-2-4             1.089µ ±  1%
PoolContention/workers-4-4             1.092µ ±  2%
PoolContention/workers-8-4             1.092µ ±  3%
PoolContention/workers-16-4            1.094µ ±  4%
ComponentLifecycle-4                   3.577m ±  0%
SourceValidation-4                     2.318µ ±  1%
RegistryConcurrent-4                   798.7n ±  1%
LoaderLoadFromString-4                 3.582m ±  0%
geomean                                18.34µ

                            │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                            │ baseline-bench.txt │
                            │       sec/op       │
InterpreterCreation-4              2.782m ± 136%
ComponentLoad-4                    2.712m ±   0%
ComponentExecute-4                 1.421µ ±   1%
PoolContention/workers-1-4         793.6n ±   2%
PoolContention/workers-2-4         791.4n ±   5%
PoolContention/workers-4-4         785.9n ±   2%
PoolContention/workers-8-4         783.5n ±   4%
PoolContention/workers-16-4        792.3n ±   2%
ComponentLifecycle-4               2.721m ±   1%
SourceValidation-4                 1.620µ ±   1%
RegistryConcurrent-4               599.3n ±   3%
LoaderLoadFromString-4             2.763m ±   1%
geomean                            13.03µ

                            │ 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

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 7763 64-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     285.4n ± 5%
CircuitBreakerExecution_Success-4             21.54n ± 3%
CircuitBreakerExecution_Failure-4             66.40n ± 1%
geomean                                       74.17n

                                  │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                 239.8n ± 10%
CircuitBreakerExecution_Success-4         17.58n ±  0%
CircuitBreakerExecution_Failure-4         55.34n ±  0%
geomean                                   61.56n

                                  │ 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

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 7763 64-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
IaCStateBackend_InProcess-4                 303.8n ± 32%
IaCStateBackend_GRPC-4                      9.357m ±  3%
JQTransform_Simple-4                        662.5n ± 33%
JQTransform_ObjectConstruction-4            1.480µ ±  1%
JQTransform_ArraySelect-4                   3.341µ ±  1%
JQTransform_Complex-4                       38.02µ ±  1%
JQTransform_Throughput-4                    1.802µ ±  1%
SSEPublishDelivery-4                        68.08n ±  2%
geomean                                     3.799µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                 416.0 ± 0%
IaCStateBackend_GRPC-4                    5.861Mi ± 9%
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       │
IaCStateBackend_InProcess-4                 2.000 ± 0%
IaCStateBackend_GRPC-4                     6.834k ± 0%
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                
                                 │ baseline-bench.txt │
                                 │       sec/op       │
IaCStateBackend_InProcess-4              220.3n ± 35%
IaCStateBackend_GRPC-4                   7.755m ±  2%
JQTransform_Simple-4                     525.3n ± 14%
JQTransform_ObjectConstruction-4         1.091µ ±  1%
JQTransform_ArraySelect-4                2.634µ ±  1%
JQTransform_Complex-4                    32.25µ ±  4%
JQTransform_Throughput-4                 1.331µ ±  3%
SSEPublishDelivery-4                     50.09n ±  0%
geomean                                  2.937µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4             416.0 ±  0%
IaCStateBackend_GRPC-4                5.650Mi ± 12%
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      │
IaCStateBackend_InProcess-4              2.000 ± 0%
IaCStateBackend_GRPC-4                  6.856k ± 0%
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                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.100µ ± 22%
SchemaValidation_AllFields-4                   1.705µ ±  3%
SchemaValidation_FormatValidation-4            1.600µ ±  2%
SchemaValidation_ManySchemas-4                 1.845µ ±  3%
geomean                                        1.534µ

                                    │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                    844.8n ± 3%
SchemaValidation_AllFields-4                 1.259µ ± 2%
SchemaValidation_FormatValidation-4          1.220µ ± 1%
SchemaValidation_ManySchemas-4               1.232µ ± 4%
geomean                                      1.124µ

                                    │ 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

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 7763 64-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.167µ ± 20%
EventStoreAppend_SQLite-4                     2.440m ± 10%
GetTimeline_InMemory/events-10-4              14.18µ ±  3%
GetTimeline_InMemory/events-50-4              79.46µ ±  2%
GetTimeline_InMemory/events-100-4             156.5µ ±  3%
GetTimeline_InMemory/events-500-4             663.4µ ± 24%
GetTimeline_InMemory/events-1000-4            1.334m ±  3%
GetTimeline_SQLite/events-10-4                107.3µ ±  1%
GetTimeline_SQLite/events-50-4                252.4µ ±  1%
GetTimeline_SQLite/events-100-4               428.1µ ±  1%
GetTimeline_SQLite/events-500-4               1.850m ±  3%
GetTimeline_SQLite/events-1000-4              3.593m ±  0%
geomean                                       238.7µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                     786.0 ± 4%
EventStoreAppend_SQLite-4                     1.982Ki ± 3%
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.31Ki

                                   │ benchmark-results.txt │
                                   │       allocs/op       │
EventStoreAppend_InMemory-4                     7.000 ± 0%
EventStoreAppend_SQLite-4                       53.00 ± 2%
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                
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4               746.8n ±  21%
EventStoreAppend_SQLite-4                 4.188m ± 167%
GetTimeline_InMemory/events-10-4          10.10µ ±  23%
GetTimeline_InMemory/events-50-4          43.16µ ±   1%
GetTimeline_InMemory/events-100-4         85.85µ ±   2%
GetTimeline_InMemory/events-500-4         436.6µ ±   1%
GetTimeline_InMemory/events-1000-4        883.1µ ±   1%
GetTimeline_SQLite/events-10-4            65.20µ ±   1%
GetTimeline_SQLite/events-50-4            170.1µ ±   2%
GetTimeline_SQLite/events-100-4           297.2µ ±   1%
GetTimeline_SQLite/events-500-4           1.299m ±   1%
GetTimeline_SQLite/events-1000-4          2.533m ±   1%
geomean                                   167.6µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                 853.0 ± 12%
EventStoreAppend_SQLite-4                 1.990Ki ± 23%
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.79Ki

                                   │ baseline-bench.txt │
                                   │     allocs/op      │
EventStoreAppend_InMemory-4                  7.000 ± 0%
EventStoreAppend_SQLite-4                    53.00 ± 2%
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.

Addresses 2 Copilot findings on PR #683 (plan-2 Tasks 1+2):

1. mapBackedProvider.ModuleTypes / StepTypes — Go map iteration is
   randomized, so the previous unsorted slice would differ run-to-run,
   breaking cache keys + any caller that compares as an ordered list.
   Sort the keys lexicographically before returning.
2. Bufconn dial target — the iacserver_modules_test.go dial used
   `passthrough://bufnet` (double-slash, wrong); the rest of the sdk
   bufconn tests use `passthrough:///bufnet` (triple-slash, gRPC URI
   form). Aligned with the in-tree convention.

Added TestIaCBridge_ModuleStepTypes_Deterministic: 3 entries inserted
non-alphabetically, expects alphabetical back, asserts across 5
iterations to catch a non-sorted impl that happens to win on a single
race.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@intel352 intel352 merged commit 0533a85 into main May 15, 2026
25 of 26 checks passed
@intel352 intel352 deleted the feat/plugin-modules-on-iac-sdk branch May 15, 2026 12:09
intel352 added a commit that referenced this pull request May 16, 2026
…affolding (#689)

Records the resolution of two interlocking decisions made mid-execution
of plan-2 (plugin-modules-on-iac):

1. (c1) for plan-2 plugin shipping: aws + gcp v1.1.0 carry strict
   descriptors backing legacy ModuleProvider Go impls, satisfying
   wfctl plugin audit without forcing an eager typed-Provider migration.

2. SDK Typed-fields scaffolding (PR #686 #683): IaCServeOptions now
   carries TypedModules + TypedSteps alongside Modules + Steps;
   mapBackedProvider implements both contracts; grpc_server's
   Typed-first → legacy-fallback path is reused.

(c2) — relaxing the validator — rejected as eroding the strict-cutover
value (decisions/0024). (B1) — eager typed migration — rejected as
blocking the Phase B/C deletions per the user's "just get the remaining
plugins finished up" mandate.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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