Skip to content

Add hermetic wfctl infra tests#651

Merged
intel352 merged 4 commits into
mainfrom
copilot/design-wfctl-infra-config-tests
May 13, 2026
Merged

Add hermetic wfctl infra tests#651
intel352 merged 4 commits into
mainfrom
copilot/design-wfctl-infra-config-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

Workflow infra config needs a test boundary before provider-driven IaC semantics become harder to reason about. Config authors should be able to assert rendered resources, provider inputs, and plan shape without cloud credentials or live provider calls.

  • Infra test command

    • Adds wfctl infra test <test.yaml>.
    • Runs fully hermetic: no provider loading, no credentials, no apply/destroy path.
    • Computes plan shape with the existing config-hash differ.
  • Assertion model

    • Supports expected rendered resources.
    • Supports expected resolved provider inputs after env/JIT resolution.
    • Supports expected plan action counts and action/resource fixtures.
    • Supports current_state fixtures for update/delete scenarios and generated resource collections.
  • Docs and examples

    • Documents minimal app-repo syntax in docs/WFCTL.md.

Example:

config: ../infra.yaml
env: staging
current_state:
  - name: existing-db
    type: infra.database
    config_hash: 8f2c...
expect:
  resources_count: 3
  resources:
    - name: network
      type: infra.vpc
      config:
        cidr: 10.10.0.0/16
  provider_inputs:
    resources:
      - name: api
        config:
          image: ghcr.io/acme/api:sha
  plan:
    action_counts:
      create: 2
      update: 1
    actions:
      - action: create
        resource:
          name: network
          type: infra.vpc

Copilot AI requested review from Copilot and removed request for Copilot May 13, 2026 05:59
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:264: parsing iteration count: invalid syntax
baseline-bench.txt:291409: parsing iteration count: invalid syntax
baseline-bench.txt:558851: parsing iteration count: invalid syntax
baseline-bench.txt:1096044: parsing iteration count: invalid syntax
baseline-bench.txt:1386271: parsing iteration count: invalid syntax
baseline-bench.txt:1660442: parsing iteration count: invalid syntax
benchmark-results.txt:264: parsing iteration count: invalid syntax
benchmark-results.txt:324004: parsing iteration count: invalid syntax
benchmark-results.txt:656009: parsing iteration count: invalid syntax
benchmark-results.txt:1003944: parsing iteration count: invalid syntax
benchmark-results.txt:1536130: parsing iteration count: invalid syntax
benchmark-results.txt:1878782: 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 │
                            │       sec/op       │
InterpreterCreation-4               7.657m ± 59%
ComponentLoad-4                     3.575m ±  0%
ComponentExecute-4                  1.924µ ±  1%
PoolContention/workers-1-4          1.089µ ±  1%
PoolContention/workers-2-4          1.074µ ±  4%
PoolContention/workers-4-4          1.081µ ±  1%
PoolContention/workers-8-4          1.083µ ±  2%
PoolContention/workers-16-4         1.092µ ±  1%
ComponentLifecycle-4                3.644m ±  1%
SourceValidation-4                  2.317µ ±  2%
RegistryConcurrent-4                807.9n ±  3%
LoaderLoadFromString-4              3.659m ±  1%
geomean                             18.81µ

                            │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                 4.763m ± 103%
ComponentLoad-4                       3.488m ±   1%
ComponentExecute-4                    1.820µ ±   1%
PoolContention/workers-1-4            1.010µ ±   1%
PoolContention/workers-2-4            1.008µ ±   3%
PoolContention/workers-4-4            1.006µ ±   2%
PoolContention/workers-8-4            1.012µ ±   1%
PoolContention/workers-16-4           1.011µ ±   1%
ComponentLifecycle-4                  3.481m ±   1%
SourceValidation-4                    2.087µ ±   1%
RegistryConcurrent-4                  764.4n ±   5%
LoaderLoadFromString-4                3.570m ±   1%
geomean                               17.11µ

                            │ 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

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 7763 64-Core Processor                
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                  286.7n ± 5%
CircuitBreakerExecution_Success-4          21.38n ± 1%
CircuitBreakerExecution_Failure-4          66.81n ± 0%
geomean                                    74.26n

                                  │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     297.8n ± 5%
