Skip to content

Implementation Plan: T5-P5-A5-WP1 Define the Typed Failure Envelope and Factory Helpers#4106

Merged
Trecek merged 2 commits into
developfrom
t5-p5-a5-wp1-define-the-typed-failure-envelope-and-factory-h/4038
Jun 13, 2026
Merged

Implementation Plan: T5-P5-A5-WP1 Define the Typed Failure Envelope and Factory Helpers#4106
Trecek merged 2 commits into
developfrom
t5-p5-a5-wp1-define-the-typed-failure-envelope-and-factory-h/4038

Conversation

@Trecek

@Trecek Trecek commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add ToolFailureEnvelope TypedDict with a retriable discriminator and two factory helpers (server_failure_envelope, input_failure_envelope) to src/autoskillit/server/tools/_types.py. This provides a typed contract for structured failure responses that downstream P5-A4 WPs will consume, enabling orchestrator routing based on retriability. The new type is intentionally distinct from the existing _kitchen_failure_envelope function in tools_kitchen.py — that function returns a raw JSON string with a kitchen field; this TypedDict provides a typed dict contract with a retriable discriminator.

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/impl-20260613-032734-695911/.autoskillit/temp/make-plan/t5-p5-a5-wp1-define-typed-failure-envelope_plan_2026-06-13_033600.md

Closes #4038

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 1 49 7.9k 748.5k 74.9k 26 75.6k 9m 7s
verify* sonnet 1 52 8.2k 217.3k 49.0k 17 28.1k 3m 1s
implement* MiniMax-M3 1 1.3M 5.1k 0 0 43 0 2m 31s
audit_impl* sonnet 1 44 6.2k 166.0k 41.6k 11 26.7k 3m 26s
prepare_pr* MiniMax-M3 1 150.3k 1.7k 0 0 10 0 37s
compose_pr* MiniMax-M3 1 211.8k 1.2k 0 0 11 0 41s
review_pr* sonnet 1 140 18.3k 833.6k 66.5k 40 46.6k 4m 56s
resolve_review* sonnet 1 141 5.8k 877.7k 62.7k 37 42.1k 3m 19s
Total 1.6M 54.4k 2.8M 74.9k 219.2k 27m 41s

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
verify 0
implement 132 0.0 0.0 38.9
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 2 438846.0 21061.0 2887.0
Total 134 21216.8 1636.1 405.9

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 49 7.9k 748.5k 75.6k 9m 7s
sonnet 4 377 38.5k 2.1M 143.6k 14m 44s
MiniMax-M3 3 1.6M 8.0k 0 0 3m 50s

Trecek and others added 2 commits June 13, 2026 03:41
Add ToolFailureEnvelope TypedDict with a retriable discriminator and two
factory helpers (server_failure_envelope, input_failure_envelope) to
src/autoskillit/server/tools/_types.py. The new type is distinct from
the existing _kitchen_failure_envelope function in tools_kitchen.py,
which returns a raw JSON string with a kitchen field; this TypedDict
provides a typed dict contract with a retriable discriminator for
P5-A4 orchestrator routing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comparing hints['success'] is typing.Literal[False] is unreliable since
Literal objects are not guaranteed to be singletons. Switch to
typing.get_args(hints['success']) == (False,) for a portable assertion.
@Trecek Trecek added this pull request to the merge queue Jun 13, 2026
Merged via the queue into develop with commit 898e8fe Jun 13, 2026
3 checks passed
@Trecek Trecek deleted the t5-p5-a5-wp1-define-the-typed-failure-envelope-and-factory-h/4038 branch June 13, 2026 11:09
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.

1 participant