Skip to content

fix: tighten wfctl validation#712

Merged
intel352 merged 2 commits into
mainfrom
fix/wfctl-plugin-cache-skip
May 18, 2026
Merged

fix: tighten wfctl validation#712
intel352 merged 2 commits into
mainfrom
fix/wfctl-plugin-cache-skip

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • make wfctl validate strict by default, with --loose/--non-strict transitional opt-outs
  • add pipeline reference validation to wfctl validate and make deterministic output-shape issues fail
  • correct built-in step output metadata for db_query_cached, db_exec, and conditional
  • redact sensitive unresolved refs in infra plan diagnostics
  • reuse cached plugin lockfile installs only when lock metadata matches

Verification

  • GOWORK=off go test ./schema ./validation ./cmd/wfctl -count=1

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

Tightens wfctl validate by making strict validation the default, adding pipeline template/reference validation (including output-shape checks for key built-in steps), improving plugin lockfile install reuse safety, and redacting potentially sensitive unresolved refs in infra plan diagnostics.

Changes:

  • Make wfctl validate strict by default; add --loose/--non-strict transitional opt-outs and update docs/tests accordingly.
  • Add pipeline reference validation to wfctl validate, plus improved template ref scanning (including index .steps "name" "field" patterns) and more robust SQL SELECT alias extraction.
  • Correct/extend step output metadata + inference for step.db_exec and step.db_query_cached (single mode flat columns), and make wfctl lock installs reuse cached plugins only when recorded metadata matches.

Reviewed changes

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

Show a summary per file
File Description
validation/pipeline_refs.go Expands pipeline template reference validation (index field refs, nested-step scanning exclusions, improved SQL parsing).
validation/pipeline_refs_test.go Adds tests covering db_query_cached single-mode output shape and nested foreach step handling.
schema/step_schema_test.go Adds inference tests for db_exec and db_query_cached single-mode flat columns.
schema/step_schema_builtins.go Updates built-in step output metadata (conditional, db_query, db_exec, db_query_cached).
schema/step_inference.go Adds inferred outputs for db_exec and refined inference for db_query_cached (single vs list; SQL alias extraction).
docs/WFCTL.md Documents strict-by-default validate behavior and new --loose/--non-strict flags.
cmd/wfctl/validate.go Implements strict-by-default behavior and enforces pipeline ref validation in strict mode.
cmd/wfctl/plugin_install_wfctllock.go Adds cached install reuse guarded by recorded lock install metadata; records metadata after installs.
cmd/wfctl/plugin_install_lockfile_test.go Adds test ensuring cached install reuse when metadata matches (and no download occurs).
cmd/wfctl/main_test.go Updates/extends validate command tests for new strict default and pipeline ref failures.
cmd/wfctl/infra.go Redacts sensitive unresolved refs in “Pending JIT resolution” diagnostics output.
cmd/wfctl/infra_test.go Adds tests for sensitive-ref redaction logic.

Comment thread cmd/wfctl/validate.go Outdated
Comment thread validation/pipeline_refs.go
Comment thread cmd/wfctl/validate.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

@intel352 intel352 merged commit 58c6556 into main May 18, 2026
24 checks passed
@intel352 intel352 deleted the fix/wfctl-plugin-cache-skip branch May 18, 2026 22:33
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