Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(outputs): hide browser-profile scratch from the Outputs view

Ruben Lütkec1b890241d62
diff --git a/jarvis/ui/web/outputs_routes.py b/jarvis/ui/web/outputs_routes.py
index 3619b5c3bf..be0e342ac3 100644
--- a/jarvis/ui/web/outputs_routes.py
+++ b/jarvis/ui/web/outputs_routes.py
@@ -27,6 +27,9 @@ from pydantic import BaseModel
from starlette.responses import FileResponse, HTMLResponse
from jarvis.core.process_utils import NO_WINDOW_CREATIONFLAGS
+from jarvis.missions.kontrollierer.deliverable_paths import (
+ is_nondeliverable_scratch,
+)
from jarvis.platform import detect_platform
from jarvis.ui.web.artifact_view import VIEW_CSP, render_artifact_html
@@ -421,11 +424,19 @@ def _is_deliverable_relpath(rel_parts: tuple[str, ...]) -> bool:
# Shortest valid deliverable: tasks/<id>/artifacts/files/<name> (5 parts).
if len(rel_parts) < 5:
return False
- return (
+ if not (
rel_parts[0] == "tasks"
and rel_parts[2] == "artifacts"
and rel_parts[3] == "files"
- )
+ ):
+ return False
+ # Defence-in-depth (2026-06-21): hide tool-scratch the archive's --ignored
+ # union may have re-imported on a PRE-FIX mission — a browser/QA worker's
+ # gitignored Chrome user-data profiles (mission_019eeb34-bb67: 199 cache
+ # blobs buried 2 real deliverables here). Shares the orchestrator's archive
+ # predicate (single source of truth, anti-drift). ``rel_parts[4:]`` is the
+ # path BELOW ``tasks/<id>/artifacts/files/`` — the deliverable-relative part.
+ return not is_nondeliverable_scratch("/".join(rel_parts[4:]))
def _resolve_artifact_target(request: Request, slug: str, path: str) -> Path:
diff --git a/tests/unit/ui/web/test_outputs_routes.py b/tests/unit/ui/web/test_outputs_routes.py
index 9a8d1912c6..4d3d520860 100644
--- a/tests/unit/ui/web/test_outputs_routes.py
+++ b/tests/unit/ui/web/test_outputs_routes.py
@@ -567,6 +567,29 @@ def test_is_deliverable_relpath() -> None:
assert not _is_deliverable_relpath(("tasks", "019e0000", "logs", "x.jsonl"))
+def test_is_deliverable_relpath_excludes_browser_scratch() -> None:
+ """Defence-in-depth (2026-06-21, mission_019eeb34-bb67): a browser/QA
+ worker's gitignored Chrome user-data profiles re-imported by the archive's
+ --ignored union must NOT show in Outputs even though they live under the
+ allowlisted ``tasks/<id>/artifacts/files/`` subtree. The real deliverable
+ inside the same qa-artifacts/ dir must still pass."""
+ base = ("tasks", "019eeb34-bc50", "artifacts", "files")
+ # Browser scratch — rejected.
+ assert not _is_deliverable_relpath(
+ (*base, "qa-artifacts", "chrome-profile-dd6355b8", "GrShaderCache", "data_2")
+ )
+ assert not _is_deliverable_relpath(
+ (*base, "qa-artifacts", "chrome-profile-dd6355b8", "Last Browser")
+ )
+ assert not _is_deliverable_relpath(
+ (*base, "qa-artifacts", "chrome-profile-dd6355b8", "Default",
+ "Shared Dictionary", "db-journal")
+ )
+ # Genuine deliverables — including one INSIDE qa-artifacts/ next to junk.
+ assert _is_deliverable_relpath((*base, "index.html"))
+ assert _is_deliverable_relpath((*base, "qa-artifacts", "melbourne-plan-render.png"))
+
+
@pytest.mark.asyncio
async def test_list_artifacts_lists_only_deliverables(
app: FastAPI, tmp_path: Path