Skip to content

refactor(error): rename taxonomy and translators for clearer layering#303

Merged
liujuanjuan1984 merged 2 commits intomainfrom
cherry-pick/issue-274-rename
Mar 23, 2026
Merged

refactor(error): rename taxonomy and translators for clearer layering#303
liujuanjuan1984 merged 2 commits intomainfrom
cherry-pick/issue-274-rename

Conversation

@liujuanjuan1984
Copy link
Collaborator

概要

本 PR 基于最新 main,补录 #274 中未进入主干的命名收敛改动,使 upstream 错误相关文件的分层命名更清晰。

改动模块

错误分层命名收敛

  • src/opencode_a2a/error_taxonomy.py 重命名为 src/opencode_a2a/upstream_taxonomy.py
  • src/opencode_a2a/execution/upstream_errors.py 重命名为 src/opencode_a2a/execution/upstream_error_translator.py
  • src/opencode_a2a/jsonrpc/error_mapping.py 重命名为 src/opencode_a2a/jsonrpc/error_responses.py
  • tests/jsonrpc/test_error_mapping.py 重命名为 tests/jsonrpc/test_error_responses.py

调用点同步

  • 同步更新 execution / jsonrpc 相关引用,保持行为不变,仅收敛命名层次

代码风格

  • 应用 ruff 自动调整 import 顺序

相关提交

  • 6b2df21 refactor(error): rename taxonomy and translators for clearer layering (#274)
  • 41fccfe chore(error): apply ruff import ordering after rename (#274)

验证

  • uv run pre-commit run --all-files
  • uv run pytest
  • 350 passed
  • coverage: 91.08%

关联

@liujuanjuan1984 liujuanjuan1984 marked this pull request as ready for review March 23, 2026 13:54
@liujuanjuan1984 liujuanjuan1984 merged commit e2eaf39 into main Mar 23, 2026
3 checks passed
@liujuanjuan1984 liujuanjuan1984 deleted the cherry-pick/issue-274-rename branch March 23, 2026 13:54
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