feat(plugins): share native session handoff and soften memory search
This commit is contained in:
@@ -10,7 +10,6 @@ sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
||||
from conformance import run as conformance_run # noqa: E402
|
||||
from conformance.run import _command_check # noqa: E402
|
||||
|
||||
|
||||
PLUGIN_ROOT = Path(__file__).resolve().parents[1]
|
||||
RUNNER = PLUGIN_ROOT / "conformance" / "run.py"
|
||||
PYTHON_HOSTS = {"claude-code", "cursor", "codex", "kimi", "antigravity"}
|
||||
@@ -101,6 +100,30 @@ def test_typescript_artifact_check_rejects_monorepo_imports(tmp_path: Path) -> N
|
||||
assert "monorepo source import" in result["output"]
|
||||
|
||||
|
||||
def test_handoff_packaging_rejects_missing_and_drifted_runtime(tmp_path: Path) -> None:
|
||||
from conformance.artifacts import (
|
||||
HANDOFF_RUNTIME_FILES,
|
||||
TYPESCRIPT_ARTIFACTS,
|
||||
verify_artifact,
|
||||
)
|
||||
|
||||
dist = tmp_path / "dist"
|
||||
dist.mkdir()
|
||||
_, required = TYPESCRIPT_ARTIFACTS["opencode"]
|
||||
for name in required:
|
||||
target = tmp_path / name
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
target.write_text("", encoding="utf-8")
|
||||
for name in HANDOFF_RUNTIME_FILES:
|
||||
(dist / name).write_bytes((PLUGIN_ROOT / "python" / name).read_bytes())
|
||||
assert verify_artifact("opencode", tmp_path, required)["status"] == "passed"
|
||||
|
||||
(dist / "session_handoff.py").write_text("# stale importer\n", encoding="utf-8")
|
||||
assert "differs from shared source" in verify_artifact("opencode", tmp_path, required)["output"]
|
||||
(dist / "session_handoff.py").unlink()
|
||||
assert "missing package artifact: dist/session_handoff.py" in verify_artifact("opencode", tmp_path, required)["output"]
|
||||
|
||||
|
||||
def test_live_conformance_requires_an_explicit_mem0_key(tmp_path: Path) -> None:
|
||||
environment = dict(os.environ)
|
||||
environment.pop("MEM0_API_KEY", None)
|
||||
|
||||
Reference in New Issue
Block a user