feat: convert Module 08 into interactive autograded workspace - #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
Replace the lesson/lab markdown with a bats-based starter workspace where students author infrastructure-as-code (Dockerfiles, docker-compose, a CI workflow, and k8s manifests) and an autograder checks each artifact. - Reuse the Module 01 bats harness: scripts/grade.mjs (auto-discovers labs/ + assignments/ exercise folders, parses TAP, shell-syntax gate), Autograde workflow, package.json, .gitignore. - Harden the syntax gate with nullglob so labs without a solution.sh are tolerated (most author a Dockerfile/compose/manifest instead). - Grading is fast and mostly Docker-free: Dockerfiles via static grep/awk lint; compose/CI/k8s YAML parsed with python3; shell scripts run under bats. Exactly one tiny real alpine 'docker build' (lab-02) proves an image actually builds. - 9 labs (lab-00..lab-08) + an integrating capstone; 59 tests total. - Keeps resources/, .devcontainer/, and submission templates. Verified: stub workspace scores 12% (RED, exit 1); a reference solution scores 100% (GREEN, exit 0) with the real docker build passing.
Forge SWEXP — Module 08 autogradeScore: 7/59 tests (12%) · Shell syntax: ✅ clean
Keep going — open each exercise folder, complete 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 SWEXP Module 08 (Platform Engineering & Containerization) from a set of
lesson/lab markdown files into an interactive, autograded starter workspace, using the
same bats harness proven on Module 01.
Students no longer read lessons here — they author infrastructure-as-code (Dockerfiles,
docker-compose.yml, a CI workflow, k8s manifests) into starter files with# TODOs, and anautograder scores each artifact. The conceptual lessons live in the LMS;
resources/,.devcontainer/, and the submission templates are kept.Grading model (fast, deterministic, mostly Docker-free)
grep/awklint (pinned base, non-rootUSER,HEALTHCHECK,multi-stage, cache-ordered layers,
--omit=dev, no baked secrets, complete.dockerignore).python3(PyYAML) and policy-checked (services,health-gated
depends_on, named volume, network segmentation/reachability, ordered CIgates,
deploy needs build, SHA-image promotion, replicas/probes/limits/secretRef).bats(the monorepo boundary check).docker buildof a tinyalpineimage (lab-02) that must build and printforge-up— the only build in the whole module, so grading stays fast and reliable.Harness
Reuses Module 01's
scripts/grade.mjs(auto-discovers exercise folders underlabs/andassignments/, parses TAP, runs thebash -nsyntax gate), the Autograde GitHub Action,package.json, and.gitignore. The syntax gate is hardened withnullglobso labs thatship no
solution.sh(most of them) don't break the glob. The workflow and dev containerensure PyYAML is present for the YAML graders.
Exercises (10 folders, 59 tests)
labs/lab-00-setupconfig.yml+Dockerfilelabs/lab-01-monoreposolution.shlabs/lab-02-dockerfileDockerfile+.dockerignore+ tiny buildlabs/lab-03-composedocker-compose.ymllabs/lab-04-devcontainerpackage.json+devcontainer.json+ lockfilelabs/lab-05-prod-imageDockerfilelabs/lab-06-networkingdocker-compose.ymllabs/lab-07-cici.ymllabs/lab-08-productiondeployment.yml(Deployment + Service)assignments/capstoneplatform/+solution.shVerification
100% (GREEN), exit 0, shell syntax clean, including the real lab-02
docker build.