Skip to content

wftest YAML runner: add PUT, PATCH, DELETE, HEAD trigger types#371

Merged
intel352 merged 7 commits intomainfrom
copilot/add-http-trigger-types-support
Mar 24, 2026
Merged

wftest YAML runner: add PUT, PATCH, DELETE, HEAD trigger types#371
intel352 merged 7 commits intomainfrom
copilot/add-http-trigger-types-support

Conversation

Copy link
Contributor

Copilot AI commented Mar 24, 2026

fireTrigger() in the YAML test runner only dispatched pipeline, get, and post — leaving PUT, PATCH, DELETE, and HEAD unsupported despite the Harness already exposing those methods.

Changes

  • wftest/yaml_runner.go: Added http.put/put, http.patch/patch, http.delete/delete, and http.head/head cases to fireTrigger(), following the same pattern as the existing GET/POST cases (JSON-marshal trigger.data as body for PUT/PATCH; header forwarding for all)
  • wftest/yaml_runner_test.go: Added one test per new method, each covering both http.<method> and the short <method> alias

Example

tests:
  update-resource:
    trigger:
      type: http.put        # or: put, http.patch, patch, http.delete, delete, http.head, head
      path: /v1/resource/123
      data:
        name: updated
    assertions:
      - response:
          status: 200
Original prompt

This section details on the original issue you should resolve

<issue_title>wftest YAML runner: missing PUT, PATCH, DELETE, HEAD HTTP trigger types</issue_title>
<issue_description>## Summary

The YAML test runner (wftest.RunYAMLTests) only supports pipeline, http.get/get, and http.post/post trigger types. The Harness already has methods for PUT, PATCH, DELETE, and HEAD, and the BDD framework (wftest/bdd) wires all of them — but the YAML runner's fireTrigger() switch doesn't dispatch to them.

Current behavior

tests:
  update-resource:
    trigger:
      type: http.put
      path: /v1/resource/123
      data:
        name: updated
    assertions:
      - response:
          status: 200

Fails with: RunYAMLTests: unsupported trigger type "http.put"

Expected behavior

All HTTP methods supported by the Harness should be available as YAML trigger types:

Trigger type Harness method
http.put / put h.PUT(path, body, opts...)
http.patch / patch h.PATCH(path, body, opts...)
http.delete / delete h.DELETE(path, opts...)
http.head / head h.HEAD(path, opts...)

Impact

We have ~15 BDD scenarios using PUT, PATCH, DELETE, and HEAD triggers that cannot be expressed in the YAML test format. These are currently covered by Gherkin features only.

Suggested implementation

Add cases to fireTrigger() in yaml_runner.go (lines 168–206), following the same pattern as the existing GET/POST cases:

case "http.put", "put":
    body := ""
    if tc.Trigger.Data != nil {
        b, _ := json.Marshal(tc.Trigger.Data)
        body = string(b)
    }
    var reqOpts []RequestOption
    for k, v := range tc.Trigger.Headers {
        reqOpts = append(reqOpts, Header(k, v))
    }
    return h.PUT(tc.Trigger.Path, body, reqOpts...)

case "http.patch", "patch":
    // same pattern as PUT
    return h.PATCH(tc.Trigger.Path, body, reqOpts...)

case "http.delete", "delete":
    var reqOpts []RequestOption
    for k, v := range tc.Trigger.Headers {
        reqOpts = append(reqOpts, Header(k, v))
    }
    return h.DELETE(tc.Trigger.Path, reqOpts...)

case "http.head", "head":
    var reqOpts []RequestOption
    for k, v := range tc.Trigger.Headers {
        reqOpts = append(reqOpts, Header(k, v))
    }
    return h.HEAD(tc.Trigger.Path, reqOpts...)

