Skip to content

fix(wfctl): match GitHub secrets case-insensitively#751

Merged
intel352 merged 1 commit into
mainfrom
fix/github-secret-case-insensitive
May 21, 2026
Merged

fix(wfctl): match GitHub secrets case-insensitively#751
intel352 merged 1 commit into
mainfrom
fix/github-secret-case-insensitive

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary\n- treat GitHub Actions secret names as case-insensitive when wfctl auto-bootstrap checks write-only List() results\n- add regression coverage for generated DO Spaces provider credentials listed as SPACES_ACCESS_KEY / SPACES_SECRET_KEY\n\n## Verification\n- GOWORK=off go test ./cmd/wfctl -run 'TestBootstrapSecrets_(WriteOnlyProviderSkipsExisting|GitHubProviderCredentialMatchesUppercaseList|ProviderCredentialAllSubKeysPresent|ProviderCredentialPartialRegenerates)'\n- GOWORK=off go test ./cmd/wfctl ./secrets

Copilot AI review requested due to automatic review settings May 21, 2026 10:42
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

Updates wfctl infra bootstrap secret existence detection to correctly treat GitHub Actions secret names as case-insensitive when using write-only providers (where Get() is unsupported and List() is used), preventing unnecessary regeneration of provider credentials.

Changes:

  • Added a GitHub-specific case-insensitive match (strings.EqualFold) when checking List() results for existing secret keys.
  • Extended the write-only secrets provider test double to allow configuring Name() (so GitHub-specific behavior can be exercised).
  • Added a regression test ensuring uppercase GitHub-listed subkeys (e.g., SPACES_ACCESS_KEY) satisfy mixed-case generated probes (e.g., SPACES_access_key).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cmd/wfctl/infra_bootstrap.go Adds GitHub-specific case-insensitive matching when using List() for existence checks.
cmd/wfctl/infra_bootstrap_secrets_test.go Adds regression coverage for GitHub uppercase secret listings and updates the test provider to support configurable Name().

Comment thread cmd/wfctl/infra_bootstrap.go
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

⏱ 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:390139: parsing iteration count: invalid syntax
baseline-bench.txt:724157: parsing iteration count: invalid syntax
baseline-bench.txt:1109928: parsing iteration count: invalid syntax
baseline-bench.txt:1411009: parsing iteration count: invalid syntax
baseline-bench.txt:1803197: parsing iteration count: invalid syntax
benchmark-results.txt:276: parsing iteration count: invalid syntax
benchmark-results.txt:310390: parsing iteration count: invalid syntax
benchmark-results.txt:597416: parsing iteration count: invalid syntax
benchmark-results.txt:885660: parsing iteration count: invalid syntax
benchmark-results.txt:1159432: parsing iteration count: invalid syntax
benchmark-results.txt:1476407: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 7763 64-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                  7.662m ± 70%
ComponentLoad-4                        3.680m ±  3%
ComponentExecute-4                     1.957µ ±  1%
PoolContention/workers-1-4             1.125µ ±  3%
PoolContention/workers-2-4             1.120µ ±  1%
PoolContention/workers-4-4             1.129µ ±  1%
PoolContention/workers-8-4             1.133µ ±  1%
PoolContention/workers-16-4            1.122µ ±  1%
ComponentLifecycle-4                   3.779m ±  3%
SourceValidation-4                     2.327µ ±  1%
RegistryConcurrent-4                   783.0n ±  4%
LoaderLoadFromString-4                 3.761m ±  2%
geomean                                19.24µ

                            │ benchmark-results.txt │
                            │         B/op          │
InterpreterCreation-4                  2.027Mi ± 0%
ComponentLoad-4                        2.180Mi ± 0%
ComponentExecute-4                     1.203Ki ± 0%
PoolContention/workers-1-4             1.203Ki ± 0%
PoolContention/workers-2-4             1.203Ki ± 0%
PoolContention/workers-4-4             1.203Ki ± 0%
PoolContention/workers-8-4             1.203Ki ± 0%
PoolContention/workers-16-4            1.203Ki ± 0%
ComponentLifecycle-4                   2.183Mi ± 0%
SourceValidation-4                     1.984Ki ± 0%
RegistryConcurrent-4                   1.133Ki ± 0%
LoaderLoadFromString-4                 2.182Mi ± 0%
geomean                                15.25Ki

                            │ benchmark-results.txt │
                            │       allocs/op       │
