refactor: make handler_configs/handler_slugs single source of truth (#233)#259
Merged
chubes4 merged 1 commit intoFeb 17, 2026
Conversation
2a9eea5 to
3bb4e7d
Compare
Contributor
Author
|
Self-audit complete. Found and fixed 3 additional gaps the sub-agent missed:
All remaining
Total: 18 files changed, 268 additions, 107 deletions. |
3bb4e7d to
f0add3f
Compare
…or flow step config
f0add3f to
0c9152c
Compare
saraichinwag
added a commit
to Sarai-Chinwag/data-machine
that referenced
this pull request
Feb 17, 2026
…ization Non-handler step types (Agent Ping, Webhook Gate) store settings directly in handler_config without a handler_slug. The normalization introduced in the source-of-truth refactor (Extra-Chill#259) was unsetting handler_config for all steps without a handler_slug, causing these settings to appear blank in the pipeline builder UI. Now only unset handler_config when a handler_slug is present (meaning the config has been migrated into handler_configs). When no handler_slug exists, handler_config is preserved as a plain settings bag for non-handler steps.
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
Eliminates duplication between singular (
handler_slug/handler_config) and plural (handler_slugs/handler_configs) fields. Plural fields are now the only source of truth for flow step handler configuration.The Problem
PRs #247-249 added
handler_slugsandhandler_configsfor multi-handler support but kept writing to the singular fields too. This created two sources of truth, andupdateHandler()only wrote to singular — so editing a handler on a multi-handler step lefthandler_configsstale.The Fix
New utilities in FlowStepHelpers:
normalizeHandlerFields()— converts legacy singular fields to plural format on read. Called whenever step config is loaded from DB.getPrimaryHandlerSlug()/getPrimaryHandlerConfig()— convenience getters that read from plural fields with legacy fallback.All writes go to plural only:
updateHandler()— writes tohandler_configs[$slug]andhandler_slugs, neverhandler_slug/handler_configaddHandler()— normalizes first, writes plural onlyremoveHandler()— normalizes first, writes plural onlyBackward compatibility maintained:
handler_slugandhandler_configfrom plural fields for consumers that read singularFiles Changed (16)
Core write path: FlowStepHelpers, UpdateFlowStepAbility
Abilities: ConfigureFlowStepsAbility, ValidateFlowStepsConfigAbility, FlowHelpers, ExecuteWorkflowAbility
API: FlowSteps REST, FlowFormatter, CreatePipeline chat tool
Engine: Step.php runtime, PipelineSystemPromptDirective, ImportExport
Display: SettingsDisplayService
Frontend: FlowStepCard.jsx, ModalManager.jsx
Tests: FlowAbilitiesTest fixtures