Skip to content

feat(plugins/localauthz): in-process Enforcer for scenario_stub RBAC demo (infra-admin v1.1 PR-5)#815

Closed
intel352 wants to merge 2 commits into
mainfrom
feat/infra-admin-scenario-authz-inproc-2026-06-01T0120
Closed

feat(plugins/localauthz): in-process Enforcer for scenario_stub RBAC demo (infra-admin v1.1 PR-5)#815
intel352 wants to merge 2 commits into
mainfrom
feat/infra-admin-scenario-authz-inproc-2026-06-01T0120

Conversation

@intel352
Copy link
Copy Markdown
Contributor

@intel352 intel352 commented Jun 1, 2026

What

PR-5 (amendment, ADR-0009) of the infra-admin v1.1 program. Adds a build-tagged (scenario_stub) in-process Enforcer so scenario 92 can demonstrate v1.1 server-side write-tier RBAC.

Why (backport)

Execution disproved a design assumption: infra.admin resolves authz_module as an in-process Go Enforcer (app.GetService + type-assert), but authz.casbin is external-only (workflow-plugin-authz gRPC plugin) — the host gets a RemoteModule proxy with no Go Enforce. So the scenario couldn't boot with RBAC. Dropping authz_module (authn-only) would weaken the locked security scope (forbidden). Fix = a minimal in-process Enforcer, scenario-only.

Changes

  • plugins/localauthz — EnginePlugin registering module type authz.local: reads config.policies ([sub,obj,act] triples), registers itself as a service (ProvidesServices), implements Enforce(sub,obj,act string, extra ...string)(bool,error) (exact-match, allow-effect, default-deny — matches module/infra_admin.go Enforcer). No casbin dep.
  • plugins/all/extras_stub.go (//go:build scenario_stub) — appends localauthz.New() (alongside the P1 stub provider). Production builds exclude it (guard test TestDefaultPlugins_BaseExcludesLocalAuthz).

Verification

go test ./plugins/localauthz/ 4/4 + tagged/untagged exclusion tests + go build -tags scenario_stub ./cmd/server + golangci-lint --new-from-rev=origin/main 0 issues. Two-stage reviewed (spec + quality SHIP-IT). Rollback: revert — untagged builds unaffected (scenario-only). ADR-0009.

🤖 Generated with Claude Code

intel352 and others added 2 commits June 1, 2026 01:26
…o_stub

Adds plugins/localauthz — an EnginePlugin registering module type 'authz.local'.
The module reads config.policies [][]string ([sub,obj,act] triples), registers
itself via ProvidesServices + app.RegisterService so infra.admin's
app.GetService(authz_module, &Enforcer) resolves it, and implements:

  Enforce(sub, obj, act string, extra ...string) (bool, error)

Exact-match semantics: allow-effect, default-deny, no Casbin dependency.
The variadic extra...string matches module/infra_admin.go:142 Enforcer exactly.

Also wires localauthz.New() into plugins/all/extras_stub.go (//go:build
scenario_stub) alongside the existing stub provider, and adds DOCUMENTATION.md
row for the new authz.local module type (required by TestDocumentationCoverage).

Tests:
- TestPlugin_ModuleFactories: 'authz.local' registered
- TestEnforce_Table: 9-case table (operator allow, viewer partial, deny, unknown)
- TestEnforce_VariadicCompatible: extra args silently accepted, no panic
- TestEnforce_EmptyPolicies: default-deny with zero policies
- TestDefaultPlugins_ContainsLocalAuthz: tagged build includes plugin

Untagged build: localauthz absent (existing TestDefaultPlugins_BaseExcludesStub)
Tagged build: go build -tags scenario_stub ./cmd/server → exit 0
lint: 0 issues

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_stub) builds

Production-exclusion guard for the in-process authz.local enforcer (was
uncommitted in the shared worktree). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 1, 2026 05:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a lightweight, in-process authorization plugin (authz.local) intended for scenario_stub builds so infra-admin scenario(s) can demonstrate server-side RBAC without relying on the external-only Casbin authz plugin.

Changes:

  • Introduces plugins/localauthz EnginePlugin providing an in-process Enforce(sub,obj,act,...) implementation backed by exact-match policy triples.
  • Wires the plugin into plugins/all only under the scenario_stub build tag, with tests guarding both inclusion (tagged) and exclusion (untagged).
  • Documents the new authz.local module type as scenario-only in DOCUMENTATION.md.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
