Skip to content

feat(sdk+wfctl): contract-diff extension for verify-capabilities (workflow#767)#773

Merged
intel352 merged 16 commits into
mainfrom
feat/767-contract-diff
May 24, 2026
Merged

feat(sdk+wfctl): contract-diff extension for verify-capabilities (workflow#767)#773
intel352 merged 16 commits into
mainfrom
feat/767-contract-diff

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

Extends wfctl plugin verify-capabilities (shipped at v0.63.2 via #765/#769) with a typed-IaC service diff. Closes #767.

  • New PluginManifest.IaCServices []string field with nested-promotion (mirrors IaCStateBackends precedent).
  • New sdk.BuildContractRegistryForPlugin(grpcSrv, namespacePrefix) filtering helper.
  • iacPluginServiceBridge.GetContractRegistry rewired to use the namespace-filtered helper (strips go-plugin infra services).
  • runPluginVerifyCapabilities now issues pbClient.GetContractRegistry after GetManifest and computes a directional diff against plugin.json.iacServices: missing-from-binary → FAIL, extra-in-binary → WARN.
  • Defense-in-depth: client-side namespace filter so old-SDK plugin binaries don't WARN-spam.
  • 3 integration fixture scenarios (iac-good / iac-missing-service / iac-extra-service) exercising the PASS / FAIL / WARN paths end-to-end.

Design

See: docs/plans/2026-05-24-contract-diff-design.md

Implementation Plan

See: docs/plans/2026-05-24-contract-diff.md (Status: Locked 2026-05-24T13:25:37Z; sha256=0924488cfddf…)

ADR

decisions/0042-verify-capabilities-iac-namespace.md — namespace prefix derivation single-source-of-truth pattern (derive from pb.IaCProviderRequired_ServiceDesc.ServiceName via TrimSuffix; both SDK bridge and client-side filter use the same derivation).

Scope Manifest

  • PR Count: 1
  • Tasks: 5
  • Status: Locked 2026-05-24T13:25:37Z
PR # Title Tasks Branch
1 feat(sdk+wfctl): contract-diff extension for verify-capabilities (workflow#767) Task 1, Task 2, Task 3, Task 4, Task 5 feat/767-contract-diff

Changes

  • Task 1 (7dfbaecab): plugin/manifest.go — adds IaCServices []string \json:"iacServices,omitempty"`field;UnmarshalJSONlegacy-object branch extended for nestedcapabilities.iacServicespromotion viaappendUnique`. 4 unit tests including dedup across top-level + nested forms.
  • Task 2 (a14de6ab9): plugin/external/sdk/contracts.go — adds BuildContractRegistryForPlugin(grpcSrv, namespacePrefix) that enumerates registered services and returns only those matching the prefix, sorted, as SERVICE-kind STRICT_PROTO ContractDescriptors. Existing BuildContractRegistry (full-surface) retained.
  • Task 3 (5d87fba11): plugin/external/sdk/iacserver.go:302iacPluginServiceBridge.GetContractRegistry derives prefix via strings.TrimSuffix(pb.IaCProviderRequired_ServiceDesc.ServiceName, \".IaCProviderRequired\") + \".\" (ADR 0042) and delegates to the filtered helper. Internal regression test confirms PluginService + health are excluded.
  • Task 4 (6031a29d9): cmd/wfctl/plugin_verify_capabilities.go — adds serviceNamesFromRegistry(reg, prefix) helper (kind + prefix filter; named distinct from deploy_providers.go's registeredIaCServices to avoid package main symbol clash) and diffIaCServices(declared, advertised) directional set-difference. New pbClient.GetContractRegistry RPC issued after GetManifest; codes.Unimplemented mapped to empty registry; missing-from-binary appended to failures, extra-in-binary emitted as WARN to stderr.
  • Task 5 (ac48371e3): 3 fixture scenarios + 3 integration tests:
    • iac-good: declares + registers both IaCProviderRequired and IaCProviderFinalizer → PASS.
    • iac-missing-service: declares both but binary ONLY embeds UnimplementedIaCProviderRequiredServer (NO Finalizer — the embed would satisfy the interface via mustEmbed* sentinel) → FAIL on Finalizer.
    • iac-extra-service: registers both but declares only Required → WARN on Finalizer (exit 0).

Test Plan

  • GOWORK=off go test ./... — all packages PASS (plugin, plugin/external/sdk, cmd/wfctl, plus 14 others)
  • GOWORK=off go vet ./... — 0 issues
  • golangci-lint run ./cmd/wfctl/... ./plugin/... — 0 issues
  • TestPluginConformance regression (Task 3 touched SDK bridge) — PASS (54s)
  • End-to-end CLI: wfctl plugin verify-capabilities --binary /tmp/iac-good cmd/wfctl/testdata/verify_capabilities/iac-good → exit 0, OK verify-iac-good (PASS path)
  • End-to-end CLI: wfctl plugin verify-capabilities --binary /tmp/iac-missing cmd/wfctl/testdata/verify_capabilities/iac-missing-service → exit 1, stderr contains iacServices: + IaCProviderFinalizer (FAIL path)
  • All 5 implementing commits pushed to origin/feat/767-contract-diff

Out of scope (deferred to follow-up PRs)

  • Sweep of 4 IaC plugin repos (aws/azure/gcp/digitalocean) to populate iacServices in plugin.json — separate per-repo PRs after this lands and v0.64+ ships.
  • validate-contract static enforcement of non-empty iacServices for type:\"iac\" plugins.
  • Multi-namespace support beyond workflow.plugin.external.iac.*.
  • Auto-population of iacServices from runtime introspection.

Process record

  • Design: 4 adversarial cycles (cycle 4 PASS).
  • Plan: 3 adversarial cycles (cycle 3 PASS) — caught the registeredIaCServices name-clash + iac-missing-service Finalizer-embed false-PASS + bash pipeline \$? bug + missing go.sum in fixtures before any code was written.
  • Alignment check: 2 cycles (cycle 2 PASS after ADR 0042 was authored).
  • Scope-locked at 2026-05-24T13:25:37Z (sha256=0924488cfddf…).
  • Spec review: PASS. Code review: APPROVED (3 non-blocking Minor findings).

🤖 Generated with Claude Code

intel352 added 16 commits May 24, 2026 08:58
…low#767)

Adds capabilities.iacServices schema to PluginManifest + BuildContractRegistryForPlugin SDK helper + extends verify-capabilities subcommand to walk GetContractRegistry. Sweeps 4 IaC plugins. Closes deferred contract-diff from #765 cycle-3 review.
…helpers)

Cycle 1 FAIL: 2 Critical (workflow.iac.v1 namespace never existed on wire — actual workflow.plugin.external.iac per proto pkg decl; duplicated existing registeredIaCServices + iacServiceRequired helpers without citing). + 5 Important.

Cycle 2:
- Derive namespace prefix programmatically from pb.IaCProviderRequired_ServiceDesc.ServiceName (single source of truth keyed to .proto pkg).
- Cite + reuse registeredIaCServices (deploy_providers.go:344) + iacServiceRequired const (iac_typed_adapter.go:52).
- Directional diff (FAIL missing-from-binary; WARN extra-in-binary) per IMPORTANT-1.
- Use cached adapter.ContractRegistry() — no redundant RPC (IMPORTANT-2).
- Sweep-target SDK pin assumption explicit (IMPORTANT-4).
- IaCStateBackend orthogonality documented (IMPORTANT-5).
- Non-goal: embedded plugin.json verify (IMPORTANT-3).
Cycle 2 PASS with 4 Important to fold. Cycle 3:
- ContractRegistryError() check ahead of diff (surface RPC errors verbatim, no synthetic FAILs).
- iacserver.go:302 added to §Files so bridge calls BuildContractRegistryForPlugin (SDK helper not dead code for sweep targets).
- Fixture construction recipes spelled out (iac-good/iac-missing-service/iac-extra-service stub providers).
- Hard-cite #765 as sequencing prerequisite in §Assumptions.
6 tasks, 1 PR. Pairs with cycle-3-PASS design. Task 5 is no-op acknowledgement of cycle-3 reviewer Option B (don't factor existing registeredIaCServices helper this PR).
…nline-spawn pattern)

#765 PR #769 + v0.63.2 landed since cycle 3 paused. Worktree rebased onto current main with verify-capabilities.go present. Replan: direct pbClient.GetContractRegistry(ctx, Empty) after existing GetManifest call (line 137); explicit codes.Unimplemented branch maps to empty registry. Drops cycle-3's adapter-based hypothesis (#765 ships inline-spawn, NOT adapter).
…wer)

Cycle 4 PASS with 3 Important. Apply inline:
- I-2: drop iac_contract_filter.go NEW proposal; reuse registeredIaCServices in-place (both package main)
- I-1: add git-grep audit confirming iacserver.go:302 rebinding is safe (4 existing consumers all already filter)
- I-3: reword Unimplemented branch to distinguish empty-LHS (skip) vs non-empty-LHS (FAIL on every declared) cases
…ent pattern)

5 tasks, 1 PR. Mirrors design cycle 4 PASS. Direct pbClient.GetContractRegistry after existing GetManifest call (line 131 inline-spawn pattern). Explicit codes.Unimplemented branch. Reuses #765 fixture pattern + IaCStateBackends UnmarshalJSON precedent.
…r from adversarial cycle 1

Critical: registeredIaCServices→serviceNamesFromRegistry unconditional rename; commit go.sum in Task 5 fixtures. Important: client-side namespace filter (defense-in-depth); dedup test for both-top-and-nested. Minors: dead Finalize methods removed; per-task rollback notes → PR-level revert.
C1: iac-missing-service fixture must NOT embed UnimplementedIaCProviderFinalizerServer (Unimplemented satisfies the interface via mustEmbed sentinel → SDK registers it → false PASS). C2: bash pipeline $? reads tee exit not wfctl exit — capture WFCTL_EXIT=$? before any pipe in Final verification 3b.
…from design + plan

Resolves alignment-check MISSING finding: design cited decisions/NNNN-verify-capabilities-iac-namespace.md but no ADR existed. ADR documents the proto-descriptor TrimSuffix single-source-of-truth pattern that Tasks 2/3/4 derive from. Design + plan both updated to cite 0042 in place of NNNN.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

❌ Patch coverage is 84.37500% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/wfctl/plugin_verify_capabilities.go 76.74% 7 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

⏱ 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:287908: parsing iteration count: invalid syntax
baseline-bench.txt:606008: parsing iteration count: invalid syntax
baseline-bench.txt:943914: parsing iteration count: invalid syntax
baseline-bench.txt:1262716: parsing iteration count: invalid syntax
baseline-bench.txt:1555856: parsing iteration count: invalid syntax
benchmark-results.txt:276: parsing iteration count: invalid syntax
benchmark-results.txt:316267: parsing iteration count: invalid syntax
benchmark-results.txt:659735: parsing iteration count: invalid syntax
benchmark-results.txt:971706: parsing iteration count: invalid syntax
benchmark-results.txt:1317988: parsing iteration count: invalid syntax
benchmark-results.txt:1647191: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 9V74 80-Core Processor                
                            │ baseline-bench.txt │        benchmark-results.txt        │
                            │       sec/op       │    sec/op      vs base              │
InterpreterCreation-4              4.347m ± 130%   4.166m ± 153%       ~ (p=0.937 n=6)
ComponentLoad-4                    3.474m ±   1%   3.475m ±   1%       ~ (p=0.699 n=6)
ComponentExecute-4                 1.823µ ±   1%   1.816µ ±   1%       ~ (p=0.232 n=6)
PoolContention/workers-1-4         1.012µ ±   3%   1.013µ ±   2%       ~ (p=0.909 n=6)
PoolContention/workers-2-4         1.009µ ±   3%   1.010µ ±   1%       ~ (p=0.732 n=6)
PoolContention/workers-4-4         1.016µ ±   2%   1.006µ ±   1%  -1.03% (p=0.011 n=6)
PoolContention/workers-8-4         1.034µ ±   4%   1.011µ ±   1%  -2.23% (p=0.002 n=6)
PoolContention/workers-16-4        1.022µ ±   3%   1.009µ ±   1%  -1.37% (p=0.039 n=6)
ComponentLifecycle-4               3.519m ±   3%   3.487m ±   0%       ~ (p=0.310 n=6)
SourceValidation-4                 2.073µ ±   1%   2.080µ ±   1%       ~ (p=0.333 n=6)
RegistryConcurrent-4               744.9n ±   7%   734.6n ±   7%       ~ (p=0.589 n=6)
LoaderLoadFromString-4             3.584m ±   2%   3.543m ±   1%       ~ (p=0.132 n=6)
geomean                            17.01µ          16.84µ         -1.00%

                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │        B/op        │     B/op      vs base                │
InterpreterCreation-4               2.027Mi ± 0%   2.027Mi ± 0%       ~ (p=1.000 n=6)
ComponentLoad-4                     2.180Mi ± 0%   2.180Mi ± 0%       ~ (p=0.180 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.424 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.327 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                  296.8n ± 2%   297.8n ± 4%  +0.34% (p=0.039 n=6)
CircuitBreakerExecution_Success-4          22.67n ± 0%   22.71n ± 2%       ~ (p=0.134 n=6)
CircuitBreakerExecution_Failure-4          71.00n ± 0%   70.95n ± 0%       ~ (p=0.123 n=6)
geomean                                    78.17n        78.28n       +0.15%

                                  │ 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              296.5n ± 27%   295.4n ± 22%       ~ (p=0.455 n=6)
IaCStateBackend_GRPC-4                   10.30m ±  6%   10.20m ±  0%  -0.99% (p=0.009 n=6)
JQTransform_Simple-4                     656.9n ± 32%   628.8n ± 36%       ~ (p=0.132 n=6)
JQTransform_ObjectConstruction-4         1.447µ ±  8%   1.415µ ±  1%  -2.21% (p=0.004 n=6)
JQTransform_ArraySelect-4                3.473µ ±  1%   3.469µ ±  2%       ~ (p=0.851 n=6)
JQTransform_Complex-4                    42.07µ ±  0%   41.99µ ±  1%       ~ (p=0.310 n=6)
JQTransform_Throughput-4                 1.779µ ±  2%   1.776µ ±  1%       ~ (p=0.316 n=6)
SSEPublishDelivery-4                     64.25n ±  2%   63.80n ±  1%       ~ (p=0.288 n=6)
geomean                                  3.852µ         3.808µ        -1.14%

                                 │ 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.788Mi ± 11%     5.779Mi ± 8%       ~ (p=1.000 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.22Ki ±  0%     16.22Ki ± 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.02%               ²
¹ 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.865k ± 0%     6.860k ± 0%       ~ (p=0.461 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                    324.0 ± 0%      324.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.01%               ²
¹ 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.091µ ± 20%   1.082µ ± 5%       ~ (p=0.368 n=6)
SchemaValidation_AllFields-4                1.626µ ±  7%   1.640µ ± 2%       ~ (p=0.310 n=6)
SchemaValidation_FormatValidation-4         1.571µ ±  1%   1.571µ ± 2%       ~ (p=0.788 n=6)
SchemaValidation_ManySchemas-4              1.595µ ±  1%   1.606µ ± 2%       ~ (p=0.288 n=6)
geomean                                     1.452µ         1.454µ       +0.17%

                                    │ 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.131µ ± 10%   1.076µ ± 11%        ~ (p=0.221 n=6)
EventStoreAppend_SQLite-4                  1.188m ±  6%   1.064m ± 13%  -10.47% (p=0.026 n=6)
GetTimeline_InMemory/events-10-4           12.28µ ±  3%   13.34µ ±  2%   +8.63% (p=0.002 n=6)
GetTimeline_InMemory/events-50-4           68.77µ ±  2%   74.57µ ±  3%   +8.44% (p=0.002 n=6)
GetTimeline_InMemory/events-100-4          110.3µ ± 19%   119.4µ ±  2%        ~ (p=0.065 n=6)
GetTimeline_InMemory/events-500-4          559.6µ ±  1%   624.8µ ±  1%  +11.65% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4         1.132m ±  2%   1.255m ±  2%  +10.87% (p=0.002 n=6)
GetTimeline_SQLite/events-10-4             83.75µ ±  1%   91.99µ ±  1%   +9.84% (p=0.002 n=6)
GetTimeline_SQLite/events-50-4             220.4µ ±  5%   239.4µ ±  1%   +8.61% (p=0.002 n=6)
GetTimeline_SQLite/events-100-4            385.0µ ±  1%   415.6µ ±  3%   +7.95% (p=0.002 n=6)
GetTimeline_SQLite/events-500-4            1.669m ±  1%   1.768m ±  2%   +5.92% (p=0.002 n=6)
GetTimeline_SQLite/events-1000-4           3.260m ±  4%   3.457m ±  1%   +6.05% (p=0.002 n=6)
geomean                                    195.2µ         206.4µ         +5.70%

                                   │ baseline-bench.txt │        benchmark-results.txt         │
                                   │        B/op        │     B/op      vs base                │
EventStoreAppend_InMemory-4                  755.0 ± 6%     771.0 ± 6%       ~ (p=0.407 n=6)
EventStoreAppend_SQLite-4                  1.984Ki ± 2%   1.984Ki ± 1%       ~ (p=0.920 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=1.000 n=6)
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%   944.3Ki ± 0%  -0.00% (p=0.041 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.152 n=6)
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%   1.639Mi ± 0%       ~ (p=0.054 n=6)
geomean                                    67.09Ki        67.21Ki       +0.17%
¹ 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.

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.

verify-capabilities contract-diff: capabilities.iacServices schema + BuildContractRegistryForPlugin filter

1 participant