KOL feeds: fix dead/blocked sources, drop stale feeds (29→25)

Feed-health pass over KOL_FEEDS:
- raoulpal: stale Substack (last 2024-05) → Real Vision podcast feed
- dampedspring: paywalled (0 entries) → free "Damped Spring 101" Substack
- unchained: Cloudflare 403 → canonical Megaphone podcast feed
- lynalden: Cloudflare 202 → FeedBurner mirror
- glassnode: recovered via httpx http2=True (was 403 on HTTP/1.1)
- browser User-Agent + Accept headers on feed fetch
- removed dead feeds with no active replacement: placeholder,
  dragonfly, niccarter, eugene
- pin h2==4.3.0 (required by http2=True)

All 25 remaining feeds verified fetching real body content; newest
post per feed ≤88d. Bundles in-flight KOL-module work already in the
working tree (kol_x ingest, migration 027, tests).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
k
2026-06-09 22:55:16 +08:00
parent 213bb911e3
commit 54884f3e24
38 changed files with 2340 additions and 322 deletions
+42 -5
View File
@@ -42,6 +42,36 @@ class TrumpPost(BaseModel):
model_config = {"from_attributes": True}
class PostFilterCounts(BaseModel):
# Count of posts matching the current non-signal filters. When the caller
# sets ai_scored_only=true this already excludes off-topic/noise rows.
all: int
actionable: int
buy: int
short: int
# Off-topic rows hidden by the "Signals only" toggle. Computed from the
# same source/sentiment scope but ignoring ai_scored_only so the toggle
# can stay visible while active.
off_topic: int
class SourceCount(BaseModel):
source: str
count: int
latest: Optional[str] = None
class PostListResponse(BaseModel):
items: list[TrumpPost]
total: int
page: int
limit: int
counts: PostFilterCounts
source_counts: list[SourceCount] = []
class Candle(BaseModel):
time: int
open: float
@@ -56,12 +86,18 @@ class BotTrade(BaseModel):
asset: str
side: str
entry_price: float
exit_price: float
pnl_usd: float
hold_seconds: int
trigger_post_id: int
# Nullable fields: None = "not yet known / externally closed / not applicable".
# Do NOT coerce to 0 — the frontend uses null to distinguish genuine zeros
# (break-even trade) from "we don't have this data yet".
exit_price: Optional[float] = None # None while still open / extern-closed
pnl_usd: Optional[float] = None # None = unsettled
hold_seconds: Optional[int] = None # None = not yet computed
trigger_post_id: Optional[int] = None # None = adopted/manual (no trigger post)
opened_at: str
closed_at: str
closed_at: Optional[str] = None # None for still-open positions returned from /user
# Optional short trigger snippet for table/list UIs. Comes from the joined
# trigger Post row when present; omitted for adopted / deleted-post trades.
trigger_post_text: Optional[str] = None
# Source tag of the originating signal (e.g. 'truth', 'breakout', 'my_strategy').
# Joined from posts.source on read; not stored on BotTrade itself.
# 'unknown' when the trigger post has been deleted or trigger_post_id is null.
@@ -152,6 +188,7 @@ class UserResponse(BaseModel):
hl_api_key_set: bool
hl_api_key_masked: Optional[str] = None
paper_mode: bool = False
auto_trade: bool = False # B50: was silently dropped, causing Settings to show ON as OFF
trades: list[BotTrade]
settings: UserSettings
# Convex-strategy: ISO-UTC timestamp until which the bot is manually armed.