InterpreterCreation-4                   15.68k ± 0%
ComponentLoad-4                         18.02k ± 0%
ComponentExecute-4                       25.00 ± 0%
PoolContention/workers-1-4               25.00 ± 0%
PoolContention/workers-2-4               25.00 ± 0%
PoolContention/workers-4-4               25.00 ± 0%
PoolContention/workers-8-4               25.00 ± 0%
PoolContention/workers-16-4              25.00 ± 0%
ComponentLifecycle-4                    18.07k ± 0%
SourceValidation-4                       32.00 ± 0%
RegistryConcurrent-4                     2.000 ± 0%
LoaderLoadFromString-4                  18.06k ± 0%
geomean                                  183.3

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                            │ baseline-bench.txt │
                            │       sec/op       │
InterpreterCreation-4               9.579m ± 68%
ComponentLoad-4                     3.482m ±  0%
ComponentExecute-4                  1.903µ ±  1%
PoolContention/workers-1-4          1.185µ ±  2%
PoolContention/workers-2-4          1.183µ ±  1%
PoolContention/workers-4-4          1.179µ ±  1%
PoolContention/workers-8-4          1.185µ ±  1%
PoolContention/workers-16-4         1.186µ ±  1%
ComponentLifecycle-4                3.460m ±  1%
SourceValidation-4                  2.228µ ±  0%
RegistryConcurrent-4                938.8n ±  6%
LoaderLoadFromString-4              3.505m ±  2%
geomean                             19.85µ

                            │ baseline-bench.txt │
                            │        B/op        │
InterpreterCreation-4               2.027Mi ± 0%
ComponentLoad-4                     2.180Mi ± 0%
ComponentExecute-4                  1.203Ki ± 0%
PoolContention/workers-1-4          1.203Ki ± 0%
PoolContention/workers-2-4          1.203Ki ± 0%
PoolContention/workers-4-4          1.203Ki ± 0%
PoolContention/workers-8-4          1.203Ki ± 0%
PoolContention/workers-16-4         1.203Ki ± 0%
ComponentLifecycle-4                2.183Mi ± 0%
SourceValidation-4                  1.984Ki ± 0%
RegistryConcurrent-4                1.133Ki ± 0%
LoaderLoadFromString-4              2.182Mi ± 0%
geomean                             15.25Ki

                            │ baseline-bench.txt │
                            │     allocs/op      │
InterpreterCreation-4                15.68k ± 0%
ComponentLoad-4                      18.02k ± 0%
ComponentExecute-4                    25.00 ± 0%
PoolContention/workers-1-4            25.00 ± 0%
PoolContention/workers-2-4            25.00 ± 0%
PoolContention/workers-4-4            25.00 ± 0%
PoolContention/workers-8-4            25.00 ± 0%
PoolContention/workers-16-4           25.00 ± 0%
ComponentLifecycle-4                 18.07k ± 0%
SourceValidation-4                    32.00 ± 0%
RegistryConcurrent-4                  2.000 ± 0%
LoaderLoadFromString-4               18.06k ± 0%
geomean                               183.3

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 7763 64-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     285.6n ± 0%
CircuitBreakerExecution_Success-4             21.52n ± 0%
CircuitBreakerExecution_Failure-4             66.81n ± 3%
geomean                                       74.32n

                                  │ benchmark-results.txt │
                                  │         B/op          │
CircuitBreakerDetection-4                    144.0 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

                                  │ benchmark-results.txt │
                                  │       allocs/op       │
CircuitBreakerDetection-4                    1.000 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                  462.5n ± 2%
CircuitBreakerExecution_Success-4          59.73n ± 1%
CircuitBreakerExecution_Failure-4          64.94n ± 1%
geomean                                    121.5n

                                  │ baseline-bench.txt │
                                  │        B/op        │
CircuitBreakerDetection-4                 144.0 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │
                                  │     allocs/op      │
CircuitBreakerDetection-4                 1.000 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 7763 64-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
IaCStateBackend_InProcess-4                 319.2n ±  1%
IaCStateBackend_GRPC-4                      9.759m ± 11%
JQTransform_Simple-4                        692.4n ± 35%
JQTransform_ObjectConstruction-4            1.548µ ±  1%
JQTransform_ArraySelect-4                   3.563µ ±  2%
JQTransform_Complex-4                       40.44µ ±  2%
JQTransform_Throughput-4                    1.940µ ±  1%
SSEPublishDelivery-4                        64.99n ±  1%
geomean                                     3.961µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.901Mi ± 12%
JQTransform_Simple-4                     1.273Ki ±  0%
JQTransform_ObjectConstruction-4         1.773Ki ±  0%
JQTransform_ArraySelect-4                2.625Ki ±  0%
JQTransform_Complex-4                    16.22Ki ±  0%
JQTransform_Throughput-4                 1.984Ki ±  0%
SSEPublishDelivery-4                       0.000 ±  0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                 │ benchmark-results.txt │
                                 │       allocs/op       │
