phase 14-15: docker build validation and helm deployment
This commit is contained in:
@@ -108,6 +108,41 @@ class DocumentIntelligence(BaseModel):
|
||||
|
||||
# --- Trend Summary ---
|
||||
|
||||
class MarketContext(BaseModel):
|
||||
"""Recent market data features for a symbol, used to enrich aggregation."""
|
||||
|
||||
ticker: str = ""
|
||||
price_change_pct: Optional[float] = None # % change over the window
|
||||
avg_volume: Optional[float] = None # average daily volume
|
||||
volume_change_pct: Optional[float] = None # volume vs prior period
|
||||
volatility: Optional[float] = None # intra-window price std dev
|
||||
latest_close: Optional[float] = None
|
||||
latest_bar_at: Optional[datetime] = None
|
||||
bars_available: int = 0
|
||||
|
||||
@property
|
||||
def has_data(self) -> bool:
|
||||
return self.bars_available > 0
|
||||
|
||||
|
||||
class DisagreementDetail(BaseModel):
|
||||
"""Represents an explicit disagreement between document signals.
|
||||
|
||||
Rather than collapsing contradictory signals into a single score,
|
||||
this captures the nature of the disagreement so downstream consumers
|
||||
can inspect *why* signals conflict.
|
||||
|
||||
Requirements: 6.4
|
||||
"""
|
||||
|
||||
dimension: str = "" # e.g. "sentiment", "catalyst", "impact_horizon"
|
||||
positive_doc_ids: List[str] = Field(default_factory=list)
|
||||
negative_doc_ids: List[str] = Field(default_factory=list)
|
||||
positive_weight: float = 0.0
|
||||
negative_weight: float = 0.0
|
||||
description: str = ""
|
||||
|
||||
|
||||
class TrendSummary(BaseModel):
|
||||
entity_type: str = "company"
|
||||
entity_id: str = ""
|
||||
@@ -120,6 +155,8 @@ class TrendSummary(BaseModel):
|
||||
dominant_catalysts: List[str] = Field(default_factory=list)
|
||||
material_risks: List[str] = Field(default_factory=list)
|
||||
contradiction_score: float = Field(ge=0, le=1, default=0.0)
|
||||
disagreement_details: List[DisagreementDetail] = Field(default_factory=list)
|
||||
market_context: Optional[MarketContext] = None
|
||||
generated_at: datetime = Field(default_factory=datetime.utcnow)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user