Skip to content

feat(cloud): honor ANTON_CLOUD_ARTIFACTS_ROOT as the artifacts dir (ENG-2056) - #414

Open
torrmal wants to merge 1 commit into
stagingfrom
jorge/eng-2056-project-artifacts-root
Open

feat(cloud): honor ANTON_CLOUD_ARTIFACTS_ROOT as the artifacts dir (ENG-2056)#414
torrmal wants to merge 1 commit into
stagingfrom
jorge/eng-2056-project-artifacts-root

Conversation

@torrmal

@torrmal torrmal commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Part 2/3 of ENG-2056. The cloud workspace mount is per-conversation, so the derived <workspace>/.anton/artifacts only ever showed a task its own artifacts. scratchpad-controller (mindsdb/scratchpad-controller#35) now mounts the PROJECT-level artifacts dir as a second mount outside the workspace and announces it via ANTON_CLOUD_ARTIFACTS_ROOT; when set, anton uses it as artifacts_dir, so sibling tasks in one project share a single artifacts tree.

  • resolve_trusted_artifacts_root() mirrors resolve_trusted_workspace_path()'s validation exactly (same trust posture — both are pod-side controller config, never wire data): absolute, no .., canonicalise, mkdir, is-dir.
  • Pre-set on settings.artifacts_dir before resolve_workspace, which already leaves an absolute value alone — the narrowest possible change. Workspace.artifacts_dir and the cloud artifact tools follow automatically (pathlib / with an absolute right operand).
  • Env var unset (desktop, CI, older controllers): behavior byte-identical to today.

Pairs with mindsdb/cowork-server#404 (project-level artifact roots + pre-enqueue mkdir).

Test plan

  • Full suite (uv run --group dev pytest tests/ --ignore=tests/e2e) — 2723 passed, 31 skipped (pre-existing)
  • 7 new tests: override applied to settings AND workspace, mount dir created, env-unset default unchanged, resolver validation (unset/blank → None, relative rejected, .. rejected)

🤖 Generated with Claude Code

…NG-2056)

The cloud workspace mount is per-conversation, so the derived
<workspace>/.anton/artifacts only ever showed a task its own artifacts.
scratchpad-controller now mounts the PROJECT-level artifacts dir as a
second mount outside the workspace (so it can't land on sys.path) and
sets this env var to say where; when present, it replaces the derived
default so sibling tasks in one project share a single artifacts tree.

resolve_trusted_artifacts_root mirrors resolve_trusted_workspace_path's
validation exactly (same trust posture — both are pod-side controller
config, never wire data): absolute, no '..', canonicalise, create.
Unset env var — desktop, CI, older controllers — leaves today's
derivation byte-identical (resolve_workspace already only derives
artifacts_dir when relative, so pre-setting an absolute path is the
narrowest change).

Pairs with mindsdb/scratchpad-controller (the mount) and
mindsdb/cowork-server (project-level artifact roots).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant