Skip to content

The Python port dropped doctor's zephyrSdk check, reintroducing the exact defect #160 fixed: 'doctor: 0 failed' on a host with no cross-toolchain #286

Description

@alpCaner

Found by the maintainer on a clean Windows host running released v0.5.0-rc1, immediately after a successful tan bootstrap.

Measured

(.venv) PS> tan doctor --sdk-root C:\alp\ws\alp-sdk
[   pass] hostPython: Python 3.14 (`python`) meets the effective floor 3.12
[   warn] pythonFloor: ...
[   pass] hostPrerequisites: git, cmake, python, ninja present
[   pass] west: west 1.5 (C:\alp\ws\.venv\Scripts\west.EXE)
[unknown] setools: ...
[   warn] jlink: ...

3 passed, 2 warning(s), 0 failed.

0 failed on a host that cannot build for real silicon. The Zephyr SDK (arm-zephyr-eabi) is not installed — tan bootstrap had said so explicitly minutes earlier, in its own "NOT auto-installed" section. doctor does not mention it. It does not mention a toolchain at all.

This is a port regression against the Rust oracle

crates/tan-cli/src/commands/doctor.rs:371 calls append_zephyr_sdk_toolchain(&mut report), emitting a zephyrSdk check. Grepping the Python port:

$ grep -rn "zephyrSdk|zephyr_sdk|arm-zephyr-eabi" python/tan/commands/doctor_cmd.py
(no matches)

The check does not exist in python/tan/commands/doctor_cmd.py. Comparing the two check sets, Rust has hostPrerequisites, west and zephyrSdk; Python has the first two and not the third.

Why this specific check

The Rust docstring at doctor.rs:381-400 states the case, and it is precisely the run that just happened:

This is the check the alp-sdk#855 fresh-host run needed and never got: on that run tan doctor (plain) never mentioned the word "toolchain" at all, and tan doctor --build's equivalent check was reached only after tan init — a full project creation — stood between the user and the first sign of trouble. Surfacing it at the FIRST command a customer runs closes that gap directly.

tan-cli#160 added it to plain doctor for that reason. v0.5.0-rc1 reintroduces the defect #160 was written to close.

It is also load-bearing for documentation that shipped in this release: tan bootstrap's "Next steps" block tells the user, verbatim, that the Zephyr SDK is

"a separate manual install, which bootstrap does NOT install — the tan doctor above reports it, and names the exact install command"

That promise is now false.

Note on the check's intended shape

Per the same docstring, it is deliberately unconditional in plain doctor — a HOST fact (env var / scanned install dir, crate::toolchain::zephyr_sdk_detected), needing no board.yaml, no workspace and no SDK, because ADR 0021 Lane 1 P0a runs tan doctor before anything project-shaped exists. A Yocto-only project seeing it is the uncommon case and a Fail there is still true. Port it with that property intact rather than gating it on a Zephyr core.

Related, same session

The port also does not surface the incomplete venv bootstrap had just warned about (hidapi wheel build failed, #285) — doctor reports the venv's west as pass and says nothing about the missing package. Whether that belongs in this check or its own is a design call, but the user-visible effect compounds: two commands in a row told this host it was healthy when it was not.

Environment

tan 0.5.0-rc1 (Windows x64, attestation-verified), alp-sdk v0.15.0-rc1, workspace C:\alp\ws with Zephyr v4.4.1, venv active, west 1.5 present, no Zephyr SDK installed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingoracle-parityDivergence from the released Rust oracle; measure by RUNNING the binarypython-portRust-to-Python port of the tan command surface

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions