Skip to content

Preserve unknown delivery for read-only timeout errors - #148

Open
al0x99 wants to merge 1 commit into
ScriptedAlchemy:mainfrom
al0x99:fix/preserve-timeout-delivery
Open

al0x99 wants to merge 1 commit into
ScriptedAlchemy:mainfrom
al0x99:fix/preserve-timeout-delivery

Conversation

@al0x99

@al0x99 al0x99 commented Oct 11, 2026

Copy link
Copy Markdown

A prompt POST that times out with a DOMException currently throws a TypeError while appending the delivery hint to its read-only message. The CLI then loses delivery: unknown and the target, even though the prompt might have reached the gateway.

Wrap unknown-delivery errors before annotating them, retaining the original error as cause, its name and properties, and the target. Add regression coverage using a real DOMException, including cancellation before fetch and failure during target resolution. Explicit HTTP rejection keeps its existing behavior.

Validation:

  • Gateway tests: 9/9 pass; the timeout regression fails on upstream main and passes with this change.
  • Validate, build, artifact validation and typecheck pass.
  • Unit suite: 443/445 pass. The same two host-tool-inventory tests also fail on the unchanged upstream base in this sandbox: the MCP SDK child drops OPENSSL_CONF, and Node exits on a denied host OpenSSL configuration before loading the bundle. No tests or expectations were changed to bypass this.
  • Route suite, run separately after the unit command stopped: 97/97 pass.
  • Independent review exercised real sendPrompt and CLI outcome handling for DOMException, network errors, HTTP 400/500, cancellation and resolution failure.

This preserves delivery uncertainty; it does not change the gateway deadline or prove that the remote timeout itself is resolved. Includes a patch Changeset.

@changeset-bot

changeset-bot Bot commented Oct 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 842e98c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
grok-bot-cli Patch

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

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.

1 participant