CircuitBreakerExecution_Success-4             22.65n ± 0%
CircuitBreakerExecution_Failure-4             70.92n ± 0%
geomean                                       78.21n

                                  │ 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

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 7763 64-Core Processor                
                                 │ baseline-bench.txt │
                                 │       sec/op       │
JQTransform_Simple-4                     869.8n ± 27%
JQTransform_ObjectConstruction-4         1.434µ ±  2%
JQTransform_ArraySelect-4                3.325µ ±  2%
JQTransform_Complex-4                    38.52µ ±  1%
JQTransform_Throughput-4                 1.760µ ±  1%
SSEPublishDelivery-4                     62.74n ±  1%
geomean                                  1.613µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
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      │
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: AMD EPYC 9V74 80-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
JQTransform_Simple-4                        854.6n ± 34%
JQTransform_ObjectConstruction-4            1.426µ ±  1%
JQTransform_ArraySelect-4                   3.545µ ±  2%
JQTransform_Complex-4                       42.54µ ±  1%
JQTransform_Throughput-4                    1.775µ ±  2%
SSEPublishDelivery-4                        63.08n ±  1%
geomean                                     1.655µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
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       │
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                
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                   1.105µ ±  2%
SchemaValidation_AllFields-4                1.666µ ± 25%
SchemaValidation_FormatValidation-4         1.587µ ±  1%
SchemaValidation_ManySchemas-4              1.836µ ±  1%
geomean                                     1.521µ

                                    │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                       1.079µ ± 2%
SchemaValidation_AllFields-4                    1.639µ ± 6%
SchemaValidation_FormatValidation-4             1.560µ ± 2%
SchemaValidation_ManySchemas-4                  1.585µ ± 2%
geomean                                         1.446µ

                                    │ 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

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 7763 64-Core Processor                
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.218µ ± 14%
EventStoreAppend_SQLite-4                  1.259m ±  5%
GetTimeline_InMemory/events-10-4           13.48µ ±  3%
GetTimeline_InMemory/events-50-4           76.33µ ±  1%
GetTimeline_InMemory/events-100-4          121.9µ ± 27%
GetTimeline_InMemory/events-500-4          624.7µ ±  0%
GetTimeline_InMemory/events-1000-4         1.271m ±  1%
GetTimeline_SQLite/events-10-4             106.9µ ±  1%
GetTimeline_SQLite/events-50-4             247.6µ ±  1%
GetTimeline_SQLite/events-100-4            416.4µ ±  1%
GetTimeline_SQLite/events-500-4            1.769m ±  1%
GetTimeline_SQLite/events-1000-4           3.460m ±  1%
geomean                                    216.0µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  812.0 ± 5%
EventStoreAppend_SQLite-4                  1.985Ki ± 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.50Ki

                                   │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.153µ ± 12%
EventStoreAppend_SQLite-4                     1.081m ±  5%
GetTimeline_InMemory/events-10-4              13.07µ ±  2%
GetTimeline_InMemory/events-50-4              72.69µ ±  3%
GetTimeline_InMemory/events-100-4             148.9µ ±  2%
GetTimeline_InMemory/events-500-4             754.1µ ±  1%
GetTimeline_InMemory/events-1000-4            1.197m ± 29%
GetTimeline_SQLite/events-10-4                86.24µ ±  1%
GetTimeline_SQLite/events-50-4                223.2µ ±  2%
GetTimeline_SQLite/events-100-4               388.1µ ±  0%
GetTimeline_SQLite/events-500-4               1.693m ±  0%
GetTimeline_SQLite/events-1000-4              3.299m ±  0%
geomean                                       208.2µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                     788.5 ± 9%
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.34Ki

                                   │ 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

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 13, 2026

