AI features test report

ClassPad AI features in production: real-database tests, evaluation set and walkthroughs

Generated on 2026-10-12 13:34 · 20261012-133409.json · 20261012-081448

Summary:31 passed, 0 failed, 1 skipped; evaluation gpt-6.1-sol 32/32;gpt-6-astra 32/32;gpt-6-luna 29/32

1. Real-database end-to-end and unit tests

Each test starts by listing the ways it could fail and turns each into a case; for new features the implementation is deliberately broken to confirm the test catches it. The database is a real PostgreSQL.

TestFailure modesResultTime (s)
AI settings: switches, providers, tiers, caps
consoleapi.TestAISettingsHTTP
8Pass0.6
Gateway: never calls a model when switched off
aigw.TestGatesNeverCallModel
4Pass0.5
Gateway: only routes to usable providers
aigw.TestRoutesOnlyUsableProviders
4Pass0.5
Gateway: hosted model access and monthly cap
aigw.TestHostedGate
4Pass0.4
Gateway: failover and circuit breaker
aigw.TestFailoverAndBreaker
4Pass0.6
Gateway: accounting and daily/monthly caps
aigw.TestAccountingAndCaps
3Pass0.6
Gateway: redaction of sensitive data
aigw.TestRedaction
3Pass0.5
Gateway: key encryption and deletion
aigw.TestKeysAndDelete
3Pass0.5
Gateway: both protocols and tool calls
aigw.TestProtocolsToolCalls
3Pass0.4
Ask about devices
consoleapi.TestAIQueryHTTP
6Pass0.6
Explain anything
consoleapi.TestAIExplainHTTP
8Pass0.6
Explain: known-issue matching
aiexplain.TestContainsKey
3Pass0.0
One-click diagnosis
consoleapi.TestAIDiagnoseHTTP
4Pass0.6
Policy from one sentence
consoleapi.TestPolicyAIDraftHTTP
7Pass0.5
Policy draft: only real restriction items
aidraft.TestSwitchesAreRealRestrictions
9Pass0.0
Policy draft: conversion and removals
aidraft.TestConvert
9Pass0.0
Risk review: rule checks
consoleapi.TestPolicyRiskCheckHTTP
7Pass0.5
Risk review: AI second opinion
consoleapi.TestPolicyRiskReviewHTTP
6Pass0.5
Weekly report and AI summary
consoleapi.TestWeeklyReportHTTP
8Pass0.5
Class assistant
consoleapi.TestClassAIDraftHTTP
5Pass0.5
Class assistant: plan checks
aiclass.TestCheck
7Pass0.0
Class assistant: call and data sent
aiclass.TestAsk
7Pass0.0
App check
consoleapi.TestAppCheckE2E
5Pass0.6
App check: risk rules
appcheck.TestEvaluate
9Pass0.0
App check: reading the installer
appcheck.TestScanZip
9Pass0.0
App check: real installers
consoleapi.TestAppCheckRealAPKs
—Skipped (needs real installers on the test machine)0.0
MCP server
consoleapi.TestMCPHTTP
8Pass0.6
Follow the latest model
consoleapi.TestAIFollowHTTP
10Pass0.9
Follow latest: product lines and candidates
aifollow.TestCandidate
6Pass0.0
Follow latest: switch and revert rules
aifollow.TestVerdictAndDegraded
6Pass0.0
Evaluation set: complete, unique, scored
aieval.TestBuiltinSet
4Pass0.0
Evaluation set: unrun questions count as failed
aieval.TestSummarizeCountsUnrun
4Pass0.0

2. Evaluation set (model exam)

Questions come from real incidents and design limits. Scoring checks only verifiable properties: key points covered, no forbidden wording, all three headings present, drafted plans and policy items as expected. A new model must pass before it goes live.

ModelPassedAverage time (s)Failed questions
gpt-6.1-sol32 / 324.4—
gpt-6-astra32 / 324.9—
gpt-6-luna29 / 322.2alert-battery, appcheck-ads-zh, draft/wifi-trap-zh

A model that does not pass everything is not assigned to the features that need it; which model each tier actually uses is set in the school's AI settings (the fast-tier gpt-6-luna is currently used only for brand translation).

3. Walkthroughs (real models)

ScriptWhat was verified
tools/walk/ai_settings.mjsAdd a provider, fetch models, test, set tiers, turn on; the key shows as *** in the audit log
tools/walk/policy_ai_draft.mjsDraft a policy from one sentence; an app not installed and “turn off Wi-Fi” are removed with a note; saved after the risk check
tools/walk/app_check.mjsApp check on a real installer; findings show component names; AI advice in three parts
tools/walk/class_ai.mjsDraft a lesson from one sentence: survey app pinned, 20 minutes, camera; what cannot be done is stated; no class started
tools/walk/mcp.mjsThe token page gives the connection command; a factory reset from an external AI only creates a pending request the requester cannot confirm
tools/walk/ai_follow.mjsAfter real exams the standard and reasoning tiers switched to newer versions; Revert restored them at once