Cross references:
- Extension README (Markdown):
../../README.md - Bot docs bridge page (Markdown):
../../docs/telegram-bot.md - Bot docs page (GitHub Pages): https://apartsinprojects.github.io/Web2Comics/HTML/telegram-bot.html
Scope note:
- Test flows here target public user behavior and deployment reliability.
- Admin-only bot commands are intentionally excluded from published docs.
- Onboarding/info:
/start,/welcome,/help,/about,/version,/user,/config,/explain,/debug - Generation: text, URL, PDF, image, and voice/audio input,
/invent <story>,/random,/peek,/peek<n> - Providers/models:
/vendors,/vendor,/text_vendor,/image_vendor,/models,/test - Controls:
/panels,/objective,/objectives, objective shortcuts,/style, style shortcuts,/new_style,/language,/mode,/consistency,/detail,/crazyness,/concurrency,/retries - Prompt/options:
/prompts,/set_prompt,/list_options,/options - Credentials/state:
/keys,/setkey,/unsetkey,/reset_config,/restart
This document covers local, integration, and remote validation for the Render webhook bot.
Run core local checks:
npm run test:telegram:localRun full render test suite:
npm run test:telegram- Interaction command matrix:
npx vitest run -c telegram/vitest.config.js telegram/tests/interaction-suite.test.js- Webhook REST behavior:
npx vitest run -c telegram/vitest.config.js telegram/tests/webhook-rest.test.js- Generator behavior:
npx vitest run -c telegram/vitest.config.js telegram/tests/generate.test.js- Telegram payload behavior (forwardable messages/photos):
npx vitest run -c telegram/vitest.config.js telegram/tests/telegram-api.test.jsGemini live tests:
set RUN_RENDER_REAL_GEMINI=1
npm run test:telegram:gemini-realReal local URL ingestion e2e (opt-in):
set RUN_RENDER_REAL_GEMINI=1
set RUN_WEBHOOK_URL_REAL=true
npx vitest run -c telegram/vitest.config.js telegram/tests/webhook-url-real.e2e.test.jsRequires valid R2_* env vars.
set RUN_R2_E2E=true
npm run test:telegram:r2-realRun the lightweight deploy sanity probe manually:
npm run telegram:deploy:sanityThis is executed automatically by npm run bot:deploy:auto unless --skip-sanity is set.
Requires deployed bot URL and Telegram test routing values.
set RUN_FULL_STACK_E2E=true
npm run test:telegram:full-stackValidated interfaces include:
- service health endpoint
- webhook ingestion path and secret handling
- Telegram outbound API calls
- R2 request logs and generated image objects
- crash log observability
- Per-user queueing and no dropped updates
- Text, URL, PDF, image, and voice/audio flows
- Streaming panel delivery (panels sent as ready)
- Caption prefix format
X(Y)on each panel - Story-summary context present in image prompts (engine prompt builder test)
- Panel image prompt field names are
BackgroundandImage description(noStory titleline) - URL flow prints exact parsed URL before extraction
- Panel watermark toggle works (
generation.panel_watermark, default on) - Consistency toggle works (
/consistency on|off) and unsupported models fall back safely - Prompt controls (
/options, dedicated setting commands) /crazynesscommand updates story invention temperature- Objective listing with
/objective(no args) - Secret redaction in user-visible messages
Workflow:
.github/workflows/bot-tests.yml
Before tests run, CI enforces secret checks:
npm run secrets:validate:tests:ci