CortexDB 0.13.0 — org trees, and synthesis that stays inside its tenant
0.13.0 is 0.12.8 plus the first CortexDB step of the org brain (docs/ORG_BRAIN_DESIGN.md, step 0:
DB-1, DB-2, DB-3 and DB-10). A tenant can now be registered as an org tree: its scopes carry a
kind, a display name, a parent and a private flag, and inside it reads never walk the tree from a
shared scope, nothing registers itself, and CortexDB's own synthesis never blends scopes there.
Recall, answers and every other read of a scope outside an org tree answer as they did on 0.12.8,
and every 0.12.8 request keeps working. What changes everywhere is the derivation layer's
isolation and erasure (Fixed, below), which only runs with enrichment and the LLM stages on.
Upgrading from 0.12.x is a drop-in replacement on a single node. On a cluster, upgrade every node before registering an org tree (Upgrade, below).
New: org trees
- The attributes. A scope record carries an optional
tree:kind(org,team,person,employee,group,compartment),display_name,parentandprivate. Set them when registering (POST /v1/scopeswith"tree": {...}) or replace them withPUT /v1/scopes/tree?path=...(Owner of the scope pluspolicy.administer.scope, as for its members). An org is the tenant root (its firstCORTEX_TENANT_DEPTHsegments) and has no parent; every other kind names a registered org, team or group of the same tenant asparent, and the chain reaches the org without a loop. Naming a parent the record did not have takes Owner of that parent too, and a parent the caller does not own answers like one that does not exist (403 POLICY_DENIED).display_nameandprivateneed akind. Units are flat siblings under the org root, so a reorg changes oneparentand moves no rows. Errors:422 INVALID_SCOPE_TREE(details.reasonnames the rule broken),409 SCOPE_PARENT_IN_USE(other scopes name it as their parent; also onDELETE /v1/scopes),422 SCOPE_TREE_UNSUPPORTED(the native memory host's journal profile),422 INVALID_BODYfor a fieldtreedoes not know. API reference §8.8.7. - The nearest kind decides. A path's kind is that of the nearest registered record above it (or at it) that has one, so a scope registered without a kind inside an org tree (auto-provisioned before the tree was registered, say) answers as the unit or person above it.
- No walk from a shared scope. At an
org,team,grouporcompartmentscope, the views that walk the tree (holistic,structured,lineage,descend) answer422 VIEW_NOT_ALLOWED_AT_SCOPEwithdetails {field: "view", view, scope_kind, allowed_views: ["granular", "raw"]}, after the roster check (a non-member still gets403 POLICY_DENIED). A recall, stream, answer or composition that names no view readsgranularthere (compose now takesgranularat such a scope).GET /v1/eventsandGET /v1/facts/timelinerefuse a walking view there with the same 422;GET /v1/claims,GET /v1/conflictsand the lifecycle routes with?scope=read the scope itself only; a cohort answer is refused whatever view it sends; andPOST /v1/exportof a shared scope with scopes registered under it is refused (export each scope by name). A person's or employee's own scope keeps its default view. - Private stays private. A scope marked
privateis read only by name: no walk from an ancestor or from a scope under it enters it, whatever the roster says, a trusted operator's key included. Event pages, claims, conflicts and lifecycle reads skip it too, and an export whose subtree holds one it did not start in answers403 POLICY_DENIED. - No auto-registration under a shared org-tree scope: a first write to an unregistered path
there answers
403 SCOPE_REGISTRATION_REQUIRED, and the boot reconcile registers nothing there either. Under a person's own scope it works as before. - No implicit synthesis. CortexDB's own synthesis never homes a blend of two scopes at a
shared org-tree scope, never homes a private scope's material outside its private region, and
consolidation and procedure mining group one scope at a time there. Each refusal is counted:
synthesis_org_tree_skips_totalandsynthesis_private_skips_totalinGET /v1/admin/layers/stats,cortexdb_synthesis_org_tree_skips_totalandcortexdb_synthesis_private_skips_totalinGET /metrics(beside the newcortexdb_synthesis_cross_tenant_skips_total). - Scope types and capabilities. The presets allow the scope types
groupandaud(aud:pub,aud:lead,aud:roll,aud:work), registered with the newscope.create.groupandscope.create.audcapabilities, whichcloud_shared_saasgrants (it deniesscope.create.custom). - On a cluster a change to a record with a
treealso names the tenant's marker<tenant>/orgtree:changesto the log's compare-and-set, so two concurrent tree changes of one tenant can't make a loop or orphan a child: the second is validated again. ORG_TREE_DEPTH_MISMATCHat boot names registered orgs whose depth is not this node'sCORTEX_TENANT_DEPTH(set it the same on every node, in[engine]on a cluster).
Fixed, everywhere
These change the derivation layer on every deployment that runs it (enrichment on, the LLM compaction stages on); recall and answers outside org trees are unchanged.
- Synthesis isolation follows
CORTEX_TENANT_DEPTH(DB-1). Knowledge synthesis, procedures and concepts compared only the first scope segment, so under bucket roots (org:b7/org:acme, depth 2) every org of a bucket shared one isolation boundary. Provenance spanning two tenants is now refused and counted insynthesis_cross_tenant_skips_totalat any depth. - Consolidation and procedure mining stay inside a tenant. Consolidation grouped memories by entity name across every tenant and stored the summary in the first memory's scope; it now groups within a tenant (in an org tree, within one scope). Procedure candidates were merged across tenants and then refused, every cycle, so a tenant lost a procedure it had repeated alone; each tenant now gets its own, and a refused input is not tried again. Inside one tenant outside org trees both group as before.
- A synthesis whose source was erased is refused, and one whose source is being erased waits; before, a source without a content row was skipped, so an erasure that ran during the model call could be synthesized back. The first compaction after a boot waits until the scope registry is ready.
- Erasure follows derivation chains to their end (DB-2). A forget or erasure removed what was
derived from the erased events, but not what was derived from those artifacts (a concept built
from procedures, a rollup built from rollups); the cascade now repeats until nothing more is
derived. Consolidation summaries now record their sources, so erasing any of them removes the
summary too.
purge.artifacts_cascadedcounts only what the request removed (a repeat counts 0), andpurge.cascaded_artifact_idslists those artifacts once each, level by level (at most 10,000; the count is authoritative).
Dependencies
rustls-webpki0.103.16,webpki-rootsandwebpki-root-certs1.0.11: certificate checks no longer trust the distrusted emSign intermediates (RUSTSEC-2026-0381, -0382, -0383).
Known limits
- The published clients (Python SDK 0.12.0, TypeScript SDK 0.10.1,
cortexdb-mcp, the CLI) sendview: "holistic"by default, which a shared org-tree scope refuses: passgranularthere. A request that sends no view reads granular. - Derived artifacts built before an org tree was registered are not re-checked against its rules. On a deployment that ran synthesis there before, forget the derived layers at its shared scopes first.
- An event sealed by the ice tier or expired by a
keep_learnedretention rule before its erasure does not run the derivation cascade when it is erased; a cascaded artifact's own row inderived_walkeeps its text until compaction;GET /v1/erasures/{id}/verifydoes not check derived artifacts. These predate 0.13.0. - Deleting a private scope's registration keeps its rows (as every
DELETE /v1/scopesdoes), read by name only. Erase them first. - A scope move carries
treeonly to a shard whose nodes all run 0.13.0.
Upgrade
- From 0.12.x: replace the binary or image. Nothing is migrated: a scope record gains
treeonly when a request sets it, and a registry entry carries it only then. Tested on a data directory the 0.12.8 image wrote: every recall, answer, event listing and scope lookup answered as 0.12.8 answers it. - From 0.10.5: as for 0.11.0 and every later release, the first start migrates the data
directory one way (
RELEASE_NOTES_0.11.0.md, "Upgrade"), keeping its rollback point inpre_stage2/. Take the cold backup first. Tested on a data directory the 0.10.5 image wrote: 0.13.0 answers every read as 0.12.8 does after the same migration. - On a cluster: a registry entry that carries
treeis proposed under the shard's apply format 7; every other entry keeps the format it had (5, or 6 for an expiring retention rule's erasure). Upgrade every node before the firsttreeis registered. A replica still on 0.12.x stops at a format-7 entry (WAL_FATAL, the error naming the apply format) rather than drop the attributes, and once upgraded it applies the entry as the others did. Tested: a 0.12.8 replica in a 0.13.0 shard kept up with every other entry, stopped at the first org-tree one while the other two served, and upgraded in place reached the same state digest.
Rollback
- Single node, to 0.12.8: possible by replacing the binary or image again, and tested: 0.12.8
opens a 0.13.0 data directory, answers every read as 0.13.0 did and reads its new writes. It
ignores
tree, so while it runs the org-tree rules above do not apply, and it drops everytreethe next time it saves the registry (by its shutdown at the latest): register them again after rolling forward. The Docker image'sio.cortexdb.one-way-belowlabel stays 0.11.0. - Cluster, to 0.12.8: possible while no
treewas ever registered. After one was, a 0.12.x replica that has to apply that entry again stops; restore from a backup instead. - To 0.10.5: as for 0.11.0, only from
pre_stage2/or the cold backup.
Compatibility
- Requests: every 0.12.8 request means what it meant. The new fields are optional, and the new refusals apply only at scopes of an org tree, which no 0.12.8 data holds.
- The shard's apply format is 7 (
ShardRequest::FORMAT), proposed only by registry entries that carrytree(decision N7's rule). A plain single node replicates no registry entries. - Scope records are stored as JSON and
treeis left out when empty, so a registry without org trees is written exactly as 0.12.8 writes it.