cd /news/ai-safety/testing-what-users-see-when-an-ai-sa… · home › topics › ai-safety › article
[ARTICLE · art-170093] src=dev.to ↗ pub= topic=ai-safety verified=true sentiment=↑ positive

Testing what users see when an AI safety check fails

A maintainer of Child AI Safety, an Apache-2.0 developer preview, built an offline test harness for Koda, an app that teaches kids how AI works, to verify what reaches the screen when a model's safety check fails after a draft already exists. The harness runs without API keys using simulated providers and exercises four paths — approved answer, refusal, support response, and a simulated detector outage — asserting that the fallback message renders and no part of the held draft is emitted, including in streaming event sequences. The project is soliciting a first contribution in issue #8 for a runnable example of local counting of approved and unavailable requests at the gateway.

by read1 min views1 publishedNov 15, 2026

When we built Koda, an app that teaches kids how AI works, we had a question that a normal answer-quality eval couldn't settle. If the model has a draft ready and the safety check fails, what actually reaches the screen?

We built an offline test around that boundary. The application holds the draft while checking it alongside the original question. The gateway rechecks permission before it delivers an approved answer. If the detector is unavailable, the application can display a predefined message without showing the draft.

With Node.js 22 or later, run:

git clone https://github.com/SamSquareAI/child-ai-safety.git
cd child-ai-safety
npm ci --ignore-scripts
npm run --silent demo

The demo uses invented prompts and simulated providers. It runs without API keys. The terminal shows four paths: an approved answer, a refusal, a support response, and a simulated detector outage. In the outage case, the learner-facing message says Koda can't answer right now and suggests trying a learning question later.

Run the test through the same delivery path your UI uses. Make the safety adapter return unavailable after a draft exists. Assert that the application renders the fallback and that no part of the draft was emitted. In a streaming app, that means checking the entire event sequence, including chunks sent before the final message. Test an ordinary approved answer too, so you know both paths work.

I help maintain Child AI Safety, the Apache-2.0 developer preview that came out of this work. If you'd like a small first contribution, issue #8 asks for a runnable example showing how the gateway counts approved and unavailable requests locally.

Drafted with AI and checked against the repository's offline demo.

── more in #ai-safety 4 stories · sorted by recency
── more on @child ai safety 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/testing-what-users-s…] indexed:0 read:1min 2026-11-15 · —