Test suite verification report (1.7.4)¶
Independent behavioral audit of LessonKit’s test suite after the 1.7.4 version alignment. Production code and tests were treated as potentially sharing incorrect assumptions; expectations were anchored in docs/contracts (IDENTITY, packaging/export parity, CHANGELOG 1.7.x, xAPI reference) rather than mirroring implementation.
Executive summary¶
Overall confidence: Moderate → High-Moderate
The suite already had strong anchors for recent 1.7.3 regressions (autoCheck stale pass, resume replay helpers) and solid xAPI transport/idempotency coverage. Follow-up gap-fill closed the highest-priority holes called out in the initial audit: Quiz/KnowledgeCheck/FillInTheBlanks/DragAndDrop resume-replay contracts, xAPI/cmi5 artifact IRI asserts, SCORM score fields, compound assertion tightening, and extracting ThemeProvider behavior from coverage theater.
Remaining gaps are mostly tooling (mutation testing) and breadth (more blocks / resume-across-export e2e), not core contract blindness.
Verification gates actually run¶
Gate |
Result |
|---|---|
|
Pass (initial audit) |
|
Pass (initial audit) |
|
Pass |
|
Pass (initial audit) |
|
Pass (initial + gap-fill |
Targeted react/cli unit suites for gap-fill |
Pass |
|
Pass |
Incorrect tests¶
Finding |
Why incorrect |
Resolution |
|---|---|---|
|
Would stay green if packaged assessments never marked complete |
Assert LXPack nav |
First strengthened attempt used React |
Shared hallucination that Vite and packaged shells share the same DOM contract |
Corrected to packaged-shell checkmarks; documented in fixture comment |
Weak tests (remaining / partially addressed)¶
packages/react/test/compound.test.tsx— ~35 high-value presence checks tightened to exact text/testid content; a fewsessionStorageraw truthiness checks remain.coverage-full.*(react/cli/lxpack) — ThemeProvider system-mode extracted totheme-system-mode.test.tsx; remaining grab-bag still exists for provider/telemetry edges.Example/template
App.test.tsx— smoke-only by design; not treated as behavioral confidence.Integration descriptor parity — still regex-scrapes source for IDs; strengthened earlier with
ID_PATTERN.
Tests rewritten¶
Resume replay assertions require event payloads (
correct,score,maxScore/ quizchoice).CLI SCORM / xAPI / cmi5 packaging unpacks XML and asserts launch + identity/activity content.
Integration
assertXapiZip/assertCmi5Zipoptionally require golden activity IRI.SCORM e2e asserts
cmi.core.score.rawis present and > 0 (not onlylesson_status).Compound navigation/branching UI asserts exact copy instead of
toBeTruthy.
Tests added¶
Test |
Why it increases confidence |
|---|---|
|
Quiz, KnowledgeCheck, FillInTheBlanks, DragAndDrop failed-terminal replay + GuessTheAnswer/ImagePairing + opt-out |
|
Only FIB/DTW implement |
|
Named behavioral suite extracted from coverage-full |
CLI xapi/cmi5 packaging cases |
|
Core identity / xAPI URN asserts (prior pass) |
Contract alignment independent of implementation literals |
Tests removed¶
ThemeProvider system-mode case removed from coverage-full.test.tsx (moved to named file). Residual coverage-full.* retained to avoid coverage cliffs; still not a primary confidence signal.
Missing coverage (remaining backlog)¶
Mutation testing — still absent; introduce Stryker (or similar) on
resumeState, scoring helpers, andtelemetryMapwhen maintainers want CI cost.Resume across export targets (e2e) — packaged shell resume/replay not covered in Playwright.
Further
coverage-fullsplits — provider/telemetry edges can become named suites incrementally.Remaining compound
sessionStoragetruthiness — prefer parsed JSON shape asserts.Broader resume matrix — remaining Tier C/D assessment blocks without failed-terminal contract tests.
Closed from prior “highest priority remaining”¶
~~autoCheck inventory~~ —
autocheck-inventory.test.ts~~Resume replay matrix (Quiz/KC/FIB/DnD)~~ — expanded contract file
~~Packaging artifact content (cmi5/xapi)~~ — CLI + integration IRI asserts
~~Partial coverage-full split~~ — ThemeProvider extracted
~~E2E SCORM score fields~~ — parity + scorm12 launch
AI failure patterns found¶
Shared hallucination: Vite React feedback DOM assumed identical to LXPack packaged shell.
Weak assertions:
toBeTruthy/ event-name-only / unconditionaltrueafter “happy path” helpers.Coverage theater: large
coverage-fullfiles named for metrics, not behavior.Circular validation: descriptor→interchange→validate against same transform (mitigated with fixed expected shape).
String/regex parity: source scrapes as packaging confidence (mitigated with identity pattern + artifact XML checks).
Confidence assessment¶
Behavioral confidence is High-Moderate for the audited contracts (resume replay, packaging XML, identity/xAPI URNs, SCORM completion+score, autoCheck scope).
It is not yet High overall until mutation testing and broader block/e2e resume coverage land.