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
4 changes: 4 additions & 0 deletions examples/control_plane/status-projection-cache-smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def run_cli_result(
) -> tuple[dict[str, Any], int, str]:
env = os.environ.copy()
env["PYTHONPATH"] = str(REPO_ROOT)
# This smoke reads machine JSON and asserts the inline decision/cache fields;
# the model-facing capture transport replaces that body with a reader
# reference, so keep the same opt-out the canary harness uses in argv.
env["LOOPX_CONTEXT_DELIVERY"] = "off"
result = subprocess.run(
[
sys.executable,
Expand Down
4 changes: 4 additions & 0 deletions examples/control_plane/status-quota-perf-budget-smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ def run_cli_result(
) -> tuple[dict[str, Any], float, int, str]:
env = os.environ.copy()
env["PYTHONPATH"] = str(REPO_ROOT)
# This smoke measures status/quota decision latency and reads the inline
# `should_run` field; the model-facing capture transport replaces that body
# with a reader reference, so keep the same opt-out the canary harness uses.
env["LOOPX_CONTEXT_DELIVERY"] = "off"
started = time.perf_counter()
result = subprocess.run(
[
Expand Down
8 changes: 7 additions & 1 deletion examples/control_plane/todo_lifecycle_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
import contextlib
import io
import json
import os
import sys
import tempfile
from pathlib import Path
from unittest.mock import patch


REPO_ROOT = Path(__file__).resolve().parents[2]
Expand Down Expand Up @@ -126,7 +128,11 @@ def run_fixture_cli(
]
stdout = io.StringIO()
stderr = io.StringIO()
with contextlib.redirect_stdout(stdout), contextlib.redirect_stderr(stderr):
# These fixtures consume machine JSON and read the inline decision fields;
# the model-facing capture transport replaces that body with a reader
# reference, so opt out in-process the way the canary harness does in argv.
with patch.dict(os.environ, {"LOOPX_CONTEXT_DELIVERY": "off"}), \
contextlib.redirect_stdout(stdout), contextlib.redirect_stderr(stderr):
try:
returncode = loopx_cli_main(argv)
except SystemExit as exc:
Expand Down
7 changes: 6 additions & 1 deletion examples/custom-runtime-minimal-cli-turn-smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
import contextlib
import io
import json
import os
import sys
import tempfile
from pathlib import Path
from typing import Any
from unittest.mock import patch

REPO_ROOT = Path(__file__).resolve().parents[1]
if str(REPO_ROOT) not in sys.path:
Expand Down Expand Up @@ -62,7 +64,10 @@ def run_cli(registry_path: Path, *args: str) -> dict[str, Any]:
*args,
]
buf = io.StringIO()
with contextlib.redirect_stdout(buf):
# This smoke reads machine JSON and asserts the inline decision fields; the
# model-facing capture transport replaces that body with a reader reference,
# so opt out in-process the way the canary harness does in argv.
with patch.dict(os.environ, {"LOOPX_CONTEXT_DELIVERY": "off"}), contextlib.redirect_stdout(buf):
code = loopx_cli_main(argv)
raw = buf.getvalue().strip()
payload: dict[str, Any] = json.loads(raw) if raw else {}
Expand Down
Loading