rebuild(stage-9): deliver deterministic intelligent screening

This commit is contained in:
leefer
2026-07-30 05:15:17 +08:00
parent 6cb52e864a
commit 158257ebb8
46 changed files with 7322 additions and 34 deletions
+9 -2
View File
@@ -110,7 +110,7 @@ def test_real_account_schema_can_upgrade_and_rollback(tmp_path) -> None:
database = Database(tmp_path / "app.db")
runner = MigrationRunner(database)
assert runner.upgrade(MIGRATIONS) == (1, 2, 3, 4, 5, 6)
assert runner.upgrade(MIGRATIONS) == (1, 2, 3, 4, 5, 6, 7)
assert {
"users",
"memberships",
@@ -128,8 +128,15 @@ def test_real_account_schema_can_upgrade_and_rollback(tmp_path) -> None:
"market_insight_snapshots",
"seat_aliases",
"watchlist_entries",
"screener_factor_snapshots",
"screener_factor_values",
"screener_runs",
"custom_screener_strategies",
"strategy_tracks",
"strategy_track_bars",
"strategy_track_events",
} <= table_names(database)
assert runner.downgrade(MIGRATIONS, target_version=0) == (6, 5, 4, 3, 2, 1)
assert runner.downgrade(MIGRATIONS, target_version=0) == (7, 6, 5, 4, 3, 2, 1)
assert "users" not in table_names(database)
assert "llm_models" not in table_names(database)