Skip to content

feat: interactive autograded workspace for Module 01 (labs + capstone) - #1

Merged
IshmaelRogers merged 1 commit into
mainfrom
feat/interactive-workspace
Jul 3, 2026
Merged

IshmaelRogers merged 1 commit into
mainfrom
feat/interactive-workspace

Conversation

@IshmaelRogers

Copy link
Copy Markdown
Contributor

Interactive autograded workspace — Module 01 (Linux & Command Line)

Converts the doc-only module into a work-along starter workspace for the Forge LMS code-server. Students edit each solution.sh, run npm test, and push — the existing scripts/grade.mjs autograder (unchanged) discovers every folder with a tests/ dir and posts a score to CI / the PR.

Structure

Each exercise = README.md + executable solution.sh (starter # TODOs, set -euo pipefail, no working code) + tests/<name>.bats + fixtures/ (where needed). Bats pattern matches the 3 reference labs: mktemp -d work dir, runs bash "$SOL" …, asserts effects/output.

Exercises (16 total, 49 tests)

Folder Gradable core
labs/lab-00-environment parse os-release, print PRETTY_NAME
labs/lab-01-filesystem-survey count files/dirs + largest file
labs/lab-02-file-recovery find *.log → copy into recovered/
labs/lab-03-permissions (pre-existing reference) tighten 640 + world-writable
labs/lab-04-users-groups group members from /etc/group
labs/lab-05-log-investigation busiest IP + 4xx/5xx count
labs/lab-06-pipeline (pre-existing reference) status tally + tee 5xx
labs/lab-07-dotfiles idempotent dotfile symlinks
labs/lab-08-onboarding-script (pre-existing reference) prereq + idempotent onboard
labs/lab-09-process-management top-%CPU PID from ps aux
labs/lab-10-networking listening TCP ports from ss -ltn
labs/lab-11-ssh emit ~/.ssh/config Host block
labs/lab-12-packages missing packages vs installed list
labs/lab-13-scheduling weekday-09:00 crontab line
labs/lab-14-resources filesystems over a df use% threshold
assignments/capstone integrates world-writable + disk + missing-packages health check

The full system-state work (real useradd, setgid dirs, sshd hardening, systemd timers, idempotent provision.sh) stays in the LMS box; each README points there. resources/, .devcontainer/, and the submission templates are kept.

Verification

  • Stubs (shipped): 9/49 tests (18%) → RED, exit 1, shell-syntax clean.
  • Reference solutions (implemented in a throwaway copy outside the repo, then deleted — no answer keys shipped): 49/49 tests (100%) → GREEN, exit 0, shell-syntax clean, including the 3 pre-existing reference labs.

Not fully autogradable (by design)

The labs grade a sandbox-safe core only. The real system-state outcomes — provisioning a box, creating users/setgid dirs, hardening sshd, installing packages, systemd timers, and the full CAP-9000 deliverables (provision.sh, RUNBOOK/SECURITY, v1.0-capstone tag) — are performed and reviewed in the LMS code-server, not by these bats tests.

…one)

Replace the doc-only module with a work-along starter workspace for the LMS
code-server: bats-graded labs plus a capstone, auto-discovered by the existing
scripts/grade.mjs autograder.

- 16 exercises (labs 00-14 + capstone core), each README + executable
  solution.sh starter (# TODO only, set -euo pipefail) + tests/*.bats + fixtures.
- Sandbox-safe gradable cores: parse os-release, survey a tree, recover logs,
  permissions, group membership, log investigation, pipeline, dotfiles symlinks,
  onboarding, top-CPU PID, listening ports, ssh config, missing packages, cron
  schedule, df threshold; capstone integrates world-writable + disk + packages.
- Root README rewritten as a work-along starter guide (quick start, exercises
  table, grading/submission). Resources, devcontainer, and submission templates kept.

Verified: stubs 9/49 (RED, exit 1); reference solutions 49/49 (GREEN, exit 0),
shell-syntax clean. No answer keys shipped.
@github-actions

Copy link
Copy Markdown

Forge SWEXP — Module 01 autograde

Score: 9/49 tests (18%) · Shell syntax: ✅ clean

Exercise Tests Status
labs/lab-00-environment 1/3
labs/lab-01-filesystem-survey 0/3
labs/lab-02-file-recovery 1/3
labs/lab-03-permissions 1/3
labs/lab-04-users-groups 1/3
labs/lab-05-log-investigation 1/3
labs/lab-06-pipeline 0/3
labs/lab-07-dotfiles 0/3
labs/lab-08-onboarding-script 0/3
labs/lab-09-process-management 1/3
labs/lab-10-networking 1/3
labs/lab-11-ssh 0/3
labs/lab-12-packages 1/3
labs/lab-13-scheduling 0/3
labs/lab-14-resources 1/3
assignments/capstone 0/4

Keep going — open each exercise folder, complete the # TODOs in its solution.sh, and run npm test. The tests/*.bats files are the spec.

@IshmaelRogers
IshmaelRogers merged commit 4c99e5f into main Jul 3, 2026
0 of 2 checks passed
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