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
2 changes: 1 addition & 1 deletion backend/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.4
1.11.4-fix.1
2 changes: 1 addition & 1 deletion backend/app/services/agent_runtime/verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ async def verify(
)
continue
return VerificationResult(
outcome="repair",
outcome="fail",
reason="an artifact/evidence reference is not readable",
details={
"code": "tool_reference_unreadable",
Expand Down
10 changes: 5 additions & 5 deletions backend/app/services/sandbox/local/subprocess_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,17 +636,17 @@ def is_allowed(relative_path: Path) -> bool:
continue
except OSError:
continue
if file_path.suffix.lower() in banned_suffixes:
logger.warning(
f"[Sandbox Gateway] Blocked banned file extension: {rel_path}"
)
continue
if target_file is not None:
try:
if file_path.read_bytes() == target_file.read_bytes():
continue
except OSError:
pass
if file_path.suffix.lower() in banned_suffixes:
logger.warning(
f"[Sandbox Gateway] Blocked banned file extension: {rel_path}"
)
continue
publication_candidates[rel_path] = file_path

deletion_candidates = {
Expand Down
23 changes: 23 additions & 0 deletions backend/tests/test_agent_runtime_node_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1691,6 +1691,29 @@ async def test_verification_repairs_are_bounded() -> None:
assert verifier.calls == ["first", "second"]


@pytest.mark.asyncio
async def test_verification_integrity_failure_does_not_reenter_model() -> None:
run_id = uuid.uuid4()
model = ModelService(ModelStepResult(intent="finish", finish_content="done"))
verifier = Verifier(
VerificationResult(
outcome="fail",
reason="an artifact/evidence reference is not readable",
details={"code": "tool_reference_unreadable"},
)
)
executor = _executor(model, verifier=verifier, max_verification_repairs=10)

result = await _invoke(run_id, executor)

lifecycle = result["lifecycle"]
assert lifecycle["status"] == "failed"
assert lifecycle["reason"] == "an artifact/evidence reference is not readable"
assert lifecycle.get("verification_attempt_count", 0) == 0
assert model.calls == 1
assert verifier.calls == ["done"]


@pytest.mark.asyncio
async def test_task_completion_gate_exhaustion_delivers_latest_candidate() -> None:
run_id = uuid.uuid4()
Expand Down
4 changes: 2 additions & 2 deletions backend/tests/test_agent_runtime_reference_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ async def test_production_verifier_and_finalizer_propagate_only_read_back_refs()


@pytest.mark.asyncio
async def test_production_verifier_repairs_an_unreadable_current_run_reference() -> None:
async def test_production_verifier_fails_fast_on_an_unreadable_current_run_reference() -> None:
tenant_id = uuid.uuid4()
run_id = uuid.uuid4()
agent_id = uuid.uuid4()
Expand Down Expand Up @@ -553,7 +553,7 @@ async def test_production_verifier_repairs_an_unreadable_current_run_reference()
context,
"done",
)
assert result.outcome == "repair"
assert result.outcome == "fail"
assert result.details == {
"code": "tool_reference_unreadable",
"reference": reference,
Expand Down
25 changes: 25 additions & 0 deletions backend/tests/test_sandbox_subprocess_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,31 @@ async def test_sandbox_output_sanitization(tmp_path: Path) -> None:
assert not (target / "evil.sh").exists()


@pytest.mark.asyncio
async def test_sandbox_does_not_report_unchanged_skill_scripts_as_blocked(
tmp_path: Path,
monkeypatch,
) -> None:
staging = tmp_path / "staging"
target = tmp_path / "target"
script_path = Path("skills/skill-creator/scripts/package_skill.py")
for root in (staging, target):
path = root / script_path
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text("print('package')", encoding="utf-8")

warnings: list[str] = []
monkeypatch.setattr(subprocess_backend.logger, "warning", warnings.append)

await SubprocessBackend(SandboxConfig())._verify_and_merge_outputs(
staging,
target,
)

assert warnings == []
assert (target / script_path).read_text(encoding="utf-8") == "print('package')"


@pytest.mark.asyncio
async def test_sandbox_quota_ignores_unchanged_materialized_files(
tmp_path: Path,
Expand Down
2 changes: 1 addition & 1 deletion frontend/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.4
1.11.4-fix.1