Skip to content

feat(providerclient): wire ResourceDriver CRUD so apply mutates external providers (infra-admin PR13/13, ADR 0021)#851

Merged
intel352 merged 2 commits into
mainfrom
feat/infra-providerclient-resourcedriver
Jun 3, 2026
Merged

feat(providerclient): wire ResourceDriver CRUD so apply mutates external providers (infra-admin PR13/13, ADR 0021)#851
intel352 merged 2 commits into
mainfrom
feat/infra-providerclient-resourcedriver

Conversation

@intel352
Copy link
Copy Markdown
Contributor

@intel352 intel352 commented Jun 3, 2026

PR13/13 — wire providerclient.ResourceDriver (CRUD) [scope amendment, ADR 0021]

Makes step.iac_provider_apply actually create/update/delete resources against an external IaC provider. Discovered by the demonstration-fidelity gate (scenario 92 on the real v0.72.0 stack): iac/providerclient.Adapter.ResourceDriver() returned ErrProviderMethodUnimplemented (the migration deferred per-action CRUD as "PR-2"), so apply only planned + hash-guarded — it never mutated infra, and commit-back always saw partial-apply. User-approved amendment (AskUserQuestion 2026-06-03).

Changes

  • iac/providerclient.Adapter: new IaCServiceResourceDriver advertised-service const; a resourceDriverAdapter bridging the pb.ResourceDriverClientinterfaces.ResourceDriver (Create/Read/Update/Delete/Diff/Scale/HealthCheck/SensitiveKeys/Troubleshoot), gated on advertisement (nil + ErrProviderMethodUnimplemented when unadvertised — unchanged regression path). JSON bridge for Config/Outputs (*_json bytes) field-for-field identical to the wfctl typed adapter (all 6 ResourceSpec fields; sensitive map preserved). gRPC error mapping (NotFound→ErrResourceNotFound, AlreadyExists→ErrResourceAlreadyExists, …) with %w/%w wrapping so callers recover BOTH the sentinel (errors.Is) AND the gRPC status (status.Code). Compile-time var _ interfaces.ResourceDriver/Troubleshooter guards.
  • plugin/external/adapter.go: advertisedOptionalIaCServices() now forwards IaCServiceResourceDriver (and IaCServiceRunner, which was also missing since Add optional IaC provider job runner contract #850 — a regression-guard bonus) from the ContractRegistry into providerclient.New, so the WiringHook actually activates the bridge at runtime.

Tests

  • Adapter: ResourceDriver wired-when-advertised (all 8 methods round-trip via bufconn; Config JSON reaches the server) + unimplemented-when-not-advertised + a table-driven gRPC-error-mapping test over all 10 codes (asserts both errors.Is sentinel AND status.Code).
  • Wiring: TestWiringHook_ResourceDriver_WiredEndToEnd — full WiringHook → app.GetServiceAdapter.ResourceDriver(...) returns the real bridge + a Create round-trips with config_json surviving the gRPC boundary; + the unadvertised negative path.

Verified: go build ./... exit 0; full go test ./... exit 0 (151 ok); full golangci-lint v2.12.0 0 issues. No proto/contract change (the ResourceDriver service + stubs already shipped). After merge: cut workflow v0.73.0, re-pin scenario 92, un-SKIP the apply→commit-back assertion.

🤖 Generated with Claude Code

…PR-2)

Implements the deferred PR-2 migration in iac/providerclient.Adapter:
- Adds IaCServiceResourceDriver const ("workflow.plugin.external.iac.ResourceDriver")
- Adds resourceDriverAdapter implementing interfaces.ResourceDriver (all 8 methods:
  Create/Read/Update/Delete/Diff/HealthCheck/Scale/SensitiveKeys) PLUS the optional
  interfaces.Troubleshooter (Troubleshoot) using the same JSON-bytes convention
  (config_json/outputs_json) as the existing typed adapter
- Compile-time guards: var _ interfaces.ResourceDriver and
  var _ interfaces.Troubleshooter on *resourceDriverAdapter (mirror typedResourceDriver)
- Wires advertisement-gated pb.ResourceDriverClient in New(); nil when not advertised
- Replaces the ErrProviderMethodUnimplemented stub with a live implementation
- Adds ResourceDriverProvider accessor interface mirroring RegionListerProvider/
  RunnerProvider pattern; not-advertised path still returns ErrProviderMethodUnimplemented
