Skip to content

Guard onboarding registration in podcast-only demo mode#444

Open
AJaySi wants to merge 1 commit intomainfrom
codex/guard-onboarding-manager-and-endpoints
Open

Guard onboarding registration in podcast-only demo mode#444
AJaySi wants to merge 1 commit intomainfrom
codex/guard-onboarding-manager-and-endpoints

Conversation

@AJaySi
Copy link
Copy Markdown
Owner

@AJaySi AJaySi commented Mar 30, 2026

Motivation

  • Provide a safe demo mode that disables onboarding behavior for podcast-only demos while keeping onboarding code present for full environments.
  • Prevent frontend probe failures by returning a lightweight controlled response when onboarding is intentionally disabled.

Description

  • Add PODCAST_ONLY_DEMO_MODE (env-driven truthy parsing) in backend/app.py to control demo behavior at startup.
  • Replace unconditional OnboardingManager(app) with a guarded initialization that sets onboarding_manager = None and only creates OnboardingManager(app) when PODCAST_ONLY_DEMO_MODE is false.
  • Keep the /api/onboarding/status endpoint available and return a fixed demo payload when PODCAST_ONLY_DEMO_MODE is enabled to avoid client errors ({"enabled": false, "status": "disabled", "message": "Onboarding is disabled for podcast-only demo mode.", "demo_mode": "podcast_only"}).
  • Do not remove or delete onboarding modules; only bypass runtime registration so full functionality returns when the flag is off.

Testing

  • Ran python -m py_compile backend/app.py which completed successfully (no syntax errors).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant