Repository navigation
Conversation
The reply reaches a person at Apple and cannot be taken back, so the default call now validates and returns a preview; it only sends on a second call with confirm=True. Tools whose docstring says "External action" also get MCP annotations (destructiveHint, openWorldHint). Closes #12 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SLMNEsRnY7MTSn1KDauZzf
The confirm call now carries the token returned by the preview: a hash of the app, the rejected submission, the exact text and each attachment's bytes. If anything changed since the preview, nothing is sent. A token sends once, so two confirms in a row don't double-post; it is released only when the failure happened before the click. Suggested by u/QuanTradin on r/mcp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SLMNEsRnY7MTSn1KDauZzf
apple_review.reply now raises ReplyNotSent only when the failure provably happened before the Reply click (the harness prints a marker right after clicking). Timeouts, logouts and anything after the click keep the token burned, and the error tells the agent to check apple_review_messages before sending again. Attachments are converted before the token is burned, so a conversion failure doesn't block a retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SLMNEsRnY7MTSn1KDauZzf
4 tasks
This branch has not been deployed
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.
Closes #12
What
apple_reply_reviewis now two-step. The first call (noconfirm_token) runs every check (empty text, 4000-character limit, attachments exist, HEVC → H.264 conversion, an openUNRESOLVED_ISSUESsubmission) and returns a preview plus aconfirm_tokenwithout sending. The token is a hash of the app, the submission, the exact text and each attachment's bytes. The second call sends only if the token matches, so if the draft, an attachment or the submission changed since the preview, nothing goes out. A token sends once, so two confirms in a row don't double-post. It's released for a retry only whenapple_review.replyraisesReplyNotSent, meaning the harness never printed its post-click marker. Timeouts, logouts and anything after the click keep it burned, and the error tells the agent to checkapple_review_messagesfirst._register_tooladdsToolAnnotations(readOnlyHint=False, destructiveHint=True, openWorldHint=True)to every tool whose docstring says "External action". That's the convention CONTRIBUTING already asks for, so it stays in sync without a second list. That covers 27 tools today, includingapple_submit_for_review,play_promote_release,play_submit_for_reviewandeas_submit. Tools without that phrase are left unannotated, so none of them is wrongly marked read-only.Why
Suggested on r/mcp: the App Review reply goes to a real person at Apple and can't be edited or taken back. Until now the only guard was the description text.
Tests
tests/test_reply_review.py: preview doesn't send; matching token sends; changed text / attachment / submission are rejected; two confirms in a row send once; failure before the click allows a retry and failure after it doesn't;reply()classifies script errors, timeouts and other errors conservatively; validation runs before the preview; annotations land on external-action tools but not on read tools. CI checks pass locally (ruff, unittest, compile, 60 tools).Notes / follow-ups
apple_update_listing,apple_attach_build,apple_create_version,eas_build_start…). Adding the phrase to their docstrings would also annotate them. I left that for a separate PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01SLMNEsRnY7MTSn1KDauZzf
Generated by Claude Code