IaCStateBackend_InProcess-4                 2.000 ± 0%
IaCStateBackend_GRPC-4                     6.843k ± 0%
JQTransform_Simple-4                        10.00 ± 0%
JQTransform_ObjectConstruction-4            15.00 ± 0%
JQTransform_ArraySelect-4                   30.00 ± 0%
JQTransform_Complex-4                       324.0 ± 0%
JQTransform_Throughput-4                    17.00 ± 0%
SSEPublishDelivery-4                        0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                 │ baseline-bench.txt │
                                 │       sec/op       │
IaCStateBackend_InProcess-4              346.0n ± 31%
IaCStateBackend_GRPC-4                   10.04m ±  1%
JQTransform_Simple-4                     694.5n ± 50%
JQTransform_ObjectConstruction-4         1.671µ ±  1%
JQTransform_ArraySelect-4                3.519µ ±  2%
JQTransform_Complex-4                    37.66µ ±  2%
JQTransform_Throughput-4                 2.004µ ±  1%
SSEPublishDelivery-4                     75.88n ±  1%
geomean                                  4.109µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4             416.0 ±  0%
IaCStateBackend_GRPC-4                5.749Mi ± 13%
JQTransform_Simple-4                  1.273Ki ±  0%
JQTransform_ObjectConstruction-4      1.773Ki ±  0%
JQTransform_ArraySelect-4             2.625Ki ±  0%
JQTransform_Complex-4                 16.22Ki ±  0%
JQTransform_Throughput-4              1.984Ki ±  0%
SSEPublishDelivery-4                    0.000 ±  0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │
                                 │     allocs/op      │
IaCStateBackend_InProcess-4              2.000 ± 0%
IaCStateBackend_GRPC-4                  6.883k ± 2%
JQTransform_Simple-4                     10.00 ± 0%
JQTransform_ObjectConstruction-4         15.00 ± 0%
JQTransform_ArraySelect-4                30.00 ± 0%
JQTransform_Complex-4                    324.0 ± 0%
JQTransform_Throughput-4                 17.00 ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
cpu: AMD EPYC 7763 64-Core Processor                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.121µ ±  4%
SchemaValidation_AllFields-4                   1.697µ ± 13%
SchemaValidation_FormatValidation-4            1.585µ ±  0%
SchemaValidation_ManySchemas-4                 1.867µ ±  3%
geomean                                        1.540µ

                                    │ benchmark-results.txt │
                                    │         B/op          │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

                                    │ benchmark-results.txt │
                                    │       allocs/op       │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                   1.025µ ±  7%
SchemaValidation_AllFields-4                1.552µ ± 28%
SchemaValidation_FormatValidation-4         1.490µ ±  1%
SchemaValidation_ManySchemas-4              1.506µ ±  2%
geomean                                     1.374µ

                                    │ baseline-bench.txt │
                                    │        B/op        │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │
                                    │     allocs/op      │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 7763 64-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.274µ ± 12%
EventStoreAppend_SQLite-4                     1.380m ±  6%
GetTimeline_InMemory/events-10-4              14.46µ ±  3%
GetTimeline_InMemory/events-50-4              72.15µ ± 17%
GetTimeline_InMemory/events-100-4             129.6µ ±  1%
GetTimeline_InMemory/events-500-4             665.6µ ±  1%
GetTimeline_InMemory/events-1000-4            1.364m ±  1%
GetTimeline_SQLite/events-10-4                109.8µ ±  1%
GetTimeline_SQLite/events-50-4                257.9µ ±  1%
GetTimeline_SQLite/events-100-4               438.3µ ±  1%
GetTimeline_SQLite/events-500-4               1.872m ±  1%
GetTimeline_SQLite/events-1000-4              3.826m ±  2%
geomean                                       227.4µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                     838.5 ± 9%
EventStoreAppend_SQLite-4                     1.983Ki ± 2%
GetTimeline_InMemory/events-10-4              7.953Ki ± 0%
GetTimeline_InMemory/events-50-4              46.62Ki ± 0%
GetTimeline_InMemory/events-100-4             94.48Ki ± 0%
GetTimeline_InMemory/events-500-4             472.8Ki ± 0%
GetTimeline_InMemory/events-1000-4            944.3Ki ± 0%
GetTimeline_SQLite/events-10-4                16.74Ki ± 0%
GetTimeline_SQLite/events-50-4                87.14Ki ± 0%
GetTimeline_SQLite/events-100-4               175.4Ki ± 0%
GetTimeline_SQLite/events-500-4               846.1Ki ± 0%
GetTimeline_SQLite/events-1000-4              1.639Mi ± 0%
geomean                                       67.68Ki

                                   │ benchmark-results.txt │
                                   │       allocs/op       │
