fix: bind job_id context to social publish tools#154
Merged
Conversation
The Bluesky, Facebook, Instagram, LinkedIn, Pinterest, Threads, and Twitter publish handlers extend PublishHandler, whose handle_tool_call() requires the run's job_id to load engine_data. Their tool definitions omitted client_context_bindings, so after data-machine's explicit-context-bindings migration job_id would never reach them and every publish call would bounce at the base job_id guard the moment these handlers ran in a pipeline. Declare 'client_context_bindings' => array( 'job_id' ) on each publish tool def, matching data-machine core handlers. data-machine core also now auto-binds this for handler-class tools, but declaring it here is correct regardless of core version.
Contributor
Homeboy Results —
|
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
Companion fix for Extra-Chill/data-machine#2560.
The Bluesky, Facebook, Instagram, LinkedIn, Pinterest, Threads, and Twitter publish handlers all extend
PublishHandler, whosehandle_tool_call()requires the run'sjob_idto load engine_data. Their tool definitions omittedclient_context_bindings, so after data-machine's explicit-context-bindings migrationjob_idwould never reach them and every publish call would bounce at the basejob_idguard the moment these handlers ran in a pipeline (same failure class as the events upsert storm).What changed
'client_context_bindings' => array( 'job_id' )on each of the 7 social publish tool defs.Note
data-machine core also now auto-binds
job_idfor handler-class tools (Extra-Chill/data-machine#2561), but declaring it here is correct regardless of deployed core version.Testing
php -lclean on all 7 changed handler files.Refs Extra-Chill/data-machine#2560