Files
Wyatt Fang 30fecaae5e release(codestable): ship skill workflow v1.0.2 (#41)
收敛 CodeStable 主入口、runtime preflight、goal driver 与 skill 工程化评测闭环。

- 根 cs 对行动请求同轮直转,咨询与介绍保持非执行
- feature/issue/refactor/epic/docs 按仓库事实恢复,旧 stage skill 保留兼容薄壳
- repo-local runtime 支持版本检测、安全自动同步和显式 refresh-runtime
- 完成 Codex/Claude marketplace 1.0.2、升级文档和回归/评测证据

验证:215 tests passed;package/runtime/diff checks passed;独立 review 与 QA 无 unresolved blocking/important findings。
2026-07-10 15:23:56 +08:00

40 lines
1.0 KiB
Python

import os
import subprocess
import sys
from taskhub import storage
from taskhub.services import tasks
def run_cli(tmp_path, *args):
repo_root = os.getcwd()
env = dict(
os.environ,
TASKHUB_DB=str(tmp_path / "taskhub.db"),
PYTHONPATH=repo_root + os.pathsep + os.environ.get("PYTHONPATH", ""),
)
return subprocess.run(
[sys.executable, "-m", "taskhub.cli", *args],
cwd=tmp_path,
env=env,
text=True,
capture_output=True,
check=True,
)
def test_done_task_can_be_archived_and_default_list_hides_it(tmp_path):
db_path = tmp_path / "taskhub.db"
conn = storage.connect(db_path)
storage.migrate(conn)
done = tasks.create_task(conn, "finished")
tasks.transition(conn, done["id"], "in_progress")
tasks.transition(conn, done["id"], "done")
tasks.create_task(conn, "open")
run_cli(tmp_path, "archive", str(done["id"]))
listed = run_cli(tmp_path, "list").stdout
assert "finished" not in listed
assert "open" in listed