V3 - #220
Closed
ognjenkatic wants to merge 5 commits into
Closed
Conversation
…contract (#216) * CxODEV-1730: add StructuredErrorException + structured_error task-output contract Adds a framework capability for workers to attach a sanitized, structured error classification to a failed task's output: - StructuredErrorException(code, reason, referenceError?) - StructuredError DTO and ErrorOutput.StructuredError (omitted when null → back-compat) - StructuredErrorSerializer: OutputKey, ToOutputData (for signal senders) and tolerant TryParse (consumer side); a round-trip contract test pins the shape/key - both ExecutionManager and TypePollSpreadingExecutionManager populate structured_error when a StructuredErrorException is caught; plain exceptions still emit only error_message - version bumped 3.7.3 -> 3.8.0 (additive, on the v3 line) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…act (3.8 backport) (#219) CxODEV-1884: carry a diagnostic message on the structured_error contract Backport of the 4.2.0 change to the 3.8 line, which consuming services pin. Identical patch: the five touched files were byte-identical between v3.8.0 and master. StructuredErrorException supported only code and reason, so callers that need both a short, stable reason and a detailed explanation had nowhere to put the detail and had to fold it into reason. That defeats matching on reason downstream, and leaves consumers with no separate diagnostic field. Add StructuredError.Message, populated from the exception. No Message property is added to the exception itself -- it already has one by virtue of being an Exception, and the new constructors set it via base(). The mapping only emits message when it differs from reason, so payloads from existing call sites are byte-identical and the field is omitted entirely (NullValueHandling.Ignore), keeping the shape at version 1. message trails referenceError in the new constructors rather than following reason. Overload resolution cannot pick between (code, reason, referenceError, message) and the existing (code, reason, referenceError, innerException) when the fourth argument is an untyped null -- and (code, reason, message, null), a message with no drill-down URI, is the common case. Placing the nullable parameter third leaves only (code, reason, referenceError, null) ambiguous, which the three-argument constructor already expresses. Both execution managers had a hand-copied exception-to-payload mapping and the test mirrored rather than called it, so a new field could pass tests while being silently dropped by the type-poll path. Extract the mapping into StructuredError.FromException and point all three at it. Released as 3.8.1 rather than a 3.8.0-suffixed build: under semver a hyphenated suffix is a pre-release and sorts before 3.8.0, so consumers on 3.8.0 would never be offered it as an upgrade. Co-authored-by: Claude Fable 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.
No description provided.