Skip to content

Commit 0f131a5

Browse files
ARTclaude
andcommitted
test(db): derive the latest migration version; drop unenforced doc claim
The thread-window production-migrator test hard-coded version 56 and broke when 0057 landed. Read the latest version from the migrations directory so the next migration does not break it again. Remove the read-state doc sentence saying the relay stops before readiness without the migrations: startup does not check for 0057's column. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: ART <ea39c1c8acf57180161ef4ba4ed68abf8589f5291956b909a5aa991fc66664ca@buzz.block.builderlab.xyz>
1 parent 06c52b4 commit 0f131a5

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎crates/buzz-db/src/runtime/tests/thread_window_postgres_tests.rs‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,16 @@ async fn migration_schema_thread_window_prebuild_does_not_queue_behind_writer()
311311
production_result.is_ok(),
312312
"production migrator must preserve ingestion progress: {production_result:?}"
313313
);
314-
assert_eq!(version, 56);
314+
let latest = sqlx::migrate::Migrator::new(
315+
std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../migrations"),
316+
)
317+
.await
318+
.unwrap()
319+
.iter()
320+
.map(|m| m.version)
321+
.max()
322+
.unwrap();
323+
assert_eq!(version, latest);
315324
assert_eq!(final_oid, oid, "prebuild must not be replaced");
316325
assert_eq!(count, 4, "all writer witnesses must persist");
317326
}

‎docs/buzz-v1-read-state.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,8 @@ is no new public account export/reset endpoint. Operator-assisted erasure/export
296296
must use the established authenticated operational process and explicitly scope
297297
both community and actor; never equate the read-time horizon with data erasure.
298298

299-
Migrations 0056 and 0057 must be applied before this relay serves, enabled or
300-
not: started without them and with auto-migration off, the relay stops before
301-
readiness. There is no down migration, and disabling the API is not a rollback. A relay built
302-
before 0056 that restarts with `BUZZ_AUTO_MIGRATE=true` (the Helm default)
299+
There is no down migration, and disabling the API is not a rollback. A relay
300+
built before 0056 that restarts with `BUZZ_AUTO_MIGRATE=true` (the Helm default)
303301
refuses to start on the migrated schema. Whole-community deletion run from a
304302
build before 0056 rejects the two new tables. A deletion approved on the
305303
earlier schema and not yet fenced fails structural revalidation after 0056:

0 commit comments

Comments
 (0)