mirror of
https://github.com/nearai/ironclaw.git
synced 2026-09-02 23:56:24 +08:00
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:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user