Skip to content

fix: keep registry sync from mutating builtins#835

Merged
intel352 merged 1 commit into
mainfrom
issue-762-registry-builtin-skip
Jun 2, 2026
Merged

fix: keep registry sync from mutating builtins#835
intel352 merged 1 commit into
mainfrom
issue-762-registry-builtin-skip

Conversation

@intel352
Copy link
Copy Markdown
Contributor

@intel352 intel352 commented Jun 2, 2026

Summary

Verification

  • GOWORK=off go test ./cmd/wfctl -run 'TestPluginRegistrySync_(DefaultSkipsBuiltinManifests|Core_DetectsAndFixesDownloadsOnlyDrift)|TestPluginRegistrySyncCore_DetectsAndFixesDownloadsOnlyDrift' -count=1\n- GOWORK=off go test ./cmd/wfctl -count=1\n- GOWORK=off golangci-lint run ./cmd/wfctl --new-from-rev origin/main\n- GOWORK=off go build -o /tmp/wfctl-762-builtin ./cmd/wfctl\n- fixed binary registry sequence against workflow-registry origin/main: default sync skipped builtin manifests; core sync produced no builtin downloads drift\n- GOWORK=off go test . -run TestE2E_Negative_RateLimit_RecoveryAfterWindow -count=1 -v\n\n## Note\n- GOWORK=off go test ./... had one unrelated intermittent root-package rate-limit failure; the exact test passed on rerun.

Copilot AI review requested due to automatic review settings June 2, 2026 02:16
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