- mapResourceDriverGRPCError maps codes.NotFound/AlreadyExists/ResourceExhausted/
  Unavailable/DeadlineExceeded/Unauthenticated/PermissionDenied/InvalidArgument/
  FailedPrecondition/Unimplemented to engine sentinels. Wraps with %w/%w (sentinel +
  original gRPC error) so callers recover BOTH the sentinel (errors.Is) AND the gRPC
  status (status.Code walking the unwrap chain); default case keeps method attribution
  while preserving the status via %w

Closes the runtime advertisement gap: plugin/external/adapter.go
advertisedOptionalIaCServices() now forwards IaCServiceResourceDriver (and
IaCServiceRunner, which #850 added but the switch never matched) from the
plugin's ContractRegistry to providerclient.New, so the WiringHook-registered
adapter constructs the real ResourceDriver client. Without this, the adapter
stayed nil and ApplyPlanWithHooks -> provider.ResourceDriver(type) still hit
ErrProviderMethodUnimplemented end-to-end.

- Tests (providerclient): bufconn round-trip for all 8 CRUD methods + Troubleshoot;
  negative advertisement gate; table-driven gRPC error-mapping test covering all 10
  status codes (asserts both the errors.Is sentinel AND status.Code recovery via the
  unwrap chain)
- Tests (plugin/external): advertisedOptionalIaCServices forwards ResourceDriver
  (and Runner) when advertised / excludes when not; end-to-end WiringHook ->
  GetService -> ResourceDriver(type) returns the real bridge and Create round-trips
  WITH config_json echoed back to prove the Config JSON survives the boundary;
  unadvertised plugin still returns the unimplemented error

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 3, 2026 07:49
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 completes the runtime wiring for the optional IaC ResourceDriver service so step.iac_provider_apply can execute per-resource CRUD operations against external IaC provider plugins (per ADR 0021), by (1) bridging the pb.ResourceDriver gRPC client into an interfaces.ResourceDriver implementation and (2) ensuring service advertisement is forwarded through the WiringHook path.

Changes:

  • Add IaCServiceResourceDriver capability wiring and a resourceDriverAdapter that bridges CRUD/Diff/Scale/HealthCheck/SensitiveKeys/Troubleshoot over gRPC.
  • Forward optional IaC service advertisements (now including Runner and ResourceDriver) from the plugin ContractRegistry into providerclient.New(...).
  • Add end-to-end wiring tests and unit tests covering advertisement gating and gRPC error→sentinel mapping.

Reviewed changes

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

File Description
plugin/external/iac_provider_wiring_test.go Extends wiring tests to exercise optional-service advertisement and end-to-end ResourceDriver bridging via WiringHook.
plugin/external/adapter.go Forwards additional optional IaC service advertisements (Runner, ResourceDriver) from ContractRegistry into providerclient.New.
iac/providerclient/adapter.go Implements ResourceDriverProvider + resourceDriverAdapter and wires optional ResourceDriver client construction based on advertisement.
iac/providerclient/adapter_test.go Adds unit tests for ResourceDriver advertisement gating, CRUD round-trips, and gRPC error mapping (including unwrap-chain preservation).

Comment thread iac/providerclient/adapter.go
Comment thread iac/providerclient/adapter.go Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:304: parsing iteration count: invalid syntax
baseline-bench.txt:284003: parsing iteration count: invalid syntax
baseline-bench.txt:568452: parsing iteration count: invalid syntax
baseline-bench.txt:871897: parsing iteration count: invalid syntax
baseline-bench.txt:1167713: parsing iteration count: invalid syntax
baseline-bench.txt:1464873: parsing iteration count: invalid syntax
benchmark-results.txt:304: parsing iteration count: invalid syntax
benchmark-results.txt:335429: parsing iteration count: invalid syntax
benchmark-results.txt:657297: parsing iteration count: invalid syntax
benchmark-results.txt:1190230: parsing iteration count: invalid syntax
benchmark-results.txt:1521773: parsing iteration count: invalid syntax
benchmark-results.txt:1812756: 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 │       benchmark-results.txt        │
                            │       sec/op       │    sec/op     vs base              │
InterpreterCreation-4               8.649m ± 64%   8.275m ± 61%       ~ (p=0.699 n=6)
ComponentLoad-4                     3.798m ±  4%   3.759m ±  2%       ~ (p=0.310 n=6)
ComponentExecute-4                  1.934µ ±  0%   1.989µ ±  1%  +2.84% (p=0.002 n=6)
PoolContention/workers-1-4          1.101µ ±  1%   1.123µ ±  1%  +2.00% (p=0.004 n=6)
PoolContention/workers-2-4          1.110µ ±  3%   1.127µ ±  1%       ~ (p=0.193 n=6)
PoolContention/workers-4-4          1.105µ ±  1%   1.115µ ±  2%       ~ (p=0.108 n=6)
PoolContention/workers-8-4          1.113µ ±  2%   1.122µ ±  2%       ~ (p=0.420 n=6)
PoolContention/workers-16-4         1.115µ ±  1%   1.121µ ±  1%       ~ (p=0.143 n=6)
ComponentLifecycle-4                3.821m ±  2%   3.818m ±  1%       ~ (p=0.937 n=6)
SourceValidation-4                  2.365µ ±  2%   2.392µ ±  1%  +1.14% (p=0.037 n=6)
RegistryConcurrent-4                826.0n ±  4%   803.1n ±  3%       ~ (p=0.132 n=6)
LoaderLoadFromString-4              3.721m ±  3%   3.773m ±  2%       ~ (p=0.065 n=6)
geomean                             19.46µ         19.51µ        +0.22%

                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │        B/op        │     B/op      vs base                │
InterpreterCreation-4               2.027Mi ± 0%   2.027Mi ± 0%       ~ (p=0.909 n=6)
ComponentLoad-4                     2.180Mi ± 0%   2.180Mi ± 0%       ~ (p=0.260 n=6)
ComponentExecute-4                  1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-1-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-2-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-4-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-8-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-16-4         1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
ComponentLifecycle-4                2.183Mi ± 0%   2.183Mi ± 0%       ~ (p=0.608 n=6)
SourceValidation-4                  1.984Ki ± 0%   1.984Ki ± 0%       ~ (p=1.000 n=6) ¹
RegistryConcurrent-4                1.133Ki ± 0%   1.133Ki ± 0%       ~ (p=1.000 n=6) ¹
LoaderLoadFromString-4              2.182Mi ± 0%   2.182Mi ± 0%       ~ (p=0.366 n=6)
geomean                             15.25Ki        15.25Ki       -0.00%
¹ all samples are equal

                            │ baseline-bench.txt │        benchmark-results.txt        │
                            │     allocs/op      │  allocs/op   vs base                │
InterpreterCreation-4                15.68k ± 0%   15.68k ± 0%       ~ (p=1.000 n=6)
ComponentLoad-4                      18.02k ± 0%   18.02k ± 0%       ~ (p=1.000 n=6)
ComponentExecute-4                    25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-1-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-2-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-4-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-8-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-16-4           25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
ComponentLifecycle-4                 18.07k ± 0%   18.07k ± 0%       ~ (p=1.000 n=6) ¹
SourceValidation-4                    32.00 ± 0%    32.00 ± 0%       ~ (p=1.000 n=6) ¹
RegistryConcurrent-4                  2.000 ± 0%    2.000 ± 0%       ~ (p=1.000 n=6) ¹
LoaderLoadFromString-4               18.06k ± 0%   18.06k ± 0%       ~ (p=1.000 n=6) ¹
geomean                               183.3         183.3       +0.00%
¹ all samples are equal

pkg: github.com/GoCodeAlone/workflow/middleware
                                  │ baseline-bench.txt │       benchmark-results.txt       │
                                  │       sec/op       │   sec/op     vs base              │
CircuitBreakerDetection-4                  292.3n ± 3%   288.1n ± 1%  -1.45% (p=0.041 n=6)
CircuitBreakerExecution_Success-4          21.54n ± 0%   21.55n ± 0%       ~ (p=0.574 n=6)
CircuitBreakerExecution_Failure-4          66.33n ± 0%   66.87n ± 1%  +0.81% (p=0.002 n=6)
geomean                                    74.74n        74.60n       -0.19%

                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │        B/op        │    B/op     vs base                │
CircuitBreakerDetection-4                 144.0 ± 0%     144.0 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Success-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Failure-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                              ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │     allocs/op      │ allocs/op   vs base                │
CircuitBreakerDetection-4                 1.000 ± 0%     1.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Success-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Failure-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                              ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
                                 │ baseline-bench.txt │       benchmark-results.txt        │
                                 │       sec/op       │    sec/op     vs base              │
IaCStateBackend_InProcess-4              325.7n ± 35%   321.9n ± 27%       ~ (p=0.240 n=6)
IaCStateBackend_GRPC-4                  10.011m ± 14%   9.709m ±  3%  -3.01% (p=0.041 n=6)
JQTransform_Simple-4                     716.3n ± 32%   734.3n ± 30%       ~ (p=0.394 n=6)
JQTransform_ObjectConstruction-4         1.572µ ±  2%   1.574µ ±  1%       ~ (p=0.937 n=6)
JQTransform_ArraySelect-4                3.503µ ±  4%   3.678µ ±  1%  +4.98% (p=0.002 n=6)
JQTransform_Complex-4                    39.72µ ±  1%   40.84µ ±  1%  +2.84% (p=0.002 n=6)
JQTransform_Throughput-4                 1.932µ ±  3%   1.953µ ±  1%       ~ (p=0.310 n=6)
SSEPublishDelivery-4                     67.24n ±  2%   66.93n ±  1%       ~ (p=0.225 n=6)
geomean                                  4.006µ         4.040µ        +0.84%

                                 │ baseline-bench.txt │         benchmark-results.txt         │
                                 │        B/op        │     B/op       vs base                │
IaCStateBackend_InProcess-4             416.0 ±  0%       416.0 ±  0%       ~ (p=1.000 n=6) ¹
IaCStateBackend_GRPC-4                5.716Mi ± 15%     5.675Mi ± 10%       ~ (p=0.589 n=6)
JQTransform_Simple-4                  1.273Ki ±  0%     1.273Ki ±  0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4      1.773Ki ±  0%     1.773Ki ±  0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4             2.625Ki ±  0%     2.625Ki ±  0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                 16.31Ki ±  0%     16.31Ki ±  0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4              1.984Ki ±  0%     1.984Ki ±  0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                    0.000 ±  0%       0.000 ±  0%       ~ (p=1.000 n=6) ¹
geomean                                             ²                  -0.09%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │        benchmark-results.txt        │
                                 │     allocs/op      │  allocs/op   vs base                │
IaCStateBackend_InProcess-4              2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=6) ¹
IaCStateBackend_GRPC-4                  6.832k ± 0%     6.848k ± 0%       ~ (p=0.329 n=6)
JQTransform_Simple-4                     10.00 ± 0%      10.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4         15.00 ± 0%      15.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4                30.00 ± 0%      30.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                    328.0 ± 0%      328.0 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4                 17.00 ± 0%      17.00 ± 0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                     0.000 ± 0%      0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                             ²                +0.03%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
                                    │ baseline-bench.txt │       benchmark-results.txt       │
                                    │       sec/op       │   sec/op     vs base              │
