Repository navigation
tests: 1.5.5 recorded migration fixture, rows read back through migrate - #21
Merged
Merged
Conversation
…(recorded fixture, #33 M5)
…libyaml via busbar-contract's serde_yaml_ng), as busbar-transport-http a6e29e3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the per-backend migration conformance gate of #33 (BUSBAR-1.6.0.md l.1096-1103, M5 l.1526): 1.5.x rows are proven against rows written by the pinned 1.5.5 binary and read back byte-identically; a missing fixture fails CI.
Fixture:
store-sqlite/tests/fixtures/1.5.5/was RECORDED by busbarscripts/store-migration-fixture.shdriving the published, digest-pinned busbar v1.5.5 binary over the published store-sqlite v1.0.6 plugin (two keys, one grouped with a day budget; models m-chat, m-cache with 4 cached tokens, m-chat-down refunded after a 503; 5 served requests, per_request_fee 3). Files unchanged:governance.db,rows.json,readback/*.json,MANIFEST.tsv(binary and plugin digests plus each file's sha256;store-migration-fixture.sh checkpasses).Tests (src/tests.rs, beside the v6 fixture tests, which are untouched):
the_1_5_5_binarys_rows_read_back_through_migrate: opens a copy viaSqliteStore::openand, parsing rows.json at test time, asserts every usage_metering cell (list_metering: key_id, model, provider, requests, billable_requests, key_group_at_use, pricing_version, four token columns; no extras), every usage_windows row (get_usage requests/billable and per-model tokens under UNIT_*), every key (group/name/enabled) and the audit chain (seq, prev_hash, hash).migrate_over_the_1_5_5_rows_is_idempotent: open, drop, open again; reads identical and user_version == SCHEMA_VERSION both times.Crash idempotence: the crate exposes no hook to stop migrate mid-way (it is one transaction), so it is covered by running migrate twice over the same file.