feat: interactive autograded starter workspace (Module 03) - #1
Open
IshmaelRogers wants to merge 1 commit into
Open
IshmaelRogers wants to merge 1 commit into
IshmaelRogers wants to merge 1 commit into
Conversation
Transform the JavaScript Foundations module into a work-along workspace:
self-contained labs/<name>/{README,src,tests} and assignments/capstone, with
vitest (Node + jsdom) as the autograder. Tests are the spec; no answer keys.
- Remove LMS-duplicated content (Lesson_*, guides, flat lab/assignment briefs).
- Add root toolchain: package.json, vitest.config.ts, scripts/grade.mjs
(per-exercise score, no tsc gate), .github/workflows/autograde.yml, .gitignore.
- 12 labs + capstone: render-blocking analysis, login-form DOM wiring (jsdom),
layout audit, runtime bugs, ES6+ modernization, event loop + async, Map/Set
optimization, binary search/memoize/debounce, fetch error handling, curl
timing attribution, layout-trigger/batched-render, and an integrated capstone.
- 81 tests; verified stubs RED (16/81) and reference solution 100% GREEN.
Forge SWEXP — Module 03 autogradeScore: 16/81 tests (20%)
Keep going — open each exercise folder, implement the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Converts Module 03 (Web Platform: JavaScript Foundations) from an LMS content dump into an
interactive, autograded starter workspace, mirroring the approved Module 04 reference template.
Learners open an exercise, read its
README.md, implement the// TODOs insrc/, run the tests, andpush — the Autograde GitHub Action reports a per-exercise score and comments it on the PR.
Structure
package.json(vitest + jsdom, ES modules, plain.js),vitest.config.ts(Node default; DOM labs opt into
jsdomper-file),scripts/grade.mjs(groups results by exercisefolder under
labs//assignments/; no tsc gate —typeGate = { ok: true }, the tests are the gate),.github/workflows/autograde.yml,.gitignore, rewritten rootREADME.md, refreshed.devcontainer.Lesson_*.md,LEARNER_GUIDE.md,MODULE_SYLLABUS.md, flatlabs/*.md+labs/README.md,assignments/README.md, and the flatcapstone-brief.md(folded intoassignments/capstone/README.md). Keptresources/,.devcontainer/, and both*submission-template*.mdfiles.src/is starter code with// TODOs; eachtests/is the spec.Exercises (13 folders)
labs/lab-00-environmentanalyzeResource— classify a Network entry, render-blocking + transfer sizelabs/lab-01-page-loadfirstPaintBlockers/criticalPathover a resource listlabs/lab-02-login-formvalidate+initLoginForm(jsdom: selector/passing/preventDefault)labs/lab-03-layoutauditLayout— flag the four box-model bugs from CSS declarationslabs/lab-04-js-runtimevarloop-capture / shared state /thislabs/lab-05-modernize||vs??trap)labs/lab-06-async-eventloopeventLoopOrder; callbacks →async/await;chunkyieldslabs/lab-07-data-structuresjoinFast(Map) +dedupFast(Set), matched against the slow versionslabs/lab-08-searchbinarySearch+memoize+debounce(fake timers)labs/lab-09-http-restfetchclient that treats 4xx/5xx as success (stubbed fetch)labs/lab-10-dns-tcpparseCurlTiming+attributeSlownessto a layerlabs/lab-11-renderinglayoutTriggersguard + batched-read/writescheduleUpdatesassignments/capstoneHarness & dependencies
^2.1.8+ jsdom^25.0.1(dev only). Plain.jsES modules with JSDoc — no TypeScript,so the tsc type gate from Module 04's grader is dropped and the tests are the sole gate.
Verification
node scripts/grade.mjs→ 16/81 tests (20%), exit 1, every exercise ❌.(A handful of stub defaults coincidentally satisfy negative/empty-case assertions; the suite is RED overall.)
// TODOin a throwaway copy outside the repo →81/81 tests (100%), exit 0, all 13 exercises ✅. Temp copy deleted; no solutions are in this branch.
Honest notes on autogradability
These labs are DevTools/browser-investigation heavy (Network waterfalls, Performance traces, box-model
overlays,
dig/ping/traceroute). Those hands-on steps can't be autograded, so each lab distills itsautogradable core — a pure function or jsdom-assertable DOM behaviour — and the README directs the
remaining investigative deliverables to the LMS notebook. The most investigation-bound labs (00, 01, 03,
10) are graded on the reasoning artifact (classify a resource, list blockers, audit declarations, parse
and attribute curl timings) rather than live tool output. Every folder still has a README, real starter
src/, and at least five passing tests.