SchemaValidation_Simple-4                    1.120µ ± 5%   1.105µ ± 1%       ~ (p=0.240 n=6)
SchemaValidation_AllFields-4                 1.659µ ± 3%   1.661µ ± 7%       ~ (p=0.786 n=6)
SchemaValidation_FormatValidation-4          1.598µ ± 3%   1.596µ ± 2%       ~ (p=0.818 n=6)
SchemaValidation_ManySchemas-4               1.843µ ± 3%   1.831µ ± 3%       ~ (p=0.976 n=6)
geomean                                      1.529µ        1.521µ       -0.52%

                                    │ baseline-bench.txt │       benchmark-results.txt        │
                                    │        B/op        │    B/op     vs base                │
SchemaValidation_Simple-4                   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_AllFields-4                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_FormatValidation-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_ManySchemas-4              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │       benchmark-results.txt        │
                                    │     allocs/op      │ allocs/op   vs base                │
SchemaValidation_Simple-4                   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_AllFields-4                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_FormatValidation-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_ManySchemas-4              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
                                   │ baseline-bench.txt │        benchmark-results.txt        │
                                   │       sec/op       │    sec/op     vs base               │
EventStoreAppend_InMemory-4                1.239µ ± 20%   1.226µ ± 30%        ~ (p=0.937 n=6)
EventStoreAppend_SQLite-4                  1.342m ±  4%   1.316m ±  6%        ~ (p=0.937 n=6)
GetTimeline_InMemory/events-10-4           14.54µ ±  5%   14.20µ ±  2%        ~ (p=0.132 n=6)
GetTimeline_InMemory/events-50-4           80.82µ ±  4%   80.75µ ±  2%        ~ (p=0.589 n=6)
GetTimeline_InMemory/events-100-4          127.1µ ±  2%   168.5µ ±  6%  +32.63% (p=0.002 n=6)
GetTimeline_InMemory/events-500-4          644.3µ ±  1%   832.3µ ±  8%  +29.19% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4         1.329m ±  2%   1.301m ±  1%   -2.08% (p=0.002 n=6)
GetTimeline_SQLite/events-10-4             73.92µ ±  2%   72.69µ ±  1%   -1.65% (p=0.002 n=6)
GetTimeline_SQLite/events-50-4             223.9µ ±  2%   219.8µ ±  1%   -1.80% (p=0.015 n=6)
GetTimeline_SQLite/events-100-4            404.9µ ±  3%   396.5µ ±  1%   -2.08% (p=0.002 n=6)
GetTimeline_SQLite/events-500-4            1.831m ±  1%   1.811m ±  1%        ~ (p=0.093 n=6)
GetTimeline_SQLite/events-1000-4           3.619m ±  4%   3.546m ±  0%   -2.01% (p=0.002 n=6)
geomean                                    214.4µ         221.2µ         +3.18%

                                   │ baseline-bench.txt │         benchmark-results.txt         │
                                   │        B/op        │     B/op       vs base                │
