Skip to content

Add VexFS filesystem support for SQLite and PostgreSQL - #24

Draft
vibeinging wants to merge 28 commits into
mainfrom
feature/agent_files
Draft

Add VexFS filesystem support for SQLite and PostgreSQL#24
vibeinging wants to merge 28 commits into
mainfrom
feature/agent_files

Conversation

@vibeinging

Copy link
Copy Markdown
Collaborator

What changed

  • add VexFS as a database-managed filesystem for VexDB Lite
  • provide unified vexdb fs / vexfs commands, local shell workflows, archive import/export, version history, snapshots and restore
  • add SQLite local storage and PostgreSQL shared-workspace storage; DuckDB is intentionally out of scope
  • add macOS NFS/FSKit integration and Linux FUSE integration, including package and platform checks
  • add PostgreSQL staged block publishing, background batching, backup/recovery, cross-gateway visibility and indexed grep evaluation
  • harden PostgreSQL reconnect behavior with bounded asynchronous libpq I/O and cache resynchronization after lost notifications
  • harden macOS gateway cleanup against PID reuse by validating the process start identity, mount source and filesystem identity before signaling

Why

VexDB Lite should expose database-owned file management that agents can use through normal filesystem commands while retaining database permissions, history, backup and remote workspace sharing.

The final recovery work closes three mount-safety gaps found during review: a lost PostgreSQL notification could leave stale metadata cached, an established but non-responsive TCP connection could block a mount operation indefinitely, and a reused macOS PID could target the wrong process during gateway cleanup.

User impact

  • local SQLite workspaces can be mounted and used from Bash-compatible tools
  • PostgreSQL workspaces can be shared across gateways and recover after connection or database restarts
  • file versions and snapshots remain managed by the database
  • network failure returns within a bounded time instead of hanging the filesystem
  • stale gateway records cannot kill an unrelated reused PID

Validation

  • SQLite spec: 30 passed, 0 failed
  • PostgreSQL libpq runtime: 134 checks passed
  • PostgreSQL network cut and blackhole recovery: 31 checks passed; established and new-connection blackholes fail in about 5 seconds; oom_kill=0
  • PostgreSQL strict crash recovery: 21 checks passed; oom_kill=0
  • macOS Release build plus runtime, static and platform registry smoke checks passed
  • Linux AArch64 full Release build passed with a 1 GiB memory limit and one build job, covering the SQLite loadable/static targets, VexFS runtime, CLI, FUSE helper and smoke binaries
  • git diff --check passed

Scope boundary

DuckDB filesystem adapter work is not included in this PR.

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