Repository navigation
fix(replay): preserve synthetic tool repair aliases - #66447
Merged
Merged
Conversation
Contributor
Greptile SummaryIntroduces Confidence Score: 5/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/agents/transport-message-transform.test.ts
Line: 58-75
Comment:
**Missing `bedrock-converse-stream` coverage**
`bedrock-converse-stream` is included in `SYNTHETIC_TOOL_RESULT_APIS` but has no case in this new test. The two alias entries are now locked in, but if `bedrock-converse-stream` is accidentally removed from the set in a future edit there will be no regression signal here. Consider adding a third sub-case alongside the Anthropic/Google aliases.
```suggestion
it("still synthesizes missing tool results for transport alias apis that own replay repair", () => {
const messages: Context["messages"] = [
assistantToolCall("call_transport_1"),
{ role: "user", content: "continue", timestamp: Date.now() },
];
const anthropicAlias = transformTransportMessages(
messages,
makeModel("openclaw-anthropic-messages-transport" as Api, "anthropic", "claude-opus-4-6"),
);
expect(anthropicAlias.map((msg) => msg.role)).toEqual(["assistant", "toolResult", "user"]);
const googleAlias = transformTransportMessages(
messages,
makeModel("openclaw-google-generative-ai-transport" as Api, "google", "gemini-2.5-pro"),
);
expect(googleAlias.map((msg) => msg.role)).toEqual(["assistant", "toolResult", "user"]);
const bedrockCanonical = transformTransportMessages(
messages,
makeModel("bedrock-converse-stream" as Api, "bedrock", "anthropic.claude-opus-4-6"),
);
expect(bedrockCanonical.map((msg) => msg.role)).toEqual(["assistant", "toolResult", "user"]);
});
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(replay): preserve synthetic tool rep..." | Re-trigger Greptile |
vincentkoc
force-pushed
the
vk/pr-61556-main
branch
from
April 14, 2026 09:33
2cf06f4 to
e3ecbdb
Compare
vincentkoc
force-pushed
the
vk/pr-61556-main
branch
4 times, most recently
from
April 24, 2026 02:25
be7a6df to
473ba8a
Compare
vincentkoc
force-pushed
the
vk/pr-61556-main
branch
from
April 24, 2026 02:31
473ba8a to
aa65a50
Compare
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.
Summary
Describe the problem and fix in 2–5 bullets:
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
Regression Test Plan (if applicable)
src/agents/transcript-policy.test.tscovers adjacent replay policy, but not these aliases.User-visible / Behavior Changes
Replay repair once again works for the supported alias transports instead of silently skipping the synthetic tool-result fixup.
Diagram (if applicable)
N/A
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
pnpm test:serialSteps
pnpm test:serial src/agents/transport-message-transform.test.ts src/agents/transcript-policy.test.ts.Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm test:serial src/agents/transport-message-transform.test.ts src/agents/transcript-policy.test.ts.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations