fix(ci): unblock staging Docker Build and echo tool E2E test (#2661)

Two independent staging CI regressions:

1. Docker Build was failing because `cargo install wasm-tools@1.246.1`
   re-resolved to the newest compatible `constant_time_eq@0.4.3`, which
   requires rustc >= 1.95, while the chef stage is pinned to rust:1.92.
   Add `--locked` so cargo uses the Cargo.lock shipped with each crate.

2. `test_builtin_echo_tool` started failing after PR #2555 intentionally
   aligned the in-memory history path with DB semantics: tool previews
   now surface in `result` with `result_preview` left empty. The test
   only inspected `result_preview`, so it timed out. Accept the preview
   from either field in `_wait_for_turn`.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Illia Polosukhin
2026-04-19 18:44:01 +09:00
committed by GitHub
parent ff119531d4
commit c4927ba6e1
2 changed files with 8 additions and 2 deletions

View File

@@ -17,7 +17,7 @@
FROM rust:1.92-bookworm AS chef FROM rust:1.92-bookworm AS chef
RUN rustup target add wasm32-wasip2 \ RUN rustup target add wasm32-wasip2 \
&& cargo install cargo-chef@0.1.77 wasm-tools@1.246.1 && cargo install --locked cargo-chef@0.1.77 wasm-tools@1.246.1
WORKDIR /app WORKDIR /app

View File

@@ -50,7 +50,13 @@ async def _wait_for_turn(
for tool_call in turn.get("tool_calls", []): for tool_call in turn.get("tool_calls", []):
if tool_call.get("name") != tool_name: if tool_call.get("name") != tool_name:
continue continue
preview = (tool_call.get("result_preview") or "").lower() # In-memory turns populate `result`; DB-hydrated turns
# populate `result_preview`. Accept either — see PR #2555.
preview = (
tool_call.get("result_preview")
or tool_call.get("result")
or ""
).lower()
tool_ok = tool_call.get("has_result") is True and ( tool_ok = tool_call.get("has_result") is True and (
result_fragment is None or result_fragment.lower() in preview result_fragment is None or result_fragment.lower() in preview
) )