fix(cli): show real cause past the elision marker in deployments-list snippet - #341
Conversation
…not the boilerplate head cloud#3649 fixed the backend to keep both the head and tail of a long, unrecognized deployment-run failure (stored as <head>...[N chars omitted]...<tail>), so the real cause survives its own 10_000-char truncation instead of being lost behind the unconditional mount/smithy bootstrap boilerplate. But formatDeploymentErrorSnippet in `deployments list`'s compact table still sliced from position 0 down to 240 chars - well inside the boilerplate head, before ever reaching the elision marker. Every unrecognized failure kept showing an opaque [smithy-diag] dump in the table view even after the backend fix landed (confirmed live: the stored `error` for chief-watchdog/hn-monitor already contains the elision marker and the real tail content via --json, but the compact table still showed only the head). Fix: when the marker is present, snippet from just after it instead of from the start. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe CLI now detects cloud-elided deployment errors and formats the text after the omission marker. A test verifies that the real cause appears without the repeated boilerplate. ChangesDeployment Error Snippets
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This localized CLI formatting change exposes real causes from cloud-elided errors while retaining the prior fallback behavior, with no material merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit found the hidden tail, Comment |
Summary
<head>...[N chars omitted]...<tail>— keeping both ends so the real cause survives the 10,000-char storage truncation instead of being lost behind the unconditional mount/smithy bootstrap boilerplate that runs before every persona invocation.agentworkforce deployments list's compact table still showed a raw[smithy-diag]dump for these agents even after that backend fix landed. Root cause:formatDeploymentErrorSnippetinpackages/cli/src/list-command.tsslices the stored error from position 0 down to 240 chars for the table view — well inside the boilerplate head, before ever reaching the elision marker.deployments list --jsonshows the full storederrorforchief-watchdog/hn-monitoralready contains the marker and real tail content, but the compact table still only showed the head.Fix
formatDeploymentErrorSnippetfinds the...[N chars omitted]...marker in a too-long error, it now snippets from just after the marker (the preserved real-cause tail) instead of from the start.Test plan
list-command.test.ts: existing tests unchanged/passing + 1 new test proving the snippet shows the real cause past the marker instead of[smithy-diag]boilerplatepackages/clifull build + typecheck cleanrunInvoke/isolated-worker sandbox tests confirmed unrelated (environment-only, not touchinglist-command.ts)Note
Low Risk
CLI-only display logic for deployment error snippets; no API, auth, or persistence changes.
Overview
Fixes
agentworkforce deployments listso compact table Errors lines show the preserved failure tail instead of repeated mount/smithy boilerplate.Cloud already stores very long unrecognized run failures as
<head>...[N chars omitted]...<tail>, butformatDeploymentErrorSnippetstill truncated from character 0 (240 chars), which never reached the marker. It now detects...[digits chars omitted]...and snippets from just after that marker, with the same head truncation when the marker is missing.Adds a unit test that asserts the table shows the real cause and omits
smithy-diagboilerplate.Reviewed by Cursor Bugbot for commit 5cd83bf. Bugbot is set up for automated code reviews on this repo. Configure here.