References

  • Harness methods: wftest/http.go (PUT line 38, DELETE line 45, PATCH line 53, HEAD line 60)
  • BDD HTTP steps: wftest/bdd/steps_http.go (all methods wired)
  • YAML runner: wftest/yaml_runner.go:fireTrigger() (only GET/POST)</issue_description>

Comments on the Issue (you are @copilot in this section)


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Copilot AI changed the title [WIP] Add support for PUT, PATCH, DELETE, HEAD HTTP trigger types in YAML runner wftest YAML runner: add PUT, PATCH, DELETE, HEAD trigger types Mar 24, 2026
Copilot AI requested a review from intel352 March 24, 2026 16:28
@intel352 intel352 marked this pull request as ready for review March 24, 2026 17:16
Copilot AI review requested due to automatic review settings March 24, 2026 17:16
Copy link
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 support in the wftest YAML test runner for additional HTTP trigger types (PUT, PATCH, DELETE, HEAD) so YAML tests can exercise the same HTTP methods already exposed by the Harness.

Changes:

  • Extend fireTrigger() to dispatch http.put/put, http.patch/patch, http.delete/delete, and http.head/head to the corresponding Harness methods.
  • Add YAML-runner tests covering each newly supported method, including both the http.<method> form and the short alias.

Reviewed changes

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

File Description
wftest/yaml_runner.go Adds new HTTP trigger-type cases in fireTrigger() for PUT/PATCH/DELETE/HEAD.
wftest/yaml_runner_test.go Adds tests ensuring the YAML runner can execute PUT/PATCH/DELETE/HEAD triggers (including alias forms).

Comment on lines +204 to +208
body := ""
if tc.Trigger.Data != nil {
b, _ := json.Marshal(tc.Trigger.Data)
body = string(b)
}
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

In the PUT trigger case, json.Marshal errors are ignored (b, _ := json.Marshal(...)). If trigger.data contains a value that can’t be marshaled, this will silently send an empty/partial body and make failures hard to diagnose. Please handle the marshal error (fail the test) rather than discarding it (and consider aligning POST/PUT/PATCH to use the same helper).

Copilot uses AI. Check for mistakes.
Comment on lines +216 to +220
body := ""
if tc.Trigger.Data != nil {
b, _ := json.Marshal(tc.Trigger.Data)
body = string(b)
}
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

In the PATCH trigger case, json.Marshal errors are ignored (b, _ := json.Marshal(...)). It’s better to fail the test on marshal errors so malformed trigger.data doesn’t silently change the request body.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Mar 24, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:245: parsing iteration count: invalid syntax
baseline-bench.txt:310629: parsing iteration count: invalid syntax
baseline-bench.txt:611695: parsing iteration count: invalid syntax
baseline-bench.txt:909527: parsing iteration count: invalid syntax
baseline-bench.txt:1211328: parsing iteration count: invalid syntax
baseline-bench.txt:1492858: parsing iteration count: invalid syntax
benchmark-results.txt:245: parsing iteration count: invalid syntax
benchmark-results.txt:304995: parsing iteration count: invalid syntax
benchmark-results.txt:619378: parsing iteration count: invalid syntax
benchmark-results.txt:889181: parsing iteration count: invalid syntax
benchmark-results.txt:1196928: parsing iteration count: invalid syntax
benchmark-results.txt:1513540: 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              3.167m ± 225%   3.118m ± 207%       ~ (p=0.818 n=6)
ComponentLoad-4                    3.578m ±   7%   3.621m ±   6%       ~ (p=0.240 n=6)
ComponentExecute-4                 1.921µ ±   1%   1.940µ ±   2%       ~ (p=0.093 n=6)
PoolContention/workers-1-4         1.085µ ±   1%   1.084µ ±   1%       ~ (p=0.446 n=6)
PoolContention/workers-2-4         1.098µ ±   2%   1.082µ ±   3%       ~ (p=0.193 n=6)
PoolContention/workers-4-4         1.097µ ±   1%   1.089µ ±   1%       ~ (p=0.149 n=6)
PoolContention/workers-8-4         1.098µ ±   1%   1.101µ ±   2%       ~ (p=0.584 n=6)
PoolContention/workers-16-4        1.105µ ±   1%   1.105µ ±   1%       ~ (p=0.853 n=6)
ComponentLifecycle-4               3.655m ±   1%   3.627m ±   0%  -0.75% (p=0.004 n=6)
SourceValidation-4                 2.250µ ±   2%   2.256µ ±   1%       ~ (p=1.000 n=6)
RegistryConcurrent-4               773.3n ±   4%   773.6n ±  14%       ~ (p=0.394 n=6)
LoaderLoadFromString-4             3.708m ±   3%   3.670m ±   1%       ~ (p=0.065 n=6)
geomean                            17.48µ          17.44µ         -0.25%

                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │        B/op        │     B/op      vs base                │
