Skip to content

feat: Add step.base64_decode pipeline step#195

Merged
intel352 merged 6 commits intomainfrom
copilot/add-base64-decode-step
Feb 27, 2026
Merged

feat: Add step.base64_decode pipeline step#195
intel352 merged 6 commits intomainfrom
copilot/add-base64-decode-step

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

  • Create module/pipeline_step_base64_decode.go with Base64DecodeStep implementation
  • Create module/pipeline_step_base64_decode_test.go with 19 unit tests
  • Register step.base64_decode in plugins/pipelinesteps/plugin.go
  • Add schema definition in schema/module_schema.go
  • Add to registered types list in schema/schema.go (sorted correctly)
  • Add to type registry in cmd/wfctl/type_registry.go
  • Build passes, all tests pass, linter clean
  • Missing/invalid input_from path returns valid: false (not error)
  • Non-string input returns valid: false (not error)
  • invalid() returns all output keys with zero defaults
  • Pre-decode size estimation prevents large allocations when max_size_bytes is set
  • Tests updated to match non-fatal semantics; added tests for non-string input and complete key presence
  • Fixed TestKnownModuleTypes_Sortedstep.base64_decode now in correct sorted position in schema/schema.go
  • Fixed TestStepFactories and TestPluginLoads — updated expected counts to include step.base64_decode

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

… base64/data-URI content

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Add step.base64_decode for parsing base64 and data-URI content feat: Add step.base64_decode pipeline step Feb 27, 2026
@intel352 intel352 marked this pull request as ready for review February 27, 2026 05:45
Copilot AI review requested due to automatic review settings February 27, 2026 05:45
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 a new built-in pipeline step type (step.base64_decode) to decode base64 payloads (raw base64 or data-URI), optionally validate MIME type and decoded size, and expose decoded metadata back to the pipeline context.

Changes:

  • Implements Base64DecodeStep with config parsing, decoding, MIME detection, and optional validations.
  • Registers the new step type across plugin manifest/factory wiring, schema registries, and wfctl’s type registry.
  • Adds a dedicated unit test suite for the new step and helper functions.

Reviewed changes

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

Show a summary per file
File Description
schema/schema.go Adds step.base64_decode to the engine’s known built-in module type list.
schema/module_schema.go Defines the module schema for step.base64_decode (config fields, inputs/outputs).
plugins/pipelinesteps/plugin.go Registers the step in the pipeline-steps plugin manifest and factory map.
module/pipeline_step_base64_decode.go New step implementation (decode + validate + output metadata).
module/pipeline_step_base64_decode_test.go New unit tests covering formats, validation, and dotted-path resolution.
cmd/wfctl/type_registry.go Adds the new step type to wfctl’s known step registry and config keys list.

@intel352
Copy link
Contributor

@copilot apply changes based on the comments in this thread

Also fix the failing tests.

…present, pre-decode size guard

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
@intel352
Copy link
Contributor

@copilot tests are failing

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 27, 2026

@copilot tests are failing

Fixed in 7a99283. Two issues were causing failures after the main branch merge:

  1. step.base64_decode was inserted out of order in coreModuleTypes in schema/schema.go — moved to its correct sorted position (after step.artifact_push)
  2. TestStepFactories and TestPluginLoads in plugins/pipelinesteps had stale hardcoded counts that didn't account for step.base64_decode — updated to the correct values

@intel352 intel352 merged commit a8de1e3 into main Feb 27, 2026
14 checks passed
@intel352 intel352 deleted the copilot/add-base64-decode-step branch February 27, 2026 11:44
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.

3 participants