test(sdk): cover desktop entrypoint and stabilize authoring snapshots

This commit is contained in:
fz authored and imccyu committed 2026-10-16 15:48:08 +08:00
1 parent 89619e673a
commit 3d20a6269f
5 files changed
+22 -8

No files matched your search

+10 -1
View File
@@ -916,7 +916,16 @@ def _smoke_sdk_authoring_cached(base_url: str, executable: Path, update_snapshot
skill.parent.mkdir(parents=True)
skill.write_text("---\nname: office-docx\ndescription: CUSTOM_OFFICE_DOCX\n---\nUse the bundled Python for custom document work.\n")
patch = root / "skills.patch.yml"
patch.write_text(json.dumps([{"id": "skill-office", "disabled": True}] if mode == "disabled" else []))
# Fix the model-visible clock in this child only; native timers stay live.
patch_rows = [
{"insert": [{"id": "authoring-clock", "name": (
Path(__file__).resolve().parent / "fixtures/python-sdk-authoring-clock.mjs"
).as_uri()}]},
{"id": "time-context", "config": {"timeZone": "UTC"}},
]
if mode == "disabled":
patch_rows.append({"id": "skill-office", "disabled": True})
patch.write_text(json.dumps(patch_rows))
first = len(MockModelHandler.requests)
with DeepSeekHarness(
provider="deepseek-official", model="smoke-model", cwd=str(root),