Skip to content

Stable release 0.3.0

Troubleshooting, bounds and choosing an engine ​

An allowed check returns True/Ok(true); a valid denial returns False/Ok(false). An invalid request, storage problem, undefined cycle or exhausted bound raises an exception/returns Err. Never catch every exception and silently treat it as a normal denial or grant. Keep a distinct operational error path and decide your application's response explicitly. Invalid Python string arguments may raise ValueError; negative or unrepresentable unsigned limits can raise OverflowError before engine validation.

SymptomWhat to check
Python import/build failsCorrect venv/interpreter, CPython >=3.11, matching wheel platform; source build needs Rust 1.99.0, C tools and Python headers
Current Rust example fails with an alpha dependencyCurrent docs use the constructors and check_str added in 0.1.0; use a matching dependency, or the alpha tag's own docs
SQLite StorageError on openingInterpreter SQLite >=3.26.0 and sqlite3.threadsafety > 0; do not install a second SQLite build to bypass this
ForeignConnectionMismatchSame file (not an in-memory SQLite connection), or same Postgres cluster/database; configured Postgres schema is fixed by the engine
Foreign-write ValueError / TypeErrorTransaction already open and correct connection type; sync write needs a synchronous driver. Version 0.2.0 uses write_async for supported async Postgres drivers
RevisionPending / future revisionCommit first; engine reads cannot see uncommitted data; AtLeast does not wait indefinitely
WriteRolledBackDiscard the Postgres pending token; SQLite rollback cannot be detected from its known number
REVISION_EXPIREDGC passed your revision; restart pagination from a fresh snapshot if appropriate
NotMigrated / StorageVersionTooNewRun the matching migration as deploy role; do not downgrade metadata or mutate internal tables
TLS handshake failurePlatform CA trust and DSN sslmode; foreign driver's TLS is configured separately
Other commits stall / PembaWarningLong transaction, early constraints or prepared 2PC transaction holding the revision lock
Transaction conflictRoll back and retry the complete app transaction with bounded backoff; also handle driver COMMIT errors
Schema change rejectedRemove orphaning live relationships before changing the schema
Lookup omits/duplicates between pagesUse the first result's revision for every page; consider concurrent GC

For unexpected permissions, use pemba check --explain, Python check_with_trace, or Rust Engine::check_with_trace. CLI exit codes are 0 allowed, 1 denied, 2 error; --json exposes the trace for tools. Use a fixture or the memory-only playground to share a model, without credentials or sensitive identifiers. The CLI does not offer a general Postgres migration/repair command.

Bounds ​

These defaults bound engine work. Rust configures them through EngineConfig setters; Python exposes max_depth on engine construction, not every Rust limit.

LimitDefault
Evaluation depth50
Operations in one write1,000
Rows per filtered delete10,000
Lookup results per page1,000
Lookup candidate nodes200,000
Relationships read per check node100,000
Store reads per check200,000
Recorded trace nodes10,000

Evaluation limits fail closed (EvaluationLimitError); they do not mean denied. Trace capacity is different: exceeding it truncates the explanation, leaving the computed answer unchanged. Page limits paginate results; a lookup candidate/work limit is an error, not silent partial success. Prefer bounded models and measured changes to increasing every limit. Inspect known differences for cyclic data, wildcard exclusions and unsupported DSL features.

When a service is a better fit ​

pemba fits one application, or a few services sharing one database, that wants app rows and permissions to commit together. Choose SpiceDB or another Zanzibar service when many languages/services need centralised permissions, horizontal or multi-region scale, caveats/expiration/Watch, or a mature supported product with service-level support commitments. pemba's API contract carries best-effort maintenance, without an SLA, guaranteed patch or long-term support. The core is synchronous; since 0.2.0, async Python goes through the specified thread bridge. No supported WASM package, SpiceDB wire compatibility, distributed dispatch or server mode is promised here. WASM is the browser playground build only. Review semantic differences before migrating schemas; common syntax alone does not guarantee identical answers.

See installation, schema, consistency and retention, transactions.

Stable release 0.3.0