Skip to content

fix: preserve top-level protected infra flag#785

Merged
intel352 merged 1 commit into
mainfrom
fix/top-level-protected
May 26, 2026
Merged

fix: preserve top-level protected infra flag#785
intel352 merged 1 commit into
mainfrom
fix/top-level-protected

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • parse module-level protected: true into ModuleConfig and ResolvedModule
  • carry protected into ResourceSpec.Config so existing replace/delete safety gates see it
  • cover the multisite-style YAML shape with regression tests

Tests

  • GOWORK=off go test ./...

Copilot review is intentionally skipped as a gating requirement per current review outage, but reviewer is still requested for visibility.

@github-actions
Copy link
Copy Markdown

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:282: parsing iteration count: invalid syntax
baseline-bench.txt:535870: parsing iteration count: invalid syntax
baseline-bench.txt:823862: parsing iteration count: invalid syntax
baseline-bench.txt:1160430: parsing iteration count: invalid syntax
baseline-bench.txt:1501468: parsing iteration count: invalid syntax
baseline-bench.txt:2014163: parsing iteration count: invalid syntax
benchmark-results.txt:282: parsing iteration count: invalid syntax
benchmark-results.txt:314275: parsing iteration count: invalid syntax
benchmark-results.txt:602684: parsing iteration count: invalid syntax
benchmark-results.txt:922905: parsing iteration count: invalid syntax
benchmark-results.txt:1178668: parsing iteration count: invalid syntax
benchmark-results.txt:1699217: 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               7.855m ± 59%   8.361m ± 62%        ~ (p=0.937 n=6)
ComponentLoad-4                     3.868m ±  5%   3.749m ±  3%        ~ (p=0.093 n=6)
ComponentExecute-4                  1.974µ ±  3%   1.968µ ±  1%        ~ (p=0.937 n=6)
PoolContention/workers-1-4          1.121µ ±  4%   1.107µ ±  2%        ~ (p=0.177 n=6)
PoolContention/workers-2-4          1.128µ ±  2%   1.111µ ±  1%        ~ (p=0.240 n=6)
PoolContention/workers-4-4          1.103µ ±  1%   1.097µ ±  1%        ~ (p=0.091 n=6)
PoolContention/workers-8-4          1.110µ ±  1%   1.097µ ±  3%        ~ (p=0.058 n=6)
PoolContention/workers-16-4         1.114µ ±  2%   1.129µ ±  4%        ~ (p=0.063 n=6)
ComponentLifecycle-4                3.737m ±  9%   3.807m ±  1%        ~ (p=0.394 n=6)
SourceValidation-4                  2.398µ ±  3%   2.462µ ±  1%   +2.67% (p=0.022 n=6)
RegistryConcurrent-4                794.6n ±  3%   907.0n ±  2%  +14.14% (p=0.002 n=6)
LoaderLoadFromString-4              3.820m ±  2%   3.887m ±  3%   +1.77% (p=0.015 n=6)
geomean                             19.38µ         19.69µ         +1.61%

                            │ 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.074 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.329 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.857 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                  290.8n ± 3%   298.3n ± 4%       ~ (p=0.121 n=6)
CircuitBreakerExecution_Success-4          21.55n ± 0%   21.58n ± 1%       ~ (p=0.288 n=6)
CircuitBreakerExecution_Failure-4          66.84n ± 0%   66.80n ± 0%       ~ (p=0.188 n=6)
geomean                                    74.82n        75.47n       +0.88%

                                  │ 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              317.8n ± 25%   318.3n ± 26%        ~ (p=0.589 n=6)