Codecov Report

❌ Patch coverage is 52.11268% with 68 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/wfctl/infra_test_cmd.go 52.51% 48 Missing and 18 partials ⚠️
cmd/wfctl/infra.go 33.33% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI linked an issue May 13, 2026 that may be closed by this pull request
Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/36793334-efac-47f8-ba98-b06822f35b8c

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 13, 2026 06:30
Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/36793334-efac-47f8-ba98-b06822f35b8c

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 13, 2026 06:33
Copilot AI changed the title [WIP] Design validation tests for wfctl infrastructure configuration Add hermetic wfctl infra tests May 13, 2026
Copilot AI requested a review from intel352 May 13, 2026 06:36
@intel352 intel352 marked this pull request as ready for review May 13, 2026 22:15
Copilot AI review requested due to automatic review settings May 13, 2026 22:15
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 new wfctl infra test subcommand that lets config authors validate infra expectations (rendered resources, resolved inputs, and plan shape) without contacting live providers or requiring cloud credentials, plus documentation and unit tests to establish the boundary.

Changes:

  • Adds wfctl infra test <test.yaml> [test.yaml ...] and wires it into wfctl infra dispatch/help.
  • Implements YAML-driven hermetic assertions for rendered resources, resolved provider inputs (post plan-time resolver), and config-hash-based plan actions.
  • Documents the new command and provides example test syntax in docs/WFCTL.md.

Reviewed changes

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

File Description
docs/WFCTL.md Documents wfctl infra test behavior and provides a minimal example test file.
cmd/wfctl/infra.go Adds test action routing and help text under wfctl infra.
cmd/wfctl/infra_test_cmd.go Implements hermetic infra test runner + assertion helpers for resources/provider inputs/plan.
cmd/wfctl/infra_test_cmd_test.go Adds unit tests covering hermetic behavior and mismatch failure.

Comment on lines +218 to +240
for _, exp := range expected.Actions {
var match *interfaces.PlanAction
for i := range actual.Actions {
action := &actual.Actions[i]
if exp.Action != "" && action.Action != exp.Action {
continue
}
if exp.Resource.Name != "" && action.Resource.Name != exp.Resource.Name {
continue
}
match = action
break
}
if match == nil {
return fmt.Errorf("plan action not found: action=%q resource=%q", exp.Action, exp.Resource.Name)
}
if exp.Resource.Type != "" && match.Resource.Type != exp.Resource.Type {
return fmt.Errorf("plan action %s resource %s type: got %q, want %q", exp.Action, exp.Resource.Name, match.Resource.Type, exp.Resource.Type)
}
if err := assertMapSubset(exp.Resource.Config, match.Resource.Config); err != nil {
return fmt.Errorf("plan action %s resource %s config: %w", exp.Action, exp.Resource.Name, err)
}
}
@intel352
Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

Need test coverage improved: #651 (comment)

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 13, 2026

@copilot apply changes based on the comments in this thread

Need test coverage improved: https://g...

Fixed in 75350fc.

assertInfraPlan now:

  • Matches each expected entry using all specified fields simultaneously (action, name, type, config subset) before accepting a candidate, so a match on name alone no longer claims an action that fails the type or config check.
  • Tracks a used[] boolean slice so each actual action can satisfy at most one expected entry — prevents two identical expected entries from both returning success against the same actual action.

Four new tests cover: used-tracking prevents double-claim, type filter blocks wrong-type match, config-subset filter blocks wrong-config match, and order-independence of expected entries.

@intel352 intel352 merged commit 998c12b into main May 13, 2026
22 of 23 checks passed
@intel352 intel352 deleted the copilot/design-wfctl-infra-config-tests branch May 13, 2026 23:26
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.

Design wfctl infra config/plan tests

3 participants