CSM configuration is validated before the affected runtime starts. Valid defaults remain unchanged, but malformed explicit input is rejected instead of being silently coerced or ignored.
- Boolean values accept
trueorfalse, case-insensitively. Values such asyes,1, or an empty string fail with the variable name. - Integer fields require finite whole numbers. Fractional counts, durations, sizes, and limits fail.
- Numeric threshold fields accept finite decimal or scientific notation. Trailing text, hexadecimal,
NaN, and infinity fail. - Parsed numeric values are then checked against field-specific semantic ranges. Timer intervals,
output sizes, capture limits, percentages, and counts cannot silently accept unsafe negative,
zero, overflow-prone, or out-of-policy values. The existing
ttl.defaultDaysceiling remains 365. - A present
.envfile supports comments,export KEY=value, quoted values, and unquoted inline comments. Invalid variable names, missing separators, unterminated quotes, or unexpected trailing text fail with a line number. Values are never included in parse errors. - Existing process environment values take precedence over
.envvalues.
- TTL values define eligibility; cleanup is not an automatic startup task.
- Cleanup requires a project, previews by default, and mutates data only with explicit
apply=true. - The longest matching type, importance-band, or grace-period duration wins.
- Applied runs are capped at 1,000 memories by default and 10,000 maximum.
- Default importance retention is 30 days for low, 90 for medium, and 180 for high importance.
- Database cleanup does not erase separate exports, generated documents, logs, or backups. See Data Privacy and Lifecycle.
CSM_DATABASE_PROVIDERispostgresorsqliteonly.- PostgreSQL URLs must use the
postgres:orpostgresql:scheme. CSM_REQUIRE_EXPLICIT_DATABASE_URL=truerequiresCSM_DATABASE_URLfor PostgreSQL. It does not impose a PostgreSQL URL on the legacy SQLite execution path.- SQLite paths must be non-empty and cannot contain NUL characters.
- PostgreSQL startup ignores SQLite-only path variables, and SQLite startup ignores PostgreSQL-only pool and TLS variables. An invalid inactive-provider setting cannot block the selected backend.
CSM_EMBEDDING_PROVIDER=openairequires a non-emptyOPENAI_API_KEY.- Ollama endpoints must be valid HTTP or HTTPS URLs.
test/config-strict-parsing.test.ts covers valid dotenv syntax, malformed records, secret-safe errors,
strict booleans, exact decimal parsing, integer rejection, provider prerequisites, and the PostgreSQL
versus SQLite explicit-URL boundary. Existing provider and re-entry configuration tests protect valid
defaults and backend capability gating.
This contract does not make SQLite a Coordination Fabric backend. Coordination Fabric remains PostgreSQL-only; SQLite remains supported only for the documented legacy CSM path.