From fe05cddacd57c713b139af3fbb3b9efe4e7da04a Mon Sep 17 00:00:00 2001 From: rayhpeng Date: Thu, 23 Jul 2026 17:44:18 +0800 Subject: [PATCH] test(persistence): bump bootstrap head pins to 0007_feedback_tags The feedback migration (0007_feedback_tags) advanced the alembic chain head, but the bootstrap/migration tests still hardcoded 0006_agents as the expected head. Update the HEAD constants and the post-upgrade version assertions so the head-pin guard and the legacy/concurrency bootstrap tests match the current chain tip. Test-only; no migration or schema change. Co-Authored-By: Claude Opus 4.8 --- backend/tests/test_migration_0004_run_ownership_dedupe.py | 2 +- backend/tests/test_persistence_bootstrap.py | 2 +- backend/tests/test_persistence_bootstrap_concurrency.py | 2 +- backend/tests/test_persistence_bootstrap_regression.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/tests/test_migration_0004_run_ownership_dedupe.py b/backend/tests/test_migration_0004_run_ownership_dedupe.py index 28bbd611a..6b3138d25 100644 --- a/backend/tests/test_migration_0004_run_ownership_dedupe.py +++ b/backend/tests/test_migration_0004_run_ownership_dedupe.py @@ -156,7 +156,7 @@ async def test_migration_dedupes_duplicate_active_rows_before_unique_index(tmp_p with sqlite3.connect(db_path) as raw: version_row = raw.execute("SELECT version_num FROM alembic_version").fetchone() - assert version_row[0] == "0006_agents" + assert version_row[0] == "0007_feedback_tags" # Sanity: the invariant the index enforces is now true — at most one # active row per thread. diff --git a/backend/tests/test_persistence_bootstrap.py b/backend/tests/test_persistence_bootstrap.py index ca9d84245..e4d29d457 100644 --- a/backend/tests/test_persistence_bootstrap.py +++ b/backend/tests/test_persistence_bootstrap.py @@ -48,7 +48,7 @@ from deerflow.persistence.migrations._helpers import _normalize_default asyncio_test = pytest.mark.asyncio -HEAD = "0006_agents" +HEAD = "0007_feedback_tags" BASELINE = "0001_baseline" diff --git a/backend/tests/test_persistence_bootstrap_concurrency.py b/backend/tests/test_persistence_bootstrap_concurrency.py index 1848da0f5..a82c79085 100644 --- a/backend/tests/test_persistence_bootstrap_concurrency.py +++ b/backend/tests/test_persistence_bootstrap_concurrency.py @@ -28,7 +28,7 @@ from deerflow.persistence.bootstrap import bootstrap_schema pytestmark = pytest.mark.asyncio -HEAD = "0006_agents" +HEAD = "0007_feedback_tags" def _url(tmp_path: Path) -> str: diff --git a/backend/tests/test_persistence_bootstrap_regression.py b/backend/tests/test_persistence_bootstrap_regression.py index 745fb4773..55524496b 100644 --- a/backend/tests/test_persistence_bootstrap_regression.py +++ b/backend/tests/test_persistence_bootstrap_regression.py @@ -76,7 +76,7 @@ async def test_legacy_database_recovers_token_usage_column(tmp_path: Path) -> No cols = {row[1] for row in raw.execute("PRAGMA table_info(runs)").fetchall()} assert "token_usage_by_model" in cols version_row = raw.execute("SELECT version_num FROM alembic_version").fetchone() - assert version_row[0] == "0006_agents" + assert version_row[0] == "0007_feedback_tags" # And the read path that originally 500'd must now succeed. sf = get_session_factory() @@ -116,6 +116,6 @@ async def test_legacy_database_with_manual_alter_still_bootstraps(tmp_path: Path # No duplicate column -- list, not set, to catch dupes. assert cols.count("token_usage_by_model") == 1 version_row = raw.execute("SELECT version_num FROM alembic_version").fetchone() - assert version_row[0] == "0006_agents" + assert version_row[0] == "0007_feedback_tags" finally: await close_engine()