EventStoreAppend_InMemory-4                  814.5 ± 4%     829.5 ± 10%       ~ (p=0.621 n=6)
EventStoreAppend_SQLite-4                  1.984Ki ± 1%   1.984Ki ±  3%       ~ (p=0.913 n=6)
GetTimeline_InMemory/events-10-4           7.953Ki ± 0%   7.953Ki ±  0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4           46.62Ki ± 0%   46.62Ki ±  0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4          94.48Ki ± 0%   94.48Ki ±  0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4          472.8Ki ± 0%   472.8Ki ±  0%       ~ (p=0.076 n=6)
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%   944.3Ki ±  0%       ~ (p=0.232 n=6)
GetTimeline_SQLite/events-10-4             16.74Ki ± 0%   16.74Ki ±  0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-50-4             87.14Ki ± 0%   87.14Ki ±  0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-100-4            175.4Ki ± 0%   175.4Ki ±  0%       ~ (p=1.000 n=6)
GetTimeline_SQLite/events-500-4            846.1Ki ± 0%   846.1Ki ±  0%       ~ (p=0.455 n=6)
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%   1.639Mi ±  0%       ~ (p=0.054 n=6)
geomean                                    67.52Ki        67.62Ki        +0.15%
¹ all samples are equal

                                   │ baseline-bench.txt │        benchmark-results.txt        │
                                   │     allocs/op      │  allocs/op   vs base                │
