Repository navigation
reference configuration
Active contributors: Vassiliy Kuzenkov.
Sych builds an effective configuration from engine defaults, an explicitly supplied trusted server file and accepted repository policy. Policy cannot authorize new credentials, model endpoints or executable commands; proposed HEAD policy is displayed but not applied to its own review.
| Layer | Input and authority | Recorded identity |
|---|---|---|
| Engine |
ServerConfig::engine_default: personal mode, no providers, execution/dependency installation off |
Engine package version |
| Server | Explicit --config file, conventionally sych.yaml; no automatic working-tree server-file discovery |
Origin and raw file SHA-256 |
| Repository |
.sych/ from pinned target tip, or explicit local --policy-ref; missing files use repository defaults |
Each accepted file path, ref/commit origin and raw SHA-256 |
| Proposed policy | Reviewed HEAD .sych/ compared with trusted policy |
PolicyDiff, including parse/version problems; never another active layer |
EffectiveConfig::build in crates/sych-core/src/config/effective.rs computes config_hash from normalized server + repository config, and rules_hash from normalized rules, effects, deployment model and contract hashes. PolicySnapshot also binds policy source and AUTHORIZATION_POLICY_VERSION = 1; creation time does not determine its identity.
These are typed defaults and validation, not arbitrary recursive YAML merging. For example, omitting budgets.analysis selects its economical default, but supplying a Budget object defaults its omitted optional fields to None; it does not inherit every economical cap. The request output cap separately defaults to 2,000. Inspect effective output rather than assuming a partial budget edit preserved the other limits. Sources: crates/sych-core/src/config/server.rs, crates/sych-core/src/model/budget.rs.
sych config validate --config sych.yaml
sych config validate --config sych.yaml --repo .The second command reads working-tree policy for authoring validation, explicitly not a trusted-ref review. Parsing rejects unknown configuration fields, uses snake_case YAML enums and reports redacted file/key-path errors. Examples live in examples/personal/sych.yaml, examples/corporate/sych.yaml and examples/personal/.sych/; they are examples, not the definitions of current defaults. Sources: crates/sych-app/src/config.rs, crates/sych-core/src/config/mod.rs, crates/sych-app/src/review/mod.rs.
ServerConfig requires schema_version: 1 and mode: personal|corporate when a server file is supplied.
| Section | Fields, defaults and constraints | Definition |
|---|---|---|
storage |
database_url_env, local artifact_store: {kind: local, path}, retention. Default database .sych-data/sych.db, artifacts .sych-data/artifacts, relative to config directory or current directory without config |
crates/sych-core/src/config/server.rs; crates/sych-app/src/storage.rs
|
storage.retention |
model_attempts_days: 90, change_events_days: 90; positive. Unresolved charge rows are not age-pruned |
crates/sych-core/src/config/server.rs |
http |
bind: 127.0.0.1:8080, no public URL/UI/clients/instances, behind_tls_proxy: false, metrics allow IPv4/IPv6 loopback |
crates/sych-core/src/config/http.rs |
http.api_clients |
Unique name/token_env, tenant default local, explicit repositories, cumulative reader, triage, writer, maintainer roles. Loaded tokens must be at least 16 bytes |
crates/sych-core/src/config/http.rs; crates/sych-app/src/server/mod.rs
|
http.instances |
Name and callable base URL, unique; must include own public_base_url. Each target has independent sign-in |
crates/sych-core/src/config/http.rs |
workers |
concurrency: 1, lease_seconds: 60, heartbeat_seconds: 15; currently concurrency must equal 1; heartbeat positive and shorter than lease |
crates/sych-core/src/config/server.rs |
publication |
Only mode: advisory; max_new_inline_comments: 8; publish_check: false. Connection and request permission still apply |
crates/sych-core/src/config/server.rs |
logging |
raw_prompts: false, raw_responses: false; these fields are declared configuration, not evidence of an implemented raw-dump feature |
crates/sych-core/src/config/server.rs |
redaction |
Additional token_prefixes, secret_keys, regex patterns; built-ins remain enabled |
crates/sych-core/src/config/redaction.rs |
Non-loopback HTTP binding requires API clients and behind_tls_proxy: true; corporate mode requires clients even on loopback. Sych does not terminate TLS merely because that flag is true. Storage accepts SQLite paths/URLs or PostgreSQL URLs, and migration remains explicit. See Deployment and Storage.
Money is integer micro-USD, so 1,000,000 = USD 1. The table is Budgets::default, not a claim that every optional field applies to every tenant pool.
| Purpose/pool | Money | Attempts | Input tokens | Output tokens | Parallel | Active deadline |
|---|---|---|---|---|---|---|
analysis |
600,000 | 12 | 512,000 | 24,000 | 2 | 300 seconds |
tour |
100,000 | 2 | Unset | Unset | Unset | Unset |
followup_session |
150,000 | Unset | Unset | Unset | Unset | Unset |
tenant_daily |
3,000,000 | Unset | Unset | Unset | Unset | Unset |
tenant_weekly |
Unset | Unset | Unset | Unset | Unset | Unset |
tenant_monthly |
60,000,000 | Unset | Unset | Unset | Unset | Unset |
playground_daily |
Unset, playground disabled | Unset | Unset | Unset | Unset | Unset |
Each Budget has max_cost_micro_usd, max_attempts, max_input_tokens, max_output_tokens, max_output_tokens_per_request, max_parallel_calls, active_deadline_seconds. Configured values must be positive. The per-request output default is 2,000, including reasoning. Tenant pools consume money caps; analysis/tour/follow-up also have purpose-specific limits. Playground needs an explicit extra daily money pool no larger than tenant daily. Validation checks money-pool containment where both caps are set.
Gateway admission reserves before each initial/repair/fallback attempt. Tenant day, Monday-start week and calendar month are UTC. Run caps survive retries and month changes; held/unknown charges count, and subscription fixed fees are allocated once per provider/month. API price cards require a conservative output bound; observable subscriptions do not gain a hard output guarantee. Sources: crates/sych-core/src/config/server.rs, crates/sych-core/src/model/budget.rs, crates/sych-storage/src/ledger.rs. See Models and budgets for exact accounting.
models contains providers, profiles, roles, deep_roles, optional fallback, and optional price_catalog_file.
-
Provider: adapter, endpoint, optional transport,
api_key_env/connection_ref_env/executable_env, allowed modes, optional{amount_micro_usd, allocated_micro_usd}fixed fee andoverage_disabled. -
Profile: provider; exactly one of
modelormodel_env; adapter-matchingbilling_kindandenforcement; optional reasoning effort and per-discovery unit/shown-context caps. OpenRouter additionally requires explicitupstreams, forbidden on other adapters. -
Roles:
reviewer,verifier,risk_auditor,explainer,followup. Deep roles override ordinary roles where assigned. An explicitly selected profile pins the primary route instead. -
Fallback: triggers
quota_exhausted|rate_limited|transient|timeout|unsupported_capability; flat profile/role/provider chains, cooldown,revert_policy: cooldown_expiry; waiting for a usage reset is unsupported. Duplicate/unknown/self-referential profile entries are rejected. -
Price catalog:
schema_version, datedrevision, model-keyedpriceswithinput_per_mtokandoutput_per_mtokin micro-USD per million tokens.
Subscriptions are permitted only in personal_local, not hosted personal service or corporate review. OpenRouter cannot be a corporate route. openai_compatible is a config adapter without an implemented transport in this revision; the corporate example is not proof that such a review can execute. Sources: crates/sych-core/src/config/models.rs, crates/sych-core/src/config/server_models.rs, crates/sych-app/src/backend.rs.
| Configuration | Meaning |
|---|---|
tooling.dependency_install: false |
Default: no dependency preparation for semantic analysis |
tooling.sandbox.backends: [bwrap, docker] |
Try in order when installation enabled |
tooling.sandbox.on_unavailable: fail |
Alternative degrade continues with explicit missing-dependency limitations, not an unsandboxed install |
tooling.sandbox.docker_image |
Required digest pin if Docker is a configured installation backend and installation is enabled |
execution.enabled: false |
Default: no targeted repository code execution |
execution.allowed_profiles, execution.profiles
|
Admin-approved Docker profiles only; image digest, absolute executable, literal arguments or closed param/one_of choices, positive timeout |
| Profile resources |
memory_mb: 2048, cpu_millis: 2000, pids: 512; all positive |
Profile report, compare_base
|
Optional CI report format; base comparison requires a report and only annotates head outcomes |
Installers need registry networking and disable build/script hooks; targeted checks use no-network containers. They are distinct security boundaries, not interchangeable “sandbox mode” switches. Sources: crates/sych-core/src/config/tooling.rs, crates/sych-core/src/config/execution.rs, crates/sych-adapters/src/sandbox.rs. See Security and Pinned facts.
scm.github[] binds connection/tenant/provider identity, trusted API/Git addresses, App ID, private-key-file and separate webhook-secret environment names, exact repository allowlist and bot login. Defaults include GitHub public API/Git endpoints, tenant local, sandbox environment, publish: false, checks: false, 2 MiB webhook bodies. CI selectors bind expected report ID to exact workflow/event/job/artifact/path and optional checkout manifest; artifact redirect hosts are separately allowlisted.
Production connections require self_review and a full trusted reviewer_commit; bondiano/sych is always treated as production. Optional oauth names App client ID, a distinct client-secret environment reference and trusted GitHub web base. Source: crates/sych-core/src/config/scm.rs.
notifications.weekly_digest selects tenant, weekday (Monday), hour UTC (9) and Slack webhook and/or SMTP email. Webhook URLs/passwords are environment references. SMTP defaults to required STARTTLS on 587; plain is loopback-only. slack slash commands separately configure signing secret, tenant and repository reader scopes. Sources: crates/sych-core/src/config/notifications.rs, crates/sych-core/src/config/slack.rs.
Only configured policy files and .sych/contracts/ content belong in the accepted .sych/ tree; unknown files, unreadable special entries and policy files over 1 MiB are rejected. File locations must remain under .sych/, outside contracts and distinct from .sych/config.yaml.
| Area | Default or contract |
|---|---|
review |
Language en (ru also supported), all six profiles: correctness, project_rules, side_effects, migration_compatibility, infrastructure, nitpicks; draft policy manual_only; no fixture paths |
policy |
source: target_tip, rules .sych/rules.yaml, effects .sych/effects.yaml, deployment .sych/deploy.yaml
|
context |
Initial 16,000; request 48,000; source files 80; graph depths 1/3; expansion rounds 2. The shown-code “token” window is measured in bytes, not the provider tokenizer |
ci |
Wait 180 seconds; no expected reports. Each report needs ID, nonempty path patterns and format, optionally required_for
|
nitpicks |
Enabled, collapsed_summary
|
tour |
Enabled, generation on_request, target steps 5 |
Repository validation requires initial context ≤ request context ≤ configured analysis input ceiling and initial depth ≤ max depth. review.fixture_paths identifies deliberately labelled data; do not classify product code as fixtures to suppress findings. Sources: crates/sych-core/src/config/repo.rs, crates/sych-adapters/src/git/policy.rs.
RulesFile carries schema version and rules. Each rule has unique uppercase ID, positive version, title, invariant|preference, required flag, optional violation severity, owner role/team, scope, statement, rationale, contract references, acceptance kinds/criteria and exceptions. Required rules must be invariants and declare severity; preferences cannot become mandatory by wording alone.
Exceptions need path scope plus expiry or completion condition. They record reason, owner and author; they do not rewrite VIOLATED/UNKNOWN. Referenced contracts must exist in the accepted .sych/contracts/ tree. A proposed rule meaning change without a version bump is reported.
EffectsFile registers language/symbol matches, effect kind, optional transaction guarantee and implementation/contract references. Deployment policy is the typed DeploymentModel, not arbitrary environment discovery. Sources: crates/sych-core/src/config/rules.rs, crates/sych-core/src/config/effective.rs. See Deployment checks.
| File | Change here |
|---|---|
crates/sych-core/src/config/effective.rs |
Layer provenance, normalized hashes and policy diff |
crates/sych-core/src/config/server.rs |
Server defaults, budget fields and ceiling validation |
crates/sych-core/src/config/repo.rs |
Repository fields/defaults |
crates/sych-core/src/config/rules.rs |
Rule/effect/exception validation |
crates/sych-app/src/config.rs |
Filesystem authoring reads and redacted display |
crates/sych-core/tests/config/main.rs |
Strict decoding, defaults and trust contracts |
Preserve hashes for absent optional additions deliberately, and test provenance/version effects when adding fields. Generated document relationships are explained in Data models.