fix(twitter): fail typed when a write command does not go through - #2256
Open
Benjamin-eecs wants to merge 1 commit into
Open
fix(twitter): fail typed when a write command does not go through#2256Benjamin-eecs wants to merge 1 commit into
Benjamin-eecs wants to merge 1 commit into
Conversation
Benjamin-eecs
force-pushed
the
fix/twitter-write-exit-codes
branch
from
August 5, 2026 09:18
7fc4826 to
bd21761
Compare
Benjamin-eecs
marked this pull request as ready for review
August 5, 2026 09:33
Benjamin-eecs
force-pushed
the
fix/twitter-write-exit-codes
branch
from
August 5, 2026 09:45
bd21761 to
8bd80f3
Compare
Benjamin-eecs
force-pushed
the
fix/twitter-write-exit-codes
branch
4 times, most recently
from
August 8, 2026 12:49
be33b9f to
a3f474d
Compare
Benjamin-eecs
force-pushed
the
fix/twitter-write-exit-codes
branch
from
August 11, 2026 13:58
a3f474d to
059be42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The twitter write commands returned a
status: failedrow when the write did not happen, so the process still exited 0 and a caller reading the exit code could not tell a posted tweet from one that never left the composer (#2255).A write the page reports as not having happened now raises
CommandExecutionErrorcarrying the message the adapter already produced: disabled or missing controls, an unusable composer, X's own failure toast, a menu without the action, and the UI-did-not-update branches across the fifteen single-target write commands. Already-correct states, like an already-liked tweet, keep returning success. A submit whose confirmation poll expires raisesTimeoutErrorinstead, exit 75, with a hint to check before retrying, since the tweet may already be live and the agent workflow re-posts onCommandExecutionError. The image-upload timeout moves there too. The per-item rows inlist-batch-utils.jsstay, since a batch reports partial success.Rebased onto main after #2251 merged; its fresh-evidence tests for the expired confirmation poll are updated here to the
TimeoutErrorcontract this PR introduces.Related issue: Closes #2255
Type of Change
Checklist
Documentation (if adding/modifying an adapter)
docs/adapters/(if new adapter)docs/adapters/index.mdtable (if new adapter)docs/.vitepress/config.mts(if new adapter)README.md/README.zh-CN.mdwhen command discoverability changedCliErrorsubclasses instead of rawErrorScreenshots / Output
A post over the character limit, before and after, on the same session:
Deleting a tweet that is not yours, the same shape in one of the other commands:
A normal post on a test account still succeeds and exits 0.
clis/twittersuite 505 / 505, with every converted command's throw pinned by a test; revertingreply.js, throwing a plainError, discarding X's failure text, or treating an unconfirmed submit as a definite failure inpost,reply, orquoteeach fails a test. Typecheck, both lint gates and doc coverage pass;cli-manifest.jsonunchanged.