Skip to content

KAI-VORAL-TPN-001 — Test Plan

Template ID: TPL-07-01 | Stage: 07-Test-and-Validate | Version: 0.3
Status: Project record created from the controlled template.

Purpose: Plan how the release candidate will be verified: scope, levels, environments, data, cases, thresholds and exit criteria.

Required inputs: SRS; RTM; quality and validation plan; risk register.

Document control

Field Required entry
Document ID KAI-VORAL-TPN-001
Template used TPL-07-01 Test Plan v0.3
Product / project / software version or commit SHA VORAL (Visionary Oral) / PRJ-001 / a6b4429e3165 (branch app_dev of AI-Dental-Project/Visionary_Oral)
Record status and version Draft v0.1
Author / technical reviewer / quality reviewer Claude Code (drafted with Claude Code for KrinosAI) / Tech Lead (name to be assigned) / Security & Privacy Officer (name to be assigned)
Created / updated / approved dates 2026-10-28 / 2026-10-28 / Pending
Applicable SOP and revision SOP-LC-07 v0.3
Related issue, commit, requirement and evidence links KAI-VORAL-SRS-001; KAI-VORAL-RTM-001; KAI-VORAL-QVP-001; docs/lifecycle/_evidence/test-run-a6b4429.md
Approver and decision record Pending

Applicability and evidence baseline

Product / system boundary: Web app and API (dentalapp/), doctor/admin mobile app (mobile/), on-device models (mobile/assets/models/), PDF Lambda (dentalapp/pdf-lambda/) at a6b4429e3165, and the external services they call. Related approved requirements, risks and change records: None approved. Related drafts are listed in document control. Retrospective record? Yes — follows the Retrospective Documentation Protocol (KrinosAI lifecycle pack, 05-References/). Items are labelled Observed (code or Git at a6b4429), Measured (dated run), Stated (named person, dated) or Not recorded. Test records describe the tests that exist at a6b4429 and the one run made on 2026-10-28. No earlier test runs, test plans or sign-offs were recorded; tests for untested requirements are planned, not run. Acceptable evidence: an implementation reference (file:line at a commit SHA), a dated test record, a signed decision, a vendor agreement, or another independently verifiable artifact. Never invent approvals, clinical results, measurements or performance data.

1. System baseline and traceability

Item Entry
Build under test Commit a6b4429e3165 on app_dev; mobile app version 1.0.0 (mobile/package.json:3), web app 0.1.0 (dentalapp/package.json:3), model bundle 0.1.0-poc (mobile/ml/model-manifest.json)
Requirements baseline KAI-VORAL-SRS-001 REQ-001 to REQ-036 (draft)
Traceability Every requirement is linked to at least one test case in KAI-VORAL-TC-001; links copied to KAI-VORAL-RTM-001 §4–§5
Test cases TC-001 to TC-014 automated (mobile Jest suite); TC-101 to TC-119 planned, not run

2. Test levels and responsibilities

Level Scope Owner
Unit — mobile 21 Jest test files in mobile/src/**/__tests__/ (Observed) Mobile developer
Unit / integration — web None: dentalapp/ has no tests and no test script (OPEN-027) Backend Lead
API contract KAI-VORAL-ACT-001; no OpenAPI file or contract tests yet (OPEN-036) Backend Lead
System / manual TC-101 to TC-118 in a staging environment (OPEN-040) Tech Lead
Security TC-115 to TC-117, then an external penetration test after WP-02 Security & Privacy Officer
Clinical validation KAI-VORAL-VAL-001 (OPEN-011) Clinical advisor with ML Lead
User acceptance KAI-VORAL-UAT-001 (OPEN-045) Product Owner

3. Environment configuration and data control

Item Entry
Unit test runtime Node v24.20.0, Jest 29.7.0, config mobile/package.json:66 (Measured 2026-10-28)
Network Unit tests mock all network calls; no production service is called
Test data Synthetic only. Sample photos mobile/ml/sample-images/ (front, upper, lower) — their origin and consent are not recorded (OPEN-044)
Staging environment None exists (OPEN-040); system tests need one with test accounts and synthetic patients
Production data Never used for testing; committed backups (OPEN-008) must not be used as test data

4. Positive negative boundary security cases

Category Count Examples
Automated unit tests (positive, negative and boundary together) 201 Positive: "accepts a centred, well-covered, sharp photo"; negative: "an invalid address is rejected"; boundary: "keeps both boxes when overlap is right at the boundary (iou == threshold)"
Security tests 0 run; 3 planned (TC-115 to TC-117) Unauthenticated call to each of the 20 routes in docs/lifecycle/_evidence/api-inventory-a6b4429.md
Clinical tests 0 run; 1 planned (TC-119) Detector sensitivity and specificity against dentist labels

