Skip to content

Pin the Lapis engine and add the notes store - #6

Merged
VirtualMachinist merged 2 commits into
mainfrom
feat/pendant-notes
Oct 30, 2026
Merged

VirtualMachinist merged 2 commits into
mainfrom
feat/pendant-notes

Conversation

@VirtualMachinist

Copy link
Copy Markdown
Member

Summary

  • Pin lapis-lattice and lapis-notes to git rev da4d1ce815d55f89db5cbf8ec2879e14f8957add. lapis-notes is unpublished, so this is rev = that sha, not a crates.io version.
  • app/src/notes/store.rs opens the index outside the vault, refreshes off the calling thread, and captures through create_new with created and inbox set. The embedder is None.
  • A path that is the vault, inside it, uses .., or is a symlink is refused before a write. A second capture of the same title leaves the first file's bytes unchanged.

Test plan

  • check, banned-names, and cargo-deny are green on this head
  • The app workspace is included in that check job
  • Store tests refuse a vault index before any write
  • A no-change refresh writes nothing and a failed refresh rolls back
  • A second same-title capture leaves the first file unchanged

VirtualMachinist and others added 2 commits October 30, 2026 15:33
Pin lapis-lattice and lapis-notes to git rev da4d1ce8 of
Hedronite/lapis-lattice (GOAL-mobile G0-G3), not a crates.io version.
app/ is its own workspace; until app/src/lib.rs lands, the store is the
library root.

app/src/notes/store.rs runs one worker thread that owns the Engine:
- Engine::open_in with the index in app-private storage, embedder None.
  The engine refuses the vault, a path inside it, `..` and a symlink in
  before any write. On Apple the index directory is marked
  NSURLIsExcludedFromBackupKey; on Android it must sit under no_backup.
- Engine::refresh on launch and foreground, off the calling thread; the
  result goes to a callback on the worker.
- Capture through lapis_notes::create_new with created (YYYY-MM-DD) and
  inbox set and classify None; no process spawn, never overwrites.

Tests drive the shipped Store: refusals with nothing written, index
outside the vault and out of backups, refresh thread, a no-change refresh
that commits nothing and keeps the index bytes, a refresh forced to fail
mid-transaction that rolls back, and a second same-title capture that
leaves the first file's bytes unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
app/ is its own workspace, so `cargo check --workspace` and
`cargo test --workspace` at the root never compiled the notes store.
Run both against app/Cargo.toml, --locked, in the same ubuntu job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@VirtualMachinist
VirtualMachinist marked this pull request as ready for review October 30, 2026 19:53
@VirtualMachinist
VirtualMachinist merged commit 70260d6 into main Oct 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant