[demo] Home: discovery task crashes on search_profiles.yaml before DEMO_MODE guard fires #21

Closed
opened 2026-03-17 07:01:17 -07:00 by pyr0ball · 0 comments
Owner

Bug

Surfaced by E2E smoke harness (2026-03-17).

The Home page renders a persistent "Discovery failed: [Errno 2] No such file or directory: /app/config/search_profiles.yaml" error because the demo container has no search_profiles.yaml, and task_runner.py invoked discover.py (which reads it at import time) before any DEMO_MODE guard could prevent it.

The failed task row persisted in background_tasks across container restarts, so the error displayed on every page load.

Fix applied

  • scripts/task_runner.py: added DEMO_MODE guard at the top of the discovery branch — returns friendly "Discovery is disabled in the public demo" error immediately without importing discover.py.
  • Cleaned stale failed rows from demo/data/staging.db.

Commit

5d14542 — feat(e2e): add smoke + interaction tests; fix two demo mode errors

Status

Fixed and verified. Smoke test passes clean.

## Bug Surfaced by E2E smoke harness (2026-03-17). The Home page renders a persistent "Discovery failed: [Errno 2] No such file or directory: /app/config/search_profiles.yaml" error because the demo container has no `search_profiles.yaml`, and `task_runner.py` invoked `discover.py` (which reads it at import time) before any DEMO_MODE guard could prevent it. The failed task row persisted in `background_tasks` across container restarts, so the error displayed on every page load. ## Fix applied - `scripts/task_runner.py`: added DEMO_MODE guard at the top of the `discovery` branch — returns friendly "Discovery is disabled in the public demo" error immediately without importing `discover.py`. - Cleaned stale `failed` rows from `demo/data/staging.db`. ## Commit `5d14542` — feat(e2e): add smoke + interaction tests; fix two demo mode errors ## Status Fixed and verified. Smoke test passes clean.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#21
No description provided.