Skip to content

fix: reject incomplete TweetDetail responses - #75

Open
LuciusChen wants to merge 1 commit into
jackwener:mainfrom
LuciusChen:fix/issue-53-tweet-detail-validation
Open

LuciusChen wants to merge 1 commit into
jackwener:mainfrom
LuciusChen:fix/issue-53-tweet-detail-validation

Conversation

@LuciusChen

Copy link
Copy Markdown
Contributor

Summary

  • require TweetDetail results to contain the requested focal tweet
  • return a structured not_found error instead of ok: true with empty or reply-only data
  • place the focal tweet before replies for stable CLI rendering
  • add client and CLI regression coverage

This keeps downstream JSON consumers from treating an incomplete parse as a successful tweet read.

Fixes #53.

Validation

  • 245 passed, 6 deselected
  • ruff check .
  • mypy twitter_cli

@c4nc

c4nc commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Hi Lucius — thanks for these three fixes. One note on where things stand: X's Sept 2026 page rebuild broke the x-client-transaction-id header for everyone, so the repo can't ship anything (including these) until that's resolved. I opened the fix upstream as #93, and in the meantime I've made a maintained fork — c4nc/twitter-cli — that cherry-picks your #75/#76/#77 (plus #57 and #87) with explicit attribution in the README, so a working build exists. Your code is used unmodified and credited. If the original repo resumes, I'd rather be a contributor or maintainer there than keep the fork — happy to help either way.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tweet detail returns success with empty data for real tweet IDs

2 participants