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
@@ -89,7 +89,10 @@ async function main() {
const plannedWithModules = structure.filter((c) => c.status === 'planned' && c.modules.length > 0);
assert.equal(plannedWithModules.length, 0, 'a PLANNED course must have zero modules, not placeholder content');
const gold = courseById(structure, 'root-10-kubernetes-troubleshooting-observability');
assert.equal(gold.status, 'partial'); // real content (gold module) alongside un-authored modules
// Phase 6F gave root-10-m02 (the bare practice bank) real framing (docs/
// PHASE6F_ROOT_V1_PILOT_READINESS.md), so all three modules are now genuinely authored and
// the course honestly earns 'ready' — no fabrication, just a real content-completeness fix.
assert.equal(gold.status, 'ready');
});
await test('the gold-standard module is fully READY with 7 ordered activities and real content', async () => {
@@ -143,10 +146,12 @@ async function main() {
// sequenced before ROOT 05 — it is now genuinely the program's front door, not ROOT 05's
// own gold module (see docs/PHASE6D_ROOT_FOUNDATIONS.md). This test's original intent —
// "resume lands on the first REAL content, not a bare-lab bank" — is still what's being
// proven, just against the current front door.
// proven, just against the current front door. Phase 6F then added a required orientation
// module (root-01-m00-welcome-to-root) in front of that — see
// docs/PHASE6F_ROOT_V1_PILOT_READINESS.md.
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('a student cannot mark a lab activity complete manually — only real scenario completion counts', async () => {
@@ -193,6 +198,14 @@ async function main() {
await completeScenario(casey, 'rolling-update-task');
await completeScenario(casey, 'deployment-rollback');
await casey.request('POST', '/api/student/activities/root-06-m02-a06-reflection/complete');
// Phase 6F gave root-06-m01 (a bare practice bank) a real intro-lesson activity — required,
// and not part of WORKLOADS's scenario list. root-06-m01's own prerequisite is root-06-m02
// complete, so this must come after root-06-m02's reflection above, not before it — see
// docs/PHASE6F_ROOT_V1_PILOT_READINESS.md.
{
const { status } = await casey.request('POST', '/api/student/activities/root-06-m01-a00-lab-bank-intro/complete');
assert.equal(status, 200, 'completing root-06-m01-a00-lab-bank-intro should 200');
}
for (const suffix of ['a01-lesson-jobs-cronjobs-daemonsets', 'a01b-demonstration-job-lifecycle', 'a02-knowledge-check', 'a02b-guided-exercise-choosing-primitive']) {
await casey.request('POST', `/api/student/activities/root-06-m03-${suffix}/complete`);
}