You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "goutamadwant (via GitHub)" <gi...@apache.org> on 2026/09/08 00:26:47 UTC
[PR] [Improve][Transform-V2] Add opt-in validation for LLM boolean output [seatunnel]
goutamadwant opened a new pull request, #12194:
URL: https://github.com/apache/seatunnel/pull/12194
### Purpose of this pull request
Closes #12191.
The LLM transform currently converts results such as `"unknown"`, an empty string, or a null element to `false` when `output_data_type = BOOLEAN`. A downstream validator cannot distinguish those results from a genuine `false` after conversion.
This proposes an optional strict validation mode at the conversion boundary, while preserving the existing default behavior.
### Does this PR introduce _any_ user-facing change?
Yes. Add `strict_boolean_output`, defaulting to `false`.
```hocon
output_data_type = BOOLEAN
strict_boolean_output = true
```
When enabled for BOOLEAN output, require exactly one non-null `true` or `false` result, matching case-insensitively without trimming whitespace. Invalid, empty, null, or multiple results fail with a validation error that does not include the input row or model response.
Existing defaults, capitalized boolean support, custom-provider response parsing, and other output types are unchanged. This does not add retries, row skipping, or error-table routing. English and Chinese documentation describe the option and its limits.
The transform retains its baseline serialization identifier so previously serialized job metadata remains readable; older payloads keep strict validation disabled.
### How was this patch tested?
- Added 41 regression cases covering default compatibility, valid literals, malformed/null/empty/multiple results, sanitized errors, non-BOOLEAN output types, row metadata, custom-provider response formats, the legacy serialization identifier, and factory-wrapper serialization roundtrips in default and strict modes.
- Before implementation, the original 38-case fixture reproduced 13 expected failures on both Java 8 and Java 11. The added serialization identifier assertion also failed before preserving the baseline identifier.
- Complete transform unit suite passed on Java 8 and Java 11: 1,150 tests on each runtime, with no failures, errors, or skips.
- A separate manual compatibility probe serialized the actual factory wrapper with baseline classes, then read those archived bytes with the updated classes on Java 8 and Java 11. A malformed boolean response still produced `false` through the local HTTP provider. This old-payload check is separate from the checked-in roundtrip tests; no full cluster-upgrade test was run.
- No external model service was used.
- Root `./mvnw spotless:apply` passed.
- Full-repository `./mvnw -q -DskipTests verify` passed on Java 11 at the final revision. This build skips tests and is separate from the transform unit-suite results above.
```shell
./mvnw -f seatunnel-transforms-v2/pom.xml -Dskip.spotless=true test
```
### Check list
* [x] If any new Jar binary package adding in your PR, please add License Notice according
[New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md) — N/A: no new dependencies or JARs.
* [x] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs — EN/ZH updated.
* [x] If necessary, please update `incompatible-changes.md` to describe the incompatibility caused by this PR. — N/A: existing defaults and APIs are preserved.
* [x] If you are contributing the connector code, please check that the following files are updated: — N/A: not a connector change.
1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Transform-V2] Add opt-in validation for LLM boolean output [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #12194:
URL: https://github.com/apache/seatunnel/pull/12194#issuecomment-5673464501
@DanielLeens Update in efe4aee63:
Synced dev to include #12302 for the deterministic S3 dry-run image failure. No additional boolean-validation logic changed. Fresh CI has been triggered; the previous shared connector and failover failures still require updated-run evidence.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Transform-V2] Add opt-in validation for LLM boolean output [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12194:
URL: https://github.com/apache/seatunnel/pull/12194#issuecomment-5713038338
Thanks for tracking this down, and for being explicit that no boolean-validation code changed here — I independently confirmed that against the fork run for this exact head (`efe4aee633d`, https://github.com/goutamadwant/seatunnel/actions/runs/34918537638), rather than taking the summary at face value.
I pulled the actual failing jobs/logs directly:
- `TaskExecutionServiceTest.testStaleTaskDoneCleansOnlyOwnedGenerationResources` does fail in `unit-test (11, ubuntu-latest)` at `seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/TaskExecutionServiceTest.java:639` — matches your execution-ID-collision diagnosis exactly, and it's entirely in `seatunnel-engine-server`, nowhere near `LLMTransform`/`nlpmodel/llm/**`. Good catch; the fixture-isolation fix belongs in its own PR as you said, not folded into this one.
- `transform-v2-it-part-1 (11)` fails again on `TestFilterRowKindIT.testFilterRowKindMultiTable` — the same pre-existing, unrelated `dev`-side flake I flagged in my 09-14 review, still not fixed on `dev`. This PR's own `TestLLMIT.testLLMWithOpenAIStrictBoolean` and `...RejectsInvalidOutput` both pass in that same job log.
- `engine-v2-it (8)` and `all-connectors-it-2/6` are also red, but in unrelated modules — nothing touching `LLMTransform` shows up in any of them.
So: this PR's own code and tests remain green everywhere they actually run; every current red job traces back to shared, unrelated `dev`-side test infrastructure, not this PR's diff. Once the fixture-isolation fix lands (or this run is otherwise green), there's nothing left blocking merge on my end. As I have comment-only rights here, a maintainer with write-level review permission will need to give the final approve/merge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Transform-V2] Add opt-in validation for LLM boolean output [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #12194:
URL: https://github.com/apache/seatunnel/pull/12194#issuecomment-5707508167
@DanielLeens I reproduced an execution-ID collision in the shared TaskExecutionServiceTest fixture and pushed a separate test-only fix using unique IDs. The deterministic regression fails before the fix, and all 18 tests pass afterward on both Java 8 and 11. No boolean-validation code changed. The [compare branch](https://github.com/apache/seatunnel/compare/dev...goutamadwant:seatunnel:test/task-execution-fixture-isolation?expand=1) is ready for a separate PR; [fork CI](https://github.com/goutamadwant/seatunnel/actions/runs/35172968896) is queued. Other shared integration failures remain separate.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Transform-V2] Add opt-in validation for LLM boolean output [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #12194:
URL: https://github.com/apache/seatunnel/pull/12194#issuecomment-5595772140
@DanielLeens Added UID provenance and a reproducible legacy serialization fixture. The regression verifies that the original factory wrapper still deserializes with legacy boolean behavior.
All 59 focused tests passed on Java 8 and 11. Strict-boolean success/failure E2E cases compile; Docker execution remains for CI. New-head CI is pending.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Transform-V2] Add opt-in validation for LLM boolean output [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12194:
URL: https://github.com/apache/seatunnel/pull/12194#issuecomment-6266775025
The CI fact cited in my previous review has changed: Build for the current unchanged head is now passing. CI was previously the only remaining blocker; CI is now passing, so my technical conclusion changes to approve. I do not see a new source-side blocker from Daniel's review. This branch is behind the latest dev base, which I have recorded as merge metadata only; because the current head CI is green, that fact alone does not call for an additional source change. I have read-only review controls, so this COMMENT does not change GitHub's displayed review decision; a write-capable maintainer must perform any final approval or dismissal action.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Transform-V2] Add opt-in validation for LLM boolean output [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo merged PR #12194:
URL: https://github.com/apache/seatunnel/pull/12194
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org