Skip to content

feat(iac): ActionStatus compensation enums + mapping fix (#698 Phase 2.3)#700

Merged
intel352 merged 4 commits into
mainfrom
feat/698-compensation-impl
May 17, 2026
Merged

feat(iac): ActionStatus compensation enums + mapping fix (#698 Phase 2.3)#700
intel352 merged 4 commits into
mainfrom
feat/698-compensation-impl

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

Phase 2.3 of workflow#640 series. Defines the 3 ActionStatus enum values Phase 2 reserved (tags 4+5) + Phase 2.5 deferred (tag 6 SKIPPED). Refactors engine apply.go mapping from single mapDispatchErrToStatus to 3 phase-specific helpers + fixes 6 call sites that were misclassifying pre-dispatch failures as Error/DeleteFailed and post-hook failures as Error/DeleteFailed.

Resolves Phase 2 + 2.5 deferred Copilot/code-reviewer findings about apply.go:235 (ctx-cancel), apply.go:354 (JIT-fail-on-delete), apply.go:313 + 316 (post-hook conflation).

Changes (4 commits)

  1. feat(proto) — extend ActionStatus enum with COMPENSATED=4 + COMPENSATION_FAILED=5 + SKIPPED=6; regen iac.pb.go (iac_grpc.pb.go no-op).
  2. feat(interfaces) — extend ActionStatus Go iota constants matching proto tag numbers + godoc update with Phase 2.3 consumer-update note.
  3. feat(wfctl) — extend mapPBActionStatusToInterface switch (fail-closed default unchanged).
  4. feat(engine) — refactor mapDispatchErrToStatus into 3 phase-specific helpers; update 6 call sites to assign iterStatus directly at each error site.

ADR alignment

  • ADR 0024 (no compat shim): existing ActionStatusError consumers must update to check {Error, DeleteFailed, CompensationFailed, Skipped} for "action did not produce desired end-state". Documented in interfaces/iac_state.go godoc. Verified via grep — no external consumer keys behavior off Error alone.
  • ADR 0040 invariant 2 (failed-delete preservation): correctly enforced now — ctx-cancel-of-delete maps to SKIPPED (no state change) instead of DeleteFailed (state preservation required for already-attempted delete). Misclassification was a bug.
  • ADR 0040 invariant 3 (compensation evidence): partial — COMPENSATION_FAILED is reachable; COMPENSATED reserved for future engine/plugin auto-compensation (Phase 2.4+).

Test plan

  • Build clean (GOWORK=off go build ./...)
  • Full repo race-clean (GOWORK=off go test ./... -race -count=1)
  • golangci-lint clean (0 issues)
  • TestActionStatus_Phase23_ValuesMatchProtoTags PASS (7 cases)
  • TestMapPBActionStatusToInterface_ActionableValues extended with 3 new cases (6 total)
  • TestStatusHelpers_Phase23 pins all 3 helper return values
  • TestApplyPlanWithHooks_PopulatesActions_PreDispatchDriverError updated to expect SKIPPED (Phase 2.3 reclassification)
  • No external ActionStatusError consumer keys behavior off it alone (assumption Feature: Workflow UI #1 verified)

Cascade context

Workflow-only — NO plugin cascade required. Plugins continue emitting Success/Error/DeleteFailed (engine populates new statuses server-side from misclassified paths). Plugins may opt to emit COMPENSATED in v_next if they implement own compensation.

After merge → tag v0.56.0 → memory update + #698 close.

Rollback

Revert PR. ActionStatus enum loses 3 new values; mapPBActionStatusToInterface switch loses 3 cases; engine mapping reverts to mapDispatchErrToStatus single-function. Cut v0.56.1 reverting whichever commit broke. Per ADR 0024 matched-pair rollback. No downstream consumer recompile required.

Plan: `docs/plans/2026-05-17-phase2.3-compensation-enums.md` (LOCKED sha256 2753ca0e2a14)
Design: `docs/plans/2026-05-17-phase2.3-compensation-enums-design.md`

🤖 Generated with Claude Code

intel352 and others added 4 commits May 17, 2026 10:22
…spatch/post-hook (#698 Phase 2.3)

Replaces single mapDispatchErrToStatus with 3 phase-specific helpers
(statusForPreDispatchSkip / statusForDispatchError / statusForPostHookFailure).
Each error-setter site now assigns iterStatus directly based on the phase
that raised iterErr, eliminating the late-mapping conflation where the
deferred closure couldn't distinguish phases.

6 call sites updated:
- ctx-cancel → SKIPPED
- JIT-substitution-fail → SKIPPED
- driver-resolve-fail → SKIPPED
- dispatch hookDispatchError → CompensationFailed
- dispatch generic error → Error / DeleteFailed (unchanged)
- post-delete-hook → CompensationFailed
- post-apply-hook → CompensationFailed

Resolves Phase 2 + 2.5 deferred Copilot/code-reviewer findings about
apply.go:235 (ctx-cancel), apply.go:354 (JIT-fail-on-delete),
apply.go:313 + 316 (post-hook conflation).

Pre-existing TestApplyPlanWithHooks_PopulatesActions_PreDispatchDriverError
updated: driver-resolve now expects SKIPPED (was Error) — locks in the
Phase 2.3 corrected mapping.

Added TestStatusHelpers_Phase23 pinning all 3 helper return values
(including statusForDispatchError(create/update/delete) branches).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 17, 2026 14:32
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 Phase 2.3 ActionStatus values to the IaC proto/Go interface boundary and refines engine-side status assignment so wfctl can distinguish pre-dispatch skips, dispatch failures, and post-hook failures.

Changes:

  • Extended ActionStatus with COMPENSATED=4, COMPENSATION_FAILED=5, and SKIPPED=6 (proto + regenerated Go).
  • Updated Go interfaces.ActionStatus constants/docs and added a lockstep-values test.
  • Refactored engine apply status mapping into phase-specific helpers and fixed call sites to assign the correct status at each error site; updated/added tests accordingly.
  • Extended wfctl proto→interface status mapping and test coverage for the new enum values.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
plugin/external/proto/iac.proto Defines the new Phase 2.3 ActionStatus enum values and documents their intended semantics.
plugin/external/proto/iac.pb.go Regenerated protobuf output reflecting the new enum values.
interfaces/iac_state.go Adds the new ActionStatus constants (0–6 lockstep) and updates consumer-facing guidance.
interfaces/iac_state_phase23_test.go Verifies Go ActionStatus iota values match proto tag numbers (0–6).
iac/wfctlhelpers/apply.go Replaces late-mapping with explicit per-site status assignment (pre-dispatch SKIPPED, dispatch Error/DeleteFailed, post-hook CompensationFailed).
iac/wfctlhelpers/apply_hooks_test.go Updates expectations for pre-dispatch driver resolve failures and pins the new helper mappings.
cmd/wfctl/iac_typed_adapter.go Maps new proto ActionStatus values to interfaces.ActionStatus (fail-closed remains).
cmd/wfctl/iac_typed_adapter_test.go Extends actionable-value test cases to include the new Phase 2.3 statuses.
Files not reviewed (1)
  • plugin/external/proto/iac.pb.go: Language not supported

@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
iac/wfctlhelpers/apply.go 94.44% 1 Missing ⚠️

📢 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:353593: parsing iteration count: invalid syntax
baseline-bench.txt:686309: parsing iteration count: invalid syntax
baseline-bench.txt:1188552: parsing iteration count: invalid syntax
baseline-bench.txt:1477939: parsing iteration count: invalid syntax
baseline-bench.txt:1813463: parsing iteration count: invalid syntax
benchmark-results.txt:276: parsing iteration count: invalid syntax
benchmark-results.txt:304969: parsing iteration count: invalid syntax
benchmark-results.txt:591326: parsing iteration count: invalid syntax
benchmark-results.txt:901068: parsing iteration count: invalid syntax
benchmark-results.txt:1220692: parsing iteration count: invalid syntax
benchmark-results.txt:1558622: 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               7.009m ± 57%   6.696m ± 55%        ~ (p=0.699 n=6)
ComponentLoad-4                     3.486m ±  5%   3.488m ±  4%        ~ (p=0.589 n=6)
ComponentExecute-4                  1.835µ ±  4%   1.835µ ±  0%        ~ (p=0.900 n=6)
PoolContention/workers-1-4          1.013µ ±  3%   1.016µ ±  3%        ~ (p=0.413 n=6)
PoolContention/workers-2-4          1.027µ ±  2%   1.014µ ±  1%        ~ (p=0.139 n=6)
PoolContention/workers-4-4          1.026µ ±  2%   1.014µ ±  1%   -1.12% (p=0.006 n=6)
PoolContention/workers-8-4          1.011µ ±  1%   1.010µ ±  1%        ~ (p=0.965 n=6)
PoolContention/workers-16-4         1.013µ ±  0%   1.055µ ±  4%        ~ (p=0.173 n=6)
ComponentLifecycle-4                3.508m ±  0%   3.556m ±  1%   +1.36% (p=0.002 n=6)
SourceValidation-4                  2.074µ ±  1%   2.150µ ±  1%   +3.69% (p=0.002 n=6)
RegistryConcurrent-4                748.0n ±  4%   823.7n ±  3%  +10.11% (p=0.002 n=6)
LoaderLoadFromString-4              3.540m ±  1%   3.596m ±  3%   +1.58% (p=0.002 n=6)
geomean                             17.70µ         17.90µ         +1.14%

                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │        B/op        │     B/op      vs base                │
InterpreterCreation-4               2.027Mi ± 0%   2.027Mi ± 0%       ~ (p=0.818 n=6)
ComponentLoad-4                     2.180Mi ± 0%   2.180Mi ± 0%       ~ (p=0.848 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.126 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.225 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                  297.0n ± 5%   297.9n ± 5%       ~ (p=0.788 n=6)
CircuitBreakerExecution_Success-4          22.68n ± 0%   22.65n ± 0%       ~ (p=0.301 n=6)
CircuitBreakerExecution_Failure-4          70.94n ± 0%   70.94n ± 0%       ~ (p=0.825 n=6)
geomean                                    78.18n        78.22n       +0.06%

                                  │ 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              295.6n ± 27%   302.5n ± 20%        ~ (p=0.240 n=6)
IaCStateBackend_GRPC-4                   10.27m ±  2%   10.36m ±  2%   +0.89% (p=0.041 n=6)
JQTransform_Simple-4                     641.0n ± 33%   677.4n ± 55%        ~ (p=0.093 n=6)
JQTransform_ObjectConstruction-4         1.443µ ±  2%   1.637µ ±  1%  +13.44% (p=0.002 n=6)
JQTransform_ArraySelect-4                3.444µ ±  0%   3.659µ ±  2%   +6.23% (p=0.002 n=6)
JQTransform_Complex-4                    41.53µ ±  3%   43.52µ ±  1%   +4.79% (p=0.002 n=6)
JQTransform_Throughput-4                 1.769µ ±  0%   1.983µ ±  1%  +12.07% (p=0.002 n=6)
SSEPublishDelivery-4                     63.96n ±  0%   66.37n ±  3%   +3.77% (p=0.002 n=6)
geomean                                  3.821µ         4.053µ         +6.07%

                                 │ 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.730Mi ± 11%     5.892Mi ± 8%       ~ (p=0.240 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.35%               ²
¹ 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.859k ± 0%     6.864k ± 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.094µ ± 10%   1.085µ ± 16%       ~ (p=0.558 n=6)
SchemaValidation_AllFields-4                1.652µ ±  3%   1.611µ ±  1%  -2.45% (p=0.002 n=6)
SchemaValidation_FormatValidation-4         1.579µ ±  1%   1.563µ ±  1%  -1.01% (p=0.039 n=6)
SchemaValidation_ManySchemas-4              1.589µ ±  1%   1.585µ ±  2%       ~ (p=0.903 n=6)
geomean                                     1.459µ         1.442µ        -1.15%

                                    │ 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.068µ ± 12%   1.072µ ± 16%        ~ (p=0.699 n=6)
EventStoreAppend_SQLite-4                  1.024m ±  3%   1.008m ±  3%        ~ (p=0.699 n=6)
GetTimeline_InMemory/events-10-4           12.56µ ±  2%   13.08µ ±  2%   +4.12% (p=0.002 n=6)
GetTimeline_InMemory/events-50-4           69.09µ ±  4%   71.58µ ± 19%        ~ (p=0.240 n=6)
GetTimeline_InMemory/events-100-4          139.8µ ±  1%   115.0µ ±  1%  -17.69% (p=0.002 n=6)
GetTimeline_InMemory/events-500-4          569.6µ ±  1%   586.7µ ±  0%   +3.01% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4         1.162m ±  1%   1.198m ±  1%   +3.09% (p=0.002 n=6)
GetTimeline_SQLite/events-10-4             84.84µ ±  1%   87.09µ ±  2%   +2.64% (p=0.002 n=6)
GetTimeline_SQLite/events-50-4             220.1µ ±  1%   225.0µ ±  1%   +2.23% (p=0.002 n=6)
GetTimeline_SQLite/events-100-4            385.1µ ±  1%   394.4µ ±  1%   +2.43% (p=0.002 n=6)
GetTimeline_SQLite/events-500-4            1.673m ±  0%   1.713m ±  1%   +2.44% (p=0.002 n=6)
GetTimeline_SQLite/events-1000-4           3.259m ±  0%   3.347m ±  0%   +2.72% (p=0.002 n=6)
geomean                                    197.1µ         198.0µ         +0.43%

                                   │ baseline-bench.txt │         benchmark-results.txt         │
                                   │        B/op        │     B/op       vs base                │
EventStoreAppend_InMemory-4                  746.0 ± 9%     760.5 ± 13%       ~ (p=0.327 n=6)
EventStoreAppend_SQLite-4                  1.985Ki ± 2%   1.984Ki ±  2%       ~ (p=0.942 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.182 n=6)
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%   944.3Ki ±  0%       ~ (p=0.054 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=1.000 n=6)
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%   1.639Mi ±  0%  -0.00% (p=0.013 n=6)
geomean                                    67.03Ki        67.13Ki        +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.

@intel352 intel352 merged commit 7a85593 into main May 17, 2026
32 checks passed
@intel352 intel352 deleted the feat/698-compensation-impl branch May 17, 2026 14:46
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