This PR fixes a registry sync bug where the default release-asset sync was mutating built-in/core manifests (originally surfaced by PR #190). The default sync now skips manifests whose type is builtin/core, and the core sync path detects and (with --fix) removes stray downloads entries that don't belong on built-in manifests.

Changes:

  • Default syncDefault skips manifests with type builtin or core via new isCoreRegistryManifestType helper.
  • syncCorePluginManifests now treats presence of a downloads key as drift and emits a clarifying message; writeCoreManifest already strips it on --fix.
  • Adds two regression tests covering both behaviors (default skip and downloads-only drift).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
cmd/wfctl/plugin_registry_sync.go Skip builtin/core manifests in default release-asset sync; updated header comment numbering.
cmd/wfctl/plugin_registry_sync_core.go Detect downloads field as drift on core manifests with a dedicated drift message.
cmd/wfctl/plugin_registry_sync_test.go Adds regression tests for builtin skip and downloads-only drift detection/fix.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/wfctl/plugin_registry_sync.go 77.77% 2 Missing ⚠️
cmd/wfctl/plugin_registry_sync_core.go 77.77% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:306: parsing iteration count: invalid syntax
baseline-bench.txt:554143: parsing iteration count: invalid syntax
baseline-bench.txt:861614: parsing iteration count: invalid syntax
baseline-bench.txt:1164798: parsing iteration count: invalid syntax
baseline-bench.txt:1432279: parsing iteration count: invalid syntax
baseline-bench.txt:1727585: parsing iteration count: invalid syntax
benchmark-results.txt:306: parsing iteration count: invalid syntax
benchmark-results.txt:348043: parsing iteration count: invalid syntax
benchmark-results.txt:665225: parsing iteration count: invalid syntax
benchmark-results.txt:997581: parsing iteration count: invalid syntax
benchmark-results.txt:1325155: parsing iteration count: invalid syntax
benchmark-results.txt:1634567: 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               10.35m ± 64%
ComponentLoad-4                     3.610m ± 11%
ComponentExecute-4                  1.956µ ±  1%
PoolContention/workers-1-4          1.107µ ±  3%
PoolContention/workers-2-4          1.144µ ±  4%
PoolContention/workers-4-4          1.135µ ±  2%
PoolContention/workers-8-4          1.099µ ±  1%
PoolContention/workers-16-4         1.111µ ±  1%
ComponentLifecycle-4                3.644m ±  1%
SourceValidation-4                  2.347µ ±  2%
RegistryConcurrent-4                811.2n ±  2%
LoaderLoadFromString-4              3.660m ±  3%
geomean                             19.62µ

                            │ 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                  9.167m ± 64%
ComponentLoad-4                        3.477m ±  0%
ComponentExecute-4                     1.817µ ±  0%
PoolContention/workers-1-4             1.014µ ±  3%
PoolContention/workers-2-4             1.009µ ±  3%
PoolContention/workers-4-4             1.038µ ±  1%
PoolContention/workers-8-4             1.027µ ±  4%
PoolContention/workers-16-4            1.016µ ±  2%
ComponentLifecycle-4                   3.495m ±  0%
SourceValidation-4                     2.099µ ±  0%
RegistryConcurrent-4                   755.1n ±  3%
LoaderLoadFromString-4                 3.546m ±  0%
geomean                                18.13µ

                            │ 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.8n ± 5%
CircuitBreakerExecution_Success-4          21.53n ± 0%
CircuitBreakerExecution_Failure-4          66.12n ± 0%
geomean                                    74.18n

                                  │ 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                     296.8n ± 6%
CircuitBreakerExecution_Success-4             22.67n ± 0%
CircuitBreakerExecution_Failure-4             70.93n ± 0%
geomean                                       78.14n

                                  │ 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       │
IaCStateBackend_InProcess-4              310.5n ±  8%
IaCStateBackend_GRPC-4                   9.912m ± 12%
JQTransform_Simple-4                     716.2n ± 29%
JQTransform_ObjectConstruction-4         1.500µ ±  1%
JQTransform_ArraySelect-4                3.490µ ±  1%
JQTransform_Complex-4                    39.79µ ±  1%
JQTransform_Throughput-4                 1.839µ ±  1%
SSEPublishDelivery-4                     64.56n ±  1%
geomean                                  3.909µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4              416.0 ± 0%
IaCStateBackend_GRPC-4                 5.865Mi ± 6%
JQTransform_Simple-4                   1.273Ki ± 0%
JQTransform_ObjectConstruction-4       1.773Ki ± 0%
JQTransform_ArraySelect-4              2.625Ki ± 0%
JQTransform_Complex-4                  16.31Ki ± 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.832k ± 0%
JQTransform_Simple-4                     10.00 ± 0%
JQTransform_ObjectConstruction-4         15.00 ± 0%
JQTransform_ArraySelect-4                30.00 ± 0%
JQTransform_Complex-4                    328.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         │
IaCStateBackend_InProcess-4                 288.3n ±  1%
IaCStateBackend_GRPC-4                      10.63m ± 10%
JQTransform_Simple-4                        653.2n ± 33%
JQTransform_ObjectConstruction-4            1.423µ ±  0%
JQTransform_ArraySelect-4                   3.392µ ±  0%
JQTransform_Complex-4                       41.97µ ±  1%
JQTransform_Throughput-4                    1.731µ ±  1%
SSEPublishDelivery-4                        63.34n ±  1%
geomean                                     3.811µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.685Mi ± 11%
JQTransform_Simple-4                     1.273Ki ±  0%
JQTransform_ObjectConstruction-4         1.773Ki ±  0%
JQTransform_ArraySelect-4                2.625Ki ±  0%
JQTransform_Complex-4                    16.31Ki ±  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.859k ± 0%
JQTransform_Simple-4                        10.00 ± 0%
JQTransform_ObjectConstruction-4            15.00 ± 0%
JQTransform_ArraySelect-4                   30.00 ± 0%
JQTransform_Complex-4                       328.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.107µ ± 23%
SchemaValidation_AllFields-4                1.663µ ±  2%
SchemaValidation_FormatValidation-4         1.589µ ±  2%
SchemaValidation_ManySchemas-4              1.821µ ±  4%
geomean                                     1.519µ

                                    │ 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.076µ ± 16%
SchemaValidation_AllFields-4                   1.634µ ±  8%
SchemaValidation_FormatValidation-4            1.564µ ±  1%
SchemaValidation_ManySchemas-4                 1.604µ ±  3%
geomean                                        1.449µ

                                    │ 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.235µ ± 17%
EventStoreAppend_SQLite-4                  1.394m ±  3%
GetTimeline_InMemory/events-10-4           14.49µ ±  5%
GetTimeline_InMemory/events-50-4           80.82µ ±  2%
GetTimeline_InMemory/events-100-4          167.6µ ±  2%
GetTimeline_InMemory/events-500-4          672.1µ ± 25%
GetTimeline_InMemory/events-1000-4         1.302m ±  1%
GetTimeline_SQLite/events-10-4             108.4µ ±  1%
GetTimeline_SQLite/events-50-4             255.2µ ±  1%
GetTimeline_SQLite/events-100-4            424.9µ ±  2%
GetTimeline_SQLite/events-500-4            1.821m ±  5%
GetTimeline_SQLite/events-1000-4           3.543m ±  3%
geomean                                    230.4µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  795.5 ± 6%
EventStoreAppend_SQLite-4                  1.982Ki ± 3%
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.38Ki

                                   │ 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.055µ ± 20%
EventStoreAppend_SQLite-4                     1.023m ±  4%
GetTimeline_InMemory/events-10-4              13.50µ ±  6%
GetTimeline_InMemory/events-50-4              74.45µ ±  2%
GetTimeline_InMemory/events-100-4             145.5µ ± 23%
GetTimeline_InMemory/events-500-4             574.2µ ±  1%
GetTimeline_InMemory/events-1000-4            1.174m ±  1%
GetTimeline_SQLite/events-10-4                85.78µ ±  2%
GetTimeline_SQLite/events-50-4                223.1µ ±  0%
GetTimeline_SQLite/events-100-4               388.9µ ±  1%
GetTimeline_SQLite/events-500-4               1.696m ±  1%
GetTimeline_SQLite/events-1000-4              3.309m ±  1%
geomean                                       201.4µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                     791.0 ± 8%
EventStoreAppend_SQLite-4                     1.982Ki ± 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.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.

@intel352 intel352 merged commit 7a9dc54 into main Jun 2, 2026
23 checks passed
@intel352 intel352 deleted the issue-762-registry-builtin-skip branch June 2, 2026 02:28
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