Repository navigation
Task messages: a saved message (201) is success, not 'could not be read' - #1901
Merged
Merged
Conversation
coreAnswerValue accepted only 200, so the core's 201 for a new task message threw RUNTIME_UNAVAILABLE (a 503) although the message was saved. Any 2xx is now a success; a 204 or empty body gives no value. 401 and error-code paths are unchanged. stopCoreTaskAs reads any 2xx as stopped, and forwardToCore drops its 202-to-200 special case. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…olved list, never undefined
A 204 or empty-body success made serveCoreTaskRoute return undefined, which the Slack keep press reads as 'not a core task' and falls back to the old handler. Answer {} (and the empty involved list) instead.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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
The mid-build "Message Rovara" POST saves the message and the core route answers 201.
coreAnswerValueaccepted only 200, so the 201 threw RUNTIME_UNAVAILABLE "The core engine's answer could not be read." and reached the website as a 503, although the message was saved. A retry with the same requestId (200) worked.Fix
coreAnswerValue: any 2xx is a success. A 204 or empty body returnsundefinedinstead of throwing inJSON.parse. The 401 and error-code paths are unchanged.stopCoreTaskAs: any 2xx from the core cancel route reads as stopped.forwardToCore: the 202-to-200 special case is gone, since 2xx is handled in one place.developer-tasksstartup read, task-changes diff), lambda-invoke checks, and the core app passthrough, which returns the core answer as is.{message}, and Cloud's code client accepts anyresponse.ok, so no website change is needed.Tests
/v1/dev/tasks/{id}/messagesthrough the real developer route and boundary over a real core host: 201 from the core becomes 200{message}, a repeat is 200, and the message is saved once. It fails before the fix.stopCoreTaskAs2xx.Gates: typecheck:all (heap 10240), eslint on changed files, complexity:check, tests/contract + tests/journeys + every importer (1087 files, 16266 tests, all pass), re-run of touched suites after merging mainline.
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.