Release notes¶
What changed in each release, newest first, in short. The complete list, with every reworded message and every fixed edge case, is the project’s CHANGELOG.md. Read it before you upgrade: any 0.x release may change the API, including a patch release.
0.1.3 (2026-11-20)¶
The fixes from the 0.1.2 install trial, and one behaviour change: a read that names a type or relation the schema does not declare is now an error. No answer changes for a read that names only declared types and relations.
A read that names an undeclared type or relation raises
zanzibar.UndeclaredTypeOrRelation, aValueError, where 0.1.2 answeredFalseor an empty result. That coverscheck,lookup,lookup_reverseandexpandon aStoreor a set engine, their type and relation filters, a typo such ascheck("user:a", "veiwer", "doc:1"), and a subject relation its type does not declare. A result key passed back ascheck(*key, ...)is refused too, and the message shows the call that was meant. Names are not checked:doc:999still answersFalse. A test that reads undeclared names and expectsFalsenow gets the refusal. See What a read checks.object_wildcard_shapesaccepts a 2-item list such as["folder", "viewer"]as a pair, as a JSON-loaded configuration gives; any other entry that cannot be a set member is aTypeErrornaming the argument and the entry. A refused entry’s message ends with the rewrite.The set engine’s
check,lookup,lookup_reverse,expand,add_tupleandremove_tuple, called with the wrong number of arguments, say which form they take instead of giving Python’s “missing 3 required positional arguments”.Docs: what
Nonemeans as the subject predicate in each call, and the order of a result key, are on the tuple strings page; the 0.1.2 note below names the two cases that stayAdmissionRejected; “Test your permission model” says it needs pytest.
0.1.2 (2026-10-30)¶
The fix from the 0.1.1 install trial, plus argument checking on every public call. No permission answer changes for a well-typed call.
sync=onzanzibar.Storetakes onlyTrueorFalse.sync=Noneorsync=0used to give async mode without a word; any other value is now aTypeError.ops=takes onlyPySetsorRoaringSets, and says so.Every public argument is type-checked before any SQL runs, and a wrong type is a
TypeErrornaming the argument, with two exceptions that stayzanzibar.AdmissionRejected, as in 0.1.0. One is a write’s identifier: the relation, and every one of the six parts in the parts form, soadd_tuple("user:a", None, "doc:1")is refused like any other bad identifier (a non-string user or object string is still aTypeError). The other is a store id, soStore(session, 123, ...)is refused the same way. A read with a part that is not a string, such ascheck("user:a", None, "doc:1"), now raisesTypeErrorwhere it used to answerFalse;Noneas a read’s subject predicate still means the bare subject (Noneas the subject predicate gives its meaning in each call).bulk=andenable_boolean=take onlyTrue/False, andobject_wildcard_shapesmust be(type, relation)pairs.A refused tuple is quoted the way you wrote it (
robot:r viewer doc:1), and the cycle refusal says how to get out of it.Each docs page deletes its SQLite file first, so running a page twice gives the same output.
0.1.1 (2026-10-30)¶
Fixes from the 0.1.0 install trial and one crash found in testing; no permission answer changes.
zanzibar.Store.lag()sees another instance’scatch_up()without arefresh(). It used to keep reporting the old backlog (it never under-reported).A tuple that makes an object its own parent (
doc:d1 parent doc:d1) under afromchain could fail with a rawIntegrityErrorand, in async mode, stall the index. Where the schema accepts such a tuple, it is written normally now; afromchain that recurses throughparentstill refuses it as a cycle, as documented forzanzibar.AdmissionRejected. No wrong answer was served.Clearer errors: an old 0.0.x keyword such as
s_type=is named with its 0.1 name;ops=PySets()says to passops=PySets; a trailing# comment,[user: *]and a chain of twobut nots say what to write instead; aSchemaMismatchsays when swappedor/and/but notoperands are the difference.Each docs page uses its own SQLite file, so two pages run in one folder no longer clash.
0.1.0 (2026-10-30)¶
A deliberate break of the 0.0.x API, with no compatibility aliases. Code written for 0.0.5 stops importing until you rename a few things; Upgrade from 0.0.x to 0.1 walks through every step.
Breaking:
zanzibar.connectedstore.ConnectedStoreis nowzanzibar.Store, importable from the top level. The graph index’s bookkeeping table model is nowIndexStore, and the set engine’s result type isSetLookupResult.Keyword names are
subject_type,subject_name,object_typeandobject_name.build_indexandrebuild_indextakeindex_store_idby keyword only.The Python
Ellipsisis refused as a subject predicate; a bare subject is the string"...".Each subpackage’s
__all__lists only its public names, and exceptions are exported fromzanzibaronly: writefrom zanzibar import StaleRead, notfrom zanzibar.store import StaleRead.The parsers raise
zanzibar.SchemaError(still aValueError).ShapeRefusedSinceTK137is renamedzanzibar.ShapeNoLongerAccepted.zanzibar.UnsupportedByGraphIndexandzanzibar.DoublyBridgedShapeErrorare nowValueErrors, so anexcept ValueErrorthat let them through now catches them.at_leastmust beNoneor anintof 0 or more.A freshness token from another store is refused on every tokened read with the new
zanzibar.ForeignToken(aStaleRead); before, one at or below the store’s own writes was accepted without error.A
Storerefuses aSessionwith unsaved changes of yours, a database without thezanzibar_*tables (zanzibar.TablesNotCreated) and a SQLite file created by 0.0.x (zanzibar.TablesOutdated).A
SetEngineraiseszanzibar.PersistedSchemaRefusedfor a store whose saved schema this version refuses, as every other entry point does.An
object_wildcard_shapesentry must name a declared relation.Some answers change. A userset such as
doc:1#bannedis now a member of itself, as in OpenFGA, so one previously allowed check on abut notrelation is now denied, andlookup_reverseresults include the object’s own userset.Many messages are reworded; code that matches on message text may need updating.
Added:
zanzibar.Store.expand()(Zanzibar Expand) andzanzibar.Store.adopt().Filters on lookups:
object_type/relationonlookup, andsubject_type/subject_predicateonlookup_reverse.The OpenFGA tuple form,
add_tuple("user:alice", "viewer", "doc:d1"), and OpenFGA JSON models asschema=.zanzibar.Store.result_keys()andzanzibar.Store.excluded_keys(), andLookupResult.implicit_keys/implicit_excluded_keysfor answers that have no node id (a userset that is a member of itself before any tuple names it).zanzibar.ZanzibarError, the base of every exception the library raises on purpose, plus new specific exceptions such aszanzibar.StoreNotFound,zanzibar.StaleLookupIdsandzanzibar.ForeignToken.Public types and helpers:
zanzibar.graphindex.DeltaProcessor,zanzibar.store.open_set_engine(), and the schema types that appear in public signatures (zanzibar.schema.SchemaInfo,zanzibar.schema.CompiledBooleans,zanzibar.schema.Entity,zanzibar.schema.RelationalTriple).
Fixed:
With paranoia
fullorfixpoint, a failed post-commit check now raiseszanzibar.InvariantViolationafter the commit, saying the write is committed, and theStorestays usable. It used to surface as SQLAlchemy’sInvalidRequestErrorand leave theStoreunusable.Public docstrings no longer cite internal task ids or repository paths, and the ones that were missing were written.
A lookup result held across a write could translate to the wrong subjects; it is now refused with
StaleLookupIds.A write refused by the fan-out cap is cheap to refuse: the graph index counts the rows it would touch and refuses before loading them, and a
Storeno longer rebuilds its set engine after the refusal. See A refused write is not free.A direct graph-index write on a schema with
and/but notthat is committed without running the delta processor’s cascade is refused at the commit with the newzanzibar.CascadeNotRun, instead of committing derived relations that disagree with the set engine. AStoreis not affected.With
ZANZIBAR_PARANOIA=fullorfixpoint, releasing a savepoint (session.begin_nested()) ran the after-commit check, which on an in-memory SQLite database rolled back the caller’s whole open transaction. The check now runs only when the outermost transaction commits.A stall recorded while nothing was pending is cleared by the next successful
catch_up(), even one that applies nothing; until then untokened lookups raisedzanzibar.IndexStalled.A sync write refused because an earlier backlog row cannot be applied now says so, names that row, and gives the recovery, instead of reading as if your own write was too big. See Recover from a stalled index.
A user string with a
:in its relation part, such as"user:a#b:c", raiseszanzibar.MalformedTupleStringon reads as well as writes.The
StaleReadandWatermarkGapmessages say “set engine” where they said “evaluator”.
0.0.5 (2026-10-14)¶
Breaking: four schema shapes that OpenFGA refuses are refused here too: a
schemaversion other than1.1, extra words on amodel,schemaorrelationsline,but notbesideor/andwithout parentheses, and a restriction naming an undeclared type. A store saved by 0.0.4 or earlier with one of them no longer opens.SetEngine.excluded_keyswas added.Fixed: under a wildcard grant, a standalone set engine’s
lookup_reversedid not list the users abut notrefuses as excluded; a set engine opened on a store that aConnectedStoreowns answered under whatever schema it was given and could write past the tuple log; arelationsline with adefineon it silently dropped the relation.
0.0.4¶
A malformed OpenFGA JSON model is refused with a message that names the field.
Reopening a store with its own schema no longer fails over formatting: the parsed schema is compared, not the text.
The
residueruntime check covers one more kind of index corruption.
0.0.3¶
The graph index serves
x from parentwhenxusesandorbut not.Several crashes on unusual schemas and on non-string write fields are now clear refusals.
0.0.2¶
The first release published to PyPI: the same library as 0.0.1, with a test-only fix.
0.0.1¶
Tagged but never published. It introduced the package: the schema parser and compiler, the
set engine, the graph index and the composed store, under the Apache-2.0 licence, with
every database table named zanzibar_*.