5. Acceptance thresholds and statistical rationale

Test Threshold Rationale
Unit tests 100 % pass on the release candidate Any failure is a regression
API authentication (TC-115) 20 of 20 routes refuse calls without a session, or return no personal data if public by design REQ-034; OPEN-026
Detector performance (TC-119) Proposed (Claude Code, for confirmation): sensitivity ≥ 0.80 and specificity ≥ 0.80 per finding, lower 95 % CI bound ≥ 0.70 At least 62 positive cases per finding give a 95 % CI half-width of about 0.10 at 0.80 (Wilson); see KAI-VORAL-VAL-001 §2
Web test coverage Proposed (Claude Code, for confirmation): 70 % line coverage of new and changed code OPEN-027

6. Execution evidence defects and deviations

Item Rule
Evidence Each run is saved with date, commit, tool versions and totals (first run: docs/lifecycle/_evidence/test-run-a6b4429.md)
Defects Every failure or confirmed defect gets a BUG ID in KAI-VORAL-BUG-001
Deviations Recorded in KAI-VORAL-VER-001 §4 with the reviewer's decision

7. Exit criteria and signoff

Criterion Target
Requirements with a passing test All Must requirements (currently 10 of 23)
Open critical or high defects 0 (currently 3 critical: BUG-001 to BUG-003)
Dependency audit 0 critical, 0 high (currently 5 critical — OPEN-037)
Clinical validation and UAT Accepted (not started — OPEN-011, OPEN-045)

Open issues and decisions

ID Specific gap or decision Responsible owner Due date Blocks gate? Evidence required Status
OPEN-001 Tracker project ID, named requester and sponsor, and named reviewers are not recorded Product Owner 2026-11-10 (proposed) Yes Tracker entry; names with roles Open
OPEN-008 Database backups with personal data committed to Git: 9 files under dentalapp/backups/ (commit 92a4b77; contents not opened) Security & Privacy Officer 2026-10-31 (proposed) Yes Files purged from history; breach/incident assessment recorded Open
OPEN-011 No clinical validation Clinical advisor with ML Lead 2026-12-15 (proposed) Yes Validation study Open
OPEN-026 Critical: 20 API routes have no authentication check, incl. /api/admin/patient-sample (patient emails) and /api/admin/api-usage (doctor names and emails), support tickets/messages, and paid AI routes (/api/detect-gemini, /api/speech-to-text, /api/validate-scan) — see docs/lifecycle/_evidence/api-inventory-a6b4429.md Backend Lead 2026-10-31 (proposed) Yes Auth added to each route; re-run of the inventory shows none unprotected Open
OPEN-027 The web app (dentalapp/) has no automated tests and no test script Tech Lead 2026-12-15 (proposed) Yes Test suite and CI run for the web app Open
OPEN-036 No OpenAPI specification and no contract tests for the 75 API route files Backend Lead 2026-12-15 (proposed) No OpenAPI file and contract tests in CI Open
OPEN-037 Known vulnerable dependencies (npm audit 2026-10-27 16:50 UTC): web 4 critical (incl. next, @clerk/nextjs), 23 high; mobile 1 critical, 4 high (incl. expo) — fixes available for all Tech Lead 2026-11-15 (proposed) Yes Upgraded lock files; clean re-run of npm audit Open
OPEN-040 No staging environment or documented environment separation; which data each environment may hold is not recorded Tech Lead 2026-11-30 (proposed) No Environment record with staging and data-class rules Open
OPEN-044 Training and evaluation datasets of the five on-device models (source, rights, consent, cohort, labelling protocol, splits) are not recorded in this repository; the models were trained in the external Visionary_oral_ML repository ML Lead 2026-12-15 (proposed) Yes Completed dataset datasheet with source and rights basis Open
OPEN-045 No user acceptance testing with clinic users has been recorded Product Owner 2026-12-15 (proposed) Yes UAT record with named participants, results and decision Open

Review and approval

Review role Named individual Decision Date Signed / controlled record
Author Claude Code (drafted with Claude Code) Draft 2026-10-28 This file at the commit that adds it
Technical reviewer Tech Lead (name to be assigned) Pending Pending Pending
Quality / regulatory reviewer (if applicable) Qualified regulatory reviewer (name to be assigned) Pending Pending Pending
Authorized approver Tech Lead (name to be assigned) Pending Pending Pending