Skip to content

Commit 89aa327

Browse files
authored
fix(smoke): align 7 full_public smokes with PR #9854 OAR and Node 24.21.0 contracts (#10264)
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
1 parent dd4f32c commit 89aa327

7 files changed

Lines changed: 56 additions & 27 deletions

‎examples/github-actions-runtime-smoke.py‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
}
2020

2121
PRIMARY_NODE_VERSION = "24"
22-
MINIMUM_NODE_VERSION = "22.22.3"
23-
MINIMUM_NODE_ACTION_VERSION = MINIMUM_NODE_VERSION
22+
MINIMUM_NODE_VERSION = "24.21.0"
23+
MINIMUM_NODE_ACTION_VERSION = "22.22.3"
2424
FORWARD_NODE_VERSION = "26"
25-
# SQLite needs both synchronous statement finalization and the WAL-reset fix.
26-
SQLITE_NODE_VERSION = "22.22.3"
25+
# SQLite and OAR runtime qualification align on Node 24.21.0.
26+
SQLITE_NODE_VERSION = "24.21.0"
2727

2828

2929
def declared_major(reference: str) -> str:
@@ -84,8 +84,12 @@ def main() -> int:
8484
r"^ ([a-z][a-z0-9-]*):\n(.*?)(?=^ [a-z][a-z0-9-]*:\n|\Z)",
8585
python_workflow, re.MULTILINE | re.DOTALL,
8686
))
87-
for name in ("typescript-core", "node-minimum-compatibility", "dashboard-acceptance", "windows-powershell"):
87+
for name in ("typescript-core", "dashboard-acceptance", "windows-powershell"):
8888
assert SQLITE_NODE_VERSION in node_version_pattern.findall(jobs[name]), name
89+
assert (
90+
MINIMUM_NODE_ACTION_VERSION
91+
in node_version_pattern.findall(jobs["node-minimum-compatibility"])
92+
), "node-minimum-compatibility"
8993
assert "node-forward-compatibility:" in python_workflow
9094
assert "continue-on-error: true" in python_workflow
9195
assert "needs: [changes, checks, pytest, node-minimum-compatibility," in python_workflow
@@ -95,7 +99,7 @@ def main() -> int:
9599

96100
print(
97101
"github-actions-runtime-smoke ok: Node 24 primary, "
98-
"22.22.3 minimum and SQLite/authority reference, 26 forward"
102+
"24.21.0 package/SQLite/OAR floor, 22.22.3 minimum-compat action, 26 forward"
99103
)
100104
return 0
101105

‎examples/loopx-chat-provider-adapters-smoke.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
from __future__ import annotations
55

66
import json
7+
import os
78
import stat
89
import sys
910
import tempfile
1011
from pathlib import Path
12+
from unittest import mock
1113

1214

1315
REPO_ROOT = Path(__file__).resolve().parents[1]
@@ -90,9 +92,10 @@ def main() -> None:
9092
fake.write_text(FAKE_CLAUDE, encoding="utf-8")
9193
fake.chmod(fake.stat().st_mode | stat.S_IXUSR)
9294
observed: list[tuple[str, dict[str, object]]] = []
93-
claude = ClaudeCodeAdapter.start(claude_bin=str(fake), work_dir=root)
94-
assert claude.capabilities()["tool_scope"] == "read_only"
95-
response = claude.start_turn("告诉我下一步", lambda kind, payload: observed.append((kind, payload)))
95+
with mock.patch.dict(os.environ, {"LOOPX_EXECUTION_ENGINE": "legacy"}):
96+
claude = ClaudeCodeAdapter.start(claude_bin=str(fake), work_dir=root)
97+
assert claude.capabilities()["tool_scope"] == "read_only"
98+
response = claude.start_turn("告诉我下一步", lambda kind, payload: observed.append((kind, payload)))
9699
assert response["message"].startswith("已确认"), response
97100
assert any(kind == "answer.delta" for kind, _ in observed), observed
98101
visible = "".join(

‎examples/loopx-managed-turn-operator-flow-smoke.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ def main() -> None:
6666

6767
# 1. Without a credential the managed delivery refuses, and names the
6868
# fact it refuses on instead of launching on something else.
69-
unconfigured = operator_provider_environ(root, environ={})
69+
unconfigured = operator_provider_environ(
70+
root, environ={"LOOPX_EXECUTION_ENGINE": "legacy"}
71+
)
7072
refusal = managed_executor_binding(
7173
"dsh", environ=unconfigured, module_probe=_runtime_installed
7274
)
@@ -82,7 +84,9 @@ def main() -> None:
8284
api_key="sk-managed-flow-smoke",
8385
base_url="https://endpoint.smoke.invalid/v1",
8486
)
85-
environ = operator_provider_environ(root, environ={})
87+
environ = operator_provider_environ(
88+
root, environ={"LOOPX_EXECUTION_ENGINE": "legacy"}
89+
)
8690
planned = managed_executor_binding(
8791
"dsh", environ=environ, module_probe=_runtime_installed
8892
)

