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 Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ tasks:
deps: [install-dev]
cmds:
- task: verify-lab-smoke
#- task: verify-golden-runs
- task: verify-golden-runs
- task: verify-tutorials

ci:
Expand Down
11 changes: 9 additions & 2 deletions ctl/src/mas/ctl/workspace/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,21 @@ def runtime_profile_path(self) -> Path | None:
return candidate if candidate.is_file() else None

def resolve_library_path(self, lib_ref: str) -> Path | None:
"""Resolve ``team:bundle/sub`` via manifest_libraries."""
"""Resolve ``team:bundle/sub`` via manifest_libraries.

The ``base`` path in manifest_libraries may be:
- Absolute: ``/abs/path`` → used directly
- Home-relative: ``~/.config/…`` → expanded via Path.expanduser()
- Relative: ``./infra`` → resolved relative to the workspace root
"""
if ":" not in lib_ref:
return None
lib, rest = lib_ref.split(":", 1)
base = self.manifest_libraries.get(lib)
if not base or self._path is None:
return None
root = (self._path / base).resolve()
base_path = Path(base).expanduser()
root = (base_path if base_path.is_absolute() else self._path / base_path).resolve()
candidate = (root / rest).with_suffix(".yaml")
if candidate.is_file():
return candidate
Expand Down
8 changes: 8 additions & 0 deletions examples/sample-workspace/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
#
# For live OpenAI/production infra, see:
# docs/tutorials/00-environment-setup/config.openai.example.yaml
#
# For private/team proxy bundles (e.g. claris:llm-proxy), add manifest_libraries:
#
# manifest_libraries:
# claris: ~/.config/mas/infra # resolves claris:llm-proxy → ~/.config/mas/infra/llm-proxy.yaml
#
# Then set MAS_INFRA_REFS=claris:llm-proxy for real-LLM runs.
# Template: config/infra/claris-proxy.example.yaml → copy to ~/.config/mas/infra/llm-proxy.yaml

mas_ctl:
flavour: local
Expand Down
22 changes: 13 additions & 9 deletions scripts/capture_golden_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,21 @@ def _capture_one(
# cache entry with stale event counts and return cached results instead of
# running the agent. The test fixture does the same via monkeypatch.
os.environ["MAS_TRACE_CACHE"] = str(trace_cache)
# Isolate from the user's personal ~/.config/mas/config.yaml so internal
# infra refs (e.g. claris:llm-proxy) don't bleed into the OSS capture.
# Isolate XDG so the user's personal ~/.config/mas/config.yaml (which may
# point at a private claris:llm-proxy) cannot bleed into the OSS capture.
os.environ["XDG_CONFIG_HOME"] = str(tmp / "xdg-config")
# Default to standard:llm-proxy, which reads LLM_PROXY_API_BASE from the
# environment (falling back to https://api.openai.com/v1). The caller can
# override by setting MAS_INFRA_REFS before running.
if not os.environ.get("MAS_INFRA_REFS"):
os.environ["MAS_INFRA_REFS"] = "standard:llm-proxy"
# Pin the workspace so find_workspace_file() always finds the OSS workspace
# config (infra_refs: [standard:mock-llm]). Without this, the walk stops at
# .git (no config.yaml at repo root), falls back to the now-isolated XDG
# path, finds nothing, and resolve_infra_refs falls through to
# standard:production — hitting a real LLM and causing a 401 or wrong event
# count. MAS_INFRA_REFS can still override this for real-LLM captures.
if "MAS_WORKSPACE_ROOT" not in os.environ:
os.environ["MAS_WORKSPACE_ROOT"] = str(ROOT / "examples" / "sample-workspace")
print(
f" infra: MAS_INFRA_REFS={os.environ.get('MAS_INFRA_REFS')!r}",
f" api_base: LLM_PROXY_API_BASE={os.environ.get('LLM_PROXY_API_BASE', '<not set — will use OpenAI default>')!r}",
f" workspace: MAS_WORKSPACE_ROOT={os.environ['MAS_WORKSPACE_ROOT']!r}",
f" infra: MAS_INFRA_REFS={os.environ.get('MAS_INFRA_REFS', '<not set — workspace infra_refs used>')!r}",
f" api_base: LLM_PROXY_API_BASE={os.environ.get('LLM_PROXY_API_BASE', '<not set>')!r}",
sep="\n",
file=sys.stderr,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"status": "ok",
"elapsed_ms": 1135.0,
"elapsed_ms": 1097.7,
"error": "",
"executed_at": "2026-07-06T01:02:36.135611Z"
"executed_at": "2026-07-06T11:50:37.912704Z"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"run_hash": "240c01f5b2a41ca79519",
"created_at": "2026-07-06T01:02:36.134972Z",
"created_at": "2026-07-06T11:50:37.912082Z",
"item_id": "1",
"run_idx": 0,
"model": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scenario": "mock-tools",
"item_id": "1",
"run_idx": 0,
"referenced_at": "2026-07-06T01:02:36.135723Z",
"referenced_at": "2026-07-06T11:50:37.912797Z",
"mas": {
"app": "qa-agent",
"mas_ref": "/Users/augjorda/repos/outshift-open/mas-lab/docs/tutorials/01-building-an-agent/agent.yaml",
Expand Down
Loading
Loading