Skip to content

Commit 42dc524

Browse files
committed
test: green CI for new module, recap usage string, and designer-skill
Regenerate the inline snapshots that pin auto-discovered state so they match the new code: - pyinstaller `hiddenimports` now includes the new `pythinker_code.tools.memory.routing_guard` module. - wire-handshake slash-command list: `/recap` usage gained `on|off` and the `skill:designer-skill` command was added. Make the recap slash-command test await type-safe: the registry types commands as `None | Awaitable[None]`, so guard with `isinstance(ret, Awaitable)` before awaiting (matching the existing shell-slash test helper) instead of awaiting the union directly, which pyright rejects.
1 parent 80ef132 commit 42dc524

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

tests/core/test_slash_recap.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
from collections.abc import Awaitable
34
from pathlib import Path
45
from unittest.mock import Mock
56

@@ -25,7 +26,9 @@ def _make_soul(runtime: Runtime, tmp_path: Path) -> PythinkerSoul:
2526

2627

2728
async def _run_recap(soul: PythinkerSoul, args: str = "") -> None:
28-
await recap_slash(soul, args)
29+
ret = recap_slash(soul, args)
30+
if isinstance(ret, Awaitable):
31+
await ret
2932

3033

3134
async def test_recap_on_persists_and_updates_runtime(

tests/utils/test_pyinstaller_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ def test_pyinstaller_hiddenimports():
314314
"pythinker_code.tools.goal",
315315
"pythinker_code.tools.mcp_resource",
316316
"pythinker_code.tools.memory",
317+
"pythinker_code.tools.memory.routing_guard",
317318
"pythinker_code.tools.plan",
318319
"pythinker_code.tools.plan.enter",
319320
"pythinker_code.tools.plan.handoff",

tests_e2e/test_wire_protocol.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_initialize_handshake(tmp_path) -> None:
5151
},
5252
{
5353
"name": "recap",
54-
"description": "Recap Pythinker sessions. Usage: /recap [today|yesterday|week|YYYY-MM-DD]",
54+
"description": "Recap Pythinker sessions. Usage: /recap [on|off|today|yesterday|week|YYYY-MM-DD]",
5555
"aliases": [],
5656
},
5757
{
@@ -125,6 +125,11 @@ def test_initialize_handshake(tmp_path) -> None:
125125
"description": "Edit Pythinker's own configuration — agent YAML specs and extend-inheritance, the permission profiles that gate tools, plugin.json, and hook lifecycle events. Use ONLY when the user wants to configure, customize, or extend Pythinker itself (its agents, permissions, plugins, or hooks). For authoring a new agent use agent-creator; for authoring a skill use skill-creator; for general usage Q&A use pythinker-code-help.",
126126
"aliases": [],
127127
},
128+
{
129+
"name": "skill:designer-skill",
130+
"description": "Prescriptive frontend design guidance via the designer-skill MCP server. Use when the user asks to use designer-skill, improve UI/UX, run the anti-slop ship gate, apply a design system, or enhance pages/components with MCP-backed design references — especially for Pythinker docs and marketing surfaces with DESIGN.md/PRODUCT.md.",
131+
"aliases": [],
132+
},
128133
{
129134
"name": "skill:diagnose-ci-failures",
130135
"description": "Diagnose failing CI, lint, typecheck, build, or test logs and propose or implement the smallest verified fix.",
@@ -251,7 +256,7 @@ def test_initialize_external_tool_conflict(tmp_path) -> None:
251256
},
252257
{
253258
"name": "recap",
254-
"description": "Recap Pythinker sessions. Usage: /recap [today|yesterday|week|YYYY-MM-DD]",
259+
"description": "Recap Pythinker sessions. Usage: /recap [on|off|today|yesterday|week|YYYY-MM-DD]",
255260
"aliases": [],
256261
},
257262
{
@@ -325,6 +330,11 @@ def test_initialize_external_tool_conflict(tmp_path) -> None:
325330
"description": "Edit Pythinker's own configuration — agent YAML specs and extend-inheritance, the permission profiles that gate tools, plugin.json, and hook lifecycle events. Use ONLY when the user wants to configure, customize, or extend Pythinker itself (its agents, permissions, plugins, or hooks). For authoring a new agent use agent-creator; for authoring a skill use skill-creator; for general usage Q&A use pythinker-code-help.",
326331
"aliases": [],
327332
},
333+
{
334+
"name": "skill:designer-skill",
335+
"description": "Prescriptive frontend design guidance via the designer-skill MCP server. Use when the user asks to use designer-skill, improve UI/UX, run the anti-slop ship gate, apply a design system, or enhance pages/components with MCP-backed design references — especially for Pythinker docs and marketing surfaces with DESIGN.md/PRODUCT.md.",
336+
"aliases": [],
337+
},
328338
{
329339
"name": "skill:diagnose-ci-failures",
330340
"description": "Diagnose failing CI, lint, typecheck, build, or test logs and propose or implement the smallest verified fix.",

0 commit comments

Comments
 (0)