Skip to content

docs: four run-the-tests instructions cannot pass on a clean machine - #3445

Merged
Birfy merged 1 commit into
mainfrom
dev/3444-docs-yaml-test-instructions
Nov 29, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/3444-docs-yaml-test-instructions

Conversation

@Birfy

@Birfy Birfy commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

docs: four run-the-tests instructions cannot pass on a clean machine

Related #3444

Problem

tests/test_isolated_bot_social.py now imports yaml directly and only
.github/workflows/tests.yml installs it, so python3 -m unittest discover -s tests needs
PyYAML 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 (miniconda flybot, Python
3.11), local, not CI:

content command result exit
pre-change 3f9b8ab0 python3 -m unittest tests.test_isolated_bot_social Ran 1 test / OK (skipped=1) 0
fdf0b860 same ModuleNotFoundError: No module named 'yaml' / FAILED (errors=1) 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.

file change
docs/GETTING_STARTED.md the sh block under "开发时验证改动" gains python3 -m pip install 'PyYAML==6.0.2' before unittest discover, worded exactly like docs/COMPOSE_MANAGER.md:306
docs/MANAGEMENT_API.md same line in the "Stack and execution" block; No pip packages narrowed to No pip packages at runtime … the test suite alone installs PyYAML 6.0.2 to parse the isolated Bot Social overlay
docs/IMPLEMENTATION.md the inline test command gains the install step; No third-party packages or upstream code are imported narrowed to No third-party package is imported at runtime and no upstream code is; the test suite alone needs PyYAML 6.0.2
docs/UI_SURFACES_DISPATCH.md the flybot_workspace/**/*.py row names python3 -m pip install 'PyYAML==6.0.2' before unittest discover

The 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.

  1. grep -rn "unittest discover" docs/ returns 7 lines across 6 files, and every one of them is
    adjacent to the install line:

    OK  docs/COMPOSE_MANAGER.md:307          (already had it, #3442)
    OK  docs/GETTING_STARTED.md:55           (this patch)
    OK  docs/IMPLEMENTATION.md:3             (this patch)
    OK  docs/MANAGEMENT_API.md:13            (this patch)
    OK  docs/RUNTIME_IMPLEMENTATION.md:48    (already had it, #3442)
    OK  docs/RUNTIME_IMPLEMENTATION.md:52    (already had it, #3442)
    OK  docs/UI_SURFACES_DISPATCH.md:8       (this patch)
    
  2. docs/MANAGEMENT_API.md and docs/IMPLEMENTATION.md no longer claim the test suite has no
    third-party dependency; each names PyYAML 6.0.2 as the test-time exception while keeping the
    runtime described as standard library only.

  3. git diff --name-only lists exactly the four files above, all under docs/. No workflow, no
    test, no product code.

  4. A reader following docs/GETTING_STARTED.md on an interpreter without yaml gets a green run.
    In a fresh venv (Python 3.11.18, import yaml -> ModuleNotFoundError), copying the block
    verbatim:

    python3 -m pip install 'PyYAML==6.0.2'  # isolated Bot Social overlay contract test
    ...
    Successfully installed PyYAML-6.0.2
    python3 -m unittest discover -s tests
    Ran 377 tests in 205.072s
    OK
    exit 0
    

    The 377 matches the test count CI reports for the same content, and the skip is gone.

Reproducing the patch

Against fdf0b860 (tree c94b6a1b): git apply --check exit 0, and applying it yields content
tree cb65483c. Reversing it from that tree returns exactly c94b6a1b, so the patch is the whole
change set relative to main and nothing else rides along.

Out of scope

  • docs/MANAGEMENT_API.md:13 says python3 -m compileall -q flybot-workspace tests with a hyphen
    while the directory is flybot_workspace. That staleness bug is real and deliberately untouched
    here, as docs: four run-the-tests instructions still fail on a clean machine now that the overlay test needs PyYAML #3444 requires.
  • Four copies of the same command will drift again. A scripts/ entry point that installs the
    parser and runs the suite is the durable fix; it carries code, so it is a different slice.
  • docs/REUSE_POLICY.md:24 says 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.

…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
@github-actions github-actions Bot added the risk:T0 Risk tier T0 (docs only), set by the controller from the diff; never by hand label Nov 29, 2026

@Birfy Birfy left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. On a clean fdf0b860 content copy, git apply --check exits 0; applying gives write-tree = cb65483c, which equals this head's tree. Reversing the patch returns the copy to c94b6a1b. So the whole change is these four documents and nothing else.
  2. All four old blobs on the patch's index lines match fdf0b860 bit 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.
  3. 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:48 and :52 (from #3442), plus the four this PR fixes. The table in the PR body matches this scan line for line.
  4. I ran the GETTING_STARTED.md command block in a fresh venv (Python 3.11.18, import yaml first raised ModuleNotFoundError): after pip install 'PyYAML==6.0.2', Ran 377 tests, OK, exit 0. Local, not CI.
  5. The two narrowing sentences only narrow the package claim, not the runtime: MANAGEMENT_API.md:9 now reads No pip packages at runtime ... the test suite alone installs PyYAML 6.0.2, and IMPLEMENTATION.md:3 reads No 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:13 still passes flybot-workspace (hyphen) to compileall, which compiles nothing and exits 0. That is a separate defect, tracked in #3447, and deliberately not fixed here.
  • REUSE_POLICY.md:24 is 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 (jobs 141324683939 / 141324683884)
  • Risk tier label, silent-revert, Web and compose planner, browser / screenshots
  • provenance / provenance, provenance / flybot-social-plugin-tests, provenance / bot-social-source-tests
  • runtime-image / Image recipe contract tests, runtime-image / Build and smoke under the manager contract
  • social-host / Façade and ledger unit tests, social-host / Social plugin on the pinned DS-Bot host
  • upstream / Pin and vendor tree, upstream / Container startup smoke, upstream / Upstream suite · Node 22 · DSH from pin, upstream / Upstream suite · Node 24 · DSH from pin
  • FlyBot 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.

@Birfy
Birfy added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit 63b36a9 Nov 29, 2026
18 checks passed
@Birfy
Birfy deleted the dev/3444-docs-yaml-test-instructions branch November 29, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T0 Risk tier T0 (docs only), set by the controller from the diff; never by hand

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant