feat: add Super Alpha research, management and MCP workflows
Deploy production / deploy (push) Successful in 56s
Deploy production / deploy (push) Successful in 56s
This commit is contained in:
@@ -301,6 +301,9 @@ class BacktestItem(Base):
|
||||
client_item_id: Mapped[str] = mapped_column(String(100))
|
||||
ordinal: Mapped[int] = mapped_column(Integer)
|
||||
expression: Mapped[str] = mapped_column(Text)
|
||||
alpha_type: Mapped[str] = mapped_column(String(20), default="REGULAR", server_default="REGULAR", index=True)
|
||||
selection: Mapped[str | None] = mapped_column(Text)
|
||||
combo: Mapped[str | None] = mapped_column(Text)
|
||||
settings: Mapped[dict] = mapped_column(JSON)
|
||||
fingerprint: Mapped[str] = mapped_column(String(64), index=True)
|
||||
platform_status: Mapped[str] = mapped_column(String(30), default="pending")
|
||||
@@ -322,6 +325,25 @@ class BacktestResult(Base):
|
||||
complete: Mapped[bool] = mapped_column(Boolean, default=True)
|
||||
|
||||
|
||||
class SuperSelectionSnapshot(Base):
|
||||
"""Immutable platform component evidence; previews never replace actual components."""
|
||||
|
||||
__tablename__ = "super_selection_snapshots"
|
||||
id: Mapped[str] = mapped_column(String(36), primary_key=True)
|
||||
job_id: Mapped[str | None] = mapped_column(ForeignKey("sync_jobs.id"), unique=True)
|
||||
item_id: Mapped[str | None] = mapped_column(ForeignKey("backtest_items.id"), unique=True)
|
||||
source: Mapped[str] = mapped_column(String(20))
|
||||
request: Mapped[dict] = mapped_column(JSON)
|
||||
request_hash: Mapped[str] = mapped_column(String(64), index=True)
|
||||
component_hash: Mapped[str | None] = mapped_column(String(64), index=True)
|
||||
components: Mapped[list] = mapped_column(JSON, default=list)
|
||||
raw: Mapped[dict] = mapped_column(JSON, default=dict)
|
||||
complete: Mapped[bool] = mapped_column(Boolean, default=False)
|
||||
total: Mapped[int | None] = mapped_column(Integer)
|
||||
warnings: Mapped[list] = mapped_column(JSON, default=list)
|
||||
observed_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=now)
|
||||
|
||||
|
||||
class BacktestEvent(Base):
|
||||
__tablename__ = "backtest_events"
|
||||
run_id: Mapped[str] = mapped_column(ForeignKey("backtest_runs.id"), primary_key=True)
|
||||
|
||||
Reference in New Issue
Block a user