Align use-case smokes with canonical workspace recipes

The 3.10.0 milestone was about making the advertised smoke pack trustworthy enough to act like a real release gate. The main drift was in the repro-plus-fix scenario: the recipe docs were SDK-first, but the smoke still shelled out to CLI patch apply and asserted a human summary string.\n\nSwitch the smoke runner to use the structured SDK patch flow directly, remove the harness-only CLI dependency, and tighten the fake smoke tests so they prove the same structured path the docs recommend. This keeps smoke failures tied to real user-facing regressions instead of human-output formatting drift.\n\nPromote make smoke-use-cases as the trustworthy guest-backed verification path in the top-level docs, bump the release surface to 3.10.0, and mark the roadmap milestone done.\n\nValidation:\n- uv lock\n- UV_CACHE_DIR=.uv-cache uv run pytest --no-cov tests/test_workspace_use_case_smokes.py\n- UV_CACHE_DIR=.uv-cache make check\n- UV_CACHE_DIR=.uv-cache make dist-check\n- USE_CASE_ENVIRONMENT=debian:12 UV_CACHE_DIR=.uv-cache make smoke-use-cases
This commit is contained in:
Thales Maciel 2026-03-13 13:30:52 -03:00
parent cc5f566bcc
commit 79a7d71d3b
12 changed files with 59 additions and 74 deletions

View file

@ -19,7 +19,7 @@ from typing import Any
from pyro_mcp.runtime import DEFAULT_PLATFORM, RuntimePaths
DEFAULT_ENVIRONMENT_VERSION = "1.0.0"
DEFAULT_CATALOG_VERSION = "3.9.0"
DEFAULT_CATALOG_VERSION = "3.10.0"
OCI_MANIFEST_ACCEPT = ", ".join(
(
"application/vnd.oci.image.index.v1+json",

View file

@ -3,8 +3,6 @@
from __future__ import annotations
import argparse
import subprocess
import sys
import tempfile
import time
from dataclasses import dataclass
@ -109,17 +107,6 @@ def _log(message: str) -> None:
print(f"[smoke] {message}", flush=True)
def _run_pyro_cli(*args: str, cwd: Path) -> str:
completed = subprocess.run(
[sys.executable, "-m", "pyro_mcp.cli", *args],
cwd=str(cwd),
check=True,
capture_output=True,
text=True,
)
return completed.stdout
def _create_workspace(
pyro: Pyro,
*,
@ -246,16 +233,11 @@ def _scenario_repro_fix_loop(pyro: Pyro, *, root: Path, environment: str) -> Non
assert str(initial_read["content"]) == "broken\n", initial_read
failing = pyro.exec_workspace(workspace_id, command="sh check.sh")
assert int(failing["exit_code"]) != 0, failing
patch_output = _run_pyro_cli(
"workspace",
"patch",
"apply",
patch_result = pyro.apply_workspace_patch(
workspace_id,
"--patch-file",
str(patch_path),
cwd=root,
patch=patch_path.read_text(encoding="utf-8"),
)
assert "[workspace-patch] workspace_id=" in patch_output, patch_output
assert bool(patch_result["changed"]) is True, patch_result
passing = pyro.exec_workspace(workspace_id, command="sh check.sh")
assert int(passing["exit_code"]) == 0, passing
assert str(passing["stdout"]) == "fixed\n", passing