IaCStateBackend_GRPC-4                   9.804m ±  2%   9.752m ±  3%        ~ (p=0.699 n=6)
JQTransform_Simple-4                     699.5n ± 48%   686.5n ± 38%        ~ (p=0.589 n=6)
JQTransform_ObjectConstruction-4         1.719µ ±  1%   1.540µ ±  2%  -10.44% (p=0.002 n=6)
JQTransform_ArraySelect-4                3.867µ ±  2%   3.580µ ±  3%   -7.42% (p=0.002 n=6)
JQTransform_Complex-4                    42.10µ ±  0%   40.96µ ±  2%   -2.71% (p=0.002 n=6)
JQTransform_Throughput-4                 2.152µ ±  2%   1.883µ ±  1%  -12.50% (p=0.002 n=6)
SSEPublishDelivery-4                     69.20n ±  1%   67.95n ±  1%   -1.80% (p=0.002 n=6)
geomean                                  4.166µ         3.969µ         -4.74%

                                 │ 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.908Mi ± 10%     5.764Mi ± 10%       ~ (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.31%               ²
¹ 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.837k ± 0%     6.839k ± 0%       ~ (p=0.613 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.00%               ²
¹ 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.124µ ± 12%   1.105µ ± 2%       ~ (p=0.132 n=6)
SchemaValidation_AllFields-4                1.663µ ± 13%   1.674µ ± 4%       ~ (p=0.937 n=6)
SchemaValidation_FormatValidation-4         1.597µ ±  1%   1.610µ ± 4%       ~ (p=0.240 n=6)
SchemaValidation_ManySchemas-4              1.839µ ±  4%   1.857µ ± 4%       ~ (p=0.818 n=6)
geomean                                     1.531µ         1.533µ       +0.16%

                                    │ 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.293µ ± 16%   1.294µ ± 19%        ~ (p=1.000 n=6)
EventStoreAppend_SQLite-4                  1.391m ±  4%   1.436m ±  4%        ~ (p=0.093 n=6)
GetTimeline_InMemory/events-10-4           14.41µ ±  5%   13.90µ ±  3%        ~ (p=0.093 n=6)
GetTimeline_InMemory/events-50-4           79.02µ ±  2%   76.25µ ±  3%   -3.50% (p=0.002 n=6)
GetTimeline_InMemory/events-100-4          158.2µ ±  3%   156.3µ ±  2%   -1.19% (p=0.026 n=6)
GetTimeline_InMemory/events-500-4          789.3µ ±  2%   795.7µ ±  3%        ~ (p=0.240 n=6)
GetTimeline_InMemory/events-1000-4         1.583m ±  1%   1.297m ± 20%  -18.08% (p=0.002 n=6)
GetTimeline_SQLite/events-10-4             112.9µ ±  9%   109.9µ ±  1%        ~ (p=0.699 n=6)
GetTimeline_SQLite/events-50-4             255.3µ ±  1%   254.5µ ±  2%        ~ (p=1.000 n=6)
GetTimeline_SQLite/events-100-4            428.9µ ±  2%   431.6µ ±  1%        ~ (p=1.000 n=6)
GetTimeline_SQLite/events-500-4            1.829m ±  1%   1.833m ±  1%        ~ (p=0.937 n=6)
GetTimeline_SQLite/events-1000-4           3.628m ±  3%   3.561m ±  1%   -1.85% (p=0.009 n=6)
geomean                                    238.1µ         232.6µ         -2.32%

                                   │ baseline-bench.txt │        benchmark-results.txt         │
                                   │        B/op        │     B/op      vs base                │
EventStoreAppend_InMemory-4                 828.5 ± 10%     783.5 ± 6%       ~ (p=0.310 n=6)
EventStoreAppend_SQLite-4                 1.986Ki ±  1%   1.982Ki ± 3%       ~ (p=0.331 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%       ~ (p=0.139 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%       ~ (p=0.989 n=6)
geomean                                   67.62Ki         67.29Ki       -0.48%
¹ 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 May 26, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/wfctl/infra.go 80.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@intel352 intel352 merged commit e9d415b into main May 26, 2026
24 checks passed
@intel352 intel352 deleted the fix/top-level-protected branch May 26, 2026 14:24
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.

1 participant