Repository navigation
v5: route record and collection-metadata writes through the mdbase-next runtime (off by default) - #2386
v5: route record and collection-metadata writes through the mdbase-next runtime (off by default)#2386callumalpass wants to merge 6 commits into
Conversation
… installed VaultMutationService is TaskNotes' single write funnel. When an MdbaseMutationBackend is installed and claims a file (it is in the mdbase collection and is a known record), writes become replica intents: frontmatter callbacks -> field-level updates (set/unset keys with the read values as merge base), content callbacks and modify -> document replace with the read document as base, create -> record create. Each call resolves once the write is published into the vault, so callers see the same behaviour as with Obsidian's APIs. Without a backend, or for files outside the collection, nothing changes. Not installed by default yet: the shared runtime wiring lands once runtime.wasm hosts the file store.
…cument relation to v5's SafeMetadata path
When the backend is installed, SafeMetadata writes to mdbase.yaml, type and contract files become resource writes through the runtime, based on the content they read (base_revision), with null base = must_not_exist for pack-created types (contracts #201). A MetadataTransaction's whole set is one mutation, applied atomically by the log with no local swap journal; backups under .tasknotes/ are still written. Setting a type aside copies it out, then deletes the resource with its base.
|
Follow-up inactive native-profile candidate |
|
Core namespace-compatibility SOURCE ACK for the exact two-file 24cef50 → 6634483 delta (not the entire eight-file PR). Actual service delta/eight new cases and resource-write context read. Native attached resource-backend profile selects existing model schemasFolder = configured typesFolder/tasknotes; both JSON sidecars remain, generated paths drive readback and strict five-path pending-set validation. Inline/schema document bytes stay identical; inactive/vault profile is unchanged. Existing physical old layout requires explicit migration, and stable native publication checks ownership of all five resources. This matches current Core namespaces (JSON files under configured types/contracts are resources, only .md files are definitions), corroborated by the independent synthetic Core five-resource admission oracle. No Core allowlist, wire or query semantics change. Author test evidence applies; no unchanged-suite rerun. Scope is path/format compatibility, not backend lifecycle/authority, real publication, positive full-UI LAB acceptance or release approval; LAB integration need not wait for consumer approval. |
|
Full-source LAB exposed a product creation bypass: TaskService constructs TaskCreationService with the plugin runtime, and TaskCreationService called |
|
Actual isolated full TaskNotes UI/service LAB acceptance PASS at 06:44:52–58 on immutable |
Inactive TaskNotes v5 mdbase-next backend port, targeting the v5 beta line (replaces #2385). Coordinator handles merging/release; this does not install the backend.
Records use the existing VaultMutationService funnel: field-level frontmatter updates with observed bases, document replacement with the read base, and record-path creates. Non-record backups/exports and outside-collection files retain Obsidian routing. Current24cef502 fails closed for unavailable managed records/documents before callbacks or legacy writes; resource paths require the resource API.
Collection metadata uses SafeMetadata/MetadataTransaction resource writes with exact read content as base, must_not_exist for new resources, and one mutation for a transaction. Backups remain ordinary vault writes.
Publication is required; confirmation alone is not success. The eventual adapter is SdkWriteClient (#166). Actual full-plugin/service/UI, offline, dirty-editor fencing and teardown activation remain separate qualification; no activation or release note while inactive. Existing LAB client-only backend proof is not full UI acceptance.
Checks at24cef502:4955 Jest passes/766 suites (70 suites skipped,1012 skipped tests,4 todo), typecheck, FULL lint (TS/review-types/CSS/architecture), production build:test PASS. Build copied only to this owned worktree .testbed/mdbase-next-inactive. User Obsidian CLI/profile not touched; no isolated plugin reload claimed. TMPDIR was an owned coordination scratch directory. Seven new managed-routing regressions, existing resource/CAS and mutation tests retained.