EventStoreAppend_InMemory-4                  7.000 ± 0%    7.000 ± 0%       ~ (p=1.000 n=6) ¹
EventStoreAppend_SQLite-4                    53.00 ± 0%    53.00 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-10-4             125.0 ± 0%    125.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4             653.0 ± 0%    653.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4           1.306k ± 0%   1.306k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4           6.514k ± 0%   6.514k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-1000-4          13.02k ± 0%   13.02k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-10-4               382.0 ± 0%    382.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-50-4              1.852k ± 0%   1.852k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-100-4             3.681k ± 0%   3.681k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-500-4             18.54k ± 0%   18.54k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-1000-4            37.29k ± 0%   37.29k ± 0%       ~ (p=1.000 n=6) ¹
geomean                                     1.162k        1.162k       +0.00%
¹ all samples are equal

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 75.54348% with 45 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
iac/providerclient/adapter.go 75.40% 24 Missing and 21 partials ⚠️

📢 Thoughts on this report? Let us know!

…ented wraps gRPC err (Copilot)

- Scale rejects out-of-int32-range replicas explicitly (was clampInt32 → silent
  saturation → unintended scale); mirrors typedResourceDriver.Scale.
- mapResourceDriverGRPCError Unimplemented case wraps the original gRPC error
  (%w) so status.Code stays recoverable, consistent with the other mapped cases
  + translateRPCErr.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@intel352 intel352 merged commit 55c2018 into main Jun 3, 2026
27 checks passed
@intel352 intel352 deleted the feat/infra-providerclient-resourcedriver branch June 3, 2026 08:16
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