EventStoreAppend_InMemory-4                     7.000 ± 0%
EventStoreAppend_SQLite-4                       53.00 ± 0%
GetTimeline_InMemory/events-10-4                125.0 ± 0%
GetTimeline_InMemory/events-50-4                653.0 ± 0%
GetTimeline_InMemory/events-100-4              1.306k ± 0%
GetTimeline_InMemory/events-500-4              6.514k ± 0%
GetTimeline_InMemory/events-1000-4             13.02k ± 0%
GetTimeline_SQLite/events-10-4                  382.0 ± 0%
GetTimeline_SQLite/events-50-4                 1.852k ± 0%
GetTimeline_SQLite/events-100-4                3.681k ± 0%
GetTimeline_SQLite/events-500-4                18.54k ± 0%
GetTimeline_SQLite/events-1000-4               37.29k ± 0%
geomean                                        1.162k

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.146µ ± 21%
EventStoreAppend_SQLite-4                  1.141m ±  3%
GetTimeline_InMemory/events-10-4           13.75µ ±  4%
GetTimeline_InMemory/events-50-4           76.37µ ±  5%
GetTimeline_InMemory/events-100-4          119.5µ ± 30%
GetTimeline_InMemory/events-500-4          604.0µ ±  0%
GetTimeline_InMemory/events-1000-4         1.230m ±  1%
GetTimeline_SQLite/events-10-4             80.61µ ±  0%
GetTimeline_SQLite/events-50-4             231.1µ ±  0%
GetTimeline_SQLite/events-100-4            421.3µ ±  1%
GetTimeline_SQLite/events-500-4            1.904m ±  3%
GetTimeline_SQLite/events-1000-4           3.761m ±  1%
geomean                                    208.8µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                 827.0 ± 10%
EventStoreAppend_SQLite-4                 1.986Ki ±  1%
GetTimeline_InMemory/events-10-4          7.953Ki ±  0%
GetTimeline_InMemory/events-50-4          46.62Ki ±  0%
GetTimeline_InMemory/events-100-4         94.48Ki ±  0%
GetTimeline_InMemory/events-500-4         472.8Ki ±  0%
GetTimeline_InMemory/events-1000-4        944.3Ki ±  0%
GetTimeline_SQLite/events-10-4            16.74Ki ±  0%
GetTimeline_SQLite/events-50-4            87.14Ki ±  0%
GetTimeline_SQLite/events-100-4           175.4Ki ±  0%
GetTimeline_SQLite/events-500-4           846.1Ki ±  0%
GetTimeline_SQLite/events-1000-4          1.639Mi ±  0%
geomean                                   67.61Ki

                                   │ baseline-bench.txt │
                                   │     allocs/op      │
EventStoreAppend_InMemory-4                  7.000 ± 0%
EventStoreAppend_SQLite-4                    53.00 ± 0%
GetTimeline_InMemory/events-10-4             125.0 ± 0%
GetTimeline_InMemory/events-50-4             653.0 ± 0%
GetTimeline_InMemory/events-100-4           1.306k ± 0%
GetTimeline_InMemory/events-500-4           6.514k ± 0%
GetTimeline_InMemory/events-1000-4          13.02k ± 0%
GetTimeline_SQLite/events-10-4               382.0 ± 0%
GetTimeline_SQLite/events-50-4              1.852k ± 0%
GetTimeline_SQLite/events-100-4             3.681k ± 0%
GetTimeline_SQLite/events-500-4             18.54k ± 0%
GetTimeline_SQLite/events-1000-4            37.29k ± 0%
geomean                                     1.162k

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

@intel352 intel352 force-pushed the fix/github-secret-case-insensitive branch from f26b6d6 to d2c7461 Compare May 21, 2026 10:53
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@intel352 intel352 merged commit 636e024 into main May 21, 2026
24 checks passed
@intel352 intel352 deleted the fix/github-secret-case-insensitive branch May 21, 2026 11:04
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