rebuild(stage-12): deliver private review workflows

This commit is contained in:
leefer
2026-07-30 07:45:55 +08:00
parent 0a055867a4
commit b93fb3ec41
32 changed files with 2292 additions and 9 deletions
+17 -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, 7, 8, 9)
assert runner.upgrade(MIGRATIONS) == (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
assert {
"users",
"memberships",
@@ -140,8 +140,23 @@ def test_real_account_schema_can_upgrade_and_rollback(tmp_path) -> None:
"llm_requests",
"llm_attempts",
"heaven_readings",
"review_notes",
"trade_entries",
"alerts",
"review_assistant_messages",
} <= table_names(database)
assert runner.downgrade(MIGRATIONS, target_version=0) == (9, 8, 7, 6, 5, 4, 3, 2, 1)
assert runner.downgrade(MIGRATIONS, target_version=0) == (
10,
9,
8,
7,
6,
5,
4,
3,
2,
1,
)
assert "users" not in table_names(database)
assert "llm_models" not in table_names(database)