Version 8.8.0

All pages

Format versions and migrations

A pod (the learner's own Solid storage) may hold data an older version of Solid Memo wrote, and every stored item says which format version it's in. This page says how the app brings old data up to the format it writes now, leaves data from a newer version alone, and updates a deck copied from the library to its newer release. Answers are the exception to leaving newer data alone when a day is reset or an answer undone: they're removed whole. A review state a newer version wrote isn't: resetting a day leaves it out and resets the other cards.

The formats are the shapes. The steps between them are the migration modules in domain/shapes/migrations, the plan is in domain/migration.ts, and the notice the user sees is in MigrationContainer.tsx.

Versions

Every subject Solid Memo writes carries sm:formatVersion. A missing one means 1, the format that predates the field; preferences without one that hold a value only a later format has don't fit (validation.md). LATEST_VERSION in the generated shapes module is what the app writes today; DECK_FORMAT_VERSION and friends are aliases of it.

Class12Why the version moved
Instancetitle, createddcterms:replaces (the instance it is an updated copy of) and dcterms:modified (when it replaced it), both optionalThe format update of that time wrote a copy and kept the original as a backup. The update now writes in place and states neither. An instance an earlier update made keeps them, and the app ignores them (The backup).
Decktitle, document links, provenancesm:direction, statedA format-1 reader would study a bidirectional deck one way only and count the other way's review subjects against the day's budgets.
Cardsm:front and sm:back, both requireda side may be a picture (sm:frontImage / sm:backImage, an IRI), text, or bothA format-1 reader drops a card without sm:front as malformed, so picture-only cards mustn't pass as format 1.
Review statethe SM-2 fields; a snapshot and per-direction subjects were added without a bump, so format 1 admits themthe same fields; the snapshot is all five triples or none; the subject naming (#<cardId>, #<cardId>@back-to-front) is part of the contractStamping begins: a format-1 reader would ignore the snapshot and the other direction.
FSRS review statean FSRS-6 state (vocabulary 1.21): stability, difficulty, due day, first and last review, the card and direction it is of, and a snapshot all four or none; sm:scheduler sm:fsrs6 fixedA new shape of sm:ReviewState, not a review-state version: see below.
Preferenceswhatever the unversioned era wrote: every field optional, a missing one meaning its defaultevery field statedThe document is rewritten on every save; format 2 is the complete record.
Deck schedulethe digest's counts of a deck's due days, with the direction and day boundary they hold forthe scheduler whose due days they count (sm:scheduledWith, vocabulary 1.21), and the version statedSwitching scheduler writes no review, so the reviews document's version can't tell the schedules apart: see below.

Deck format 4 (and library deck series format 2, its summary in the library index) states a deck's title and description as language-tagged text, one value per language, exactly one of them English. The app shows and edits the English and keeps the other languages. A format-3 reader knows only untagged strings and would drop a format-4 deck as untitled. The step to format 4 tags a format-3 deck's title and description as English.

Card format 3 adds a note under each side (sm:frontNote, sm:backNote, shown once the answer is revealed) and a label above the back (sm:backLabel, how the answer relates to the front), all language-tagged text like a deck's title. It lets a card be retired (owl:deprecated true): a library deck keeps a card it no longer uses instead of removing it, and a copy keeps the card and its review state but stops studying it. A format-2 reader would go on studying a retired card. A format-2 card is in use, so the step to format 3 changes nothing.

Card format 4 lets a side's text be language-tagged, one text per language ("Mona Lisa"@en), or untagged when its language isn't known, never both; English isn't required. The app shows the reader's language, else the English, else the untagged text, and edits one text while keeping the others; text typed in the app is untagged. A format-3 reader would read a tagged side as empty and drop the card. The step to format 4 changes nothing: a format-3 side stays untagged, and no language is guessed.

Deck format 5 and card format 5 let a deck's title and description, and a card's notes and label, be in any language, one value per language. English is no longer required: a deck titled only in Swedish, or a note only in Finnish, is whole. zxx tags text in no language (codes, numbers, symbols). Library releases stay at deck format 4 (English first is the library's curation policy, not a rule of the data), so no release is rebuilt, and an import is written in format 5. A format-4 validator flags a title or note with no English, and a format-4 app drops such a note when the card is edited. The steps to format 5 change nothing but the version and guess nothing: every format-4 deck and card is valid format 5 already.

Text the step to deck format 4 tagged English stays, as does text saved the same in English and another language ("Stockholm"@en and "Stockholm"@sv). A pure step can't tell an identical English copy from a real translation, and the app accepts the same words in several languages as text in each. An untagged card side stays untagged.

Deck format 6, with library deck format 5 and library deck series format 3, lets a deck's keywords (dcat:keyword) be language-tagged, several per language ("capitals"@en, "huvudstäder"@sv), shown in the reader's language. A format-5 reader would read a tagged keyword as absent and drop it on its next save of the deck. The steps to deck 6, library deck 5 and series 3 keep untagged keywords untagged, their language unknown ("" in the model), and guess no language. Untagged keywords are valid only as kept from older formats: the app writes every new keyword under the language the user states. Library releases from library deck format 5 on tag every keyword, and each deck has keywords in English and Swedish. Older releases stay frozen with untagged keywords, and an import of one writes them untagged into the format-6 copy.

Card format 6 (vocabulary 1.20) gives the front a label above it (sm:frontLabel), as format 3 gave the back one, so a card studied both ways says what's asked ("Country" above "Croatia", "Capital" above "Zagreb"). Card format 5 was published without the term, and a published shape is never edited (vocab.md). The step to format 6 (card/5-to-6) changes nothing but the version. Library releases stay at the card format they were published in: one with front labels is at card format 6, and an import writes every card at 6. An app from before format 6 reads a format-6 card with the format-5 shape, without its front label, and doesn't write over it, so updating stays the user's choice.

Card format 7 keeps what a card is about (dcterms:subject, the IRIs of the things its source names); a copy of a library release keeps them as the release states them (deck-library.md). Card format 6 was published without the term. An app that wrote format 6 kept it, as a triple its shape doesn't name, when it rewrote a card in place. It dropped it when it copied a card into a new subject (an import, or a move or copy into another deck). The step to format 7 (card/6-to-7) changes nothing but the version. Releases compiled from linked data state the term on cards of older formats (the taxonomy deck's version 3, at card format 4), so the app reads it whatever format a card states. The format update keeps subjects another app gave a card. An import writes every card at 7. An app from before format 7 reads a format-7 card with the format-6 shape and doesn't write over it.

Deck groups (deck group format 1) need no migration: groups are new subjects, and a deck's sm:position and the catalog's dcat:catalog belong to no shape.

Courses (vocabulary 1.14) need no migration and moved no format version:

An older app that edits a course's card keeps its sm:distractor links, as any triple its shape doesn't own. One that removes the card leaves its sm:Distractor subjects behind, which this app ignores. An older app's check lists an sm:Distractor as untyped, a subject of no class it knows: visible, never a violation.

Text formats (vocabulary 1.15) need no migration and moved no format version. sm:textFormat joined card format 5, step format 1 and chapter format 1, optional:

What a review state is of, and the other links of vocabulary 1.16 (see vocab.md), need no migration and moved no format version:

Library deck format 6 (vocabulary 1.18) lets a release describe its series and its publisher in its own document, so a release published in a pod is whole without an index (deck-library.md):

What an answer says of how it was given in vocabulary 1.19 (response times, the day the prompt was due and the device's offset from UTC) needs no migration and moved no format version:

FSRS-6 review states (vocabulary 1.21, see vocab.md) need no migration, and the review-state format didn't move:

Preferences format 5 and deck schedule format 2 (vocabulary 1.21) say which scheduler sets the due days:

Preferences format 6 (vocabulary 1.22) keeps the colors and the text size in the pod, as format 4 keeps the theme (theme.md):

Palette and color set format 1 (vocabulary 1.23) are new shapes, for the palettes a user designs in the instance's palettes.ttl (theme.md):

A deck's card language (vocabulary 1.24, sm:deckCardLanguage, the language its card text is shown in first) needs no migration and moved no format version:

The hosts whose pictures a deck shows (vocabulary 1.28, sm:deckPictureHost, privacy.md) need no migration and moved no format version:

A deck's pause (vocabulary 1.29, sm:deckPausedAt and sm:deckResumesOn, srs.md) needs no migration and moved no format version:

The release a card was taken from (vocabulary 1.27, sm:fromRelease, see the library upgrades below) needs no migration and moved no format version:

Whether logging in skips the Connected screen (vocabulary 1.26, sm:connectedScreenSkipped, onboarding.md) needs no migration and moved no format version:

Rules that hold across versions:

The chain

The migration chain
Each shape's record versions in order, with the migration that takes one version to the next.
The diagram's source
flowchart LR
    accTitle: The migration chain
    accDescr: Each shape's record versions in order, with the migration that takes one version to the next.
    v1["CardV1"] -->|card/1-to-2| v2["CardV2"]
    v2 -->|card/2-to-3<br/>in use: nothing to change| v3["CardV3"]
    v3 -->|card/3-to-4<br/>text stays untagged| v4["CardV4"]
    v4 -->|card/4-to-5<br/>restamped: nothing guessed| v5["CardV5"]
    v5 -->|card/5-to-6<br/>no front label yet: nothing to change| v6["CardV6"]
    v6 -->|card/6-to-7<br/>subjects read from the card| v7["CardV7"]
    d1["DeckV1"] -->|deck/1-to-2<br/>direction: front-to-back| d2["DeckV2"]
    d2 -->|deck/2-to-3<br/>DCAT dataset: direction concept,<br/>default description, creator agents| d3["DeckV3"]
    d3 -->|deck/3-to-4<br/>title and description tagged English| d4["DeckV4"]
    d4 -->|deck/4-to-5<br/>restamped: nothing guessed| d5["DeckV5"]
    d5 -->|deck/5-to-6<br/>keywords: untagged kept| d6["DeckV6"]
    l2["LibraryDeckV2"] -->|libraryDeck/2-to-3<br/>release 1 of its series| l3["LibraryDeckV3"]
    l3 -->|libraryDeck/3-to-4<br/>title and description tagged English| l4["LibraryDeckV4"]
    l4 -->|libraryDeck/4-to-5<br/>keywords: untagged kept| l5["LibraryDeckV5"]
    l5 -->|libraryDeck/5-to-6<br/>nothing to change| l6["LibraryDeckV6"]
    s1["LibraryDeckSeriesV1"] -->|libraryDeckSeries/1-to-2<br/>title and description tagged English| s2["LibraryDeckSeriesV2"]
    s2 -->|libraryDeckSeries/2-to-3<br/>keywords: untagged kept| s3["LibraryDeckSeriesV3"]
    r1["ReviewStateV1"] -->|reviewState/1-to-2<br/>partial snapshot dropped| r2["ReviewStateV2"]
    p1["PreferencesV1"] -->|preferences/1-to-2<br/>defaults filled| p2["PreferencesV2"]
    p2 -->|preferences/2-to-3<br/>the default invalid data policy:<br/>set invalid data aside| p3["PreferencesV3"]
    p3 -->|preferences/3-to-4<br/>theme as the browser prefers| p4["PreferencesV4"]
    p4 -->|preferences/4-to-5<br/>SM-2, desired retention 0.9| p5["PreferencesV5"]
    p5 -->|preferences/5-to-6<br/>Standard colors, the browser's text size| p6["PreferencesV6"]
    ds1["DeckScheduleV1"] -->|deckSchedule/1-to-2<br/>SM-2's due days| ds2["DeckScheduleV2"]

Each step is one module (<class>/<n>-to-<n+1>.ts): a pure, total function from the record of one version to the record of the next, which never mutates its input. A step also gets the IRI of the subject being migrated (MigrationContext), for naming new resources beside it. migrate(shape, record, { subject }) walks the chain to the latest version; a gap throws. Tests assert that the chain is contiguous for every kind, every step is pure, the latest record passes through untouched, and, with the real shapes, every step's output conforms to the shape it moves to.

Every step runs on a record read within its kind's bounds (shapes.md), so it never sees more values than they let through.

A step's output is held to the bound on a term, 16,383 characters, as every read and write is (data-model.md), each term measured as a write would write it. The text a step writes, the default description Flashcards: <title>., cuts a title too long for it short, with an ellipsis after it, so that the description fits. Other terms a step makes can't be cut short. One is an address it builds from the subject, such as a deck's distribution or a release's series. Another is a text it tags, such as an untagged title that format 4 writes in English, with @en after it. A deck or release whose migration gives it one past the bound is read as not fitting its shape (migrateWithinBound), since no write of it would be accepted. A deck from before format 3 names its authors itself, and a write names their agents anew, refusing one past the bound. At most its first MAX_DECK_METADATA (100) authors are read, before the step names their agents, which is all a deck keeps at most (data-model.md). An author whose node an earlier deck took is given a longer one. The format update names the agents of each entry in turn, as its write does, after the entries before it. It leaves an entry with an agent past the bound as it is, so that it doesn't keep the others from being brought up to date.

The pod migration

The format update brings each outdated document up to this app's formats on its own, where it is, in one write the pod makes whole or not at all. No document, subject or folder changes its address, so bookmarks and other apps' links still hold. Nothing outside the instance is written: no type index registration is added or changed. No copy or backup is kept. A document that can't be updated now is left as it is, readable, and the update goes on; run again, it updates what's still outdated (instanceUpdate.ts, updateInstance in instances.ts).

Updating an instance
Once the learner confirms, the update reads what is outdated and writes one document after another, then says what is done or left.
The diagram's source
flowchart TD
    accTitle: Updating an instance
    accDescr: Once the learner confirms, the update reads what is outdated and writes one document after another, then says what is done or left.
    open["Instance opened"] --> plan["planMigration<br/>read meta, preferences,<br/>every deck's cards and reviews"]
    plan -->|nothing outdated| quiet["(nothing shown)"]
    plan -->|outdated| notice["Notice: what will change"]
    notice -->|Update…| confirm["Confirm: how the update<br/>keeps the data safe"]
    confirm -->|Start the update| read["1 read: what is outdated now,<br/>planned again"]
    read --> write["2 write, one document after another:<br/>read it, bring its outdated subjects up to date,<br/>write it in one edit, If-Match the read"]
    write -->|written| updated["Updated"]
    write -->|refused or failed| left["Left as it is,<br/>named with why"]
    updated & left -->|the next document| write
    updated & left -->|none left| done["Done; or what is left, and why:<br/>Try again updates only that"]

On a server that ignores If-Match (node-solid-server), a write can't be held to the version read. A change another device makes between the update's read and its write is kept by a PATCH, which changes only the update's triples (and fails when a triple it deletes is gone). The PUT of a whole large document undoes it, as any such save there does (the write discipline in data-model.md).

What a server can't apply leaves that document as it was. node-solid-server's parser knows no SPARQL-style PREFIX directive, so it can't patch a document another app wrote with one. It finds a decimal only as JavaScript spells it (2.5 for 2.50), so a deletion it refuses for that is sent once more, so spelled.

Proof on a real server

npm run test:pod runs the update against two majors each of the Community Solid Server and node-solid-server, started by the tests (testing.md), through the app's own use cases and Solid adapters, wired as in createAppUseCases. It records every HTTP request as the app attempts it and as it reaches the server (instanceUpdate.integration.test.ts). It seeds an old-format instance with another app's triple, an unknown file and shared access, and checks that:

On Community Solid Server 6, whose ETags are to the second, the update's test of a change made "elsewhere" waits for the next second. On node-solid-server, which ignores If-Match, the tests of such a change are skipped. The tests start a Community Solid Server in memory; SOLID_SERVER_URL points them at another server that lets anyone read and write. npm test doesn't run them.

A user journey (format-update.journey.ts) runs the same update through the notice in the built app, against Community Solid Server 7. It covers a tab closed part-way, which the pod tests can't: the next opening offers only the rest.

The backup

The format update keeps no backup: each document is in a format the app reads, updated or not. The chain's tests guard against a step that runs but loses meaning (The chain). Every save applies the same steps with no backup.

Until stable addresses, the format update copied the whole instance into a sibling folder (<name>-<uuid>/), updated the copy, and kept the original as a backup, which the copy's meta.ttl names (dcterms:replaces). Such a backup, or a partial copy a closed tab left, is now an ordinary folder: the app no longer lists it or offers to restore it, and the user may delete it by hand. meta.ttl keeps dcterms:replaces and dcterms:modified, which the app ignores.

Catching up with the library

A deck imported from the deck library says which release it came from (prov:wasDerivedFrom <…/decks/name/vN.ttl>). When the library publishes a newer release, the deck page (and a course's page) offers to bring the copy up to it (planLibraryUpgrade in domain/libraryUpgrade.ts, shown by LibraryUpgradeContainer.tsx). The Studio lists every copy of an instance, and upgrades several in turn (studio.md). A copy of a release added from a link is upgraded to the newest version its creator's catalog lists, when it can be read (deck-library.md).

The deck list marks a copy the library has a newer release of with "New release" after its name; its row leads to the deck page and its offer (newerRelease of useCopies in deckTreeEditor.ts). The list tells this from the library's index alone (libraryCopiesOf, offersNewerRelease in library.ts), as the Studio's library copies screen does, and reads no release and plans no upgrade. So it marks some copies the deck page offers nothing for. One is a copy whose newer release changes nothing in it or uses a card format this app doesn't know. Another is a copy of a release the index doesn't list, which may be no older than the newest. A copy of a release added from a link isn't marked: only its creator's catalog would list a newer one.

The plan compares three sets of cards by fragment id: the release the copy came from, the current release, and the copy. The library's changes reach only what the user left as the library had it:

In the releasesIn the copyThe upgrade
Added in the new releaseNot thereAdds it (retired, if the release has it retired)
ChangedAs the old release had itChanges it
Added, changed or removedChanged by the userKeeps the user's card, and says so
RetiredAnythingRetires it: kept, with its review states, but no longer studied
Retired before, in use againRetiredBrings it back, with the review states it had
RemovedAs the old release had itRemoves it, and its review states
What it is about changedIts subjects as an older release had them, or noneWrites the release's subjects, the user's content and retirement kept
AnythingRemoved by the userLeaves it removed
RemovedNot there any moreNothing to write but dropping the review states left of it; the deck still moves to the release
Added, changed, retired, in use again or about other thingsAlready as the new release has it: content and retirement, or, changed by the user, retirement; or its subjectsNothing to write, but the deck still moves to the release

Only the series' cards are compared. Each card a deck takes from a release names that release (sm:fromRelease, vocabulary 1.27): every card of an import, each card an upgrade writes, and a course's question as it joins the deck. A card moved or copied in (studio.md) or written by the user names none. A deck added from a link has releases their creator writes. In such a deck, a card that names no release is the user's, whatever ids the releases list. The plan leaves it out: it's never removed, changed, retired or brought back, and nothing is added at its id. In a copy of a series the library's own index lists, a card that names no release is compared by its id as above: copies made before 1.27 name none, and those releases are the library's. So a copy from a link made before 1.27 keeps its cards as they are; its upgrades bring new cards, and each card they write names the release from then on.

The notice names the cards an upgrade removes and those it retires by their fronts (LibraryUpgradeNotice), so the user sees which cards leave study before agreeing. Each list shows at most LIST_LIMIT (50) fronts (bounded) and says how many more there are, as a release can hold any number of cards; the sentence above it counts them all.

Retiring isn't a change of the card's content, so it applies to cards the user changed too. A library release never removes a card any more: the build refuses one that drops a card of the release before it. The removal rows are for releases made before cards could be retired.

A copy more than one release behind is compared with the releases in between too. A card as one of them has it is the library's, as though the copy came from that release (an upgrade to it, cut off before it moved the deck's entry, wrote it). The newer release changes it and sets its retirement.

A card's distractors are part of its content: a release that changes a wrong option, its note or their order changes the card. A course's deck (either release is a course) holds only the cards the learner has answered. Its upgrade adds none, and changes, retires and restores the cards it holds as above. A card the release removed that it lacks is no offer. The course's outline (its chapters, steps and theory) is never copied, but read from the release the deck names. A release that changes only the outline is an offer of its own (LibraryUpgradePlan.outline, compared by sameOutline in domain/course.ts): it writes no card and moves the deck to the release. So is a release that changes only questions the learner hasn't reached (LibraryUpgradePlan.unreached): their content, wrong options, subjects or retirement. The deck meets them as the release it names has them.

A card's text format is part of its content: a release that only marks a card as Markdown changes it. No text format and sm:plainText compare the same, so a card switched to Markdown and back is still the library's. One exception: a copy that is as the old release had it but for lacking the release's text format, as an app before vocabulary 1.15 imports or writes it, counts as left alone. That holds here and when the user settles the deck's languages. The newer release then brings the marker back, whether or not it changes the card otherwise. A copy that states a format other than the release's, sm:plainText against sm:markdown included, was changed by the user and is kept.

What a card is about (its subjects, dcterms:subject, card format 7; deck-library.md) is the library's: the app neither shows nor edits it, and it's no part of the card's content. A release that changes it gives the copy's card the release's subjects, whatever the user did to the card's text. A release that changes nothing else is an offer of its own (LibraryUpgradePlan.about, which the notice words as recording what the cards are about). Subjects compare as sets. As for the text format, a copy without subjects, as an app before card format 7 imports or writes it, takes the release's. A copy with subjects of its own (only another app could write them) is left as it is. A changed card is written as the release has it, subjects and all. A card retired or brought back is written once, with the release's subjects and retirement.

A new study direction is taken up when the copy is still studied the old release's way, and the deck's title, description, keywords and themes each when the copy still has the old release's. A changed title or description is kept. It gets the languages the release adds only when it says the same as the release in every language both have, sharing at least one (so a copy whose English the user retagged still agrees in the languages left). Keywords compare language by language, in any order: a copy whose keywords are the old release's in every language takes the new release's, all languages at once, and one whose keywords the user changed in any language keeps them all. Untagged keywords imported from a format-4 release give way to the new release's tagged ones. The default description the app gave a deck that had none (Flashcards: <title>.) gives way to the release's description. A copy upgraded before upgrades brought these texts along gets its own release's languages the same way, once a session when its page opens (addReleaseLanguages); nothing the user wrote changes. That applies only to a copy of a series the library's index lists. A release added from a link stays on its creator's server, which can change it at any time, so a copy of one gets new languages only from an upgrade the user agrees to. The notice lists the notes of the releases in between, at most LIST_LIMIT (50) of them, and says how many more there are.

Nothing is offered for a release that isn't newer, uses a card format this app doesn't know, or would change nothing. A copy already as the newer release has it (the table's last two rows) is still offered the release, which moves its entry. That covers cards as the release has them (applied), and a direction, title, description, keywords or themes already the release's where it changed them (appliedAbout). It covers a copy with no card the release removed (gone, unless the copy is a course's deck). An upgrade cut off after writing the cards, or the user's own edits, leave a copy so (guards against a later upgrade taking the newer release's changes for the user's). A plan made on a copy an upgrade left half done finishes that upgrade, or takes the copy on to a release out since (How an upgrade is applied). Review history of every card but the removed ones is kept.

How an upgrade is applied

An upgrade writes the deck's documents where they are, each in one write made only if it's still as it was read. The order leaves the deck readable after each write: its cards, then the review states of the cards it removes (SM-2's and FSRS-6's, in one write), then its catalog entry, which says which release the deck is. The entry is checked before the first write (checkDeckEntryUpgrade), so one the write check refuses leaves the deck as it was. The writes of the cards and the review states are made and checked before the first is sent too (prepareCardChanges, prepareReviewChanges). A removed card's state a newer version of the app wrote refuses the upgrade with nothing written. A later failure stops it where it is and puts nothing back; planned again, the upgrade is offered and finishes (domain/deckUpgrade.ts, applyLibraryUpgrade in library.ts). The deck, its documents and its cards keep their addresses and ids, so the answer log (statistics count a card by its deck and id) and other apps' links still name them.

Upgrading a library deck
The upgrade reads the deck, puts its cards, drops the removed cards' review states and moves the entry to the new release, and an error stops it where it is.
The diagram's source
flowchart TD
    accTitle: Upgrading a library deck
    accDescr: The upgrade reads the deck, puts its cards, drops the removed cards' review states and moves the entry to the new release, and an error stops it where it is.
    offer["Notice: what the upgrade changes"] -->|Update to release n| read["1 read: the deck's entry and cards;<br/>the plan again must change the same cards;<br/>the review states, when cards go;<br/>the new entry and both writes checked"]
    read --> cards["2 cards: one PUT of the whole document,<br/>If-Match the read the plan was made from<br/>(none when no card changes)"]
    cards --> reviews["3 reviews: the removed cards' states dropped,<br/>If-Match the read (none when there are none)"]
    reviews --> entry["4 entry: moved to the new release,<br/>with the deck's texts, If-Match the read"]
    entry --> refresh["The page reads everything again at once,<br/>a course's outline and questions included"]
    read & cards & reviews & entry -->|error| stop["Stopped where it is, nothing put back:<br/>the deck readable, still naming the release<br/>it came from; planned again, it finishes"]

On a server that ignores If-Match (node-solid-server), the cards' PUT can't be held to the plan's read: a card another device edited in between is written over.

Proof of the upgrade on a real server

npm run test:pod runs the upgrade against the same servers as the format update, through the app's own use cases and Solid adapters, with every request recorded as it reaches the server (deckUpgrade.integration.test.ts). It seeds an instance holding a copy of a release, studied, its cards shared with a friend, and checks that:

Adding data without a format version

No kind of data gets a further format version: an app refuses to save over a format newer than its own, so each new format shut every earlier version of the app out of what a later one saved (releasing.md). The formats in the table above are the ones every later version writes, and the steps between them stay, for pods an older version wrote. formats.api.test.ts fails when a format rises, and npm run check:breaking fails on the line that would go from semver-public-api-declaration/frozen/formats.txt, whatever the commit says.

Data added later goes one of the four ways of the versioning policy:

  1. A term outside every shape. Add the term to the vocabulary, and to the small shape of the terms beside the kind's record, <#terms> in ns/bounds/<kind>.ttl, with its bounds (shapes.md). Read it with readTerms and write it in the subject's mapper, beside the record, as deckMapper.ts does for sm:deckCardLanguage. A missing value means the default, and it needs no migration.
  2. A new class. Write ns/shapes/<class>/v1.ttl and run npm run generate: the record type, the descriptor and its entry in LATEST_VERSION appear, at format 1. Add fixtures under packages/lib/vocab/fixtures/<class>/v1/, and the class to the shapes' table.
  3. A new scheduler's review state: a shape of its own, as the second way, with sm:scheduler fixed to the new concept (shapes.md).
  4. A new choice in a closed list: the first way, with the owned term left at a value older versions accept.

Whichever way, an older version of the app keeps running on the same pod, as it is: check what it does with the new data when it edits, copies, exports or removes the subject beside it.