fix: normalize config authoring quirks#873
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves Workflow’s config authoring ergonomics by adding additive compatibility aliases (while keeping canonical fields), extending wfctl modernize to rewrite common aliases back to canonical config, and updating schemas/tests/docs to reflect the normalized surfaces.
Changes:
- Accept and validate new authoring aliases (e.g.,
http.server.config.port, DB stepmodule/args/one/many, request parseformat, conditionalif/then/else, andstep.response). - Extend
wfctl modernizewith a new rule to rewrite DB step aliases and normalize DB modes. - Update schema registry metadata, golden editor schemas, tests, and docs; remove the now-obsolete config quirks guide.
Reviewed changes
Copilot reviewed 44 out of 44 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
schema/validate.go |
Adds module-specific validation to allow http.server port alias alongside canonical address. |
schema/testdata/editor-schemas.golden.json |
Updates generated editor schema output to document new aliases and canonical wording. |
schema/step_schema_builtins.go |
Registers step.response schema as an alias of step.json_response. |
schema/schema.go |
Adds step.response to the core known type list. |
schema/schema_test.go |
Updates/extends config validation tests for http.server port alias behavior. |
schema/module_schema.go |
Updates built-in module/step schemas to document canonical keys plus accepted aliases. |
schema/module_schema_test.go |
Ensures http server schema exposes both address and port. |
plugins/pipelinesteps/plugin.go |
Registers step.response step type as an alias to step.json_response. |
plugins/pipelinesteps/plugin_test.go |
Adds coverage for the step.response factory alias behavior. |
plugins/http/schemas.go |
Documents port as an alias for the canonical address config key. |
plugins/http/plugin_test.go |
Tests http.server port alias normalization in the plugin factory and schema listing. |
plugins/http/modules.go |
Implements http.server address normalization from address or port (multi-type parsing). |
module/reflect_validation_test.go |
Updates reflect-based schema expectations for http.server address no longer being individually required. |
module/pipeline_step_request_parse.go |
Supports `format: json |
module/pipeline_step_request_parse_test.go |
Adds test coverage for the format alias. |
module/pipeline_step_json_response.go |
Decodes template-resolved JSON arrays/objects before encoding response to avoid double-serialization. |
module/pipeline_step_json_response_test.go |
Adds tests for raw JSON array/object template decoding behavior. |
module/pipeline_step_db_query.go |
Normalizes DB step config aliases and mode (module/args/many/one). |
module/pipeline_step_db_query_test.go |
Adds tests ensuring DB alias normalization and canonical precedence. |
module/pipeline_step_db_query_cached.go |
Applies DB alias normalization to cached query steps as well. |
module/pipeline_step_db_exec.go |
Applies DB alias normalization to exec steps, including mode normalization for returning queries. |
module/pipeline_step_db_exec_test.go |
Adds tests for DB exec alias normalization and canonical precedence. |
module/pipeline_step_db_config.go |
Introduces shared helper functions for alias resolution and mode normalization. |
module/pipeline_step_conditional.go |
Adds if/then/else conditional routing mode alongside existing field/routes mode. |
module/pipeline_step_conditional_test.go |
Adds tests for if/then/else conditional behavior with both {{ }} and ${ } forms. |
module/http_server.go |
Updates editor tag metadata to describe address as canonical rather than “required”. |
modernize/rules.go |
Adds YAML AST helpers and a new rule to rewrite DB config aliases to canonical keys/modes. |
modernize/modernize.go |
Registers the new DB alias modernize rule. |
handlers/testhelpers_test.go |
Registers step.response in cyclic plugin test helper wiring. |
DOCUMENTATION.md |
Adds step.response to the documented step catalog. |
docs/WFCTL.md |
Documents the new wfctl modernize rule and clarifies alias rewriting intent. |
docs/tutorials/building-apps-with-workflow.md |
Notes canonical keys and lists supported authoring aliases + wfctl modernize guidance. |
docs/plans/2026-06-07-workflow-docs-ecosystem.md.scope-lock |
Adds scope lock hash for the docs plan. |
docs/plans/2026-06-07-workflow-docs-ecosystem.md |
Adds the implementation plan for docs ecosystem work (PR1 tasks). |
docs/plans/2026-06-07-workflow-docs-ecosystem-plan-review.md |
Adds adversarial review report for the plan artifact. |
docs/plans/2026-06-07-workflow-docs-ecosystem-design.md |
Adds the docs ecosystem design artifact. |
docs/plans/2026-06-07-workflow-docs-ecosystem-design-review.md |
Adds adversarial review report for the design artifact. |
docs/plans/2026-06-07-workflow-docs-ecosystem-alignment-check.md |
Adds design/plan alignment report artifact. |
docs/dsl-reference.md |
Documents canonical field notes and pipeline authoring alias notes. |
docs/config-field-quirks.md |
Removes the quirks/inconsistencies doc now that the listed quirks are addressed. |
decisions/0048-wfctl-owned-go-api-docs.md |
Adds ADR documenting the decision to generate Go API docs via wfctl. |
cmd/wfctl/type_registry.go |
Updates module/step type registry metadata to include new aliases and step types. |
cmd/wfctl/type_registry_test.go |
Adds/updates tests to ensure the type registry includes the new keys/types. |
cmd/wfctl/modernize_test.go |
Adds tests validating the new DB alias modernize rule behavior. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
http.server.config.portas an additive alias while keepingaddresscanonicalmodule,args,one,many) and add wfctl modernize coverageVerification
GOWORK=off go test ./cmd/wfctl ./module ./plugins/http ./plugins/pipelinesteps -count=1GOWORK=off UPDATE_GOLDEN=1 go test ./schema -run TestEditorSchemasGoldenFile -count=1GOWORK=off go test . ./plugins/all ./schema -run 'TestRegistryConsistency|TestDocumentationCoverage|TestModuleSchemaRegistry|TestEditorSchemasGoldenFile' -count=1GOWORK=off go test ./... -count=1/Users/jon/.codex/plugins/cache/autodev-marketplace/autodev/6.5.0/tests/plan-scope-check.sh --verify-lock /Users/jon/workspace/.autodev/gocodealone-audit/clones/workflow/docs/plans/2026-06-07-workflow-docs-ecosystem.mdPlan: docs/plans/2026-06-07-workflow-docs-ecosystem.md PR1 / Tasks 1-4.