You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "chennaji9 (via GitHub)" <gi...@apache.org> on 2026/10/15 16:59:35 UTC
[PR] fix(ai): keep CLI diagnostics out of Qoder completions [rocketmq-dashboard]
chennaji9 opened a new pull request, #6777:
URL: https://github.com/apache/rocketmq-dashboard/pull/6777
### Which Issue(s) This PR Fixes
None — small self-contained fix found by inspection (no issue tracked).
### Brief Description
`CliAgentProvider.complete()` — the path every completion-style provider (qoder's one-shot runs, the prompt enhancement) goes through — started the child with `redirectErrorStream(true)`, so stderr was merged into stdout and captured as the completion result:
- a qoder run that streamed its answer and then printed SDK/connection warnings to stderr returned the warnings appended to (or, with an empty answer, *instead of*) the answer — the merged text is what passed the empty-completion check;
- the existing `completeSurvivesLargeStderrOutput` test even asserted this: it checked the result is longer than 500 000 bytes because the stderr noise was in it. That only proved the pipe could not deadlock, not that the answer was the answer.
stdout and stderr are now drained on separate background threads (the deadlock rationale that justified the background drain is preserved for both pipes): stdout is the completion, stderr is diagnostics — kept bounded at the same output limit but always drained to the end so a chatty child can never block on a full stderr pipe. A non-zero exit reports stderr first (falling back to stdout when the CLI wrote nothing to stderr).
### How Did You Test This Change?
`cd server && mvn -B -ntp test -Dtest='CliAgentProviderTest,ClaudeCodeAgentProviderTest,QoderAgentProviderTest' -DfailIfNoTests=false` → **Tests run: 38, Failures: 0**.
- `completeSurvivesLargeStderrOutput` (updated) — 500 KiB of stderr, no deadlock, and the completion is now exactly `DONE`, none of the noise;
- `completeRejectsACompletionWhoseStdoutStayedEmptyTest` (new) — warnings on stderr with exit 0 is an `llm.provider.empty_completion`, not a "completion";
- `completeReportsStderrDiagnosticsOnFailureTest` (new) — a failed exit names its stderr in the error.
Red side: both new/updated expectations were run against the unfixed `complete()` and fail — the empty-stdout run returns the warning text as the completion, and the 500 KiB of stderr used to be the result.
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits (`fix:`)
- [x] Tests added or updated for non-trivial changes (2 new tests + 1 assertion-migration, red-green)
- [x] New UI text has both Chinese and English entries under `web/src/i18n/` (n/a — no UI change)
- [x] Architecture constraints stay green (same class, no new dependency)
- [x] New source files carry the ASF license header (n/a — no new source file)
- [x] Documentation touched where behaviour changed (n/a — the class contract "captures stdout as the completion result" now actually holds)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ai): keep CLI diagnostics out of Qoder completions [rocketmq-dashboard]
Posted by "chennaji9 (via GitHub)" <gi...@apache.org>.
chennaji9 commented on PR #6777:
URL: https://github.com/apache/rocketmq-dashboard/pull/6777#issuecomment-6520045584
One detail worth flagging for review: stderr is still drained to the end (bounded at the same output limit) even though it is no longer part of the result, so a chatty child can never block on a full pipe. stdout alone is what passes the empty-completion check now, which is what makes the warnings-only run fail loudly instead of passing the noise off as an answer.
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ai): keep CLI diagnostics out of Qoder completions [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub) via commits" <co...@rocketmq.apache.org>.
github-actions[bot] commented on PR #6777:
URL: https://github.com/apache/rocketmq-dashboard/pull/6777#issuecomment-6699326641
This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ai): keep CLI diagnostics out of Qoder completions [rocketmq-dashboard]
Posted by "chennaji9 (via GitHub)" <gi...@apache.org>.
chennaji9 commented on PR #6777:
URL: https://github.com/apache/rocketmq-dashboard/pull/6777#issuecomment-6359276273
For context, the interesting assertion is that the 500 KiB stderr case now completes with exactly DONE — the old test only proved the pipe didn't deadlock, and accidentally pinned the noise-in-result behaviour. Draining stderr fully in the background is what preserves the deadlock guarantee while keeping it out of the answer.
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ai): keep CLI diagnostics out of Qoder completions [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub) via commits" <co...@rocketmq.apache.org>.
github-actions[bot] closed pull request #6777: fix(ai): keep CLI diagnostics out of Qoder completions
URL: https://github.com/apache/rocketmq-dashboard/pull/6777
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ai): keep CLI diagnostics out of Qoder completions [rocketmq-dashboard]
Posted by "lizhimins (via GitHub) via commits" <co...@rocketmq.apache.org>.
lizhimins merged PR #6777:
URL: https://github.com/apache/rocketmq-dashboard/pull/6777
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org