Repository navigation
deployment
Sych ships one Rust binary for local reviews and combined or split server roles, plus a container that includes the dashboard. Deploying a server requires trusted configuration, explicit database migration and durable artifact access; building the public documentation website is a separate path.
| Path | What is shipped | Source |
|---|---|---|
| Native release |
sych archive, LICENSE, README and SHA-256 file |
.github/workflows/release.yml, docs/INSTALL.md
|
| Source install |
sych-app package installs the sych executable |
crates/sych-app/Cargo.toml, docs/INSTALL.md
|
| Reviewer container | Rust binary, pinned Rust toolchain and built Vue dashboard |
Dockerfile, .github/workflows/image.yml
|
| Public documentation | Static Astro output in site/dist/
|
.github/workflows/pages.yml, site/package.json
|
Current package version is 0.2.0. Native release targets are x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu and aarch64-apple-darwin; Linux binaries are built on Ubuntu 22.04 for a glibc 2.35 floor. Verify the archive's checksum before installing. Other platforms can build from source with the supported Rust toolchain.
cargo install --git https://github.com/bondiano/sych --tag v0.2.0 --locked sych-appFor a local CLI store, run sych db migrate before the first review. Defaults are .sych-data/sych.db and .sych-data/artifacts in the working directory. A local review does not publish to GitHub. See Getting started and CLI.
Dockerfile builds the dashboard with Node/pnpm, then builds sych with Rust 1.94.1 and a required SYCH_BUILD_COMMIT build argument. The runtime retains Rust, rustfmt and Clippy for reviewed Rust workspace facts, plus Git and CA certificates.
The image:
- runs as UID 10001, with working directory
/data; - copies the dashboard to
/usr/share/sych/ui; - sets
XDG_CACHE_HOME=/data/cache,CARGO_HOME=/data/cargoandCARGO_NET_OFFLINE=true; - exposes port 8080 and defaults to
sych serve --config /etc/sych/sych.yaml.
Mount durable storage writable by UID 10001 and mount configuration/credential files appropriately. Offline Cargo is not an offline guarantee for GitHub, model providers or pinned-tool downloads. The Dockerfile does not declare an application healthcheck; an operator must wire the real HTTP probes.
.github/workflows/image.yml builds/pushes ghcr.io/bondiano/sych:<commit> only from main and reports the immutable digest. .github/workflows/release.yml runs for v* tags or an existing manually selected tag, verifies the binary version, packages three native targets and creates a draft release. Notes/publication are manual. The release job tags the image already built for that commit as ghcr.io/bondiano/sych:<version>; it fails rather than rebuilding a missing main image.
For the repository's production self-review, a human pins the image digest and matching reviewer_commit outside this repository. A PR cannot swap its reviewer. See Development workflow.
| Command | Runs |
|---|---|
sych serve --config sych.yaml |
HTTP intake/API/UI, scheduler, worker, publisher and maintenance |
sych api --config sych.yaml |
HTTP intake/API/UI, without background job claiming |
sych worker --config sych.yaml |
Scheduler/worker/publisher/maintenance, with only health and metrics HTTP routes |
crates/sych-app/src/server/mod.rs selects roles; crates/sych-app/src/server/engine.rs runs background loops. Models default to the configured role plan; --models PROFILE or --models fake explicitly selects another mode.
Use PostgreSQL for the server through storage.database_url_env; the local CLI defaults to SQLite. Split processes must use consistent trusted configuration, the same database and the same durable artifact files. PostgreSQL alone does not share local artifact directories between hosts.
workers.concurrency must be 1 in this revision: the validator enforces one claim loop per process in crates/sych-core/src/config/server.rs. Separate workers can claim separate jobs with leases/fences, but database writes still serialize under a lock. Do not infer throughput or multi-host storage guarantees from role separation.
Start from docs/examples/server/sych.yaml, then configure the GitHub App, allowed repositories, provider profile, price catalog, bounded budgets and durable paths. The permissions/events and CI report mapping are in docs/SERVER.md and Server admission.
Secret fields name environment variables, not secret values. The example uses variables for the App key file path, webhook secret, API-client token and database URL. Model/OAuth/Slack credentials are additional only when configured. Missing required startup secrets fail closed.
The default HTTP bind is 127.0.0.1:8080. A non-loopback bind requires configured API clients and behind_tls_proxy: true; deploy behind real TLS rather than setting that flag alone. API tokens must be at least 16 bytes. Browser sign-in/mutations need a correct http.public_base_url and the corresponding OAuth/session settings. See Operator capabilities and auth.
With the reviewed binary/image and intended environment:
sych config validate --config sych.yaml
sych db migrate --config sych.yaml
sych serve --config sych.yamlOnly db migrate changes schema. Startup does not migrate automatically and refuses missing or newer migrations. Validate/migrate using the same build/configuration that will serve traffic. Run only one intentional migration operation while writers and GC are stopped for a controlled upgrade.
Then check /health/live and /health/ready, a signed App ping, a small test PR and the resulting durable receipt/job/result/publication. Readiness alone does not prove GitHub or model credentials work. A doctor --scm-smoke test modifies a test PR; a doctor --probe-model test spends money and needs separate approval.
The application schema has 25 tables, excluding _sqlx_migrations. This count comes from crates/sych-storage/src/import/schema.rs; older table counts in docs/STORAGE.md are stale. The migration histories are migrations/sqlite/ and migrations/postgres/; changing a configured database URL does not copy history.
Artifacts are immutable, tenant/access-scope-partitioned, content-addressed files verified by hash on read. A database backup without those files is not a complete restore.
For SQLite to PostgreSQL cutover:
- Stop every writer and GC, take a consistent SQLite snapshot and preserve the matching artifact directory.
- If needed, migrate a copy of an older supported SQLite snapshot with its matching reviewed build; never force unknown/newer schemas through import.
- Configure an empty PostgreSQL target and the copied artifact files, then explicitly migrate the target.
- Import and inspect the committed verification report:
sych db migrate --config pg.yaml
sych db import-sqlite --source /protected/snapshot/sych.db --config pg.yamlcrates/sych-storage/src/import.rs and crates/sych-storage/src/import/schema.rs require the current valid source schema and empty target application tables. One write transaction copies all 25 application tables, restores predecessor links and identities and verifies ordered counts/digests. Extant artifact rows need safe keys, expected sizes and matching file hashes. Any copy/verification error rolls back imported rows; source data/files remain untouched. Already-pruned references stay unavailable.
Keep writers stopped until verified cutover. Once PostgreSQL accepts new writes, the old SQLite snapshot is stale, not a safe rollback target. Preserve PostgreSQL plus its files and fix forward.
For SQLite backup, stop writers/GC, use SQLite's backup API and copy artifacts from that same stopped interval; preserve the original database/WAL. For PostgreSQL, retain both a database backup and matching artifact files. The repository does not demonstrate a complete corporate restore exercise, RPO or RTO. See Storage and docs/STORAGE.md.
| Data | Implemented policy |
|---|---|
| Source snapshot and diff manifest artifacts | 7 days |
| Other artifact kinds, including result, evidence, analysis, checkpoints and tours | 30 days |
Active-run artifacts or unfinished PENDING/PUBLISHING/UNCERTAIN publication artifacts |
Pinned against age deletion |
| Orphan artifacts without an active/completed keeper | One-hour grace |
| Consumed intents, eligible webhook receipts and terminal jobs | 30 days |
| Change events and settled/released model attempts | Configured retention; default 90 days |
| Final publication operations | 90 days |
| Browser sessions | Once expired |
RESERVED/UNKNOWN charges, unresolved publications, run rows and audit log |
Not removed by these age rules |
| Mirrors | CLI pruning after seven days without fetch; active repositories protected |
Sources are crates/sych-storage/src/lib.rs, crates/sych-storage/src/gc.rs, crates/sych-storage/src/retention.rs and crates/sych-app/src/server/mirrors.rs. Workers prune artifacts/history at startup and then daily; mirror pruning is a separate CLI action:
sych cache prune --config sych.yaml --dry-runReview the plan before omitting --dry-run. Artifact deletion rechecks eligibility under the database write lock; a newly committed pin can keep a listed candidate. Raw CI archives are read in memory, not retained as original zip files.
Set http.ui_dir to /usr/share/sych/ui for the container's bundled build. Merely having the files in the image does not enable the route: the example config leaves the setting null.
crates/sych-app/src/server/ui.rs serves /ui/ on the API origin and redirects / there when configured. Page paths fall back to index.html; missing /ui/assets/ files return 404. Successful hashed assets are immutable-cacheable; other responses use no-cache. The client is built for /ui/ in web/vite.config.ts. See Dashboard.
The public documentation site is not this dashboard. .github/workflows/pages.yml runs npm ci, npm test and npm run build in site/ for relevant docs/README/site changes. PRs only build. Eligible main builds upload site/dist and deploy through the github-pages environment with scoped Pages/OIDC permissions. site/astro.config.mjs sets the /sych/ base; the source content is docs/, not droid-wiki/.
The explicit graceful-shutdown signal path in crates/sych-app/src/server/mod.rs handles Ctrl-C/SIGINT: intake stops, then claiming stops. In-flight jobs retain their leases until expiry/recovery; uncertain external writes reconcile rather than being blindly repeated. Do not assume a completed remote write was absent after a crash or that the code installs a separate SIGTERM drain handler.
No deployment or migration was executed while writing this wiki. The shipped sources define process roles, probes, metrics and example alerts, not a complete cluster, ingress, backup service or observability platform. Continue with Monitoring and Workers and publication.