Repository navigation
build!: move to @ocfl/ocfl-fs 1.0 beta and arocapi 5.0.0-beta.10 - #64
Merged
Merged
Conversation
Opens the repository with openStorageRoot/createStorageRoot, imports through create then update, and reads files from the head. OCFL_SCRATCH is gone: the workspace is inside the repository. File rows no longer carry a CRC32, which nothing read and 1.0 doesn't record. Crates and repository listings no longer carry a disk path. The storage root is opened in its own module so the scripts don't load arocapi, whose OCFL backend still needs 0.4.
…eta.59 arocapi's OcflStorage now serves files through @ocfl/ocfl-fs 1.0, so ldacapi installs only 1.0. Listing reads beta.59's entries, and logs a damaged crate's object root and id.
This was referenced Nov 16, 2026
Closed
Closed
Closed
This was referenced Nov 16, 2026
This was referenced Nov 16, 2026
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.
Moves ldacapi to
@ocfl/ocfl-fs1.0.0-beta.59 and arocapi 5.0.0-beta.10, whoseOcflStoragenow serves files through 1.0. This is the trial migration that checks the 1.0 API before it freezes (Language-Research-Technology/ocfl-js#309 and #310).Closes #53.
What changes for users and operators
OCFL_SCRATCHis gone. 1.0 assembles versions inextensions/ocfl-js-workspaceinside the repository. The README,.env.exampleanddeploy/no longer mention it.metafrom responses, ldacapi has no file transformer, and Oni never uses it. 1.0 can't read stored fixity values, so keeping it would mean reading every byte of every file on each index.Imported from <source dir>, byldacapi crates:importwith ldacapi's URL as its address. 1.0 requires both.Last-Modifiedchanges meaning. It is now the commit time of the version in which the file took its current content, read from the inventory, not the stored file's mtime. It no longer changes when storage is copied or restored.extensions/ocfl-js-workspace. The API itself still only reads: 1.0 opens, lists and reads a fully read-only repository.Code
src/ocfl-repository.tsopens or creates the repository. It doesn't load arocapi, sopnpm ocfl:initandpnpm crates:importstart without it.scripts/crates-import.tscreates each crate and, onOBJECT_EXISTS, opens and updates it. It still merges: files missing from the source stay. A crate that is locked or needs recovery is logged with itslockedAtand skipped, and the script exits non-zero. It never recovers a crate itself, because only a person can tell that its writer is dead.CrateObject.rootandRepositoryObject.pathare gone: 1.0 gives out no disk paths, and they were used only in logs that already had the crate id.@ocfl/ocfland the hand-writtensrc/ocfl-modules.d.tsare gone; 1.0 ships its own types.Before deploying
Stop every 0.4 writer of the repository first; 0.4 doesn't take 1.0's lock. Afterwards, delete the old
scratchdirectory. Repositories written by 0.4 need no conversion: the dev repository opens, lists and takes updates as it is.Measured
Per file request through
OcflStorage, on local NVMe with a warm cache: 0.2 ms for a small crate, 21 ms for a crate of 10,000 files. arocapi opens the crate on every request, so the cost grows with the size of the inventory. It is not yet measured on NFS or with LDaCA's largest crates.Testing
pnpm lintis clean andpnpm testpasses (229 tests). New tests cover importing a crate again (no version when nothing changed, a merged version when something did) and a damaged crate being left out of indexing and the crate list.