‎examples/loopx-steward-channel-binding-smoke.py‎

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ def _assert_selection_moves_the_channel_to_the_managed_host() -> dict[str, objec
111111
"""Selecting the managed host is what puts the managed profile on it."""
112112

113113
selected = manager_channel_binding(
114-
{MANAGER_ENDPOINT_ENV_VAR: "dsh", CREDENTIAL_ENV: CREDENTIAL_VALUE}
114+
{
115+
MANAGER_ENDPOINT_ENV_VAR: "dsh",
116+
CREDENTIAL_ENV: CREDENTIAL_VALUE,
117+
"LOOPX_EXECUTION_ENGINE": "legacy",
118+
}
115119
)
116120
_assert(
117121
selected["executor_endpoint"] == MANAGER_ENDPOINT_MANAGED
@@ -152,7 +156,9 @@ def _assert_explicit_selection_and_managed_host_verdict() -> dict[str, object]:
152156
def _assert_managed_host_verdict() -> dict[str, object]:
153157
"""The managed host is listed, and an unauthenticated launch is a typed gate."""
154158

155-
selected = manager_channel_binding({MANAGER_ENDPOINT_ENV_VAR: "dsh"})
159+
selected = manager_channel_binding(
160+
{MANAGER_ENDPOINT_ENV_VAR: "dsh", "LOOPX_EXECUTION_ENGINE": "legacy"}
161+
)
156162
_assert(
157163
selected["executor_endpoint"] == "dsh"
158164
and selected["executor_endpoint_source"]
@@ -356,6 +362,7 @@ def _assert_the_machine_default_is_first_class() -> dict[str, object]:
356362
MANAGER_ENDPOINT_ENV_VAR: "codex",
357363
"LOOPX_MANAGER_MODEL": "env-model",
358364
"LOOPX_MANAGER_REASONING_EFFORT": "low",
365+
"LOOPX_EXECUTION_ENGINE": "legacy",
359366
CREDENTIAL_ENV: CREDENTIAL_VALUE,
360367
},
361368
machine_defaults=defaults,
@@ -418,6 +425,7 @@ def _assert_mode_readback_quotes_the_session() -> dict[str, object]:
418425
selected = {
419426
MANAGER_ENDPOINT_ENV_VAR: MANAGER_ENDPOINT_MANAGED,
420427
CREDENTIAL_ENV: CREDENTIAL_VALUE,
428+
"LOOPX_EXECUTION_ENGINE": "legacy",
421429
}
422430
# Pin the runtime probe: this assertion is about the mode, and whether the
423431
# machine running the smoke has the dsh runtime installed is not the fact
@@ -463,17 +471,18 @@ def _assert_mode_readback_quotes_the_session() -> dict[str, object]:
463471

464472

465473
def main() -> int:
466-
payload = {
467-
"ok": True,
468-
"shipped_default_probe": _assert_the_shipped_default_ignores_the_credential(),
469-
"selected_managed_host": (
470-
_assert_selection_moves_the_channel_to_the_managed_host()
471-
),
472-
"explicit_selection": _assert_explicit_selection_and_managed_host_verdict(),
473-
"mode_readback": _assert_mode_readback_quotes_the_session(),
474-
"opened_endpoint": _assert_session_opens_the_resolved_endpoint(),
475-
"machine_default": _assert_the_machine_default_is_first_class(),
476-
}
474+
with mock.patch.dict(os.environ, {"LOOPX_EXECUTION_ENGINE": "legacy"}):
475+
payload = {
476+
"ok": True,
477+
"shipped_default_probe": _assert_the_shipped_default_ignores_the_credential(),
478+
"selected_managed_host": (
479+
_assert_selection_moves_the_channel_to_the_managed_host()
480+
),
481+
"explicit_selection": _assert_explicit_selection_and_managed_host_verdict(),
482+
"mode_readback": _assert_mode_readback_quotes_the_session(),
483+
"opened_endpoint": _assert_session_opens_the_resolved_endpoint(),
484+
"machine_default": _assert_the_machine_default_is_first_class(),
485+
}
477486
print(json.dumps(payload, ensure_ascii=False, indent=2))
478487
return 0
479488

‎examples/loopx-turn-managed-executor-binding-smoke.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ def _expect_probe(binding: dict[str, Any], *, available: bool) -> None:
271271
def main() -> int:
272272
with tempfile.TemporaryDirectory(
273273
prefix="loopx-turn-managed-executor-"
274-
) as directory, mock.patch.object(
274+
) as directory, mock.patch.dict(
275+
os.environ, {"LOOPX_EXECUTION_ENGINE": "legacy"}
276+
), mock.patch.object(
275277
operator_provider, "select_default_runtime_root", return_value=Path(directory) / "machine"
276278
):
277279
root = Path(directory)

‎examples/release/codex-cli-no-clone-release-verification-smoke.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def add_tree(tar: tarfile.TarFile, root: Path, name: str) -> None:
6262
path = root / name
6363
if path.is_dir():
6464
for child in sorted(path.rglob("*")):
65-
if ".git" in child.parts or "__pycache__" in child.parts:
65+
if any(part in {".git", "__pycache__", "node_modules", "dist"} for part in child.parts):
6666
continue
6767
tar.add(
6868
child,
@@ -220,6 +220,9 @@ def main() -> None:
220220
"skills",
221221
"docs",
222222
"examples",
223+
"apps/presentation/dashboard",
224+
"package.json",
225+
"package-lock.json",
223226
"README.md",
224227
"pyproject.toml",
225228
"LICENSE",
@@ -228,6 +231,10 @@ def main() -> None:
228231

229232
env = os.environ.copy()
230233
env.pop("PYTHONPATH", None)
234+
if not env.get("npm_config_cache") and not env.get("NPM_CONFIG_CACHE"):
235+
host_npm_cache = Path.home() / ".npm"
236+
if host_npm_cache.is_dir():
237+
env["npm_config_cache"] = str(host_npm_cache)
231238
env.update(
232239
{
233240
"HOME": str(home),

‎examples/release/release-promotion-concurrency-smoke.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def assert_incomplete_candidate_does_not_replace_default(root: Path) -> None:
313313
broken_root = root / "broken-source"
314314
shutil.copytree(REPO_ROOT / "loopx", broken_root / "loopx")
315315
shutil.copytree(REPO_ROOT / "scripts", broken_root / "scripts")
316-
for filename in ("LICENSE", "README.md", "pyproject.toml"):
316+
for filename in ("LICENSE", "README.md", "pyproject.toml", "package.json", "package-lock.json"):
317317
shutil.copy2(REPO_ROOT / filename, broken_root / filename)
318318
(broken_root / "loopx" / "quota.py").unlink()
319319

0 commit comments

Comments
 (0)