feat(catalog): serve the public catalog in the authored onboarding arc (L1→L8) #83
No reviewers
Labels
No labels
backend
bug
completed
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
in-progress
invalid
performance
phase-1
Phase1
Phase2
Phase3
planning
question
refactor
security
test
testing
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Kalle/ATM!83
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/catalog-onboarding-arc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan
Make
GET /api/lessons(the documented unauthenticated discovery entry point) serve the authored onboarding arc oldest-first (L1→L8) instead of newest-first, so a first-time visitor's first impression is the introduction lesson, not the integration lesson.Outcome
getPublicCatalog()now sorts oldest-first insrc/lib/lessons-catalog.ts(the seed lessons encode the arc increated_at: L1 2026-01-01 → L8 2026-01-08). The obsolete "newest-first" unit test was replaced with arc assertions (first =l1-introduction-to-awareness, last =l8-walking-awareness).Coverage gap found and closed: the public catalog had zero blackbox coverage — the suite only exercised the teacher view
/api/lessons/list. Added blackbox tests 2d/2e/2f/2g: reachability, non-emptiness, L1-leads, full arc order.Blackbox 16b made idempotent (separate
test:commit with justification): 16b asserted "all pre-existing lessons survive" with a sentinel set that included the previous run's copy of the byte-identical test PDF — which the endpoint legitimately replaces (exactly the behaviour 16d asserts). It therefore failed on every second run. Verified on testing: the missing UUID differed between runs (f9ec55cf…thenb4a419fb…) while real library content was untouched — proof the victim was per-run residue, not a destructive-import P0. 16b now excludes only the test document's own copies ("Lektion 777" marker) from its sentinel set; seeds, the Yanai collection and teacher lessons remain fully guarded.Impact on release goals
[~]Core Platform item → Core Platform 5/5 COMPLETE. With Launch Lessons 8/8 already merged, the authored arc is now both complete and presented in teaching order.Blackbox
python3 scripts/blackbox_test.py --target testingdev(testing deploysdev, which is still newest-first:first='l8-walking-awareness',order=['l8'…'l1']). They are the new assertions this PR exists to satisfy.devshowing the 9 locally non-servable checks (DB-seed/AI-backend paths) fail identically on both — i.e. no regression from this change.tsc --noEmitexit 0. TDD discipline held: RED confirmed before implementation (2 unit failures for the correct reason; 2f/2g red on testing).--target testingand confirm 2f/2g flip to green (51/51).Six-perspectives check
Risk
Low. A sort-direction flip on a read path, covered by unit + blackbox assertions. Teacher-facing
/api/lessons/listis intentionally unchanged (its UI exposes a user-controlled sort, so recency stays the sensible default there). Related open PR #76 (stable lesson ids on re-import) edits the same file's test-16 block — trivially rebasable, either merge order works.Checklist
dev(ea812cd)This PR was created by an AI agent (OpenHands) on behalf of the ATM maintainers. Human merge required.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.