plugins/localauthz/plugin.go Adds the in-process authz.local module + policy parsing + service registration.
plugins/localauthz/plugin_test.go Adds unit tests for factory registration and enforcement behavior.
plugins/all/extras_stub.go Registers localauthz in the scenario-only default plugin set.
plugins/all/extras_stub_test.go Asserts localauthz is included under scenario_stub.
plugins/all/extras_base_test.go Asserts localauthz is excluded without scenario_stub.
DOCUMENTATION.md Documents authz.local as scenario-only.

Comment on lines +19 to +20
// Each policy is a [subject, object, action] triple. A request is allowed
// when it exactly matches at least one triple; all other requests are denied.
Comment on lines +67 to +68
// policy is a parsed [subject, object, action] triple.
type policy struct{ sub, obj, act string }
Comment on lines +81 to +88
// Init parses the policies from config and logs a startup message.
func (m *localAuthzModule) Init(app modular.Application) error {
m.policies = parsePolicies(m.cfg)
app.Logger().Info("authz.local: loaded policies",
"module", m.name,
"count", len(m.policies),
)
return nil
Comment on lines +109 to +116
var enf enforcer
for _, svc := range sa.ProvidesServices() {
if e, ok := svc.Instance.(enforcer); ok {
enf = e
}
}
// Variadic: extra args must not panic or cause error.
got, err := enf.Enforce("u", "o", "a", "extra1", "extra2")
Comment on lines +139 to +145
var enf enforcer
for _, svc := range sa.ProvidesServices() {
if e, ok := svc.Instance.(enforcer); ok {
enf = e
}
}
got, err := enf.Enforce("anyone", "infra:apply", "allow")
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 89.83051% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
plugins/localauthz/plugin.go 89.83% 4 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:309: parsing iteration count: invalid syntax
baseline-bench.txt:263071: parsing iteration count: invalid syntax
baseline-bench.txt:558359: parsing iteration count: invalid syntax
baseline-bench.txt:871845: parsing iteration count: invalid syntax
baseline-bench.txt:1153765: parsing iteration count: invalid syntax
baseline-bench.txt:1430153: parsing iteration count: invalid syntax
benchmark-results.txt:309: parsing iteration count: invalid syntax
benchmark-results.txt:341875: parsing iteration count: invalid syntax
benchmark-results.txt:894893: parsing iteration count: invalid syntax
benchmark-results.txt:1217094: parsing iteration count: invalid syntax
benchmark-results.txt:1560787: parsing iteration count: invalid syntax
benchmark-results.txt:1866377: 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              10.821m ± 54%   9.661m ± 69%        ~ (p=0.240 n=6)
ComponentLoad-4                     3.716m ±  4%   3.455m ±  1%   -7.02% (p=0.002 n=6)
ComponentExecute-4                  1.864µ ±  2%   1.817µ ±  1%   -2.50% (p=0.004 n=6)
PoolContention/workers-1-4          1.069µ ±  2%   1.012µ ±  4%   -5.33% (p=0.002 n=6)
PoolContention/workers-2-4          1.042µ ±  3%   1.009µ ±  2%   -3.21% (p=0.009 n=6)
PoolContention/workers-4-4          1.077µ ±  3%   1.012µ ±  1%   -6.08% (p=0.002 n=6)
PoolContention/workers-8-4          1.075µ ±  2%   1.009µ ±  1%   -6.14% (p=0.002 n=6)
PoolContention/workers-16-4         1.056µ ±  2%   1.018µ ±  3%   -3.65% (p=0.004 n=6)
ComponentLifecycle-4                3.924m ±  7%   3.483m ±  0%  -11.25% (p=0.002 n=6)
SourceValidation-4                  2.129µ ±  3%   2.090µ ±  1%   -1.83% (p=0.002 n=6)
RegistryConcurrent-4                747.1n ±  6%   750.8n ±  6%        ~ (p=0.937 n=6)
LoaderLoadFromString-4              3.807m ±  7%   3.516m ±  0%   -7.66% (p=0.002 n=6)
geomean                             19.14µ         18.10µ         -5.47%

                            │ 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.699 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.894 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.102 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                  303.2n ± 1%   297.3n ± 7%       ~ (p=0.065 n=6)
CircuitBreakerExecution_Success-4          22.68n ± 1%   22.68n ± 0%       ~ (p=0.985 n=6)
CircuitBreakerExecution_Failure-4          70.89n ± 0%   70.94n ± 0%       ~ (p=0.082 n=6)
geomean                                    78.71n        78.21n       -0.63%

                                  │ 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              349.5n ± 15%   289.8n ±  1%  -17.11% (p=0.002 n=6)
IaCStateBackend_GRPC-4                   10.61m ±  1%   10.91m ±  8%        ~ (p=0.485 n=6)
JQTransform_Simple-4                     724.1n ± 32%   655.7n ± 29%        ~ (p=0.132 n=6)
JQTransform_ObjectConstruction-4         1.563µ ±  1%   1.396µ ±  1%  -10.69% (p=0.002 n=6)
JQTransform_ArraySelect-4                3.806µ ±  3%   3.397µ ±  2%  -10.75% (p=0.002 n=6)
JQTransform_Complex-4                    44.15µ ±  1%   42.86µ ±  5%        ~ (p=0.065 n=6)
JQTransform_Throughput-4                 1.911µ ±  1%   1.730µ ±  1%   -9.47% (p=0.002 n=6)
SSEPublishDelivery-4                     63.87n ±  1%   63.81n ±  1%        ~ (p=0.818 n=6)
geomean                                  4.139µ         3.832µ         -7.42%

                                 │ 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.905Mi ± 5%     5.697Mi ± 9%       ~ (p=0.310 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.45%               ²
¹ 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.874k ± 0%     6.858k ± 0%  -0.23% (p=0.041 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.069µ ± 14%   1.091µ ± 16%       ~ (p=0.307 n=6)
SchemaValidation_AllFields-4                1.618µ ±  2%   1.627µ ±  6%       ~ (p=0.329 n=6)
SchemaValidation_FormatValidation-4         1.569µ ±  2%   1.583µ ±  2%       ~ (p=0.240 n=6)
SchemaValidation_ManySchemas-4              1.596µ ±  2%   1.595µ ±  1%       ~ (p=0.974 n=6)
geomean                                     1.442µ         1.455µ        +0.88%

                                    │ 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.050µ ± 17%   1.154µ ± 11%        ~ (p=0.394 n=6)
EventStoreAppend_SQLite-4                  1.015m ±  2%   1.009m ±  3%        ~ (p=0.485 n=6)
GetTimeline_InMemory/events-10-4           13.53µ ±  1%   13.84µ ±  5%        ~ (p=0.394 n=6)
GetTimeline_InMemory/events-50-4           66.21µ ± 16%   76.71µ ±  3%  +15.86% (p=0.026 n=6)
GetTimeline_InMemory/events-100-4          116.4µ ±  1%   153.2µ ±  2%  +31.69% (p=0.002 n=6)
GetTimeline_InMemory/events-500-4          596.6µ ±  1%   775.4µ ±  2%  +29.97% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4         1.213m ±  1%   1.209m ± 33%        ~ (p=0.937 n=6)
GetTimeline_SQLite/events-10-4             87.86µ ±  2%   86.92µ ±  1%        ~ (p=0.180 n=6)
GetTimeline_SQLite/events-50-4             231.6µ ±  2%   228.2µ ±  0%   -1.47% (p=0.002 n=6)
GetTimeline_SQLite/events-100-4            411.6µ ±  2%   398.6µ ±  0%   -3.15% (p=0.002 n=6)
GetTimeline_SQLite/events-500-4            1.788m ±  1%   1.737m ±  0%   -2.85% (p=0.002 n=6)
GetTimeline_SQLite/events-1000-4           3.470m ±  3%   3.397m ±  1%   -2.10% (p=0.041 n=6)
geomean                                    200.3µ         212.1µ         +5.87%

                                   │ baseline-bench.txt │         benchmark-results.txt         │
                                   │        B/op        │     B/op       vs base                │
EventStoreAppend_InMemory-4                  808.0 ± 8%     782.0 ± 10%       ~ (p=0.935 n=6)
EventStoreAppend_SQLite-4                  1.983Ki ± 1%   1.984Ki ±  1%       ~ (p=0.732 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%  +0.00% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%   944.3Ki ±  0%       ~ (p=0.245 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.727 n=6)
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%   1.639Mi ±  0%       ~ (p=1.000 n=6)
geomean                                    67.47Ki        67.29Ki        -0.27%
¹ 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
Copy link
Copy Markdown
Contributor Author

intel352 commented Jun 1, 2026

Closing — wrong approach. Per maintainer feedback, scenario test fixtures (stub iac.provider, in-process enforcer) must NOT live in the workflow engine repo (even build-tagged). The established pattern (scenarios 85/86/87) is a scenario-owned cmd/server/main.go that imports the engine via NewEngineBuilder().WithPlugin(...) and registers fixtures from the scenario repo. Reworking: (1) revert the scenario_stub mechanism + stub provider/enforcer from workflow core; (2) scenario 92 gets its own cmd/server/main.go with fixtures in workflow-scenarios. Tracking in the rework.

@intel352 intel352 closed this Jun 1, 2026
@intel352 intel352 deleted the feat/infra-admin-scenario-authz-inproc-2026-06-01T0120 branch June 1, 2026 05:53
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