Repository navigation
Collapse dispatch store bumps into one v5 -> v6; open dev v7..v15 stores as v6 (T313) - #241
Merged
Merged
Conversation
…15 stores as v6 (T313)
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Owner
Author
|
Note: the live board check covered open and render on a v15 copy; a save from the board itself was not driven. The CLI |
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.
What
Before #120 lands, the store moves up one version over v0.12.0 (v5), not ten.
STORE_FORMAT_VERSION= 6.MIGRATIONSends at one identitymigrate_v5_to_v6; its doc comment lists everything v6 adds (folded from the old v6..v15 comments).migrate_v6_to_v7…migrate_v14_to_v15are gone.DEV_FORMAT_VERSIONS: RangeInclusive<u32> = 7..=15plus one helperreads_as(found)insrc/store.rs. A v7..v15 document opens as v6 (no transform,format_versionrestamped), its next save writes 6 and keepstsk.json.v<N>.check_document(restore, backup) accepts v7..v15 too. v16+ is still refused. The three gates (load, pre-save peek,check_document) all go throughreads_as.const _: () = assert!(STORE_FORMAT_VERSION < *DEV_FORMAT_VERSIONS.start(), …)breaks the build when a future bump enters the dev range (message says: drop the range or bump past it and migrate dev documents from v6), plus a unit test of the same predicate.storage.md"Store version" says this version writes format 6 and tsk 0.12 and older refuse it. CHANGELOG Breaking line uses the shippedStore format N:prefix. No dev versions in user docs.Where to look
src/store.rstop:MIGRATIONS,DEV_FORMAT_VERSIONS, the const guard,reads_as; thenload_unlocked_supported,save_unlocked_supported(backup condition is nowversion != supported),check_document.tests/fixtures/current_store_v6.jsonis now the canonical v6 wire (old v15 content stamped 6). The old dev-v6 fixture was v5 + version only and was replaced. The v7..v15 fixtures stay as dev inputs.Tests
a_populated_dev_v15_store_opens_as_v6_and_keeps_tsk_json_v15(agent and person assignees, hidden name,afterlink, review round with a sent reply, batch done; opens unchanged, saves v6,tsk.json.v15byte-identical, batch undoes),dev_v7_and_v11_open_as_v6_and_v16_is_refused,check_document_accepts_a_dev_v15_store_and_refuses_v16,a_restored_dev_v15_document_opens_as_v6_and_keeps_its_copy,the_current_format_sits_below_the_dev_range.migrated_load_backs_up…reseeded at v5 (v6 is current now); restore-older test uses v5; refusal tests useDEV_FORMAT_VERSIONS.end() + 1.check_documentgate (2 lib), save refusal gate (14). SettingSTORE_FORMAT_VERSION = 7fails the build with the guard message.tests/packaging/test_install.pyandsrc/domain/undo.rshold no version pins (grepped); undo.rs only had comment wording, updated.Gate
cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test: green (1082 lib + 967 integration + rest).cargo clippy --all-targets --target x86_64-pc-windows-gnu -- -D warnings: clean.cd site && npm test: 57 pass, 0 fail.Real proof (copies only;
~/.tsk/tsk.jsonsha256 prefix3be3306fb7ad9f17before and after)Dogfood binary =
~/.herdr/worktrees/herdr-tsk/dispatch/target/release/tsk(what~/.local/bin/tsklinks to). Live store is format 15. Both copies under the session scratchpad, every command withenv TSK_STATE_DIR=<copy>.tsk list --json --all, dogfood vs new, on two copiestsk list --jsonidentical tootsk add -t "T313 collapse proof task" --deskformat_version6;tsk.json.v15written and byte-identical to the originallist --json --allafter the addnext_task_numberdiffers in the documentqquits; no write on opengh release download) seeds a fresh store, 2 addslist --json --allon ittsk addon ittsk.json.v5byte-identical to the v0.12 originaltsk liston the v6 storestore format 6 is unsupported by this tsk (expected 5)Note: the old dogfood (v15) binary still opens a v6 store (it migrates 6 → 15 by identity), so swapping back and forth during dogfood is safe.