Motivation
A learner who runs pythonlings update from an initialized workspace reasonably expects that workspace to update. Today the subcommand default targets the home workspace first, which is surprising and can point at a missing directory.
Current evidence
pythonlings/cli.py gives update --path a default of default_workspace_root().
update_workspace() correctly rejects a target without info.toml, but the CLI target-selection precedence is not aligned with user expectation.
Exact scope
Resolve update targets in this order: explicit update --path, global --root, current working directory when it is a workspace, then the default home workspace. update must never create a missing workspace.
Acceptance checklist
Explicit exclusions
Do not change init behavior, add implicit workspace creation to update, modify update copy semantics, or alter the PYTHONLINGS_HOME contract.
Likely files
pythonlings/cli.py
pythonlings/core/workspace.py
tests/integration/test_cli_workspace.py
Verification
python -m pytest tests/integration/test_cli_workspace.py -q
python -m pytest -q
Also exercise each precedence branch in a temporary directory and verify a missing target remains absent.
Sprint coordination
See the sprint Discussion. This issue is unassigned and is not a reservation.
Motivation
A learner who runs
pythonlings updatefrom an initialized workspace reasonably expects that workspace to update. Today the subcommand default targets the home workspace first, which is surprising and can point at a missing directory.Current evidence
pythonlings/cli.pygivesupdate --patha default ofdefault_workspace_root().update_workspace()correctly rejects a target withoutinfo.toml, but the CLI target-selection precedence is not aligned with user expectation.Exact scope
Resolve update targets in this order: explicit
update --path, global--root, current working directory when it is a workspace, then the default home workspace.updatemust never create a missing workspace.Acceptance checklist
pythonlings update --path PATHupdatesPATHregardless of the working directory or global root.pythonlings --root PATH updateupdates that root when no--pathis supplied.pythonlings updateinside a workspace updates the current workspace.pythonlings updateoutside a workspace falls back to the default home workspace.Explicit exclusions
Do not change init behavior, add implicit workspace creation to update, modify update copy semantics, or alter the
PYTHONLINGS_HOMEcontract.Likely files
pythonlings/cli.pypythonlings/core/workspace.pytests/integration/test_cli_workspace.pyVerification
Also exercise each precedence branch in a temporary directory and verify a missing target remains absent.
Sprint coordination
See the sprint Discussion. This issue is unassigned and is not a reservation.