Skip to content

chore(data): local demo enrichment tooling + seeder price-history fix #297

@w7-mgfcode

Description

@w7-mgfcode

Umbrella tracking issue

Tracks the docs-PR-adjacent carryover from prior local demo work. Three buckets:

1. Seeder bug fix — app/shared/seeder/generators/facts.py

PriceHistoryGenerator could emit a price_history row with valid_to < valid_from when a price-change roll fired on the very first day of the window. That violates ck_price_history_valid_dates and crashes the seeder when ingest runs over that range. The fix skips the degenerate row entirely.

2. Local demo enrichment scripts — scripts/seed_*.py

Three new utilities for populating the local demo DB through the public API (no SQL writes):

  • seed_phase2_only.py — re-runs Phase 2 generators (replenishment, exogenous, returns, lifecycle) against existing dimensions; refuses unless DATABASE_URL resolves to localhost
  • seed_historical_activity.py — submits a varied spread of train/predict/backtest jobs across 2024-Q4 → 2026-Q1 cutoffs through /jobs so the Registry / Jobs / Forecasts dashboards have meaningful content
  • seed_registry_from_jobs.py — walks completed train jobs, runs the canonical /registry/runs pending → running → success transition + alias stamping with deterministic stub metrics

All three are demo-host tooling; production code paths unaffected.

3. Lockfile refresh — uv.lock

forecastlabai version 0.2.18 → 0.2.19 to match the release-please-merged version bump. Mirrors the prior chore: refresh uv.lock to v0.2.18 (#239) pattern.

Out of scope (intentionally excluded)

  • app/features/rag/models.py + alembic/versions/a2b3c4d5e6f7_rag_embedding_dim_2560_qwen3.py — the migration's own docstring marks it "local-only demo" (truncates document_chunk, drops the HNSW index, hardcodes 2560 for qwen3). Shipping it to dev/main would wipe OpenAI users' RAG corpora on next alembic upgrade head. Stays uncommitted locally; if upstream qwen3 support is wanted, it gets its own PRP-level discussion (target-dim from settings, non-destructive upgrade path).

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:forecastTouches the forecast area (commit-format scope)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions