Commit e7923b6
committed
Raise Bedrock translator patch coverage
Codecov flagged the PR because the new Bedrock RequestBody branch left one real error path uncovered and one assistant error path that the code could never reach. The user-message image error is now covered directly, and assistant conversion no longer advertises an impossible error return.
Constraint: PR #2237 is blocked by Codecov patch coverage on internal/translator/anthropic_awsbedrock.go
Rejected: Add a synthetic assistant error test | convertAssistantMessage cannot currently fail, so such a test would require artificial production behavior
Confidence: high
Scope-risk: narrow
Directive: Do not reintroduce an error return for assistant conversion unless a real assistant block conversion can fail
Tested: go test ./internal/translator -coverprofile=/tmp/translator.after.cover
Tested: go test ./internal/translator -run 'TestAnthropicToAWSBedrockTranslator_RequestBody_(ToolResultMessages|ToolResultMessagesWithSystemMessages|SingleToolResultNotCoalesced|UnexpectedRole|UserArrayContent|UserArrayContentError|AssistantMessage)' -count=1
Tested: go vet ./internal/translator
Tested: make lint
Not-tested: go test ./... failed locally because port 6060 is occupied by amass, Docker Hub CRD fetch timed out, required e2e Docker image is missing, and Ollama model qwen3:1.7b is unavailable
Signed-off-by: liuhy <liuhongyu@apache.org>1 parent 0db1e84 commit e7923b6
2 files changed
Lines changed: 37 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 100 | + | |
105 | 101 | | |
106 | 102 | | |
107 | 103 | | |
| |||
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
236 | | - | |
| 232 | + | |
237 | 233 | | |
238 | 234 | | |
239 | 235 | | |
240 | 236 | | |
241 | 237 | | |
242 | | - | |
| 238 | + | |
243 | 239 | | |
244 | 240 | | |
245 | 241 | | |
| |||
274 | 270 | | |
275 | 271 | | |
276 | 272 | | |
277 | | - | |
| 273 | + | |
278 | 274 | | |
279 | 275 | | |
280 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
955 | 955 | | |
956 | 956 | | |
957 | 957 | | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
958 | 991 | | |
959 | 992 | | |
960 | 993 | | |
| |||
0 commit comments