Skip to content

feat(error): add typed public error contract#140

Draft
tcp404 wants to merge 2 commits into
mainfrom
boii/feat/error-system
Draft

feat(error): add typed public error contract#140
tcp404 wants to merge 2 commits into
mainfrom
boii/feat/error-system

Conversation

@tcp404

@tcp404 tcp404 commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add typed PublicError protocol contract with stable code, ownership, and details fields
  • introduce ProviderFailure / AgentFailure flow and remove provider stream string error events
  • centralize provider raw signal classification, including transport phase, SSE provider errors, and retry-after handling
  • emit structured public errors at the JSON stream boundary and update protocol docs

Verification

  • just push
    • cargo fix --allow-dirty --allow-staged
    • cargo clippy --fix --workspace --all-targets --allow-dirty --allow-staged -- -D warnings
    • cargo fmt --all
    • cargo nextest run --workspace --profile default
    • 1968 tests run: 1968 passed, 2 skipped

Notes

  • protocol_parse_failed is reserved in the public code list; the current stdin reader still logs malformed command lines before dispatch.
  • retry_after_ms remains internal provider metadata and is not part of the public stream error contract.

tcp404 added 2 commits June 21, 2026 06:18
- Introduce ProviderFailure, AgentFailure, and PublicError code mappings so provider errors cross boundaries as structured data.
- Replace stream string error events with typed provider stream failures and protocol public errors.
- Centralize provider signal classification and document the JSON stream error contract.
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