Repository navigation
Conversation
Add `rtree workflow sink list|create|update|delete|schema` to manage one sink at a time, `--sink-table`, `--sink-http`, and `--sink-header` on `workflow create`, and accept arrays, @path, and stdin for `--sink`. Validate sinks locally against the platform's rules and point errors at `rtree workflow sink schema`.
jordiori
force-pushed
the
jordiori/raw-539-cli-make-workflow-sink-input-easier-to-discover
branch
from
October 13, 2026 13:11
49b7d6d to
7afccec
Compare
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.
Resolves RAW-539.
Workflow sinks could only be passed as raw JSON through
--sink, with two examples in the help as the only hint at the shape. Changing one sink meant re-sending the whole list with every existing sink ID.Changes
rtree workflow sink list|create|update|deletemanages one sink at a time. The CLI reads the current list and sends the other sinks back by ID, since the API replaces the whole list.rtree workflow sink schema [--type table|http]lists each sink type's fields, rules, and examples (JSON with--json). It needs no login.workflow creategains--sink-table,--sink-http, and--sink-header.--sinkoncreateandupdatealso takes an array,@path, or-for stdin.sink schema; header values are never echoed. Sink input errors exit asvalidation_error(2); a missing sink asnot_found(4).Examples
Typed flags:
One sink at a time:
JSON, inline or as an array:
From a file or stdin, which keeps header credentials out of shell history:
Replacing the full list keeps existing sinks by ID; an existing HTTP sink needs only its ID to keep its URL and headers:
Local validation:
Note
Medium Risk
Changes how workflow results are routed (tables/webhooks) and how HTTP sink credentials are merged on update; mistakes or concurrent sink edits could misconfigure delivery, though the API still enforces limits.
Overview
Workflow sink configuration moves from raw JSON-only
--sinkto typed flags, dedicated subcommands, and local shape validation before API calls.workflow createadds--sink-table,--sink-http, and--sink-header(header only with a single HTTP URL).--sinkon create/update now accepts a JSON object or array,@path, or stdin; create blocks using both--sql -and--sink -.rtree workflow sinkaddslist,create,update,delete, andschema(no auth). Per-sink changes GET the workflow, rebuild the full sink list (unchanged sinks sent back by ID; HTTP sinks omit settings to preserve write-only URLs/headers), then PATCH—documented race if sinks are edited concurrently.A new
sinkmodule validates sink shape client-side (field names, types, helpful errors without echoing header secrets), merges HTTP header updates vianullfor unchanged stored headers, and maps validation/not-found to exit codes 2 and 4.README and help text are updated; contract, CLI parsing, unit, and live Platform tests cover typed create, pre-request validation, and incremental sink CRUD.
Reviewed by Cursor Bugbot for commit 7afccec. Bugbot is set up for automated code reviews on this repo. Configure here.