40 Commits
Author SHA1 Message Date
Jamie Pine 3fd4cd315c Repoint the integration tests and examples at sources
Tests whose subject was the entry tree, locations, legacy tag tables, or
row sync of retired models are deleted. The rest track a source or browse
a directory the way production does. The indexing harness gains track(),
which waits on the walk tracking dispatched, and index_dir(), which walks
under the volume's spelling of a path, as browsing does; the hand-built
walks it replaces indexed /Users while search scoped to
/System/Volumes/Data/Users and found nothing. The harness also moves the
core's data directory beside the test files: the daemon never walks or
watches its own data, so every watcher test had been observing nothing.

The sync tests drive traffic with spaces now that indexing writes nothing
the library syncs. job_shutdown reads the pause off the bus, since the
job database closes with the core, and waits on the walk by id rather
than a sleep. The TypeScript bridge passes the daemon's device slug
instead of guessing it from the hostname, and the suites wrap
createSubscription with its current signature. Location-scoped search
cases become library-wide searches over a tracked source, and the typed
search bridge test is back in the core suite.
2026-09-18 00:08:20 -07:00
Jamie Pine 0eca870628 Separate the map of a drive from what is kept off it
A machine needs full local search over every file and a size figure the
analyser can trust. Neither is the same question as what someone chose to keep,
and the sources migration collapsed the two.

A partition is keyed by source id today and routed by longest prefix, so a
source nested inside another forks rather than narrows: two partitions, two
snapshots, two ledgers, and two uuids for one file. A tag applied through one
root is invisible through the other, which is the second-namespace problem
between two filesystem sources.

P2.7 keys the arena by medium instead. One drive, one arena, one snapshot,
whatever is persisted from it. A source says persist this subtree and owns a
data.db, so nesting is ordinary because the nested things are no longer the
same thing. The arena mints identity once per medium and a source adopts what
is already there, which is both what stops the fork and what makes creating a
source over mapped files fast.

A path under no source still has a uuid and still cannot carry an assertion,
since assertions live in a source store. Choosing to keep something is what
gives it somewhere to keep things.

Also records the completeness cost. An internal volume walks with default
rules, so /Library, ~/Library, node_modules and gitignored files never enter
the map: 262 GB indexed against roughly 900 GB used on a 1 TB drive. Rules
become view-time lenses and the walk records what it can read, which takes a
2.1M entry map to somewhere between 5 and 8M, and 1.0 GB resident to between
2.5 and 4. collection_flags already has room for a filtered bit.

Settles the nesting question in the Open register. Both live documents were
right about their own half: one filesystem owns one record namespace, and that
namespace is the arena rather than the source.
2026-08-26 16:14:08 -07:00
Jamie Pine 6b55d880d5 Delete the shared durable layer, move overlays into the source store
grouping and lib_edge had no writer, no reader and no op — Engine and
SourceManager exposed link/unlink/neighbors/upsert_grouping as pass-throughs
that nothing called. They are also the wrong shape for where Photos
enrichment is going: a person appearing in photos on three drives is a
definition replicated into three source stores, not a row in a library-level
table that outlives all three.

record_overlay moves into source.db as SourceDb::{set_overlay, get_overlay,
overlays_for}, keyed (type, external_id) with source_id dropped — the source
is now implied by which file you opened. The search router reads overlays off
the same handle it just searched instead of joining a second database.

registry.db is down to sources and data_types. No durable layer, so there is
no shared file left to argue about.

Semantic change worth knowing: deleting a source now discards its assertions,
since they live in the file being deleted. Re-index is the operation that
keeps them — replace what an ingest produced, leave record_overlay alone —
and it does not exist yet. Nothing reaches delete_source with assertions
today, so nothing regresses, but re-index has to land before either is
reachable from an op.
2026-08-22 16:58:15 -07:00
Jamie Pine 35eb522e39 Remove hardcoded local paths
Absolute paths from one developer's machine sat in an example, a shell script,
recorded benchmark metadata, task docs and design docs. The example and the
script were broken for anyone else as a result: the example now resolves against
CARGO_MANIFEST_DIR and the script derives the repo root from git. The duplicate
copy of that script under core/scripts is gone.

