Skip to content

V3 - #220

Closed
ognjenkatic wants to merge 5 commits into
masterfrom
v3
Closed

V3#220
ognjenkatic wants to merge 5 commits into
masterfrom
v3

Conversation

@ognjenkatic

Copy link
Copy Markdown
Collaborator

No description provided.

boma96 and others added 5 commits July 17, 2026 12:53
…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>
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.

3 participants