You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A read-only diagnostic command can turn opaque setup problems into actionable checks for learners and maintainers without changing user workspaces.
Current evidence
The existing product-hardening umbrella (Product-hardening umbrella #4) identifies pythonlings doctor as a desired diagnostic command.
Workspace validity currently spans CLI root resolution, info.toml, mirrored curriculum files, state, reset snapshots, solutions, and bundled docs.
Existing state loading can mutate corrupt files, so doctor needs its own non-mutating inspection path.
Exact scope
Add pythonlings [--root PATH] doctor, a read-only diagnostic command that reports runtime/package version, workspace structure, manifest, solutions, state, reset snapshots, and bundled docs. Warnings do not fail the command; required failures return 1.
Acceptance checklist
The command is discoverable in CLI help and respects global --root.
It prints clear status for Python runtime and installed package version.
It checks required workspace structure, manifest validity, solution availability, state readability, reset snapshots, and bundled docs.
It distinguishes warnings from required failures, uses actionable messages, and exits 0 when only warnings occur.
A required failure exits 1; malformed/missing manifest handling remains friendly and never prints a traceback.
The command does not create, repair, rename, or otherwise modify workspace files.
Unit and CLI integration tests cover healthy, warning-only, required-failure, malformed-state, and --root paths.
Explicit exclusions
Do not add automatic repair, network calls, telemetry, a TUI screen, or a release promise. Do not reuse a mutating load path in the read-only diagnostics command.
Likely files
pythonlings/cli.py
pythonlings/core/doctor.py (new)
pythonlings/core/manifest.py, state.py, reset.py, or docs helpers as needed
Motivation
A read-only diagnostic command can turn opaque setup problems into actionable checks for learners and maintainers without changing user workspaces.
Current evidence
pythonlings doctoras a desired diagnostic command.info.toml, mirrored curriculum files, state, reset snapshots, solutions, and bundled docs.Exact scope
Add
pythonlings [--root PATH] doctor, a read-only diagnostic command that reports runtime/package version, workspace structure, manifest, solutions, state, reset snapshots, and bundled docs. Warnings do not fail the command; required failures return 1.Acceptance checklist
--root.--rootpaths.Explicit exclusions
Do not add automatic repair, network calls, telemetry, a TUI screen, or a release promise. Do not reuse a mutating load path in the read-only diagnostics command.
Likely files
pythonlings/cli.pypythonlings/core/doctor.py(new)pythonlings/core/manifest.py,state.py,reset.py, or docs helpers as neededtests/unit/test_doctor.py(new)tests/integration/test_cli_doctor.py(new)Verification
Compare workspace file hashes before and after doctor to demonstrate read-only behavior.
Sprint coordination
See the sprint Discussion. This issue is unassigned and is not a reservation.