-
Notifications
You must be signed in to change notification settings - Fork 7
fix: return friendly errors for malformed info.toml files #44
Copy link
Copy link
Open
Labels
area: coreCore workspace, manifest, state, and runner behaviorCore workspace, manifest, state, and runner behaviorbugSomething isn't workingSomething isn't workingdev sprintPythonlings Community Dev Sprint August 2026Pythonlings Community Dev Sprint August 2026good first issueGood for newcomersGood for newcomerssize: MMedium, self-contained contributionMedium, self-contained contribution
Description
Metadata
Metadata
Assignees
Labels
area: coreCore workspace, manifest, state, and runner behaviorCore workspace, manifest, state, and runner behaviorbugSomething isn't workingSomething isn't workingdev sprintPythonlings Community Dev Sprint August 2026Pythonlings Community Dev Sprint August 2026good first issueGood for newcomersGood for newcomerssize: MMedium, self-contained contributionMedium, self-contained contribution
Motivation
A malformed or unsafe workspace manifest should explain the problem without exposing a Python traceback. Learners and contributors need an actionable path, and paths must remain safely scoped to the workspace.
Current evidence
pythonlings/core/manifest.pycallstomllib.load()without translating TOML decode errors.KeyError/type errors.exercises/prefix but does not explicitly reject absolute paths or traversal components.Exact scope
Convert malformed TOML, missing/wrong field shapes, and unsafe absolute or traversal paths into contextual
ManifestErrormessages. CLI callers must print a friendlypythonlings: …error and exit 2 without a traceback.Acceptance checklist
ManifestErrorthat identifiesinfo.tomland the parsing problem.ManifestErrormessages, not raw exceptions.exercises/retain existing behavior.Explicit exclusions
Do not change the manifest schema, accept paths outside
exercises/, silently repair invalid manifests, or broaden the issue into curriculum migration.Likely files
pythonlings/core/manifest.pytests/unit/test_manifest.pytests/integration/test_cli_verify.pyand related CLI testsVerification
Manually run a CLI command against malformed, missing-field, absolute-path, and traversal-path fixture manifests; each must exit 2 with a friendly message.
Sprint coordination
See the sprint Discussion. This issue is unassigned and is not a reservation.