Executed the full improvement plan for this block, found genuinely
under-baked (zero real usage, schema-only test coverage):
- Fixed a real bug: a JSON-typed output returned the raw trimmed string,
but Input.validateValue() requires JSON-typed values to be instanceof
JsonNode - configuring a JSON output was silently broken end to end.
coerce() now parses the segment with ObjectMapper.readTree(), with a
clear error on invalid JSON instead of a confusing downstream rejection.
- Replaced raw IllegalArgumentException with NodeExecutionException and
stable error codes (DELIMITED_PARSER_INPUT_MISSING,
_SEGMENT_COUNT_MISMATCH, _INVALID_BOOLEAN, _INVALID_FILE,
_INVALID_JSON), matching the convention already used by
BranchRejoinExecutor.
- Added an array-output mode: a DelimitedParserOutput (new record, kept
separate from the shared SwitchCase used by SwitchBlock) marked
multiple=true collects every split segment into a list with no
fixed-count check, instead of requiring exactly N named outputs -
complements the Iterator's "array in" with "array out" here.
- Boolean coercion now also accepts yes/no and 1/0, not just true/false.
- Added DelimitedParserExecutorTest (11 cases, was zero), two end-to-end
ExecutionTest cases (fixed mode and array mode), and a bundled "test
delimited parser" example flow (LLM -> DelimitedParserBlock -> EndBlock)
since the block had never been used in any real flow before. Verified
live against the running service with a real Ollama call.
No rename needed here - "DelimitedParserBlock" already describes what it
does, unlike ExclusiveMergeBlock.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>