Also drops a pointer to a repository that is not public.
2026-08-21 13:47:42 -07:00
Jamie Pine 7ce7862c24 Coherent startup and file-backed sources
Sources resolve at startup without onboarding. Adds the Apple Photos native
adapter, collections and the analyzer, the bundle lens, and assertions with
read-time binding.
2026-08-21 13:30:14 -07:00
S.L c63f1b078b fix: update tests/examples for upstream API changes and fix sync loop busy-loop (#3057)
* fix: update tests and examples for upstream API changes

Align error types, struct fields, and constructor calls in 27 test/example
files to match current Core API:

- Box<dyn Error> -> Box<dyn Error + Send + Sync> to match Core::new()/shutdown()
- entry::ActiveModel device_id -> volume_id (field rename)
- location::ActiveModel add volume_id field (new nullable field)
- AppConfig add proxy_pairing and spacebot fields (config v5/v6)
- Re-export ProxyPairingConfig from config module
- VolumeFingerprint::new() -> from_primary/external/network_volume()
- DeviceInfo add device_type field, NetworkFingerprint public_key -> public_key_hash
- SecretKey::generate(thread_rng) -> from_bytes (rand_core version mismatch)
- SdPath::Physical.path String -> PathBuf, thumbnail_url &Uuid -> &str
- init_sync_service unwrap networking Option for Arc<dyn NetworkTransport>

* fix: prevent busy-loop in sync loop when real-time sync is active

The sync loop's Ready state used 'continue' when is_realtime_active()
returned true, which skipped the sleep at the bottom of the loop and
caused a CPU-saturating busy-loop logging 'Skipping catch-up' hundreds
of thousands of times per second. Replace with if/else so the
realtime-active branch falls through to the configurable sleep.
2026-04-18 18:51:13 -07:00
Jamie Pine 388b4dde28 cargo fmt 2026-01-24 16:14:21 -08:00
Jamie Pine 37d19adb08 chore(sync): remove legacy last_sync_at column and related functionality
- Removed the last_sync_at field from the device model and related structures, as it is now superseded by per-peer watermark tracking in sync.db.
- Updated various components, including device registration, sync setup, and messaging protocols, to eliminate references to last_sync_at.
- Introduced a migration to drop the obsolete last_sync_at column from the devices table.
- Adjusted tests and helper functions to reflect the removal of last_sync_at, ensuring they align with the new sync architecture.
2026-01-22 19:37:43 -08:00
Jamie Pine bfc4cc639b feat(volume): introduce debug volume detection example and enhance fingerprinting methods
This commit adds a new example for debugging volume detection, showcasing how to detect and display various volume properties, including auto-track eligibility and primary volume identification. Additionally, it refactors the VolumeFingerprint struct to provide stable fingerprinting methods for primary, external, and network volumes, improving the reliability of volume identification across different scenarios. These changes enhance the overall volume management capabilities and provide a clearer debugging interface for developers.
2026-01-16 06:40:53 -08:00
Jamie Pine 2881117e00 feat(tests): update testing paths for deterministic integration tests
- Modified test data paths in various integration tests to use the Spacedrive source code instead of user directories, ensuring consistent and deterministic test results across environments.
- Updated comments and documentation to reflect the new testing approach and clarify the purpose of using project source code for testing.
- Enhanced the GitHub Actions workflow to skip Rust toolchain setup on macOS self-hosted runners, assuming Rust is pre-installed.
2025-12-30 13:05:19 -08:00
Jamie Pine b555156fa7 Update TODO list and enhance job logging configuration
- Added critical tasks for remote file access and updater functionality to the TODO list.
- Updated job logging configuration to include an option for logging ephemeral jobs, improving logging flexibility.
- Enhanced the job manager to conditionally log job events based on persistence settings, ensuring better tracking of job statuses.
- Refactored the inspector component to remove unnecessary console logs, streamlining the codebase.
- Improved the selection context to eliminate redundant logging during file synchronization, enhancing performance.
2025-12-24 08:04:57 -08:00
Jamie Pine eb9ba58b6a Refactor test configurations and remove deprecated examples
- Updated the CI workflow to run tests specifically for the  package for clarity.
- Deleted outdated example test files for event serialization, location watcher, and simple metrics to reduce clutter.
- Enhanced error handling in  for better robustness.
- Improved device data handling in  by adding additional fields for comprehensive device information.
- Adjusted test assertions in  to align with updated change detection logic.
2025-12-18 03:53:29 -08:00
Cursor Agentandijamespine 29d79ee9e7 feat: Add auto-switch for synced libraries
This commit introduces an auto-switch feature for libraries created via sync. Users can now configure whether to automatically switch to a newly synced library. This involves updates to the preferences store, event handling in mobile and tauri apps, and modifications to the core library event system to include a `LibraryCreationSource` enum.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-12-15 08:45:40 +00:00
Jamie Pine cab3d4da18 cargo format 2025-12-03 15:56:27 -08:00
Jamie Pine 9c8fe660d3 Remove all emojis from codebase 2025-12-01 13:33:00 -08:00
Jamie Pine 8a3387ca69 Add memory system with archive and UI integration 2025-11-23 03:33:19 -08:00
Jamie Pine c6cda350be feat: media proxy and thumbstrip functionality
- Introduced new modules and actions for generating media proxies and thumbstrips, improving media handling capabilities.
- Added configuration, error handling, and processing logic for both proxy and thumbstrip generation.
- Updated existing media operations to integrate new functionalities, ensuring seamless media processing and user experience.
- Enhanced tests to cover new features and ensure reliability in media operations.
2025-11-17 04:24:05 -08:00
Jamie Pine 267d52d769 feat: enhance volume management with new filtering options and improved event handling; add stability tests for volume fingerprints 2025-11-14 05:20:05 -08:00
Cursor Agentandijamespine 606485c398 Refactor: Organize job logs and flatten job database
Co-authored-by: ijamespine <ijamespine@me.com>
2025-10-24 02:45:10 +00:00
Jamie Pine dcc4dc4fc1 pairing 2025-10-18 10:33:20 -07:00
Jamie Pine c9501d3773 refactor: update file references and imports for search facets 2025-10-15 23:48:18 -07:00
Jamie Pine b26e2b5f54 (epic): new SdPath addressing - lots of LSYNC, FSYNC progress - improved
testing framework
2025-10-15 07:02:36 -07:00
Jamie Pine 91137c6cc1 cleanup 2025-10-11 13:14:01 -07:00
Jamie Pine 94a52dd2df cleanup 2025-10-11 08:48:11 -07:00
Jamie Pine c77121aff8 The Spacedrive Collection 2025-10-11 07:16:16 -07:00
Jamie Pine a5c9717dcb modularize photos extension and fix all errors 2025-10-11 05:32:47 -07:00
Jamie Pine 28e3ee443d feat: Enhance sync functionality by adding sync fields to devices and implementing migration
- Added `sync_enabled` and `last_sync_at` fields to the device model to support synchronization capabilities.
- Created a migration script to update the devices table, consolidating sync-related data.
- Updated various components to ensure sync is enabled by default for new devices.
- Removed the obsolete sync partners table, streamlining the sync architecture.
- Introduced comprehensive sync integration tests to validate the new functionality and ensure robust performance.
2025-10-09 08:48:23 -07:00
Jamie Pine 2bac0d3226 feat: Integrate WASM extension system into Spacedrive
- Implemented a complete WASM extension framework, enabling secure, sandboxed plugins.
- Added core components including `PluginManager`, `host_functions`, and `permissions` for managing the lifecycle and security of extensions.
- Integrated Wasmer runtime for executing WASM modules, enhancing the platform's extensibility.
- Developed a demo extension showcasing the new API, significantly reducing boilerplate code and improving developer experience.
- Updated documentation to reflect the new architecture and provide guidance for extension development.
- Prepared for testing and validation of the extension system, marking a significant step towards a robust plugin ecosystem.
2025-10-09 01:34:04 -07:00
Jamie Pine 08adba6404 feat: Implement sync infrastructure with leader election and transaction management
- Introduced a comprehensive sync infrastructure, including a `Syncable` trait for models, enabling automatic logging of changes in a dedicated sync log database.
- Added `LeadershipManager` for managing leader election and lease tracking, ensuring reliable synchronization across devices.
- Implemented `TransactionManager` to handle atomic writes and sync logging, enhancing data integrity during state changes.
- Created a new `sync` module with necessary components such as `SyncLogDb`, `SyncLogEntry`, and sync protocol handlers for efficient communication between leader and follower devices.
- Developed integration tests to validate the sync functionality and ensure robust performance across various scenarios.
2025-10-08 06:35:28 -07:00
Jamie Pine 910dce67f5 feat: Add new documentation and enhance CLI functionality
- Introduced three new markdown files: CLI_LIBRARY_SYNC_COMPLETE.md, IMPLEMENTATION_COMPLETE.md, and LIBRARY_SYNC_SETUP_IMPLEMENTATION.md for comprehensive documentation.
- Updated various CLI domain modules to improve argument handling and output formatting.
- Enhanced device, index, job, library, location, network, and search modules for better integration and user experience.
- Refactored code across multiple domains to improve maintainability and clarity.
2025-10-04 21:31:47 -07:00
Jamie Pine 3a94a773db refactor: Update event handling and Swift client generation
- Enhanced the `Event` enum documentation for clarity on its purpose.
- Modified the Swift client generation script to create event samples for enum generation.
- Updated the Swift client to utilize the new `EventElement` type for event handling.
- Improved error handling and logging in the event subscription process.
- Refactored the types generated for Swift to align with the new event structure.
2025-09-21 11:44:40 -07:00
Jamie Pine f83ac9f829 refactor: Clean up emoji handling in Rust files and improve output formatting
- Refactored `remove_emojis.sh` to enhance the emoji removal process by using a more efficient Python script for detecting and removing 3D/colorful emojis followed by spaces.
- Updated various Rust files to remove emoji characters from log messages and print statements, resulting in a cleaner output.
- Improved user experience with color-coded progress and results during the emoji removal process.
- Ensured that the script counts processed files and reports modifications accurately.
2025-09-19 18:40:19 -07:00
Jamie Pine 75faba76da feat: Add script to remove 3D/colorful emojis from Rust files
- Introduced `remove_emojis.sh`, a Bash script designed to identify and remove 3D/colorful emojis followed by a space in Rust files while preserving simple symbols.
- The script counts the number of Rust files processed and reports modifications made.
- Updated various Rust files to remove emoji characters from log messages and print statements for a cleaner output.
- Enhanced user experience by providing color-coded output for progress and results during the emoji removal process.
2025-09-19 18:28:42 -07:00
Jamie Pine ecdcf04066 Refactor logging output to remove emojis and improve consistency
- Updated various print statements across the codebase to remove emoji indicators, ensuring a more uniform logging style.
- Adjusted output messages in CLI, job handling, and event processing to enhance clarity and maintainability.
- Refactored job-related logging to provide clearer status updates without emoji clutter.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-18 22:44:10 -07:00
Jamie Pine 4c00502511 Update dependencies and refactor error handling in CLI
- Upgraded `bincode` to version `2.0.0-rc.3` with `serde` feature enabled in `Cargo.toml`.
- Refactored error handling to accommodate changes in `bincode` by updating the error conversion implementation in `error.rs`.
- Modified deserialization logic in macros to align with the new `bincode` API.
- Removed outdated metrics test file from the core examples.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-18 17:57:14 -07:00
Jamie Pine b330807c0e Implement FS Event Pipeline Testing Guide and update Cargo.toml for CLI name change
- Added a comprehensive testing guide for the FS Event Pipeline, detailing metrics collection, logging, and troubleshooting steps.
- Updated the CLI package name from "spacedrive-cli" to "sd-cli" in Cargo.toml for consistency.
- Modified various files to reflect the new package structure and improve logging and metrics handling.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-09-18 15:31:25 -07:00
Jamie Pine 56a5c6f0af feat: Update search functionality with new tests and dependencies
- Added a new end-to-end search test with real data to validate the complete search workflow, including file indexing and search result display.
- Removed the outdated search integration test to streamline testing efforts.
- Introduced the `chrono` dependency in the CLI for enhanced date handling in search operations.
- Updated the search output structure to include matched content and improved pagination handling.

These changes enhance the robustness of the search feature and ensure better integration with real-world data scenarios.
2025-09-17 00:28:45 -07:00
Jamie Pine 80866f1790 feat: Make execute_fast_search public for external access
- Changed the visibility of the execute_fast_search method from private to public, allowing it to be accessed outside the FileSearchQuery implementation.
- This modification facilitates integration with other components that require fast search capabilities using FTS5.
2025-09-17 00:04:32 -07:00
Jamie Pine ed7e101d71 more 2025-09-07 01:51:35 -04:00
Jamie Pine 29a87a91ce huge refactor 2025-09-06 21:00:37 -04:00