SEZ9 commented on PR #13425:
URL: https://github.com/apache/seatunnel/pull/13425#issuecomment-7149189409
Thanks @DanielLeens — Issue 1 is a fair hit and it was the more important
half of the problem. Fixed in `4d3a65a`.
You were right that I changed an unused field. `_process_request` renders a
config result from `config`, `explanation` and `dry_run`; `content` is never
displayed on that path. So the failure text I added went somewhere nothing
looks at, and a config the engine had rejected still arrived in a green
"Generated SeaTunnel Config" panel with the rejection mentioned nowhere on
screen. Repair routing worked and the user-facing half did not.
### What changed
The orchestrator now carries the unresolved failure in its own field rather
than only in `content`:
```python
if unresolved:
result["validation_failure"] = unresolved
```
and the renderer uses it:
- the config panel is titled `⚠ Generated SeaTunnel Config (did not pass
validation)` and bordered yellow instead of green;
- the engine's own error is shown beneath it in a labelled `⚠ Unresolved
validation failure` panel.
On your point about not mislabelling `last_dry_run`: I left it out of the
rendered output entirely. It describes the last config that reached the engine,
which after a repair round is not necessarily the one being returned, so
presenting it as this config's dry-run would be the same category of error in
the other direction. It stays in the result for programmatic callers,
documented as such.
The config is still handed back — one that needs a single edit beats nothing
— it just can no longer look finished.
### Tests
Added the CLI-level regression you asked for, driving the real
`SeaTunnelCLI._process_request` with a recording `rich` Console so the
assertion is on what actually reaches the terminal:
- `test_the_engine_rejection_is_shown_to_the_user` — exhausted budget,
asserts `option 'x' not recognised` and `did not pass validation` appear in the
rendered output
- `test_a_validated_config_is_not_labelled_as_failing` — a passing config
keeps the normal panel and gains no warning
- `test_a_delivered_config_carries_no_validation_failure` / an assertion on
the new field in the existing exhausted-budget case
Suite: 444 passed (441 before), `ruff check .` clean.
Both halves are load-bearing, checked by reverting each rather than only by
the tests passing:
| Mutation | Result |
| --- | --- |
| renderer ignores `validation_failure` (green panel again) |
`test_the_engine_rejection_is_shown_to_the_user` failed |
| orchestrator stops setting the field |
`test_an_unresolved_rejection_is_reported_not_called_a_warning` failed
(KeyError) |
| neither | 13 passed |
I did not change the `/run` affordance offered afterwards, since `/check` is
also offered and reworking that menu seemed outside this fix. Say the word if
you'd rather it were suppressed for an unvalidated config.
On docs: I've left both language guides alone, because this is a rendering
change to an existing flow rather than a new option or command. If you think
the three states you named — explicit rejection, incomplete check, unvalidated
best effort — deserve describing in `docs/*/ai-cli/`, I'm happy to add that
here rather than in a follow-up.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]