Shared failed-task structured-error reader + BuildFailureError pattern task (4.4.0) - #223
Merged
Merged
Conversation
ognjenkatic
force-pushed
the
CxODEV-1875-failed-task-error-reader
branch
from
August 26, 2026 15:52
e2752ba to
1f066b4
Compare
ognjenkatic
force-pushed
the
CxODEV-1875-failed-task-error-reader
branch
3 times, most recently
from
August 26, 2026 16:51
c97bad2 to
fe78491
Compare
…n task Extracts the deepest-failed-task descent and the structured_error harvest (UNCLASSIFIED fallback, sanitized reason, diagnostic message) that consumers of the contract were each re-implementing. Engine ships the reader (DI-registered); Patterns ships a generic BuildFailureError worker for failure workflows. Boundary concerns stay with callers - the sanitized generic reason is a parameter, not baked in. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ognjenkatic
force-pushed
the
CxODEV-1875-failed-task-error-reader
branch
from
August 26, 2026 18:15
fe78491 to
3fdb38f
Compare
An out parameter rules out async, so the method is synchronous and blocks on the underlying Conductor call. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ognjenkatic
force-pushed
the
CxODEV-1875-failed-task-error-reader
branch
from
August 27, 2026 07:15
f14eaec to
bb3de89
Compare
…e naming Consumers read the contract through FailedTaskStructuredErrorReader and produce it by throwing StructuredErrorException; nobody outside the assembly needs the serializer itself. 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.
Consumers of the
structured_errortask-output contract have been re-implementing the same two pieces: the descent through a failed execution to the task that actually failed, and the harvest of its declared classification. Multiple hand-maintained copies drift — this moves the machinery next to the contract it reads.ConductorSharp.Engine
Util/FailedTaskStructuredErrorReader:TryReadAsync(null when the failure declared nothing) andReadOrFallbackAsync(never null —UNCLASSIFIED+ a caller-supplied sanitized generic reason on a miss; raw internals only ever go into the diagnosticmessage, never the reason).FindDeepestFailedTaskAsyncis public for consumers that need the raw task. Registered in DI by the builder.StructuredError.UnclassifiedCode— the reserved code becomes contract vocabulary.messagewhen present (4.3.0 semantics), else fills a workflowId/taskId/ref/reason locator.ConductorSharp.Patterns
BuildFailureErrorworker (CSH_PATTERNS_build_failure_error), registered byAddConductorSharpPatterns: input{ workflowId, genericReason?, fallbackReason? }→ output{ error: StructuredError }, for failure workflows that persist the classification atomically with the failed state. Registered under the shared task name: the task is a stateless read-only lookup, so multiple services polling one queue is safe by design (Conductor task domains remain the lever if poller isolation is ever needed).No consumer specifics leak in: entity mapping and boundary reason texts stay with callers — the sanitized generic reason is a parameter; the library default is neutral.
Versions 4.3.0 → 4.4.0. Tests: 8 new (descent, FORK/JOIN skipping, fallback sanitization, message precedence) — 70/70 green. v3 backport (3.10.0) in a sibling PR.
🤖 Generated with Claude Code