Skip to content

feat(notes): unify workspace vault and Mem synchronization - #575

Merged
PeterGuy326 merged 7 commits into
mainfrom
feat/574-workspace-vault
Oct 8, 2026
Merged

PeterGuy326 merged 7 commits into
mainfrom
feat/574-workspace-vault

Conversation

@PeterGuy326

@PeterGuy326 PeterGuy326 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Change

RoleWeave separates position documents, shared knowledge and conversation memory, making a portable notebook and cross-device sharing difficult. This change provides one workspace Markdown notebook under notes/, with Notes and Drive as the default resource workflow. Positions associate with note identities, completed answers can be saved with provenance, and turns expose the note references actually used.

The notebook supports bounded local history and recovery, original attachments and image previews, and manual bidirectional Mem synchronization. Revision/hash checks and durable pre-image journals preserve notes across stale writes, interrupted syncs and failed index persistence. Concurrent edits retain conflict copies; equivalent image aliases resolve to one original while different originals are rejected. Existing knowledge is referenced in place until explicitly migrated, and legacy Doc APIs remain compatible.

CI follow-ups fix the explicit runtime package inventory, preserve conversation rendering without a preload bridge, and validate Mem as the default connection. Files are read through bounded verified descriptors with no-follow protection where available and path/identity checks on all platforms. Synchronization uses configured origins, known routes and reconstructed UUIDs.

Validation

  • Full renderer: 77 files / 1,095 tests passed, no skips; renderer type check and production build passed.
  • Full backend on Node 24 Linux/ext4: 818 passed / 821 total, no failures; three documented conditional engine/environment/Windows-only checks skipped.
  • Security/context/turn regressions: 103 passed on Linux without skips; 50 passed on Windows with one symlink-privilege skip.
  • Windows packaging/runtime/IPC: 20 passed, two platform fixture skips; the runtime inventory includes all 13 generated Vault modules.
  • Earlier local integration exercised two clients, concurrent note/image edits, original-byte hashes and interrupted sync recovery.
  • Final-head GitHub CI: all 11 checks passed, including complete Linux/macOS verification, Windows/macOS staging and installers, layout parity, dependency review, Scorecard and CodeQL with zero new alerts. The macOS retry preserved the original test assertions and timeout budget.

See docs/acceptance/workspace-vault-validation.md for reproducible evidence and docs/workspace-vault.md for limits and deployment prerequisites. Implementation and source review used automated assistance. No personal maintenance tools, credentials, deployed data or runtime artifacts are included, and newer UI changes already on main are preserved.

Rollback: revert the client change while retaining user notes/ and .roleweave/vault/ files. Legacy knowledge and Doc APIs remain compatible; the dependent Mem migration is additive.

Closes #574. Uses the canonical Mem Vault API in bytefolk/mem#235. Relates to #511.

Comment thread apps/server/src/vault/attachments.ts Fixed
Comment thread apps/server/src/vault/history.ts Fixed
Comment thread apps/server/src/vault/receipts.ts Fixed
Comment thread apps/server/src/vault/store.ts Fixed
Comment thread apps/server/src/vault/sync.ts Fixed
Comment thread apps/server/test/vault-attachments.test.ts Fixed
Comment thread apps/server/test/vault.test.ts Fixed
Comment thread apps/server/src/vault/sync.ts Fixed
Comment thread apps/server/src/vault/sync.ts Fixed
Comment thread apps/server/test/vault-attachments.test.ts Fixed
Comment thread apps/server/test/vault-attachments.test.ts Fixed
@PeterGuy326
PeterGuy326 merged commit 1650d37 into main Oct 8, 2026
17 of 18 checks passed
PeterGuy326 added a commit to bytefolk/mem that referenced this pull request Oct 9, 2026
## Summary

Add workspace-scoped Vault discovery, snapshots and atomic delta
commits. Logical note IDs keep identical and empty notes distinct;
whole-Vault CAS rejects competing stale edits with 409. Immutable
revisions, mutable heads and tombstones preserve note identity and
history.

Closes #234. Client integration: bytefolk/roleweave#575.

## Behavior and boundaries

- Existing workspace membership, read/write scopes and literal token
paths authorize every operation; properties remain untrusted data.
- Additive migration 0027 preserves existing file/auth/memory tables.
Downgrade drops Vault state and requires a backup.
- The snapshot is a separate current-state portability contract.
Existing workspace bundles and CLI/MCP/Web adapters do not transport
Vault history.
- No local login helpers, credentials, machine paths or production
deployment changes are included.

## CI baseline repair

The first run failed on unchanged vulnerable Web dependencies and an
unavailable public MinIO image, before exercising Vault code. Remove the
unpatched braces chain with official Tailwind/PostCSS 4 and
typescript-eslint 8; retain the existing theme and utility behavior with
browser compatibility tests. Build test-only MinIO/mc images from
checksum-pinned official sources and preserve isolation and every
lifecycle assertion. Audit thresholds, checks and timeouts remain
unchanged.

## Validation

Local PASS: complete Go build/vet/unit/race; full disposable PostgreSQL
integration and integration-race; clean Web install, zero-finding
Linux/Windows audits, 109 unit tests, lint/typecheck/build, all browser
acceptance; complete HTTP/CLI/MCP lifecycle with CI-exact Go 1.25.0.
Test resources were removed.

Remote verification on `18db8a26791b3827b86e8d3c9e11fec5ac171999`: all
21 checks and all 12 required checks pass, including [CI and Windows
audit](https://github.com/bytefolk/mem/actions/runs/37809406457) and
[full PostgreSQL/HTTP/CLI/MCP/browser
validation](https://github.com/bytefolk/mem/actions/runs/37809406428).
Non-author CODEOWNERS approval remains required. Public advisory
sources, compatibility checks and exact evidence: [validation
ledger](https://github.com/bytefolk/mem/blob/18db8a26791b3827b86e8d3c9e11fec5ac171999/docs/acceptance/VAULT_SYNC_VALIDATION.md).
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.

feat(notes): unify workspace Markdown vault and Mem synchronization

2 participants