From 0de3251712c271468bbdd61c91198babe1ead6b0 Mon Sep 17 00:00:00 2001 From: Danyang Chen Date: Sun, 29 Nov 2026 19:11:29 +0800 Subject: [PATCH] docs: install the pinned YAML parser in the four run-the-tests instructions Since the overlay contract test imports `yaml` directly (fdf0b860, #3442), the `unittest discover` command that four documents still present as the way to verify a change fails on a clean machine. Measured with the same interpreter that has no PyYAML: pre-#3442 content reports `OK (skipped=1)` and exit 0, post-#3442 content reports `FAILED (errors=1)` / `ModuleNotFoundError: No module named 'yaml'` and exit 1. The docs were describing that red run as the verification step. - docs/GETTING_STARTED.md: the sh block gains the install line before `unittest discover`, matching COMPOSE_MANAGER.md:306. - docs/MANAGEMENT_API.md: same install line in the "Stack and execution" block, and "No pip packages" narrowed to "No pip packages at runtime ... the test suite alone installs PyYAML 6.0.2". - docs/IMPLEMENTATION.md: the inline test command gains the install step, and "No third-party packages ... are imported" narrowed to "No third-party package is imported at runtime ... the test suite alone needs PyYAML 6.0.2". - docs/UI_SURFACES_DISPATCH.md: the `flybot_workspace/**/*.py` row names the install before `unittest discover`. 4 files, +6/-3, all under docs/. Local verification (not CI): a fresh venv on Python 3.11.18 with no PyYAML runs the GETTING_STARTED.md block verbatim -- the install resolves PyYAML-6.0.2, then `Ran 377 tests` / `OK` / exit 0. All seven `grep -rn "unittest discover" docs/` hits now sit next to the install line. Related #3444 --- docs/GETTING_STARTED.md | 1 + docs/IMPLEMENTATION.md | 2 +- docs/MANAGEMENT_API.md | 3 ++- docs/UI_SURFACES_DISPATCH.md | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md index 3ec91373d..ebee30d05 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.md @@ -51,6 +51,7 @@ docker build \ 在仓库根目录运行管理端用例。运行 DS-Bot 插件测试时使用 Node.js 22 或 24。 ```sh +python3 -m pip install 'PyYAML==6.0.2' # isolated Bot Social overlay contract test python3 -m unittest discover -s tests node --test tests/chat_page.test.mjs tests/discover_page.test.mjs node --test runtime/flybot-workspace-web/test/*.test.js diff --git a/docs/IMPLEMENTATION.md b/docs/IMPLEMENTATION.md index 49428a464..5ffb5c106 100644 --- a/docs/IMPLEMENTATION.md +++ b/docs/IMPLEMENTATION.md @@ -1,6 +1,6 @@ # Implementation handoff -First implementation PR: Python 3.11+ standard library, SQLite v1 schema, WSGI application and unittest. Test: `python3 -m unittest discover -s tests -v`. No third-party packages or upstream code are imported. +First implementation PR: Python 3.11+ standard library, SQLite v1 schema, WSGI application and unittest. Test: `python3 -m pip install 'PyYAML==6.0.2'` then `python3 -m unittest discover -s tests -v`. No third-party package is imported at runtime and no upstream code is; the test suite alone needs PyYAML 6.0.2 to parse the isolated Bot Social overlay. This PR delivers authentication/session/CSRF and owner-scoped workspace records, not the complete runtime lifecycle MVP. Deployment may keep the separate dependency-free Node command planner; no Compose planner or executor is duplicated here. The management Web process never executes Docker. Next PR should implement durable desired/revision/operation jobs and the fake RuntimeBackend before wiring a separately reviewed manager adapter. diff --git a/docs/MANAGEMENT_API.md b/docs/MANAGEMENT_API.md index 9abc9369e..802946bdd 100644 --- a/docs/MANAGEMENT_API.md +++ b/docs/MANAGEMENT_API.md @@ -6,9 +6,10 @@ Related: #2 (lifecycle MVP, **not completed**) and #1 (full parity). This PR is ## Stack and execution -Python 3.11+ standard library, SQLite, WSGI, unittest. No pip packages, copied upstream source or private control-plane implementation. POSIX file ownership/mode and `O_NOFOLLOW` support are required. Local tests use Python 3.13; CI exercises 3.11/3.13 separately. +Python 3.11+ standard library, SQLite, WSGI, unittest. No pip packages at runtime, copied upstream source or private control-plane implementation; the test suite alone installs PyYAML 6.0.2 to parse the isolated Bot Social overlay. POSIX file ownership/mode and `O_NOFOLLOW` support are required. Local tests use Python 3.13; CI exercises 3.11/3.13 separately. ```sh +python3 -m pip install 'PyYAML==6.0.2' # isolated Bot Social overlay contract test python3 -m unittest discover -s tests -v python3 -m compileall -q flybot-workspace tests python3 -m flybot_workspace.server --help diff --git a/docs/UI_SURFACES_DISPATCH.md b/docs/UI_SURFACES_DISPATCH.md index 0d7a26cd8..563f4c864 100644 --- a/docs/UI_SURFACES_DISPATCH.md +++ b/docs/UI_SURFACES_DISPATCH.md @@ -5,7 +5,8 @@ Related: #3393. Part of [UI_SURFACES.md](UI_SURFACES.md). Measured on `34a80ca5a - `flybot_workspace/static/**` → `node --test tests/*.test.mjs` → CI `Web and compose planner`; screenshot if the change is visible. - `static/shell/system-locale*.mjs` → `node --test tests/system_locale*.test.mjs` → same check. -- `flybot_workspace/**/*.py` → `unittest discover -s tests -v` and `compileall -q` under `python -m`; +- `flybot_workspace/**/*.py` → `python3 -m pip install 'PyYAML==6.0.2'` then `unittest discover -s tests -v` + and `compileall -q` under `python -m`; CI `Management API · 3.11` / `3.13`; screenshot only if page output changes. - `runtime/flybot-workspace-web/**` → `npm test` in that directory → CI `runtime-image / Image recipe contract tests`; no screenshot, fixtures are Python side.