Skip to content

Surface malformed courses instead of silently skipping them#69

Merged
redmodd merged 2 commits into
mainfrom
warn-malformed-course
Jun 4, 2026
Merged

Surface malformed courses instead of silently skipping them#69
redmodd merged 2 commits into
mainfrom
warn-malformed-course

Conversation

@redmodd
Copy link
Copy Markdown
Owner

@redmodd redmodd commented Jun 4, 2026

What

A directory under courses/ that looks like a course attempt — it has a pages/ folder — but is missing its course.config.js was silently filtered out of the course listing. Users hit a confusing "course not found" / empty listing with no indication of the cause.

It's now reported under a "Skipped (missing course.config.js)" section whenever the workspace's courses are listed (e.g. course-not-found and no-course-specified errors).

Why this scope

The big workspace breakages (mangled root package.json, deleted courses/) already surface clear errors from pnpm or the existing resolver. Silent course-dropping was the one place the tooling actively hid a problem, so that's all this fixes — no speculative tessera doctor / full workspace validator.

The pages/ heuristic keeps legitimate non-course content (a README, a shared-assets folder) out of the warning.

Tests

  • New listMalformedCourses() unit tests (flags pages/-without-config, ignores plain dirs and valid courses) plus a resolveCourse test asserting the malformed course appears in the hint.
  • Full unit suite passes (884 + 19); pnpm check clean.

🤖 Generated with Claude Code

redmodd and others added 2 commits June 3, 2026 21:37
A directory under courses/ that looks like a course attempt (it has a
pages/ folder) but lacks course.config.js was silently filtered out of
the course listing, leaving a confusing "course not found" with no cause.
It is now reported under "Skipped (missing course.config.js)" when the
workspace's courses are listed. Legitimate non-course content (a README,
a shared-assets folder) is left out of the warning.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
listHint called both listCourses and listMalformedCourses, each doing its
own readdirSync plus per-entry stats. Partition the directory in a single
scanCourses pass and derive both lists from it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@redmodd redmodd merged commit 7978096 into main Jun 4, 2026
8 checks passed
@redmodd redmodd deleted the warn-malformed-course branch June 4, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant