How cartert27/scion works
Scion is a Rust source-control system for always-online clients, coding agents, and CI. A client uses the CLI or working-copy library to import or edit a repository, upload changes, query history, and materialize full or sparse checkouts; server-side history and expensive operations support that workflow. The server exposes gRPC services over persistent metadata and object storage, with optional daemon caching. The README documents these capabilities; sampled source confirms selected client, query, server, derived-data, and storage wiring, but not every subsystem connection.
Main entry points: app.rs Server application · client.rs gRPC client · query.rs Query handlers · history_query.rs History queries
Components 21
Client workflows
- Scion CLI
crates/scion-cli/src/cli/args.rs - Working copy
crates/scion-wc/src/checkout.rs - Git importer
crates/scion-import/src/import/git.rs - Local daemon
crates/scion-daemon/src/daemon.rs - gRPC client
crates/scion-proto/src/client.rs
Server services
- Server application
crates/scion-server/src/app.rs - Query handlers
crates/scion-server/src/handlers/query.rs - History queries
crates/scion-server/src/handlers/history_query.rs - Write and ref handlers
crates/scion-server/src/handlers/write.rs
History and data
- History operations
crates/scion-history/src/create.rs - Merge engine
crates/scion-merge/src/merge3.rs - Derived data
crates/scion-derived/src/engine.rs - Immutable objects
crates/scion-object/src/changeset.rs
Persistence
- Storage interfaces
crates/scion-store/src/storage.rs - CockroachDB metadata
crates/scion-store-crdb/src/store.rs - S3 object store
crates/scion-store-s3/src/store.rs
Identity and extensions
- Auth and access
crates/scion-auth/src/service.rs - Authorization policy
crates/scion-policy/src/policy.rs - Content redaction
crates/scion-redaction/src/redactor.rs
Other components
- Developer or agent
- GitHub OAuth
Connections 23
- Developer or agent → Scion CLI: runs commands
- Scion CLI → gRPC client: sends RPCs
- Working copy → gRPC client: fetches and writes
- Git importer → gRPC client: publishes history
- gRPC client → Server application: calls gRPC
crates/scion-proto/src/client.rs - Server application → Query handlers: routes requests
crates/scion-server/src/app.rs - Server application → History queries: routes requests
crates/scion-server/src/app.rs - Server application → Write and ref handlers: routes requests
- Query handlers → Authorization policy: checks access
crates/scion-server/src/handlers/query.rs - History queries → Authorization policy: checks access
crates/scion-server/src/handlers/history_query.rs - Query handlers → Merge engine: computes hunks
crates/scion-server/src/handlers/query.rs - History queries → History operations: reads log
crates/scion-server/src/handlers/history_query.rs - History operations → Storage interfaces: persists history
- Query handlers → Immutable objects: reads objects
crates/scion-server/src/handlers/query.rs - Storage interfaces → CockroachDB metadata: uses metadata backend
- Storage interfaces → S3 object store: uses blob backend
- Server application → Derived data: assembles derivation
- Server application → Auth and access: configures authentication
- Server application → Content redaction: applies redaction
- Auth and access → GitHub OAuth: authenticates with
- Local daemon → gRPC client: forwards requests
- Developer or agent → Working copy: checks out paths
- Developer or agent → Git importer: migrates Git history