[Improve][CLI] Add opt-in --debug pipeline diagnostics for soft generation failures
Author: det101Created Sep 29, 2026Updated Sep 29, 2026
Search before asking
- I had searched in the feature and found no similar feature requirement.
Description
SeaTunnel CLI currently has weak observability when config generation soft-fails.
Typical case: the planner/generator stages succeed, then the validator/fix loop fails repeatedly, and the user only sees a short message such as:
Failed to generate config.or stage lines without the underlying reason:
stage=validator outcome=fail round=1
stage=fix outcome=ok round=1
stage=validator outcome=fail round=2Exceptions already print a traceback, but soft failures (empty model reply, missing HOCON code block, local/LLM validation FAIL) do not expose:
- which pipeline stage failed (
start→planner→skill→metadata→generator→validator→fix→dryrun→result) - local
validate_hoconvs LLM validator verdict - a redacted snippet of the model / validator output
Please add an opt-in debug mode for the agent pipeline:
- CLI flag:
--debug - Env var:
SEATUNNEL_CLI_DEBUG=1(equivalent) - Default behavior unchanged (no noisy logs)
- When enabled, print a one-line summary per stage; on failure attach a redacted, truncated detail block
- Soft-failure user message should include a short reason code (e.g.
no_hocon_block) plus a hint to re-run with--debug - Never print API keys / passwords (reuse / align with existing secret redaction)
This is a diagnostics improvement, not a change to generation prompts by itself. It helps contributors and users locate whether failures come from the model, parsing, local validation, or the LLM validator loop.
Usage Scenario
- Debugging why
seatunnel/seatunnel --debugfails to produce a config with a given LLM provider/gateway - Distinguishing “model returned no HOCON block” vs “validator rejected
${ENV}placeholders” vs tool-loop exhaustion - Supporting issue reports with a shareable (redacted) stage trace
Example (desired):
seatunnel --debug
# or
SEATUNNEL_CLI_DEBUG=1 seatunnel[debug] stage=start provider=openai model=... fast_model=...
[debug] stage=planner stop_reason=end_turn tools=0 outcome=plan
[debug] stage=generator outcome=ok
[debug] stage=validator_detail local=fail reason=INVALID
[debug] detail:
| ERROR: Unresolved environment variables: MYSQL_USER, MYSQL_PASSWORD
[debug] stage=validator round=1 outcome=fail reason=...Related Issues
- N/A (no existing CLI debug/diagnostics feature request found)
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Source: apache/seatunnel