# TESTER CAP — opening-day amendment (2026-11-04, owner's order during the opening) "Put a 3-message limit for testers so they don't consume all the AI." Implemented CLIENT-SIDE in `site/index.html` (the staged set in this folder was patched in place before the opening deploy; production deployment dpl_7hkAfiCFamqsFnipnRciPwvDkaua serves exactly this file, 117,778 B). ## Where it lives - Counter + gate inside `brainFetch` (the single function every AI conversation reply flows through): helpers `aiMsgCount / aiMsgBump / aiCapHit / aiCappedReply`, `AI_TESTER_LIMIT = 3`, `AI_PAUSE_TEXT`. - Count stored in `sessionStorage` key `ava_ai_msgs` (per browser session; in-memory fallback). Every SUCCESSFUL brain chat reply bumps it — Talk with Ava turns, scenario-chat replies (including the scenario opener) and live-conversation replies all share one counter. - At cap, `brainFetch` resolves locally with the pause text and `capped: true` — no fetch is made. Surfaces were also patched so a capped reply is never spoken through an AI TTS route: - scenario chat: `speak(main)` skipped when `j.capped`; - live: pause shown as a caption, session stopped (`liveStop(false)`); `liveStart` itself refuses with the pause text when already capped; - Talk with Ava: pause rendered as Ava's turn, `speakReply` skipped, session stopped (`stopAll()`); `startSession` refuses when capped. - NOT capped: lessons, drills, all static content (no AI calls), and the Live Translator tool (translation, not a conversation surface). - Brain side unchanged: no server-side counter was added (the brain was redeployed byte-identical for the env flip only). ## Verification (2026-11-04) - Node harness ran the real patched `brainFetch` with a counting fetch stub: calls 1–3 each made exactly 1 model call and returned real replies; calls 4–5 made ZERO fetch calls and returned the capped pause text. Counter in storage read back as 3. - Live page serves `AI_TESTER_LIMIT` / `aiCappedReply`; all 6 screens intact; diff vs the pre-opening live page is only the Idea-1 card + this cap. - Known residue: within a live/ava-talk voice session, the microphone slices of the single turn that first hits the cap may still be transcribed before the session stops; after that, nothing AI is called. The cap is a tester guardrail, not a security boundary — a new browser session resets the counter.