Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/e2e-scenario/live/double-onboard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,10 @@ function assertRegistryInferenceMetadata(sandboxName: string, endpointUrl: strin
expect(entry).toMatchObject({
provider: "compatible-endpoint",
model: "test-model",
endpointUrl,
credentialEnv: "COMPATIBLE_API_KEY",
preferredInferenceApi: "openai-completions",
});
expect(entry?.endpointUrl ?? endpointUrl).toBe(endpointUrl);
expect(entry?.credentialEnv ?? "COMPATIBLE_API_KEY").toBe("COMPATIBLE_API_KEY");
expect(entry?.preferredInferenceApi ?? "openai-completions").toBe("openai-completions");
}

async function waitOpenshellSandboxAbsent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ runIssue4434LiveTest(
timeoutMs: 60_000,
});
expect(status.exitCode, resultText(status)).toBe(0);
expect(resultText(status)).toMatch(/inference.*healthy|healthy.*inference/i);
expect(resultText(status)).toMatch(/managed_inference|inference\.local/i);
expect(resultText(status)).toMatch(/Docker health:\s*healthy/i);

const connectProbe = await host.nemoclaw([instance.sandboxName, "connect", "--probe-only"], {
artifactName: "issue4434-connect-probe-before-block",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ expect_reached() {
local url="$3"
local python_bin="${4:-python3}"
local output
output="$(python_probe "$python_bin" "$url")"
output="$(python_probe "$python_bin" "$url" || true)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Capture stderr from failed probes too.

output="$(python_probe ... || true)" only keeps stdout. If sandbox_exec/Python fails before emitting a BLOCKED: or REACHED: marker, the useful diagnostic stays on stderr and fail_test still reports an empty reason.

Suggested fix
-  output="$(python_probe "$python_bin" "$url" || true)"
+  output="$(python_probe "$python_bin" "$url" 2>&1 || true)"
...
-  output="$(python_probe "$python_bin" "$url" || true)"
+  output="$(python_probe "$python_bin" "$url" 2>&1 || true)"

Also applies to: 121-121

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh`
at line 107, The probe result assignment in python_probe handling only captures
stdout, so failures from sandbox_exec or Python can lose the useful stderr
diagnostics and leave fail_test with an empty reason. Update the output capture
at both python_probe call sites so stderr is merged into the captured output,
and keep the existing BLOCKED:/REACHED: parsing unchanged so the script can
report the actual failure message.

if echo "$output" | grep -q "REACHED:"; then
pass "${actor} can reach approved ${label} host"
else
Expand All @@ -118,7 +118,7 @@ expect_blocked() {
local url="$3"
local python_bin="${4:-python3}"
local output
output="$(python_probe "$python_bin" "$url")"
output="$(python_probe "$python_bin" "$url" || true)"
if echo "$output" | grep -q "BLOCKED:" && ! echo "$output" | grep -q "REACHED:"; then
pass "${actor} cannot reach ${label} without explicit policy"
elif echo "$output" | grep -q "REACHED:"; then
Expand Down
Loading