From 1fa25d8c3ab8b326ab698e40f774443917332dc6 Mon Sep 17 00:00:00 2001 From: "DistributedApps.AI" Date: Mon, 31 Aug 2026 11:32:08 -0400 Subject: [PATCH] CI workflow (pytest + CLI demo + live smoke on py3.10/3.13); evolve CLI now reports test evaluation; add python -m wikiskill entry; README badges --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ README.md | 7 ++++++- smoke_test.py | 3 +++ src/wikiskill/__main__.py | 4 ++++ src/wikiskill/cli.py | 5 ++++- 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 src/wikiskill/__main__.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1277b83 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.13"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install + run: pip install -e ".[dev,ui]" + - name: Run tests + run: pytest -q --timeout=120 + - name: CLI demo (mock, end-to-end) + run: python -m wikiskill.demo --root ci_demo --iterations 3 + - name: Live-server smoke test + run: python smoke_test.py diff --git a/README.md b/README.md index 09a6f70..696f20b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # WikiSkill — Implementation +[![CI](https://github.com/kenhuangus/wikiskill/actions/workflows/ci.yml/badge.svg)](https://github.com/kenhuangus/wikiskill/actions/workflows/ci.yml) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) +![Python](https://img.shields.io/badge/python-3.9%2B-blue) + Python implementation of **"WikiSkill: Compiling Agent Experience into Persistent Knowledge for Skill Evolution"** (arXiv:2608.27454v1, Tang et al., Google Research). @@ -81,8 +85,9 @@ Tabs (see `ui_design.md` for the full design): ```bash pip install -e ".[dev]" -pytest # 30 tests incl. UI + end-to-end loop +pytest # 29 tests: unit + end-to-end + UI python -m wikiskill.demo # offline demo with the deterministic MockLLM +python -m wikiskill serve # same as `wikiskill serve` ``` Demo output: a `wikiskill_demo_workspace/` with `raw/`, `wiki/`, `skills/` populated, diff --git a/smoke_test.py b/smoke_test.py index 704d410..de9ded8 100644 --- a/smoke_test.py +++ b/smoke_test.py @@ -1,5 +1,6 @@ """Live smoke test: boots the real wikiskill serve stack and exercises it over HTTP.""" import json +import shutil import subprocess import sys import time @@ -9,6 +10,8 @@ PORT = 8765 BASE = f"http://127.0.0.1:{PORT}" ok = True +shutil.rmtree("smoke_run", ignore_errors=True) # fresh workspace per invocation + def check(name, cond, extra=""): global ok diff --git a/src/wikiskill/__main__.py b/src/wikiskill/__main__.py new file mode 100644 index 0000000..0ef3024 --- /dev/null +++ b/src/wikiskill/__main__.py @@ -0,0 +1,4 @@ +from .cli import main + +if __name__ == "__main__": + raise SystemExit(main()) \ No newline at end of file diff --git a/src/wikiskill/cli.py b/src/wikiskill/cli.py index 8662a47..bb31b6c 100644 --- a/src/wikiskill/cli.py +++ b/src/wikiskill/cli.py @@ -79,7 +79,10 @@ def main(argv=None) -> int: ws=Workspace(args.root), tools=tools, K=args.iterations) result = orch.run() - print(json.dumps(result, indent=2)) + # Paper §4: report final skills vs no-skill baseline on the test split with + # paired bootstrap significance (paper Appendix C). + evaluation = orch.evaluate_test() + print(json.dumps({**result, "evaluation": evaluation}, indent=2)) return 0