test(phase6f): add V1 pilot acceptance suite; fix regression from real curriculum changes

- New platform/test/e2e-phase6f.js (17 tests): V1 manifest/exclusion correctness, the full
  V1 prerequisite graph, ROOT 01-04 re-verification, the orientation module's unlock
  behavior, optional-activity handling, the strengthened Capstone gate in both directions,
  instructor-notes RBAC on locked (not just draft) content, isolation, and an explicit
  age-independence check.
- foundations-helper.js: completeThroughRoot06/completeThroughRoot10 updated for the new
  practice-bank intro-lesson activities; new completeThroughCapstoneEligible() helper
  (ROOT 07-m03/m04 + full ROOT 09 + ROOT 12) shared by e2e-phase6f.js and both new drills.
- e2e-phase6a/6b/6d/6e.js: resume-pointer assertions updated for the new orientation
  module; e2e-phase6a.js's and e2e-phase6b.js's own inline ROOT 06/07/09/10/12 completion
  sequences updated for the new intro-lesson activities and the new root-09 Capstone
  dependency; e2e-phase6b.js's stale ROOT 09 status assertion and its draft-activity test
  (previously targeting the now fully-excluded ROOT 08) corrected.
- test-phase6d/6e-foundations-rehearsal.js: same orientation-module fix applied to the
  real-Lab dress rehearsals.

All of 6A (23/23) / 6B (26/26) / 6C (17/17) / 6D (21/21) / 6E (23/23) / 6F (17/17) verified
green on independent fresh stacks. See docs/PHASE6F_ROOT_V1_PILOT_READINESS.md.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
2026-08-26 18:33:21 -05:00
co-authored by Claude Sonnet 5
parent f695b7c95d
commit 2864fe03dc
8 changed files with 397 additions and 22 deletions
+17 -4
View File
@@ -25,7 +25,9 @@ if (!OWNER_EMAIL || !OWNER_PASSWORD) {
}
const RUN_ID = Date.now();
const PROGRAM = 'root-kubernetes-foundations';
const ROOT01_MODULES = ['root-01-m01-how-computers-run-software', 'root-01-m02-linux-and-the-shell', 'root-01-m03-navigating-the-filesystem', 'root-01-m04-files-and-text', 'root-01-m05-processes', 'root-01-m06-users-and-permissions-foundations'];
// Phase 6F prepended a required orientation module (root-01-m00-welcome-to-root) — see
// docs/PHASE6F_ROOT_V1_PILOT_READINESS.md.
const ROOT01_MODULES = ['root-01-m00-welcome-to-root', 'root-01-m01-how-computers-run-software', 'root-01-m02-linux-and-the-shell', 'root-01-m03-navigating-the-filesystem', 'root-01-m04-files-and-text', 'root-01-m05-processes', 'root-01-m06-users-and-permissions-foundations'];
const ROOT01_LAB_SCENARIOS = ['linux-inspect-hardware', 'linux-shell-basics', 'linux-filesystem-navigation', 'linux-files-and-text', 'linux-process-management', 'linux-permissions-foundations'];
let passed = 0, failed = 0;
@@ -99,11 +101,22 @@ async function main() {
// ── A real self-paced student walking ROOT 01 end to end ────────────────────────────────
const casey = await newStudent(owner, 'Casey');
await test('resume points at ROOT 01 module 1 activity 1, the very first activity in the whole program', async () => {
await test('resume points at ROOT 01 module 0 activity 1, the very first activity in the whole program', async () => {
// Phase 6F added a required orientation module (root-01-m00-welcome-to-root) in front of
// what was previously the first module — see docs/PHASE6F_ROOT_V1_PILOT_READINESS.md.
const { body } = await casey.session.request('GET', `/api/student/programs/${casey.enrollmentId}/courses`);
assert.equal(body.resume.course_id, 'root-01-computing-linux-foundations');
assert.equal(body.resume.module_id, 'root-01-m01-how-computers-run-software');
assert.equal(body.resume.activity_id, 'root-01-m01-a01-lesson');
assert.equal(body.resume.module_id, 'root-01-m00-welcome-to-root');
assert.equal(body.resume.activity_id, 'root-01-m00-a01-lesson-welcome');
});
await test('walking the ROOT_ V1 orientation module completes it and unlocks module 1', async () => {
await completeActivity(casey.session, 'root-01-m00-a01-lesson-welcome');
await completeActivity(casey.session, 'root-01-m00-a02-lesson-disposable-lab');
await completeActivity(casey.session, 'root-01-m00-a03-knowledge-check');
const { body } = await casey.session.request('GET', `/api/student/programs/${casey.enrollmentId}/courses`);
assert.equal(moduleById(body.courses, 'root-01-m00-welcome-to-root').complete, true);
assert.equal(moduleById(body.courses, 'root-01-m01-how-computers-run-software').locked, false);
});
// ── 16: direct API cannot bypass — a lab activity cannot be manually marked complete ─────