fix(errors): dedupe identical messages when traversing error .cause chain#84556
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. from source inspection: current main appends every Error/string cause message, and PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the focused formatter fix after maintainer review and focused CI/test confirmation, keeping distinct nested causes and final redaction intact. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main appends every Error/string cause message, and Is this the best way to solve the issue? Yes; fixing the shared formatter removes the duplicate at the presentation boundary while preserving distinct nested cause messages and the existing redaction step. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 0af55f971d00. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Sunspot Diff Drake Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
e26f6d2 to
c6cef5e
Compare
c6cef5e to
e27f94d
Compare
e27f94d to
075debd
Compare
…hain formatErrorMessage walked .cause and appended each level joined by ' | '. Wrappers like coerceToFailoverError construct a FailoverError whose message equals the wrapped error's message and set cause to the original, so the formatted output ended up doubled (e.g. 'No API key... | No API key...') which surfaced in the TUI as a duplicated 'Agent failed before reply' line.
075debd to
46aa27f
Compare
|
Merged via squash.
Thanks @RomneyDa! |
* fix(errors): dedupe identical messages when traversing error .cause chain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf * fix(cli): gate exported subcli descriptors (openclaw#84519) Summary: - This PR filters exported sub-CLI descriptors through the private-QA gate, centralizes that filter, adds regr ... ge, and carries small validation repairs in workspace glob and tunnel-timeout tests plus a changelog entry. - Reproducibility: yes. Current-main source shows the raw SUB_CLI_DESCRIPTORS export can include qa while the helper surfaces filter it, and src/cli/argv.ts consumes that export for root command policy. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(cli): gate exported subcli descriptors - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8451… Validation: - ClawSweeper review passed for head ba197a6. - Required merge gates passed before the squash merge. Prepared head SHA: ba197a6 Review: openclaw#84519 (comment) Co-authored-by: Zhaocun <zhaocunsun@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com> * fix(doctor): migrate invalid thinking formats (openclaw#84626) * fix(cron-cli): bound loadCronJobForShow pagination (openclaw#83856) (openclaw#83989) Summary: - Adds a 50-page and advancing-`nextOffset` guard to `loadCronJobForShow`, exports that helper for regression tests, and adds an unreleased changelog entry. - Reproducibility: yes. Current main is source-reproducible because `loadCronJobForShow` loops while `hasMore` ... ed numeric `nextOffset`; the PR discussion also includes terminal before/after proof for the same CLI path. Automerge notes: - No ClawSweeper repair was needed after automerge opt-in. Validation: - ClawSweeper review passed for head 7828b4b. - Required merge gates passed before the squash merge. Prepared head SHA: 7828b4b Review: openclaw#83989 (comment) Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com> * fix(config): accept execApprovals.enabled="auto" in zod schema * fix: honour tool error suppression for mutating tools (openclaw#81561) Merged via squash. Prepared head SHA: 7462a86 Co-authored-by: moeedahmed <5780040+moeedahmed@users.noreply.github.com> Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com> Reviewed-by: @jalehman * Add OpenRouter provider routing params (openclaw#84579) Co-authored-by: Alex Knight <15041791+amknight@users.noreply.github.com> * Preserve AGENTS.md policy during bootstrap truncation (openclaw#82921) Fixes openclaw#82920 * chore: regenerate base config schema Updated after MODEL_THINKING_FORMATS changed from z.union literals to z.enum, and session/session.agentToAgent gained detailed help text. * Revert "Add OpenRouter provider routing params (openclaw#84579)" This reverts commit 53254dc. --------- Co-authored-by: Dallin Romney <dallinromney@gmail.com> Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Co-authored-by: Zhaocun Sun <zhaocunsun@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com> Co-authored-by: Gio Della-Libera <giodl73@gmail.com> Co-authored-by: yaoyi1222 <yaoyi_1222@163.com> Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com> Co-authored-by: Moeed Ahmed <drmoeedahmed@gmail.com> Co-authored-by: moeedahmed <5780040+moeedahmed@users.noreply.github.com> Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com> Co-authored-by: Alex Knight <aknight@atlassian.com> Co-authored-by: Alex Knight <15041791+amknight@users.noreply.github.com> Co-authored-by: Galin Iliev <iliev@galcho.com>
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
…hain (openclaw#84556) Merged via squash. Prepared head SHA: 46aa27f Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf
See before and after in these 2 messages:
Summary
formatErrorMessagewalked.causeand appended every level joined by|, so a wrapper that carried the same string as its cause produced doubled output.coerceToFailoverError(src/agents/failover-error.ts:524-563) does exactly that: it builds aFailoverErrorwhosemessageis read from the wrapped error and setscause: err. That made auth failures likeNo API key found for provider "openai-codex" …surface in the TUI as the same sentence twice, separated by|, inside the|).Behavior addressed: TUI control-UI failure path renders the error message once instead of duplicated. Underlying auth misconfiguration is unchanged.
Test plan
node scripts/run-vitest.mjs src/infra/errors.test.ts(added a regression case covering the FailoverError-style wrap).