Commit graph

2 commits

Author SHA1 Message Date
Viktor Barzin
b4e1c5cd12 fix(scripts): kevin-analyze + reanalyze — self-contained + append-only
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Two small follow-ups from the session:

- kevin-analyze.sh: always cp the local analyze_kevin_video.py into
  the pod before exec, so the wrapper works even before CI ships an
  image with scripts/ baked in (saw this hit the user with
  ModuleNotFoundError on stale images).

- reanalyze_kevin_videos.py: switch from DELETE+INSERT to
  append-only. The old behaviour violated the FK constraint on
  kevin_signal_bridge_state.mention_id; the new behaviour adds a
  fresh v2 analysis alongside the v1 row and lets the API surface
  the latest. Old v1 rows preserved for audit.
2026-05-28 22:55:14 +00:00
Viktor Barzin
a93cb06898 feat(scripts): ad-hoc Meet Kevin video analyzer CLI
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
Given a YouTube video ID or URL, runs the same caption-extraction +
LLM-analysis pipeline the watcher uses in prod, then prints the
extracted tickers + actions sorted by action priority and conviction
descending. No DB writes, no Redis publish — strictly observational.

Two entry points:
  - scripts/analyze_kevin_video.py — pure Python; needs yt-dlp +
    Anthropic OAuth token in env. Local laptop yt-dlp tends to hit
    "Sign in to confirm you're not a bot" rate-limits; running inside
    a cluster pod avoids this.
  - scripts/kevin-analyze.sh — wrapper that finds the running
    trading-bot-workers pod and execs the Python script in the
    meet-kevin-watcher container. Easiest invocation.

Example:
  $ ./scripts/kevin-analyze.sh poUJIZRmFew
  === Meet Kevin analysis — poUJIZRmFew ===
    Market outlook: bullish
    TICKERS (12):
      SYMBOL   ACTION    CONV HORIZON     RATIONALE
      APPF     buy      85.0% long_term   Apploven's looking fantastic ...
      SOX      buy      80.0% months      Semiconductor ETF momentum ...
      ...
2026-05-27 12:05:59 +00:00