Repository navigation
docs: four run-the-tests instructions cannot pass on a clean machine - #3445
Merged
Merged
Conversation
…ctions Since the overlay contract test imports `yaml` directly (fdf0b86, #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
Birfy
commented
Nov 29, 2026
Birfy
left a comment
Collaborator
Author
There was a problem hiding this comment.
Lead review — PR #3445
Bound head: 0de3251712c271468bbdd61c91198babe1ead6b0, tree cb65483cf41ba26edc13722a3bfa63a7b7f84c4a, base main at fdf0b8603d327d7ee4522048efe63c6bd7071020 (tree c94b6a1b712d).
Content
4 files, +6/−3, all under docs/:
| File | Blob | Change |
|---|---|---|
docs/GETTING_STARTED.md |
ebee30d0 |
+1/−0 |
docs/IMPLEMENTATION.md |
5ffb5c10 |
+1/−1 |
docs/MANAGEMENT_API.md |
802946bd |
+2/−1 |
docs/UI_SURFACES_DISPATCH.md |
563f4c86 |
+2/−1 |
No code, workflow, test, or inventory file is touched.
What I checked myself
- On a clean
fdf0b860content copy,git apply --checkexits 0; applying giveswrite-tree=cb65483c, which equals this head's tree. Reversing the patch returns the copy toc94b6a1b. So the whole change is these four documents and nothing else. - All four old blobs on the patch's
indexlines matchfdf0b860bit for bit (3ec91373,49428a46,9abc9369,0d7a26cd). Unlike #3442, this patch was cut from the current main, so the index lines are a real binding here. grep -rn "unittest discover" docs/returns 7 hits across 6 files, each one immediately preceded by an install line:COMPOSE_MANAGER.md:307,RUNTIME_IMPLEMENTATION.md:48and:52(from #3442), plus the four this PR fixes. The table in the PR body matches this scan line for line.- I ran the
GETTING_STARTED.mdcommand block in a fresh venv (Python 3.11.18,import yamlfirst raisedModuleNotFoundError): afterpip install 'PyYAML==6.0.2',Ran 377 tests,OK, exit 0. Local, not CI. - The two narrowing sentences only narrow the package claim, not the runtime:
MANAGEMENT_API.md:9now readsNo pip packages at runtime ... the test suite alone installs PyYAML 6.0.2, andIMPLEMENTATION.md:3readsNo third-party package is imported at runtime and no upstream code is; the test suite alone needs PyYAML 6.0.2. The runtime is still described as stdlib-only.
Scope boundaries as declared
docs/MANAGEMENT_API.md:13still passesflybot-workspace(hyphen) tocompileall, which compiles nothing and exits 0. That is a separate defect, tracked in #3447, and deliberately not fixed here.REUSE_POLICY.md:24is unchanged: the policy sentence talks about an application package, and PyYAML is installed only for tests while application code never imports it. The PR body names it explicitly instead of editing it.
CI
Read on the exact head 0de3251712c271468bbdd61c91198babe1ead6b0 only. Any new commit invalidates this review.
GET /commits/0de3251712c271468bbdd61c91198babe1ead6b0/check-runs returned total_count 18 with 18 runs returned, all completed and success, and every head_sha equal to the head above:
Management API · Python 3.11/3.13(jobs141324683939/141324683884)Risk tier label,silent-revert,Web and compose planner,browser / screenshotsprovenance / provenance,provenance / flybot-social-plugin-tests,provenance / bot-social-source-testsruntime-image / Image recipe contract tests,runtime-image / Build and smoke under the manager contractsocial-host / Façade and ledger unit tests,social-host / Social plugin on the pinned DS-Bot hostupstream / Pin and vendor tree,upstream / Container startup smoke,upstream / Upstream suite · Node 22 · DSH from pin,upstream / Upstream suite · Node 24 · DSH from pinFlyBot required checks(aggregate)141325968538
Nothing in this section is a claim of parity or acceptance; the local readings above and this CI result are reported separately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs: four run-the-tests instructions cannot pass on a clean machine
Related #3444
Problem
tests/test_isolated_bot_social.pynow importsyamldirectly and only.github/workflows/tests.ymlinstalls it, sopython3 -m unittest discover -s testsneedsPyYAML 6.0.2. Four documents still present that command as the way to verify a change, with no
install step, so they describe a red run as the verification step.
Measured on this repository with one interpreter that has no
yaml(minicondaflybot, Python3.11), local, not CI:
3f9b8ab0python3 -m unittest tests.test_isolated_bot_socialRan 1 test/OK (skipped=1)fdf0b860ModuleNotFoundError: No module named 'yaml'/FAILED (errors=1)Two of the four also contradict themselves inside one paragraph: the sentence that says no pip
package is needed is followed immediately by the command that now needs one.
Change
Documentation only, 4 files
+6/−3.docs/GETTING_STARTED.mdshblock under "开发时验证改动" gainspython3 -m pip install 'PyYAML==6.0.2'beforeunittest discover, worded exactly likedocs/COMPOSE_MANAGER.md:306docs/MANAGEMENT_API.mdNo pip packagesnarrowed toNo pip packages at runtime … the test suite alone installs PyYAML 6.0.2 to parse the isolated Bot Social overlaydocs/IMPLEMENTATION.mdNo third-party packages or upstream code are importednarrowed toNo third-party package is imported at runtime and no upstream code is; the test suite alone needs PyYAML 6.0.2docs/UI_SURFACES_DISPATCH.mdflybot_workspace/**/*.pyrow namespython3 -m pip install 'PyYAML==6.0.2'beforeunittest discoverThe two narrowed claims keep the runtime honest: the management API and server are still Python
stdlib only, and PyYAML is named as the test-time exception rather than as a runtime dependency.
Acceptance (local, not CI)
Every item is a local measurement against this patch; no CI run backs them.
grep -rn "unittest discover" docs/returns 7 lines across 6 files, and every one of them isadjacent to the install line:
docs/MANAGEMENT_API.mdanddocs/IMPLEMENTATION.mdno longer claim the test suite has nothird-party dependency; each names PyYAML 6.0.2 as the test-time exception while keeping the
runtime described as standard library only.
git diff --name-onlylists exactly the four files above, all underdocs/. No workflow, notest, no product code.
A reader following
docs/GETTING_STARTED.mdon an interpreter withoutyamlgets a green run.In a fresh venv (Python 3.11.18,
import yaml->ModuleNotFoundError), copying the blockverbatim:
The 377 matches the test count CI reports for the same content, and the skip is gone.
Reproducing the patch
Against
fdf0b860(treec94b6a1b):git apply --checkexit 0, and applying it yields contenttree
cb65483c. Reversing it from that tree returns exactlyc94b6a1b, so the patch is the wholechange set relative to main and nothing else rides along.
Out of scope
docs/MANAGEMENT_API.md:13sayspython3 -m compileall -q flybot-workspace testswith a hyphenwhile the directory is
flybot_workspace. That staleness bug is real and deliberately untouchedhere, as docs: four run-the-tests instructions still fail on a clean machine now that the overlay test needs PyYAML #3444 requires.
scripts/entry point that installs theparser and runs the suite is the durable fix; it carries code, so it is a different slice.
docs/REUSE_POLICY.md:24says the management slice "adds no third-party application package".Left as is: PyYAML is a test dependency, is never imported by application code, so the sentence
is still true as written. Flagging rather than editing, in case the reviewer reads it
differently.
Rollback
Revert the commit. The four instructions then point at a command that fails on a clean machine;
nothing in code, CI or the runtime changes either way.