Repository navigation
Conversation
…pt clientNonce
Current Grok Bot gateways (desktop app 0.70.x) answer sendPrompt with
`{ accepted: true }` and no messageId, so every delivered message was
reported as `delivery: "unknown"`.
A bare flag is still not treated as a receipt. When the ack arrives
without a messageId, read the transcript tail once and use the id of the
entry that carries this request's clientNonce. Any miss or read failure
keeps the send `unknown`, so the never-a-silent-accept contract holds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 92bdd62 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Problem
With the current Grok Bot desktop app (0.70.2, macOS), the gateway answers
sendPromptwith{ "accepted": true }and nomessageId. Since #43 only a stringmessageIdcounts as a receipt, so every deliveredgbot sendreportsdelivery: "unknown"— which tells callers to check the thread before resending, for every single message.Fix
The never-a-silent-accept contract stays: a bare flag is still not a receipt. When the ack arrives without a
messageId, read the transcript tail once (limit 20) and look for the entry that carries this request'sclientNonce(already sent bysendPrompt). That entry's id becomes themessageIdand delivery becomesaccepted. A miss or any read failure keepsunknown. Responses withoutaccepted: true(e.g.{ ok: true }) are unchanged and trigger no extra read.Evidence
resultwas{ "accepted": true }anddeliverywasunknown; the user entry with the sameclientNoncewas already in the transcript tail about 1 s after the call returned. After:{ "delivery": "accepted", "messageId": "t14u" }.test/gateway-send.test.js(nonce found → accepted; nonce missing → unknown; tail read fails → unknown).npm run test:unit: 445/445 on this branch.npm run typecheck: clean. On a cleanmain, "CLI concurrent starts share one owner, durable request replay sends once, worker restart retains receipt" failed once locally and passed on rerun — unrelated to this change.artifact/rebuilt.🤖 Generated with Claude Code