2026-11-20 · A project saved as one file, and opened on another computer

2026-11-20 · A project saved as one file, and opened on another computer

Context

Everything a researcher does in Kalamu lives in the system’s data folder: the job database (jobs.sqlite), the frozen texts beside it (snapshots/), the search’s and the search by meaning’s indexes. The researchers Kalamu is for never see that folder, and the review of 20 November (decision) heard three needs in their own words (#213):

One file, saved from a project and opened on another computer, Windows or macOS in either direction, must bring back the project with its documents’ results and the researcher’s layer intact, and resume or export its jobs without a call to a provider.

Decision

What is in the file

The file holds one project and what was done with its documents:

Never in the file:

Cost records go with their jobs. A job’s cost is part of its record (the job’s page and provenance.json give what producing its results cost), and the file says what was done, not who paid: a colleague who opens it sees what the work cost when it was done.

The original files

Scans and recordings can be gigabytes, and they may be confidential, so by default the file holds the results without the originals. One named control, Include the original files (scans, recordings), adds them; before saving, the dialog says what each choice weighs (About 12 MB and About 3.4 GB with the original files), how many files there are, and how many cannot be found on this computer (those are left out, said in the sentence after saving).

A path is text, never parsed as the other system’s. A Windows path opened on a Mac, or a Mac path on Windows, is kept as written and simply does not exist there. Where Kalamu needs a file’s name or folder from a path written on another computer, it splits at both \ and / (project_file::path_parts), and the names it writes are kept to what both systems accept.

The format

One SQLite database with the extension .kalamu: the job database’s own schema, at the version the saving Kalamu has (PRAGMA user_version), holding only this project’s rows, plus three tables of the file’s own: a manifest (format kalamu-project, format version 1, the schema version, the app version, when it was saved, the project’s name and counts, whether the originals are in), the files it carries (Kalamu’s frozen texts, and originals when chosen) and their bytes in chunks of 4 MiB. The layout is in formats.

Opening

Always a new project; never merged, never written over. Every identifier the file holds (project, collections, documents, jobs, snapshots, items, entries, requests, passages, regions) is given a new one as it comes in, wherever it appears, so the same file opened twice, or a colleague’s copy of a project already on this computer, comes in beside it and cannot touch it. The models’ answers are keyed by their fingerprint and taken as they are: an answer already here is the same answer, and the first stored is kept, as everywhere in the store. The project keeps its name; if one of this computer’s projects has it, the name takes the date the file was saved, Letters (2026-11-21), then a number. It is opened unarchived.

Bringing a colleague’s corrections into one’s own project (a merge with its conflicts shown) and a backup of the whole app are later work.

Where it lives

The file is the job database’s tables, so the store writes and reads it: it is the only crate that knows them. core defines the trait, ProjectArchive (plan, save, open), its types and its errors, beside JobStore, ProjectStore and DictionaryStore; store implements it in a module of its own (project_file/); the shell holds an Arc<dyn ProjectArchive> wired from the store, gives it the data folder’s places (snapshots/, originals/) and exposes three commands. No crate gains a dependency on another: the architecture test is unchanged. projects stays as it was: organising never writes a result, and opening a file writes results.

Interrupted saving and opening

Consequences

Rejected

Later