Skip to content

Task messages: a saved message (201) is success, not 'could not be read' - #1901

Merged
abhishek255 merged 3 commits into
mainlinefrom
fix/core-answer-2xx
Dec 6, 2026
Merged

abhishek255 merged 3 commits into
mainlinefrom
fix/core-answer-2xx

Conversation

@abhishek255

@abhishek255 abhishek255 commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The mid-build "Message Rovara" POST saves the message and the core route answers 201. coreAnswerValue accepted 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 returns undefined instead of throwing in JSON.parse. The 401 and error-code paths are unchanged.
  • Same class, stopCoreTaskAs: any 2xx from the core cancel route reads as stopped.
  • Same class, forwardToCore: the 202-to-200 special case is gone, since 2xx is handled in one place.
  • Left alone: internal GET reads that only ever see 200 (developer-tasks startup read, task-changes diff), lambda-invoke checks, and the core app passthrough, which returns the core answer as is.
  • Website: the broker returns the value as 200 {message}, and Cloud's code client accepts any response.ok, so no website change is needed.

Tests

  • 201, 202, 204 and empty-body answers; non-2xx statuses (199, 300, 400, 409, 503, 401) still map to their errors.
  • Contract test that POSTs /v1/dev/tasks/{id}/messages through 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.
  • stopCoreTaskAs 2xx.

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-bot with what you need.

m2 and others added 3 commits December 5, 2026 16:22
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>
@abhishek255
abhishek255 added this pull request to the merge queue Dec 6, 2026
Merged via the queue into mainline with commit f041669 Dec 6, 2026
43 checks passed
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.

2 participants