Skip to content

feat: wp datamachine flows bulk-config CLI command (#626)#729

Merged
chubes4 merged 1 commit intomainfrom
feature/626-bulk-config-cli
Mar 8, 2026
Merged

feat: wp datamachine flows bulk-config CLI command (#626)#729
chubes4 merged 1 commit intomainfrom
feature/626-bulk-config-cli

Conversation

@chubes4
Copy link
Member

@chubes4 chubes4 commented Mar 8, 2026

Summary

  • New wp datamachine flows bulk-config subcommand for bulk-updating handler config across flows
  • Wraps the existing ConfigureFlowStepsAbility (3 execution modes) with a CLI interface
  • 9 tests, all passing

Usage

# Pipeline scope: update all flows with 'rss' handler in pipeline 5
wp datamachine flows bulk-config --pipeline_id=5 --handler=rss --handler_config='{"max_items":20}'

# Global scope (dry-run): preview changes across all pipelines
wp datamachine flows bulk-config --handler=rss --handler_config='{"max_items":20}' --dry-run

# Cross-pipeline scope: update flows across specific pipelines
wp datamachine flows bulk-config --pipeline_ids=5,8,12 --handler=rss --handler_config='{"max_items":20}'

# Filter by step type
wp datamachine flows bulk-config --pipeline_id=5 --handler=rss --step-type=fetch --handler_config='{"max_items":20}'

# Per-flow overrides
wp datamachine flows bulk-config --pipeline_id=5 --handler=rss --handler_config='{"max_items":20}' --override=42:max_items=50

Architecture

  • BulkConfigCommand at inc/Cli/Commands/Flows/BulkConfigCommand.php (352 lines)
  • Dispatched from FlowsCommand via bulk-config subcommand
  • Three execution paths matching the ability's modes: executePipeline(), executeGlobal(), executeCrossPipeline()
  • Config merge is handled by the ability layer (preserves existing handler config, merges new values on top)

Tests

  • tests/Unit/Cli/BulkConfigCommandTest.php — 9 tests covering:
    • Pipeline scope: updates matching flows, preserves existing config, skips non-matching handlers
    • Global scope: dry-run validation, execution
    • Unknown handler handling
    • Per-flow overrides
    • Step type filtering

Closes #626

Wraps ConfigureFlowStepsAbility with a CLI interface for bulk-updating
handler config across flows. Supports three scopes:

  - Pipeline scope: update all flows matching a handler within a pipeline
  - Global scope: update all flows matching a handler across all pipelines
  - Cross-pipeline scope: update flows across specific pipelines

Includes --dry-run for global/cross-pipeline scopes, --handler to target
specific handlers, --step-type to filter by step type, and per-flow
overrides via --override=flow_id:key=value.

9 tests covering all execution paths.
@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Homeboy Results — data-machine

Lint

Tooling versions

  • Homeboy CLI: homeboy 0.71.0
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v1

ℹ️ PR test scope resolved to full for compatibility with installed Homeboy CLI

lint (changed files only)

  • PHPStan: PHPSTAN SUMMARY: 202 errors at level 5

Test

Tooling versions

  • Homeboy CLI: homeboy 0.71.0
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v1

⚡ PR test scope resolved to changed

test

  • PHPCS: LINT SUMMARY: 1 errors, 19 warnings
  • Fixable: 17 | Files with issues: 8 of 364
Top violations
  Generic.Formatting.MultipleStatementAlignment.NotSameWarning    11
  WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned     5
  Generic.CodeAnalysis.UnusedFunctionParameter.Found          3
  PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter         1
- PHPStan: PHPSTAN SUMMARY: 202 errors at level 5 - OK (9 tests, 25 assertions)

Audit

Tooling versions

  • Homeboy CLI: homeboy 0.71.0
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v1

ℹ️ PR test scope resolved to full for compatibility with installed Homeboy CLI

audit (changed files only)

  • Actionable audit summary:
  • Alignment score: 0.701
  • Severity counts: unknown: 76, warning: 6
  • Drift increased: no
  • Outliers in current run: 76
  • Parsed outlier entries: 76
  • Top actionable findings:
    1. inc/Cli/Commands/Flows/FlowsCommand.php — missing_method — Missing method: dispatch
    2. inc/Cli/Commands/Flows/FlowsCommand.php — god_file — File has 1276 lines (threshold: 1000)
    3. inc/Cli/Commands/Flows/BulkConfigCommand.php — intra_method_duplicate — Duplicated block in runAbility — 5 identical lines at line 257 and line 281
    4. inc/Cli/Commands/Flows/FlowsCommand.php — intra_method_duplicate — Duplicated block in memoryFiles — 5 identical lines at line 1179 and line 1200
    5. inc/Cli/Commands/Flows/FlowsCommand.php — intra_method_duplicate — Duplicated block in showFlowDetail — 5 identical lines at line 434 and line 452

Homeboy Action v1

@chubes4 chubes4 merged commit 55bd7b7 into main Mar 8, 2026
3 checks passed
@chubes4 chubes4 deleted the feature/626-bulk-config-cli branch March 8, 2026 06:26
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.

CLI: bulk update handler config (e.g. max_items) by scope (global/pipeline/flow)

1 participant