InterpreterCreation-4               2.027Mi ± 0%   2.027Mi ± 0%       ~ (p=0.892 n=6)
ComponentLoad-4                     2.180Mi ± 0%   2.180Mi ± 0%       ~ (p=0.255 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.084 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.368 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                  287.9n ± 5%   287.3n ± 8%       ~ (p=0.900 n=6)
CircuitBreakerExecution_Success-4          22.51n ± 0%   22.52n ± 1%       ~ (p=0.403 n=6)
CircuitBreakerExecution_Failure-4          64.55n ± 0%   64.41n ± 1%       ~ (p=0.258 n=6)
geomean                                    74.79n        74.70n       -0.12%

                                  │ 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              │
JQTransform_Simple-4                     870.9n ± 31%   849.0n ± 26%       ~ (p=0.240 n=6)
JQTransform_ObjectConstruction-4         1.451µ ±  1%   1.410µ ±  1%  -2.83% (p=0.002 n=6)
JQTransform_ArraySelect-4                3.450µ ±  1%   3.249µ ±  1%  -5.83% (p=0.002 n=6)
JQTransform_Complex-4                    39.21µ ±  1%   37.64µ ±  1%  -4.01% (p=0.002 n=6)
JQTransform_Throughput-4                 1.793µ ±  2%   1.732µ ±  1%  -3.37% (p=0.002 n=6)
SSEPublishDelivery-4                     72.36n ±  3%   69.91n ±  0%  -3.39% (p=0.002 n=6)
geomean                                  1.676µ         1.615µ        -3.66%

                                 │ baseline-bench.txt │        benchmark-results.txt         │
                                 │        B/op        │     B/op      vs base                │
JQTransform_Simple-4                   1.273Ki ± 0%     1.273Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4       1.773Ki ± 0%     1.773Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4              2.625Ki ± 0%     2.625Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                  16.22Ki ± 0%     16.22Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4               1.984Ki ± 0%     1.984Ki ± 0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                     0.000 ± 0%       0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                             ²                 +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │       benchmark-results.txt        │
                                 │     allocs/op      │ allocs/op   vs base                │
JQTransform_Simple-4                     10.00 ± 0%     10.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4         15.00 ± 0%     15.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4                30.00 ± 0%     30.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                    324.0 ± 0%     324.0 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4                 17.00 ± 0%     17.00 ± 0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                     0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                             ²               +0.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.100µ ± 5%   1.117µ ± 6%       ~ (p=0.310 n=6)
SchemaValidation_AllFields-4                 1.664µ ± 2%   1.726µ ± 3%  +3.73% (p=0.004 n=6)
SchemaValidation_FormatValidation-4          1.607µ ± 8%   1.637µ ± 4%       ~ (p=0.394 n=6)
SchemaValidation_ManySchemas-4               1.786µ ± 5%   1.818µ ± 3%       ~ (p=0.818 n=6)
geomean                                      1.514µ        1.548µ       +2.24%

                                    │ 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.309µ ± 32%   1.204µ ± 20%        ~ (p=0.589 n=6)
EventStoreAppend_SQLite-4                  2.470m ± 19%   1.460m ± 11%  -40.88% (p=0.002 n=6)
GetTimeline_InMemory/events-10-4           14.09µ ±  3%   14.90µ ±  2%   +5.73% (p=0.002 n=6)
GetTimeline_InMemory/events-50-4           79.15µ ± 22%   65.94µ ± 24%        ~ (p=0.394 n=6)
GetTimeline_InMemory/events-100-4          123.2µ ±  0%   130.8µ ±  1%   +6.16% (p=0.002 n=6)
GetTimeline_InMemory/events-500-4          635.6µ ±  1%   672.6µ ±  1%   +5.82% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4         1.300m ±  1%   1.381m ±  1%   +6.22% (p=0.002 n=6)
GetTimeline_SQLite/events-10-4             111.5µ ±  1%   115.4µ ±  1%   +3.56% (p=0.002 n=6)
GetTimeline_SQLite/events-50-4             252.9µ ±  2%   269.6µ ±  1%   +6.59% (p=0.002 n=6)
GetTimeline_SQLite/events-100-4            423.2µ ±  1%   450.9µ ±  0%   +6.55% (p=0.002 n=6)
GetTimeline_SQLite/events-500-4            1.816m ±  1%   1.917m ±  3%   +5.58% (p=0.002 n=6)
GetTimeline_SQLite/events-1000-4           3.514m ±  1%   3.759m ±  1%   +6.98% (p=0.002 n=6)
geomean                                    234.7µ         229.4µ         -2.27%

                                   │ baseline-bench.txt │        benchmark-results.txt         │
                                   │        B/op        │     B/op      vs base                │
EventStoreAppend_InMemory-4                  789.0 ± 8%     770.5 ± 7%       ~ (p=0.221 n=6)
EventStoreAppend_SQLite-4                  1.985Ki ± 0%   1.982Ki ± 2%       ~ (p=0.900 n=6)
GetTimeline_InMemory/events-10-4           7.953Ki ± 0%   7.953Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4           46.62Ki ± 0%   46.62Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4          94.48Ki ± 0%   94.48Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4          472.8Ki ± 0%   472.8Ki ± 0%       ~ (p=0.182 n=6)
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%   944.3Ki ± 0%       ~ (p=0.688 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.121 n=6)
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%   1.639Mi ± 0%  -0.00% (p=0.002 n=6)
geomean                                    67.34Ki        67.20Ki       -0.21%
¹ 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 ± 2%    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
Contributor

@copilot apply changes based on the comments in this thread

…ATCH/DELETE/HEAD triggers

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/00318fe7-5a64-450d-9dff-ee0a9dde72b6
Copy link
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot apply changes based on the comments in this thread

Applied in 86a5022:

  • Added path validation (trigger.path required, fails fast with a clear error) to POST, PUT, PATCH, DELETE, and HEAD cases
  • Replaced b, _ := json.Marshal(...) with proper error handling in POST, PUT, and PATCH — test now fails with a descriptive message if trigger.data can't be marshaled

@intel352
Copy link
Contributor

@copilot Address any failing tests, linters, etc

Copy link
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot Address any failing tests, linters, etc

Fixed in 9e5a229. TestYAMLRunner_HTTPPutTrigger was failing due to malformed YAML in the test — it was missing the yaml: | block with the modules/pipelines definition, and had an invalid updated: true line nested incorrectly under method: PUT. Corrected the test to follow the same structure as the other HTTP trigger tests. All tests and linter pass now.

@intel352 intel352 merged commit 24aaca4 into main Mar 24, 2026
18 checks passed
@intel352 intel352 deleted the copilot/add-http-trigger-types-support branch March 24, 2026 22:40
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.

wftest YAML runner: missing PUT, PATCH, DELETE, HEAD HTTP trigger types

3 participants