CortexDB 0.14.0 — shared memory: sources, applications and the org brain under one access model
0.14.0 is 0.13.1 plus shared memory (docs/SHARED_MEMORY_ARCHITECTURE.md): one CortexDB holding a
tenant's sources, its applications' memories and its org brain, where every row carries who may read
it and every read is decided against it. It adds the identity that needs (a principal chain on
tokens, external token issuers, a tenant directory and SCIM 2.0), an access API to ask and to change
who may read what (check and explain, lookups, AuthZEN, change sets with previews, watch,
notices), reads that declare their purpose, legal holds and the erasure of a person, an outside
party or a whole tenant, source containers that follow each source's own ACL, agent writes that
carry what their run read, rollups and publish for the org brain, a decision-audit stream with audit
retention, and an MCP server over HTTP.
This is the one breaking release of shared memory (owner decisions A33 and A36 to A38). Its first start arms the data directory for shard apply format 10, one way: no 0.13.x binary opens the directory afterwards, and the way back is the backup taken before the upgrade. Every new access check refuses by default, and some requests 0.13.1 served now answer differently or under another code. Work through the "Upgrade checklist" before you upgrade.
The upgrade loses nothing stored. Tested on a data directory 0.13.1 wrote in the hosted beta's shape
(tests/compat/beta_upgrade.py, the beta data-retention gate, owner decision A34): every record,
roster, tree, event, fact, erasure receipt, revocation and token probe 0.13.1 served, 0.14.0 serves;
the directory armed one way, 0.13.1 then refused it, and a restored copy served the same. The one
difference was the one expected: a person's token minted for 30 days answered 200 on 0.13.1 and 401
on 0.14.0 (its lifetime ceiling, below).
Getting 0.14.0. It is released on the customer channel only: from https://customer.cortexdb.ai, Releases. It is not on Docker Hub or the public GitHub releases.
Every caller-visible change, route by route, is in docs/shared_memory/PHASE0_RELEASE_NOTES_DRAFT.md
to PHASE5_RELEASE_NOTES_DRAFT.md; the routes are in docs/API_REFERENCE_V1.md (its §16 lists every
error code with its status and retriable flag) and docs/schemas/openapi.json. This page is the
summary an operator needs.
Breaking changes
Upgrade checklist
For a single node; on a cluster, for every node. "Upgrading a pilot", below, has the steps in order.
Before the first start of 0.14.0:
- Take a cold backup, and keep it with the 0.13.1 binary. With the server stopped:
python scripts/cold_backup.py backup DATA_DIR ARCHIVE.tar.gz, thenpython scripts/cold_backup.py verify ARCHIVE.tar.gz(or the 0.13.1 binary'scortexdb backupandcortexdb backup-verify). The first start arms the directory one way; this archive is the only way back. - Rehearse on a copy with
scripts/upgrade_rehearsal.py: it boots 0.13.1 and then 0.14.0 on a restored copy, with your environment, and lists what 0.14.0 lost or answers differently. - Decide each enforcement switch. All eleven
CORTEX_<CHECK>_ENFORCEswitches are on. Setofffor each one your clients would trip; the access report then counts what it would refuse. - Decide the operator key's mode on
cloud_shared_saas, where it isdeny: an application that reads, writes or mints with the operator key needsCORTEX_OPERATOR_DATA_READS=allow(oraudit) until it uses per-person tokens. - Check your tokens and mints: lifetimes within the ceilings (7 days for a person or an agent,
30 for a service, 24 hours with a chain claim);
scopesthat name every capability family a token uses; noactnaming an AI employee; every mint naming its tenant root (scope,tenantorscopes); and no mint wider than its minter. - Hosted deployments: list the website minter's principal in the issuers file's
deployment_minters, and mint its token again holdingauth.mintand every family it mints, each at*. - Check your callers for what is now refused or answered differently: forget and erasure
selector fields a route does not apply,
tree.display_name,/v1/understanding*and/v1/concepts*withoutunderstanding.read, a decimal offset asGET /v1/events's cursor, and the error codes, statuses andretriableflags that changed. - Upgrade the clients with the server ("Clients"): the published ones predate shared memory.
After the first start:
- A restored copy waits for its acknowledgement (503
ACCESS_RESTORE_PENDING): acknowledge it, or restore with--access-state unchangedwhen access did not change since the backup. - Remove each
offonce its count inGET /v1/admin/access/reportstays at zero.
What changes, and what to do
What a 0.13.1 deployment that sets none of the variables below sees change at the upgrade.
-
The first start arms the data directory, one way. 0.14.0 builds shard apply formats 8 to 10, and its format ceiling (
CORTEX_FORMAT_CEILING) defaults to the newest. A plain node arms itself at its first start, before it serves: it writes<data_dir>/format_armed.json({"format": 10}) and logsSHARD_ARMED_ONE_WAY. From then on a 0.13.x binary exits at start on the directory (RocksDB'sColumn families not opened: …). On a cluster, a shard's leader arms it once every member runs 0.14.0.Do: take the cold backup first (checklist, step 1).
CORTEX_FORMAT_CEILING=7keeps the directory unarmed, and the features that need formats 8 to 10 then answer 503FORMAT_UPGRADE_PENDING(details.reason: "arming_disabled"); it is not a way back either. The one-click updater treats 0.14.0 as one way (the image'sio.cortexdb.one-way-belowlabel is 0.14.0): it needsaccept_one_wayand the backup, and never starts 0.13.x again on the armed directory. -
Every enforcement switch is on. Eleven of the access report's checks have a switch,
CORTEX_<CHECK>_ENFORCE. Unset, blank oronenforces;offis the kill switch: it serves what the check refuses and counts it inGET /v1/admin/access/reportinstead. Any other value exits 78AUTH_CONFIG_INVALID. They are read once at start (on a cluster data node, in its[engine]table), andGET /v1/admin/metricsauth.enforcelists each asonoroff.Switch What it refuses while on CORTEX_MINT_LIFETIME_ENFORCEa token past its lifetime ceiling ("Tokens", below) CORTEX_TOKEN_CONFINEMENT_ENFORCEa use of a capability family a token's scopesdo not name ("Tokens")CORTEX_MINT_REACH_ENFORCEa mint past its minter's reach ("Tokens") CORTEX_MINTER_LINK_ENFORCEa token another principal minted, used where its minter could not act: 403 POLICY_DENIED,details.link: "minter". A token minted before the upgrade carries nominterand passesCORTEX_PERSON_DISPLAY_NAME_ENFORCE,CORTEX_DISPLAY_NAME_IN_RECORD_ENFORCEtree.display_namein a registry write, on apersonoremployeerecord and on any other ("tree.display_nameis refused")CORTEX_DUPLICATE_MEMBER_ENFORCEa roster that lists a principal twice: 422 INVALID_BODY,duplicate_member. A stored roster stays as it isCORTEX_RESERVED_PATH_ENFORCEa registration or first write at a marker or companion path ( <tenant>/orgtree:changes,<scope>/attrs:unit, …): 422INVALID_SCOPE_GRAMMAR,reserved_path. No shipped preset lists those typesCORTEX_ROLE_BLIND_MEMBERSHIP_ENFORCEnothing new today: GET /v1/scopes/list, the audit boundary and the commitment transport's read side ask for Reader by nameCORTEX_AUDIT_RETENTION_ENFORCEaudit rows older than audit.retention: the daily sweep deletes them ("audit.retentionis enforced")CORTEX_DELIVERY_GATE_ENFORCEa row whose home the reader may not read ("The delivery gate") Do: set
offthe switches your clients would trip, then watch their checks in the access report (GET /v1/admin/access/report?scope=<tenant root>, the operator key withdiagnostics.read); a hole between tenants is closed with no switch. -
Tokens. Four rules refuse tokens and mints 0.13.1 served.
- Lifetime ceilings (
CORTEX_MINT_LIFETIME_ENFORCE). A token this server's minter signs lives at most 7 days (604,800 s) for auser:oragent:subject, 30 days (2,592,000 s) for aservice:orsystem:subject, and 24 hours when it carries a chain claim. A mint above its ceiling is 422INVALID_BODY(ttl_too_long), and a presented token whoseexp - iatis above it is 401INVALID_TOKEN_CLAIM(lifetime_over_ceiling), tokens minted before the upgrade included: a person's 30-day token that answered 200 on 0.13.1 answers 401 from the first request on 0.14.0. A mint's default lifetime, one hour, is within every ceiling. - Total confinement (
CORTEX_TOKEN_CONFINEMENT_ENFORCE). A token that carriesscopesholds only the capability families its entries name: any other use is 403POLICY_DENIEDwithdetails.link: "confinement"anddetails.capability, andGET /v1/auth/whoamiandGET /v1/policy/effectivelist only the named families. A token withoutscopesis unchanged. A signup token minted before the upgrade names only its four read and write families, so it loses the other fourteen (llm.invoke,blob.upload,scope.create.*, …) until it is replaced; 0.14.0's/v1/auth/signupnames all 18.<capability-or-prefix>:*(new) names a family at every scope, which the checks made without a scope (blob.upload,audit.read, …) need. - The mint's reach (
CORTEX_MINT_REACH_ENFORCE). A minted token reaches no more than its minter:- every mint names its tenant root, with
scope,tenantorscopes, all within that one root (else 422INVALID_BODY,scopes_span_roots); a mint that names no root is deployment-wide, the operator key's alone and only for aservice:orsystem:subject (else 403POLICY_DENIED,deployment_mint_requires_operator). So the operator key namesscope: "org:<tenant>"(ortenant, orscopes) when it mints a person's or an agent's token, and a mint whosescopesspan two roots becomes one mint per root; - every
capsentry is one the minting credential holds at the mint's scope, and a credential that carriescapsorscopesnames the minted token'scaps(an emptycapsinherits the deployment's): else 403caps_exceed_minter, withdetails.capability; - a confined minter, one whose token carries
scopes, mints noscopesentry past its own, by family and by reach, and namesscopesunless it holds each capability everywhere: else 403scopes_exceed_minter,details.link: "minter", naming the entry; - a token another principal minted (its
minteris not"operator") never mints: 403minted_token_cannot_mint.
- every mint names its tenant root, with
- An AI employee acts only under its own run (
act_not_delegable, no switch). A mint whoseactnames an AI employee of the tenant (an employee record that is not delegable; a worker's agent and a project role are) is 422INVALID_BODY(act_not_delegable,details.field: "act"), a verified token whoseactnames one is 401INVALID_TOKEN_CLAIM(details.claim: "act"), whatever issuer signed it, andcheck,explainand the scopes lookup refuse such a chain for another principal (422; AuthZEN 400).
Do: re-mint long-lived tokens within the ceilings, mint tokens whose
scopesname every family they use (docs/API_REFERENCE_V1.md,POST /v1/auth/tokens, shows a body that names every family), name the tenant root in every mint, give an AI employee a token of its own (subthe employee, noact). Or start with the switchoffand replace the tokens while the report counts their uses (checksmint_lifetime,token_confinement,mint_reach). - Lifetime ceilings (
-
Hosted deployments: the website minter is minted again. A hosted deployment's website mints each account's token with its own service credential (
service:website-minter). Since a minted token reaches no more than its minter, that credential must hold what it mints:- its principal stays listed in the issuers file's
deployment_minters, so the account tokens carryminter: "operator"; a token it mints as a plain principal fails the minter link at every account scope (403details.link: "minter"); - its own token holds
auth.mintand every family the account tokens carry, each as<family>:*inscopesand as the capabilities the deployment allows incaps; - each account mint names its capabilities in
caps: an emptycapsfrom that token is 403caps_exceed_minter.
Under
deny, a deployment minter's mint of a token that carries a data capability is an in-band path, which needsX-Cortex-Break-Glass; a hosted deployment that mints this way runsCORTEX_OPERATOR_DATA_READS=allow(oraudit), as the release's hosted smoke does.cloud_shared_saasnow allows every import and export format (below), so the account mints can name them.Do: before the upgrade, mint the website's token again as
docs/API_REFERENCE_V1.md§8.16.3 ("Per-tenant audiences") shows, and check the issuers file lists its principal. - its principal stays listed in the issuers file's
-
CORTEX_OPERATOR_DATA_READSisdenyoncloud_shared_saas. The static operator key (CORTEX_API_KEY) is the operator plane now, and its mode defaults to the preset's:denyoncloud_shared_saaswith auth on;allowondev_local(the zero-config default),on_prem_enterpriseandcloud_private, and wherever auth is disabled. Underdenythe key's reads of stored rows, its content-returning admin routes, its reads in private regions and its in-band actions (registrations and auto-registering first writes, writes into private regions and shared org-tree scopes, mints of tokens that carry a data capability, a deployment minter's included, a change-set activation or a dated one's approval that a legacy route would make in-band, …) answer 403BREAK_GLASS_REQUIREDunless the request carriesX-Cortex-Break-Glass: reason=<r>; ticket=<t>, which is audited; a malformed header is 400INVALID_HEADER. A by-id read is decided by the row's own tenant and class, never by the scope the request names, and a break-glass read of a private region tells the region first (a notice). One write is not in-band: the key namingservice:<key>writes at its application's reference root,app:<key>, with no header (the root holds the application's reference documents, no tenant's data); any other writer there is refused by the root's rule (reference_root), and a write below the root by its admission (SCOPE_REGISTRATION_REQUIRED). The console asks for both when it meets that 403. A tenant may set its own mode (PUT /v1/admin/access/tenant-settings), and the route and the access report'stenant_settingsanswer the deployment's own beside it,deployment_mode.Do: if an application reads, writes or mints with the operator key on
cloud_shared_saas, setCORTEX_OPERATOR_DATA_READS=allowbefore the upgrade, oraudit, which serves the same and counts whatdenywould refuse (checkoperator_access), until it uses per-person tokens. -
CORTEX_REVOCATIONS_V2is on. A revocation is stored with its token'sexpand pruned after it, and a token of an issuer given a namespace is revoked as<namespace>:<jti>. Every revocation 0.13.x recorded is kept, never pruned, and still matches its token byjti.Do: nothing.
offkeeps 0.13.x's journal format. -
A restored copy waits for its acknowledgement. Every archive of an armed directory holds access state, so
cortexdb restore-check(whichscripts/cold_backup.py restoreruns) marks a copylostunless told otherwise, and each root it holds answers 503ACCESS_RESTORE_PENDING, not retriable, until its access sources re-send their state and acknowledge (POST /v1/access/restore/ack) or the trusted operator acknowledges (POST /v1/admin/access/restore{"acknowledge": true, "reason": "..."}, for every root of the node, or?scope=<root>for one). While it waits it serves only the restore's own routes (GET /v1/access/records, the acknowledgements,watch), a connector's resync (rehome, account resolution, watermarks, the directory,resyncchange sets), the trusted operator's forgets and erasures, and the token and schema routes.Do: when nothing changed access since the backup, restore with
--access-state unchanged(scripts/cold_backup.py restore ARCHIVE NEW_DIR --access-state unchanged, orcortexdb restore-check --access-state unchanged); otherwise acknowledge. The built-incortexdb restoretakes no--access-state, so its copies wait for the acknowledgement. -
Forget and erasure selectors are strict. A field a route does not apply is refused, where it was ignored (422
INVALID_BODY,details.field):unknown_selector_field(for exampleselector.queryorselector.valid_during, which no route applies);unknown_layer(a forget'slayersoutsideevents,episodes,facts,beliefs,understandingandcode: a misspelt layer used to cascade to all four derived layers);field_not_applied(confirmwithoutsubjecton/v1/erasuresand its preview; on/v1/forgetand its preview, afact_orent_id inmemory_idsunderredact_events, or any selector field whilelayersleaves the events out, withdetails.fields);key_selector_not_supported(idempotency_keysorcapture_keyson an erasure route: dropped, they would leave the selector empty, which withconfirm_allerases the whole scope)./v1/forget/previewrefuses afrom_preview_idthe forget would refuse (UNKNOWN_PREVIEW_ID), and the/mcpforgettool an argument outside its schema (-32602). No selector field is dropped any more:about_entitybesideabout_subjectis applied, and underredact_eventsevery attribute field is a query an event must match.Do: fix callers that send such fields. The published SDKs send none;
cortexdb-cli0.6.0's interactive/forgetsendsselector.queryand is refused, which 0.7.0 fixes. -
tree.display_nameis refused (CORTEX_PERSON_DISPLAY_NAME_ENFORCEforpersonandemployeerecords,CORTEX_DISPLAY_NAME_IN_RECORD_ENFORCEfor every other). A registry write that sets it (POST /v1/scopes,PUT /v1/scopes/tree) is 422INVALID_SCOPE_TREE,details.field: "tree.display_name", and a change set's version-2 record that sets it is 422INVALID_ACCESS_RECORD: names live in the tenant directory now (PUT /v1/directory/{id}). A record that holds one keeps it and stays readable, and a write that sets no name is never refused.Do: move the client's names to the directory, or set both switches
offuntil it has. -
understanding.readis enforced.GET /v1/understanding(and/v1/concepts),/coverage, a concept by id, its/historyand its/relatedrequireunderstanding.readbesidescope.read.localand a view's own capability. Every built-in preset grants it wherever it grants the reads. A token whosecapsleave it out is refused 403POLICY_DENIED(details.capability: "understanding.read") on a listing and the coverage, and answered 404 on a read by id; an agent chain token needs anunderstandingentry in itsscopes. The listing also refuses a query parameter it does not read,topicanddepthamong them (400INVALID_QUERY).Do: add
understanding.readto tokens minted with explicitcapsthat read concepts. -
The delivery gate checks every row's home (
CORTEX_DELIVERY_GATE_ENFORCE). For a verified per-actor token, every route that returns stored rows checks each row's home itself, whatever the route (a lifecycle frame, an export page, a record whose scope is not the request's): a row whose home the reader's chain may not read at Reader is withheld, and a by-id read of one is 404. A lifecycle subscriber now also needsscope.read.localat each row's home.Do: nothing for readers that read where their rows live.
offserves such rows and counts them (checkdelivery_gate). -
audit.retentionis enforced (CORTEX_AUDIT_RETENTION_ENFORCE). Where a deployment names its preset (CORTEX_DEPLOYMENT_PRESET) or setsCORTEX_AUDIT_RETENTION(new: an ISO 8601 period, oroff), a daily sweep, first run five minutes after the start, deletes the audit rows older than the period:dev_localP7D,on_prem_enterpriseP1Y,cloud_shared_saasP2Y,cloud_privateP3Y. A deployment that sets neither keeps its whole trail.POST /v1/audit/chain/verifystill verifies what is left, from an anchor.Do: to keep older rows, set
CORTEX_AUDIT_RETENTION_ENFORCE=off(the sweep then only counts, checkaudit_retention) orCORTEX_AUDIT_RETENTION=offbefore the first start. Deleted rows come back only from a backup. -
Error codes: one code, one meaning, one status, one
retriableflag. Clients that match a code, a status or a flag should readdocs/API_REFERENCE_V1.md§16 (every code this release answers) andPHASE5_RELEASE_NOTES_DRAFT.md, "Error codes: one meaning, one status, oneretriableflag (p5m)" (each change, before and after). In short:- New: 400
INVALID_HEADER(details {part, field, reason}) for any request header that does not parse,X-Cortex-Actor,X-Cortex-Break-Glass,Last-Event-IDandIf-Matchincluded; 405METHOD_NOT_ALLOWEDin the error envelope, withAllow; 409ERASURE_NOT_CANCELLABLE; 410ROLLUP_SUPERSEDED; 500SCOPE_STORAGE_MISCONFIGURED(not retriable,details.reason); 500PERSIST_FAILED; 501COHORT_UNSUPPORTED; 501SCIM_UNSUPPORTED; 503TENANT_SETTINGS_UNAVAILABLE; 504DB_TIMEOUT; 409ICE_FORK_UNSUPPORTED; and the refusals' new reasons (field_not_applied,scopes_exceed_minter,caps_exceed_minter,deployment_mint_requires_operator,act_not_delegable, …). - Retired:
BREAK_GLASS_INVALID(now 400INVALID_HEADER),INTERNAL(now 500INTERNAL_ERROR, retriable unless it carriesdetails.refusal),SCOPE_MUTATION_UNKNOWN(a registry change whose outcome is unknown is 503WAL_OUTCOME_UNKNOWN, retriable, on one node as on a cluster),STORAGE_ERRORon the blob routes (now 503BLOB_STORE_ERROR),resend: "new_key"onGET /v1/experience/status(a write that failed indexing answersno, and its note says never to re-send it, at any age, under its key or a new one: an operator re-includes it,POST /v1/admin/index-audit/reinclude), andNON_HUMAN_WRITE_UNSUPPORTED(an agent's write is redirected instead). - Changed:
DB_SATURATED,DB_UNAVAILABLE,PROVIDER_*,ANSWER_PROVIDER_ERROR,MEMORY_INGESTION_UNAVAILABLEand the registry'sSCOPE_STATE_CHANGED,AUTHORIZATION_STATE_CHANGED,ACTIVITY_CHANGEDandSCOPE_STORAGE_UNAVAILABLEare retriable on every route, and storage the operator must fix is 500SCOPE_STORAGE_MISCONFIGUREDinstead ofSCOPE_STORAGE_UNAVAILABLE; the blob routes' 500s are 503s;INVALID_SCOPE,INVALID_RANGEandSCOPE_REQUIREDare 422 on the usage and plan routes; an apply refusal answers by its own flag (TENANT_MAPS_UNSUPPORTEDand a malformed entry are not retriable); a malformedX-Cortex-Actoris 400INVALID_HEADER(it was 401INVALID_BODY); a wrong operator key is 401MISSING_TOKENwith or withoutX-Cortex-Actor; a single node whose revocation journal failed answers 503REVOCATION_UNAVAILABLE, retriable, instead of 401REVOKED_TOKENfor every token; a registry change the shard does not take answers the shard's own code (SCOPE_MOVING,REGISTRY_STALE,FORMAT_UPGRADE_PENDING,NOT_LEADER,WAL_UNAVAILABLE, 413WAL_TOO_LARGE, 409REGISTRY_NOT_REPLICATED), andFORMAT_UPGRADE_PENDINGis retriable only fordetails.reason: "members_behind", and a 503NOTICE_UNAVAILABLEthat a reserved path's format hold caused saysdetails.reason: "reserved_path_in_use", not retriable and with noRetry-After(it saidmembers_behind, retriable); the lifecycle and layer routes answer a query, path or header they cannot read 400INVALID_QUERY,INVALID_PATH_PARAMSorINVALID_HEADER(each was 422INVALID_BODY); a mint'scapsentry that is no capability is 422INVALID_BODY,details {field: "caps", entry, reason}(wildcard_not_allowedfor a pattern such asscope.*, elseinvalid; it had nodetails); a change set's activation names anACCESS_ASSERTION_FAILEDcase as a string ("case": "0"), as the preview and the legacy routes do (it was a number). DISK_FULLis never answered by a forget, an erasure or a registry route (POST /v1/scopes,PUT /v1/scopes/members,PUT /v1/scopes/tree,DELETE /v1/scopes): the disk guard never refuses those proposals. At a critical disk it refuses only what adds data: captures, bulk chunks and imports, vocabulary and phrase puts, and since 0.14.0 a change set that widens access, a directory entry that adds, rollups and declared beliefs.- Every error envelope carries
request_id.
Do: a client that reads the server's
retriableneeds no change; one that keeps its own table of codes or flags regenerates it from §16. The 0.14.0 clients follow the final catalog. - New: 400
-
Smaller changes.
- A
<capability>:*entry in a token'sscopes(whichmint_offlineand external issuers could write; the mint route refused it) confined its family to nowhere, so every use was 403. It now opens the family at every scope. Look for issuers that put:*inscopes. On a hosted tenant's own token (audiencecortexdb:tenant:<tenant>),:*stays insideorg:<tenant>. - PASETO verification is bound to the claimed issuer: a token signed by one registered issuer's
key that names another is 401
INVALID_TOKEN. - A registration or first write whose leaf is a record-only type (
attrs,set,hold,policy) is 422UNREGISTERED_SCOPE_TYPE, even where the deployment lists the type; once armed, so is one at a reserved type (orgtree,holds,access,self). - The decision log (
CORTEX_DECISION_LOG, new) defaults todenials: one line per refused request (rate limited), under the tracing targetcortex_api::decision, which aRUST_LOGofwarnno longer drops.offwrites none, as 0.13.1 wrote none. - Audit rows'
headers_hashcovers the names ofauthorization,x-cortex-subject-tokenandx-cortex-break-glassand no longer their values, so it changes on every row of a request that carries a credential; a request a policy refuses (a 403) writes its row withdecision: "deny"and adenialobject. The chain verifies as before; a 0.13.x binary reports it broken at the first row that carrieschain,subjectordenial. GET /v1/eventspages newest first with an opaque cursor (next_cursor,le1.…) and reaches every event of a scope (it listed only a scope's earliest 5,000): a decimal offset, or another query's cursor, is 422INVALID_CURSOR.- The by-id layer reads (
GET /v1/facts/{id},/v1/beliefs/why,/v1/beliefs/history, a concept or a conflict by id, the lifecycle reads by id,/v1/admin/events/{id}/chunks) take?scope=: a row not at or under it is 404, as an unknown id is; a malformed one is 422INVALID_SCOPE_GRAMMAR. - A conflict's
resolutionreads as the request that resolved it ({"action": "pick", …}), no longer the engine's externally tagged form ({"Pick": {...}}), andresolved_bynames the principal that resolved it, no longeroperator:<billing tenant>. POST /v1/exportrefuses a field it does not honour (include,layers,as_of,destination, …: 422INVALID_BODY,details.field), and leaves cancelled and excluded events out, as every read does.- An export at a shared org-tree scope (an org, a team, a group or a compartment) reads granular:
it exports that scope's own rows, as a read naming no view does, and never walks into members'
private regions. 0.13.x refused it with 422
VIEW_NOT_ALLOWED_AT_SCOPE. - Registered temporal phrases change reads: a
temporal.naturalequal to a phrase the caller registered (POST /v1/temporal/phrases, with an optionalscope) reads the phrase's window, before the built-in grammar. Until now phrases were stored and listed only. - Relative date phrases (
yesterday,2 years ago, …) are refused where nothing anchors them (a conflict split,GET /v1/claims,GET /v1/episodes'soverlapping): they were counted from 1970-01-01. POST /v1/composeanswers a provider failure 502ANSWER_PROVIDER_ERROR, retriable, instead of a 200 whose document is the error text.- The code plane spells a tier in lower case everywhere (
compiler,syntax), and a store read that fails is 503QUERY_ERROR, retriable. POST /v1/admin/scopes/migratecopies through the log: each copy is a capture and a move erases its source as a whole-scope erasure with its receipt; the report'sskipped_existingis nowalready_copied, andtriple_facts_rewrittenis gone; a cluster serves it for one shard's roots (422CROSS_SHARD_REQUESTotherwise).POST /v1/admin/persistreports what it saved and answers 500PERSIST_FAILEDwhen a store did not save; vector hygiene refusesscopeandvectors; the maintenance bodies refuse a body without a JSONContent-Type(415) and fields they do not take, asPOST /v1/admin/retention/sweepand/v1/admin/wal/compactdo.GET /v1/admin/usagecost_basissays the ledger prices every call (cost_usd: "ledger_priced"; it saidrouter_reported).- A cluster ingress's
GET /v1/admin/metricsneeds the operator key: an ingress config may carry[auth]withapi_key_filealone, and without it its metrics are served to no one (boot warnsINGRESS_METRICS_UNKEYED). GET /v1/policy/effectiveandGET /v1/auth/whoamilist every capability the server names (64),auth.mint,auth.mint.on_behalf_of,forget.by_keyand version 2'sscope.create.*names included.- A restore's replay completes older erasures of expired events: an erasure journaled before format 10 now also removes, from the restored copy, the expired markers of the events it named, with what was learned from them, and the artifacts derived from those events and from the sealed events it names.
- A
Upgrading a pilot
A single node. On a cluster, upgrade every node; each shard's leader arms it once every member runs 0.14.0.
Before you start
-
Read "Breaking changes", and list the credentials your clients use: the operator key, minted tokens (their subjects, lifetimes and minters), tokens that carry
scopes, external issuers, and on a hosted deployment the website minter. -
Rehearse on a copy (recommended). On a host with both binaries:
python scripts/upgrade_rehearsal.py --old-binary ./cortexdb-0.13.1 --new-binary ./cortexdb \ --data-dir /backups/a-copy --env-file /etc/cortexdb/cortexdb.env \ --token user:pat=<a client's bearer>It backs the copy up, boots 0.13.1 and then 0.14.0 on a restored copy with your environment, and lists, kind by kind (records, rosters, trees, events, facts, beliefs, erasure receipts with
--erasure-id, revocations,--tokenprobes), what 0.14.0 lost or answers differently; exit 0 when nothing is lost. Never point it at the live directory.
Steps
-
Pin the deployment to 0.13.1, so nothing restarts it on 0.14.0 while you work.
-
Stop the server with its full stop grace:
docker stop -t 120 cortexdb, orsystemctl stopwithTimeoutStopSec=120. -
Back up the stopped directory and verify the archive:
python scripts/cold_backup.py backup DATA_DIR ARCHIVE.tar.gz python scripts/cold_backup.py verify ARCHIVE.tar.gz(or the 0.13.1 binary's own
cortexdb backup DATA_DIR ARCHIVEandcortexdb backup-verify ARCHIVE; with Docker,--entrypoint cortexdbon the 0.13.1 image). Keep the archive with the 0.13.1 binary or image: arming is one way, and this backup is the only way back. -
Review the environment. 0.14.0 reads the same environment and override files as 0.13.1. Each
offbelow serves what the check refuses and counts it in the access report, so you can see when it is safe to remove:Set When Why CORTEX_OPERATOR_DATA_READS=allow(oraudit)the preset is cloud_shared_saasand an application reads, writes or mints with the operator key, or a deployment minter mints account tokensdeny, the preset's default, refuses those requests withoutX-Cortex-Break-GlassCORTEX_MINT_LIFETIME_ENFORCE=offclients hold minted tokens of more than 7 days (person, agent), 30 days (service) or, with a chain claim, 24 hours they answer 401 from the first request CORTEX_TOKEN_CONFINEMENT_ENFORCE=offclients hold tokens whose scopesdo not name every family they usethose uses answer 403 CORTEX_MINT_REACH_ENFORCE=offa minter's mints name no tenant root, or more than the minter holds (the website minter not yet re-minted) those mints answer 403 or 422 CORTEX_PERSON_DISPLAY_NAME_ENFORCE=offandCORTEX_DISPLAY_NAME_IN_RECORD_ENFORCE=offa client writes tree.display_namethose writes answer 422 CORTEX_AUDIT_RETENTION_ENFORCE=off, orCORTEX_AUDIT_RETENTION=offthe deployment names its preset and must keep audit rows older than its period the first sweep deletes them five minutes after the start CORTEX_DELIVERY_GATE_ENFORCE=offa reader reads rows (lifecycle frames, exports) at homes where it holds no Reader role those rows are withheld leave CORTEX_FORMAT_CEILINGunsetalways 7keeps the directory unarmed and the new features answering 503 -
Start 0.14.0 on the same directory with that environment. Before it serves, it arms the directory and logs a warning, "shard armed for apply format 10: this is one-way, and this data directory no longer opens on an older binary…", with
codeSHARD_ARMED_ONE_WAYandformat10; every later start logsSHARD_ARMED_ONE_WAYat INFO. If the log says instead "the format ceiling allows arming, but the shard is held below it" withreason=reserved_path_in_use, a record sits at a marker or companion path (pathsnames them): the node serves unarmed, and the routes that need the new formats answer 503FORMAT_UPGRADE_PENDINGuntil you migrate that scope's events out, delete the record and restart.GET /v1/admin/readyanswers 200 once it serves. -
Verify:
GET /v1/admin/version:crate_version0.14.0 and the new capabilities ("New capabilities").DATA_DIR/format_armed.jsonholds{"format": 10}.GET /v1/admin/metricsauth.enforce: each switchonoroffas you set it.- A memory you know is found by
GET /v1/events/{id}and by/v1/recall(the operator key underallow, or a person's token), and a retry of a recent write with its idempotency key replays it. - Each kind of client token answers
GET /v1/auth/whoamias before; a 401lifetime_over_ceilingnames a token to mint again. A hosted deployment's website mints an account token. - For each switch you set
off:GET /v1/admin/access/report?scope=<tenant root>(the operator key,diagnostics.read) counts what it would refuse. Under the defaults, each refusal is a line undercortex_api::decisionin the log, naming the link that failed and its deciding path.
-
Then mint the over-ceiling tokens again, move display names to the directory, and remove each
offonce its count stays at zero.
The way back
Only from the backup. Stop 0.14.0 and keep its directory aside. Restore the archive into a new,
empty directory with the 0.13.1 tools
(python scripts/cold_backup.py restore ARCHIVE NEW_DIR --cortexdb ./cortexdb-0.13.1, or the 0.13.1
binary's cortexdb restore ARCHIVE NEW_DIR), and start 0.13.1 on it. Every write made after the
upgrade is lost. Never start 0.13.x on the upgraded directory: it refuses it. The one-click updater
never rolls back onto an armed directory.
The hosted beta
The hosted beta runs cloud_shared_saas, and CortexOS reads and writes there with the operator key,
as service:cortexos. Set CORTEX_OPERATOR_DATA_READS=allow before its upgrade and keep it until
CortexOS's release that moves its traffic to per-person tokens is live: under deny, the preset's
default, its data reads and its writes into person regions and shared scopes are refused from the
first request. audit serves the same as allow and counts what deny would refuse (check
operator_access), which shows when the key's traffic has moved. Mint the website's token again
("Hosted deployments", above) before the upgrade. Before the upgrade, run
scripts/upgrade_rehearsal.py on a copy of the beta's directory, with its environment.
What's new
Identity and tokens
- The principal chain (
principal_chain_v1). Optional token claimsact(the agent acting),app,client,run,run_start,taint,auth_time,minterandcdb_crit, signed by this server's minter with the chain assertion or asserted by an issuers-file entry;GET /v1/auth/whoamianswerschain. A token that carries a chain field lives at most 24 hours, and an agent's holds only what itsscopesname; a write made underactis stored withobserved_actorthe agent and needs arun(403RUN_REQUIRED), on the capture and import routes alike. An exact entry,<capability-or-prefix>:<path>!, names one scope and none below it, and<capability-or-prefix>:*names a family at every scope (confinement_wildcard_v1). - Mints (
mint_chain_v1).POST /v1/auth/tokenstakesact,app,client,run,run_startandtaint(the capabilityauth.mint.on_behalf_of, whichcloud_shared_saasallows), stampsminteron every token, copies a minting token'staintin, and holds every mint to its minter's reach. A token another principal minted also needs that minter to pass at the scope (the minter link). Attl_secondspast what a timestamp holds is 422ttl_out_of_range; it used to sign a token that had already expired./v1/auth/signupnames every family it grants. - External issuers (
CORTEX_AUTH_ISSUERS_FILE;[auth] issuers_fileon a cluster data node): a TOML file of JWT (RS256, ES256; pinned keys or a JWKS URL) and PASETO v4 issuers, mapping each token's subject (actor,prefix,hash, ordirectory, which signs a token in through the account it carries) and tenant, each entry naming the chain claims its tokens may carry and their longest lifetime, anddeployment_minters, the principals whose mints carryminter: "operator".POST /v1/admin/auth/reloadswaps the set without a restart, andGET /v1/admin/metricsauthand/node/v1/statusreport it. - The operator plane (
operator_break_glass_v1):CORTEX_OPERATOR_DATA_READS(allow,audit,deny) and theX-Cortex-Break-Glassheader ("Breaking changes"), and a tenant's own mode and readiness override,PUTandGET /v1/admin/access/tenant-settings(tenant_access_settings_v1), which answer the deployment's own mode too,deployment_mode. - The subject-token shadow (
subject_token_shadow_v1). On the operator key's requests,X-Cortex-Subject-Token(a person's or a worker's token) has every decision the request makes evaluated for that token's chain too, for the read's purpose, and counted (checksubject_shadow), without changing the response: a dry run of the move from the key to per-person tokens. - Rebinding a root to its tenant.
POST /v1/admin/access/tenant-bindingbinds the records under anorg:<id>root that the static key registered to tenant<id>(a dry run by default), andCORTEX_OPERATOR_INHERIT_TENANT=onkeeps the key's later registrations bound to the record that governs them. CORTEX_LEGACY_WRITE_CUTOFF(an RFC 3339 time, unset by default): from it on, a non-human write from a token with no chain claims follows the chain's write rules.
The access API
- The access report (
access_report_v1).GET /v1/admin/access/report?scope=<tenant root>(trusted operator withdiagnostics.read): per tenant and per check, what the check would refuse with its switchoff(while it is on, the refusal is the answer and its decision line the record), and when read, what the tenant's records and log hold that a check counts (rosters listing a principal twice, records at reserved paths, display names, machine-written rows by caller and source, paged bycursor). Counts are per node, in memory (counting_since), andGET /metricsgainscortexdb_access_report_requests_total,cortexdb_access_report_would_deny_totalandcortexdb_decision_log_suppressed_total. - Check and explain (
access_check_v1).POST /v1/access/checkandPOST /v1/access/explainanswer whether a chain (the caller's, or another one for an Owner or the operator) may read, write or administer at a scope or a memory, and which link decided (capability,confinement,tenant,person,minter,app,label,private_region, with each path, the role it delivers, its label cap and its conditions); a memory is decided as the delivery gate decides it, its home and every atom it carries. - Lookups and AuthZEN (
access_lookup_v1,authzen_v1).POST /v1/access/lookup/scopes(the scopes a chain may read under a prefix) andPOST /v1/access/lookup/principals(who may read a scope), paged with sealed cursors; AuthZEN 1.0'sPOST /access/v1/evaluationandPOST /access/v1/search/resource, withGET /.well-known/authzen-configuration(CORTEX_AUTHZEN_PDP). An evaluation of a memory ischeck's delivery decision. - Limits (
access_limits_v1).GET /v1/access/limits?scope=<root>lists every limit the binary enforces at a root, and the deployment limits are enforced:brain_scopes(520,000),sources(16),containers_per_source(50,000),sets(50,000),apps(8) andpolicies(64), per org tree, eachCORTEX_LIMIT_<NAME>(orlimits.<name>in a data node's[engine]); past one, 409ACCESS_LIMIT_REACHEDand nothing is written. - The permission view. The lookups, AuthZEN's search, roster checks,
checkandexplainread a per-root view the root's leader keeps (a warm check's p95 at 100,000 people: 1.8 ms to 61 µs), bounded byCORTEX_ACCESS_VIEW_MAX_BYTESandCORTEX_ACCESS_VIEW_ROOT_MAX_BYTES; while a view is being built the lookups answer 503ACCESS_VIEW_UNAVAILABLE. - A read's purpose (
read_purpose_v1)./v1/recall,/v1/recall/stream,/v1/answer,/v1/compose,POST /v1/access/checkand/explaintakepurpose, 1 to 64 characters of[a-z0-9_-], and AuthZEN's evaluation takes it ascontext.purpose. A roster entry, set entry or grant whosewhenis{purpose: <id>}holds for a read that names<id>, at every roster check the read makes, and only for it; the read's decision lines name it, and the answer cache and the cohort read cache key on it. A value out of the grammar is 422INVALID_BODY(details.field: "purpose"), and awhen: {purpose}id out of it is refused when it is written (422INVALID_ACCESS_RECORD,when_purpose). A read whose only roster path to its scope holds under a purpose, sent with no purpose or another one, stays 403POLICY_DENIED, withdetails.reason: "purpose_required",details.purpose(the purpose the path needs) and a message naming it. A read withoutpurposeis otherwise unchanged.
Registry records, change sets and applications
- Version-2 records and the audience rules. A version-2 registry record decides its roster
checks by its audience (
self,participants,subtree,leads,rollup,chain), its entries and sets, heads, grants and delegable regions, and each check is a read, a write or administration; a version-1 record reads exactly as 0.13.1 reads it. Version-2 kinds are written on an armed node only. - Change sets (
access_changesets_v1).POST /v1/access/changesstages access changes in parts,…/previewshows their access diff with a structural hash, and…/activateapplies them at once or on a date: refusedPREVIEW_CHANGEDwhen the structure moved,ACCESS_ASSERTION_FAILEDwhen a widening change breaks one of the tenant's policy cases,CHANGESET_STALEwhen a record it writes changed. A change set is its caller's own tenant's (another billing tenant's credential is refused,link: "tenant"), and staging needspolicy.administer.scopeat each record it writes andscope.create.<type>for a new one, under the token'scapsandscopes; every refusal is 403POLICY_DENIEDwithdetails.linkand its decision line. An activation returns a consistency token. The legacy registry routes are one-part change sets. Change sets serve one-segment tenant roots only: atCORTEX_TENANT_DEPTHabove 1 they answer 422INVALID_BODY(tenant_depth_unsupported).- The preview evaluates over a complete copy of what the change reaches (companions, units, homes,
regions) and answers
in_bandandin_band_parts({part, path, reason, scope?}, the first 256): whether the caller's activation is an in-band path, which only the operator key's can be. - A preview page holds at most 1 MiB, within a unit too: a unit whose records, changes or people do
not fit continues on the next page, with
records_cursororpeople_cursorset on it, each equal to the page'snext_cursor. A client that reads a unit's items appends them across pages. - A
not_narrowingrefusal names what widens:details.path, the first record in part order whose change widens access, and, when a person's role is what widens,details.principalanddetails.scope. A staging short of its read-path parts is refused 409CHANGESET_STALE(reason: "read_set") before any evaluation, so that refusal now comes beforenot_narrowing.
- The preview evaluates over a complete copy of what the change reaches (companions, units, homes,
regions) and answers
- The legacy registry routes.
POST /v1/scopeshonoursowner(it was dropped);GET /v1/scopes/listpages withcursor,next_cursorandhas_more; their errors carry each code's ownretriableflag; a token another principal minted registers only where its minter could. - Applications (
app_records_v1).PUTandGET /v1/apps/{id}register an application with its home template, memory kinds, mounts and limits; in a tenant that setsapps_enforced, a chain that carriesappreads and writes only where an entry admits the application (403APP_NOT_ADMITTED), while registry administration is decided by the roster alone.mounts: "default"on the four read routes adds the application's mounts to the read set (recall_mounts_v1), a person's first write of their home in an application registers it,GET /v1/usageaddsby_app, and an application's reference root (app:<key>,reference: true) is read by its chains from any tenant. The record's name lives in the directory:display_nameis 422 withdetails.name_entrynaming the entry. - A record's free text is erased by its Owner.
POST /v1/access/texts/erase{scope, path}erases every text a record names (its entries', grants', heads' and delegates' reasons, a hold's matter, a policy case's notes) from the log, the snapshots and every voter's files; the record keeps its references. A daily sweep erases the texts nothing names any more, on every root.
Notices and watch
watch(access_watch_v1).GET /v1/access/watch?scope=<root>lists a root's registry changes, change-set events, notices and restores from a position, waiting for more withwait_ms; its pages carrynames, the directory names of the principals they name.- Notices (
access_notices_v1). A read that must tell someone first commits its notice before it delivers (GET /v1/access/notices?scope=<root>&mine=true,POST /v1/access/notices/ack). The rules fire in production: a Detail read of a person's work compartment admitted only through a grant tells the person (cause: "grant"), on every route that returns rows, before anything is delivered; a break-glass read of a private region tells the region. The leader's hourly sweep drops notices 30 days old and the directory's erased-entry markers 90 days after their erasure.
Consistency tokens
consistency_tokens_v1:consistency: {"at_least": "<token>"}on the read routes waits until this node has reached the token (CORTEX_CONSISTENCY_WAIT_MS), GET reads take?at_least=, and writes answer one with?consistency=1(?consistency=takes any case;POST /v1/publishand the legacy registry routes included). A change set's activation,PUT /v1/apps/{id}, the tenant rebind and every page ofGET /v1/access/recordsalways carry one. A token names only a root the request was authorized under (403token_root_not_writtenotherwise), a write whose token cannot be issued answers its committed receipt without one, and a read whose token is from before a restore of its root answersconsistency_reset: truewithaccess_restored_at.
Restores
- A restored copy is held until its access sources acknowledge ("Breaking changes").
cortexdb restore-check --access-state lost|unchangedmarks it (<data_dir>/access_restore.json), andscripts/cold_backup.py restorepasses the flag;GET /v1/access/records?root=lists a root's registry for a source to diff (with a consistency token and?at_least=),POST /v1/access/restore/ackacknowledges for a source (a repeat keeps the first time), andPOST /v1/admin/access/restoreis the trusted operator's override. While a root is pending, the change-set routes serve onlyresyncchange sets, to its access sources and the operator, andwatchlists the restore.
Source containers
source_containers_v1(format 9).POST /v1/access/rehomemoves events whose sharing changed without erasing them (its caller must own the new home; an item too large to move isskipped,too_large),PUTandGET /v1/access/watermarksrecord a source's last completed sync, andPOST /v1/access/accounts/resolvemaps a source's accounts to directory principals; change sets enforce the container rules and the per-source cap. Withcoverage, a source whose last sync is older thanCORTEX_SOURCE_WATERMARK_MAX_AGE_Sis awatermarkgap.cortexdb-connectors0.3.0 writes containers ("Clients").
The directory and SCIM
- The directory (
directory_v1).PUT,GETandDELETE /v1/directory/{id}?scope=<tenant root>and the searchGET /v1/directory: a tenant's principals with their names, emails and sign-in accounts, and the names of its scopes and sets, withETagandIf-Match. Any principal of the tenant reads names and titles, only the root's Owners, the operator and the principal itself emails and accounts, and a private scope's name only its readers. A search page holds at most 1 MiB. While no record registers the tenant's root, only the trusted operator acts as its Owner there. An entry a legal hold names is not erased (409HOLD_IN_FORCE). - SCIM 2.0 (
scim_v1) at/scim/v2/Users,/scim/v2/Groupsand their metadata routes (ResourceTypes/{id}andSchemas/{id}included), for the tenant's SCIM client: Users are directory entries, Groups are sets changed through change sets, andactive: falsestops every credential of the person at the next request (401SUBJECT_UNMAPPED,deactivated) until it is active again. A deployment whoseCORTEX_TENANT_DEPTHis above 1 answers 501SCIM_UNSUPPORTED.
Read sets and agent writes
- Read sets.
extra_scopestakes up to 40 scopes (extra_scopes_40_v1), searched in parallel, one search per scope (a read set of up to 9 ranks as before);coverage: truereports what was searched and the gaps (bound,deadline,segment_unreachable,rebuild_cut,private_unexpanded, and for sourceswatermarkandcontainer_cap;recall_coverage_v1);beliefs: "merged"rebuilds the pack's beliefs across the read set for the caller (beliefs_merged_v1). A mounted prefix reaches the private containers whose roster names the reading person, by an entry or a set, besides the non-private ones. - Agent writes carry what they read (
write_provenance_v1, format 9). Each node keeps a read record per non-human chain and run; a non-human write carries the atoms (homes) and provenance of what its chain was delivered, and a caller may declareprovenance(at most 1,024 event ids). Erasing any of those events erases the write on every replica. A write that cannot carry its atoms safely (an unknown record,taint, more than 16 atoms, an atom in a private region) is redirected to the writer's private space (redirected_to). A row with atoms is served only to a reader of every atom's scope.
Derived records and labels
- Derived records follow their sources (format 10). A forget or erasure also erases, on every
replica and in the same entry, the rollups and declared beliefs that cite an erased event and the
procedures, concepts and summaries derived from a sealed or expired one;
GET /v1/erasures/{id}/verifychecks them, and receipts list them.POST /v1/beliefsstores a declared belief as a replicated record (with optionalprovenanceand, new,idempotency_key), so every replica serves it and a move carries it. - Derived rows carry their sources' atoms. A fact, a belief's supports, an episode and a concept
are served only to readers of what they were made from; a belief a reader may read only in part is
rebuilt for that reader from the facts it may read (
rebuilt: true), and a fact superseded by one the reader may not read is shown as current. Entity names resolve per audience. - Sensitivity labels (
tree.label): a row's label is the most restrictive of its home's and its sources', computed at each read, capped by a grant'smax_label; a labelled item never reaches a Summary reader. enrichper scope. A scope'senrich(on itsattrs:unitcompanion) turns enrichment off or on below it. Turning it on backfills the scope's older captures within a daily budget per tenant (CORTEX_ENRICHMENT_BACKFILL_BUDGET_USD, 5 USD;enrich_backfill_v1), andGET /v1/access/enrich?scope=answers a scope's effectiveenrichand its tenant's backfill.- Scope moves on a cluster carry a root's blobs (
MOVE_BLOBS_UNSUPPORTEDis gone), access records, lineage and derived records, rebuild its episodes and beliefs on the target, and drop its concepts, which the target reflects again at its next concept pass.
Rollups and publish
- Rollups (
rollups_v1). The shard leader builds typed monthly totals for each org-tree unit with anaud:rollcompartment, and synthesis items where the LLM stages run, on a cadence and within a daily budget (CORTEX_ROLLUP_CADENCE,CORTEX_ROLLUP_BUDGET_USD; usage rolerollup).GET /v1/rollups,/v1/rollups/{id}and/v1/rollups/totalsserve them only to readers of every input; a recall at a rollup home carrieslayers.rollups;GET /v1/admin/rollups/statusreports the driver. A record that is not part of its topic's current build answers 410ROLLUP_SUPERSEDEDwithdetails.current, and the totals takeYYYY-MMmonths only. - Publish (
publish_v1).POST /v1/publishis how a person widens a memory: it copies an event or a rollup the person is served into a home they write, with the original as its provenance, so erasing the original erases the copy. A person may publish through the tenant's admitted application (appwithclient: "person"); an agent's, a run's, a service's or an application's own chain, and the operator key, are 403PUBLISH_PERSON_REQUIRED. A norm needs a sign-in within 10 minutes (401FRESH_AUTH_REQUIRED).?consistency=1returns a token at the target's root. POST /v1/experience/bulkinto an org tree's team or compartment no longer answers 503SCOPE_STORAGE_UNAVAILABLE.
Erasures, holds and the read-free forget
- A person, an outside party, a tenant.
POST /v1/erasures/person(person_erasure_v1) erases a person's region, application homes and own messages in the tenant's groups, then their directory entry; one person's erasure at a time (409DESTRUCTIVE_OPERATION_IN_PROGRESSnaming the running job)./v1/erasureswithsubject: {email}(party_erasure_v1) erases the events labelledparty:<address>, through a per-node party index.POST /v1/erasures/tenant(tenant_erasure_v1, a dry run by default) deletes a tenant whole: from its first change every request of the tenant's credentials answers 410TENANT_DELETED, and its/verifyproves it as a whole-scope erasure. Each writes a receipt of counts and hashes. - A cancel stops an erasure that has not proposed its first entry (its job, receipt and gdpr row
read
cancelled); after that, or for a job that ended, it is 409ERASURE_NOT_CANCELLABLE.ERASURE_JOB_CAPACITYis retriable (503,Retry-After: 30). - Legal holds.
holdrecords keep the events they name from forgets, erasures and retention. An event a hold keeps is no input to an erasure's closure, so what was derived from it (facts, beliefs, episodes, concepts, rollups and declared records) stays with it, however it is homed; a forget's derived pass keeps them too. The previews count held events (events_under_legal_hold) and what the hold kept (derived_under_legal_hold, on the forget and its preview), and a whole-scope erasure's receipt lists the kept events inheld_event_ids. A forget'smatched(and its preview's) counts what a hold kept beside what went, capped atrequested, and a selector whose every match a hold kept gets no "matched no records" warning. Writes and erasures authorized through a set are fenced at apply and reads at delivery, so a change to the set reaches the requests already in flight. - Held erasures run when their holds are released. The shard leader runs every pending held
erasure no hold keeps any more (when it takes the lead, when a hold's record changes and every five
minutes), under its job's receipt (
held_completed). A hold is released only by a change to its record; a window's end releases nothing. - The read-free forget (
forget_by_key_v1)./v1/forgetand its preview takeselector.idempotency_keys(at most 1,024: the events those keys' first writes stored, wherever a redirect landed them) andselector.capture_keys(at most 64: the events labelled with one). The policy capabilityforget.by_keyadmits such a forget alone, so a forget-only service token reads nothing; underdenyit needs no break-glass header, and while a restore mark holds the trusted operator's preview by keys is served. - A locked license no longer blocks deletion: the forget and erasure routes, their previews,
cancels, status, proofs and receipts, and
GET /v1/schemas, pass an expired or missing license.
Audit
- The decision-audit stream. Every enforced denial writes a decision line
(
mode=enforced verdict=deny) naming the failed link, its reason and its deciding path (<record>#<field>), and the verified chain, never content;CORTEX_DECISION_LOG=alladds one line per decision a served request made. WithCORTEX_LOG_FORMAT=jsoneach line is one JSON object for a log shipper. - The audit trail is read from its file. With
CORTEX_V1_AUDIT_PATHset, a start reads only the last row and every read streams the file, so memory no longer grows with the trail; a torn last line is cut off at the start. - The audit trail's pepper is kept (
<data_dir>/audit_pepper.json, orCORTEX_AUDIT_PEPPER_FILE), soPOST /v1/audit/verifyverifies the rows this server wrote before a restart (a row an older binary wrote, pepper version 1, still verifies under no kept pepper); back the file up with the trail, and a pepper file that does not read refuses the start (78AUDIT_PEPPER_INVALID). A policy's denial writes its row withdecision: "deny"and adenialobject (at most 60 a minute per principal), the auth layer's own refusals (BREAK_GLASS_REQUIRED, a malformed header) are audited, and a lifecycle cancel'saudit_noteis kept as a peppered digest. audit.retention("Breaking changes"):CORTEX_AUDIT_RETENTION, the report checkaudit_retention, andPOST /v1/audit/chain/verify'sanchoronce rows were deleted.- The lifecycle stream loses nothing and repeats nothing.
GET /v1/lifecycle/streamreads the lifecycle log in order from its cursor; a subscriber the log left behind gets onelaggingframe and the stream ends;?batch_id=and?export_id=filter it, so a bulk receipt'slifecycle_streamdelivers only its batch's rows.
The MCP server
/mcp(CORTEX_MCP=on; off by default): Streamable HTTP, stateless, an OAuth 2.1 resource server with its protected-resource metadata (RFC 9728) and enterprise-managed authorization through the issuers file. One identity per call, the caller's own signed token (never the operator key), and each tool call is the REST request the same credential would make. Tools:recall(in a time window),decision_historyandexplain, plusrememberandforget(by memory id, with a preview and its receipt) underCORTEX_MCP_PROFILE=write, inside the scope allowlistCORTEX_MCP_SCOPES. Browser origins needCORTEX_MCP_ALLOWED_ORIGINS.mcp_http_v1is listed onGET /v1/admin/version(owner decision A37): served whileCORTEX_MCP=onand withheld while it is off, so a listed name always means/mcpanswers. A cluster ingress never lists it.
The console
- The Access pages (the embedded console,
/): Organization (the org tree from the records, every edit staged, previewed and activated as a change set), Change sets, the Access explorer (check,explain, the lookups, the limits and an AuthZEN tester), Directory, Applications, Tokens (mints with the chain fields, the lifetime ceilings and the mint-reach refusals, and revoke), Tenant settings (the tenant's operator mode beside the deployment'sdeployment_mode, the tenant binding, the access report, the issuers reload), Notices and watch, Restores and sources, and Rollups and publish. Each shows a refusal as the server answered it (its status, code, message,detailsand request id), so a read refused for want of a purpose names the purpose. - Erasure, Audit and Maintenance pages for the new routes (a person's erasure, a refused request's
denyrow, scope migration on the log, retention's per-TTL cursors); Console › Advanced sendspurpose,extra_scopes,coverage,beliefs: "merged",mountsand consistency tokens; underdenythe console asks for a break-glass reason only after a 403BREAK_GLASS_REQUIRED, and words the refusal's class; and the top bar's Act as names who the operator key acts as (X-Cortex-Actor), checked withGET /v1/auth/whoamifirst. Change sets mark an activation that is in-band, show anot_narrowingrefusal'sdetailsand page a preview's units.
The shared fixture and the release gates
- The shared fixture (
tests/fixture/run_fixture.py, data intests/fixture/shared_fixture.json): the design's acceptance matrix (§19) and the org brain's §13 matrix as data, with the expected-deny, leakage and laundering suites, run against the release binaries on a plain node and on three replicas (the shard leader killed halfway), each cell on every route that returns its row, and every outcome compared across the two topologies and with the reference evaluator's verdicts (cortex-access).scripts/ci_cluster.sh prruns it. - The release gates:
tests/compat/beta_upgrade.py(the beta data-retention gate),scripts/upgrade_rehearsal.py(the same comparison on a copy of an operator's backup),tests/smoke/shared_memory_smoke.py(the shared-memory surface over HTTP on one node), and the shard's seeded replication harness.
New capabilities
GET /v1/admin/version lists 34 more names than 0.13.1 (mcp_http_v1 only while CORTEX_MCP=on):
access_changesets_v1: change sets, the registry listing and the restore acknowledgements.access_check_v1:POST /v1/access/checkand/v1/access/explain.access_limits_v1:GET /v1/access/limits.access_lookup_v1:POST /v1/access/lookup/scopesand/v1/access/lookup/principals.access_notices_v1: notices,GET /v1/access/noticesandPOST /v1/access/notices/ack.access_report_v1:GET /v1/admin/access/report.access_watch_v1:GET /v1/access/watch.app_records_v1: application records (/v1/apps/{id}) and reference roots.authzen_v1: AuthZEN 1.0 at/access/v1/*and its well-known metadata.beliefs_merged_v1:beliefs: "merged"across a read set.confinement_wildcard_v1:<capability-or-prefix>:*inscopes.consistency_tokens_v1:consistencyand?at_least=on reads,?consistency=1on writes.directory_v1: the tenant directory,/v1/directory.enrich_backfill_v1: theenrichturn-on backfill andGET /v1/access/enrich.extra_scopes_40_v1: up to 40extra_scopes.forget_by_key_v1:selector.idempotency_keysandselector.capture_keyson/v1/forget.mcp_http_v1: the MCP server at/mcp; listed only whileCORTEX_MCP=on.mint_chain_v1: the chain fields of a mint and the stampedminter.operator_break_glass_v1:CORTEX_OPERATOR_DATA_READSandX-Cortex-Break-Glass.org_tree_v1: 0.13.0's org trees, by name.party_erasure_v1: an outside party's erasure,subject: {email}on/v1/erasures.person_erasure_v1:POST /v1/erasures/person.principal_chain_v1: the chain's claims, the exactscopesentry and the issuers file.publish_v1:POST /v1/publish.read_purpose_v1:purposeon the read routes,check,explainand AuthZEN, andwhen: {purpose}.recall_coverage_v1:coverage: trueon the four read routes.recall_mounts_v1:mounts: "default"on the four read routes.rollups_v1:/v1/rollups,/v1/rollups/{id}and/v1/rollups/totals.scim_v1: SCIM 2.0 at/scim/v2/*.source_containers_v1: rehomes, watermarks, account resolution and the container rules.subject_token_shadow_v1:X-Cortex-Subject-Tokenon the operator key's requests.tenant_access_settings_v1:PUTandGET /v1/admin/access/tenant-settings.tenant_erasure_v1:POST /v1/erasures/tenant.write_provenance_v1:provenanceon the capture routes andPOST /v1/beliefs, andredirected_to.
New settings
On a cluster data node, set them in the node config's [engine] table. The switches,
CORTEX_OPERATOR_DATA_READS, CORTEX_OPERATOR_INHERIT_TENANT, CORTEX_LEGACY_WRITE_CUTOFF,
CORTEX_AUDIT_RETENTION, the audit pepper file, the issuers file and the rollup, backfill and MCP
settings refuse the start (exit 78) on a value they do not take; CORTEX_ACCESS_REPORT, its
_MAX_MB, CORTEX_DECISION_LOG, CORTEX_CONSISTENCY_WAIT_MS and
CORTEX_SOURCE_WATERMARK_MAX_AGE_S fall back to their default.
| Variable | Default | Meaning |
|---|---|---|
CORTEX_FORMAT_CEILING | the newest format, 10 | the highest shard apply format the node arms for; 7 keeps it unarmed, 9 holds it at 9 |
CORTEX_MINT_LIFETIME_ENFORCE, CORTEX_TOKEN_CONFINEMENT_ENFORCE, CORTEX_MINT_REACH_ENFORCE, CORTEX_MINTER_LINK_ENFORCE, CORTEX_DUPLICATE_MEMBER_ENFORCE, CORTEX_RESERVED_PATH_ENFORCE, CORTEX_ROLE_BLIND_MEMBERSHIP_ENFORCE, CORTEX_PERSON_DISPLAY_NAME_ENFORCE, CORTEX_DISPLAY_NAME_IN_RECORD_ENFORCE, CORTEX_AUDIT_RETENTION_ENFORCE, CORTEX_DELIVERY_GATE_ENFORCE | on | off serves what the check refuses and counts it |
CORTEX_REVOCATIONS_V2 | on | off keeps 0.13.x's revocation journal |
CORTEX_OPERATOR_DATA_READS | the preset's: deny on cloud_shared_saas with auth on, else allow | allow, audit or deny for the operator key |
CORTEX_OPERATOR_INHERIT_TENANT | off | the key's registrations take the binding of the record that governs them |
CORTEX_AUTH_ISSUERS_FILE | unset | the external issuers file |
CORTEX_LEGACY_WRITE_CUTOFF | unset | from this time, chainless non-human writes follow the chain's write rules |
CORTEX_AUTHZEN_PDP | the request's origin | the policy_decision_point AuthZEN's metadata names |
CORTEX_ACCESS_REPORT | on | off counts nothing (the report answers 409 ACCESS_REPORT_OFF) |
CORTEX_ACCESS_REPORT_MAX_MB | 64 | the report counters' memory budget |
CORTEX_DECISION_LOG | denials | off, report, denials or all |
CORTEX_AUDIT_RETENTION | unset (the named preset's period, or none) | an ISO 8601 period, or off |
CORTEX_AUDIT_PEPPER_FILE | <data_dir>/audit_pepper.json | where the audit trail's pepper is kept: created at the first start, never replaced |
CORTEX_CONSISTENCY_WAIT_MS | 10,000 (at most 30,000) | how long at_least waits |
CORTEX_ACCESS_VIEW_MAX_BYTES | 2 GiB | every permission view a node keeps; 0 keeps none |
CORTEX_ACCESS_VIEW_ROOT_MAX_BYTES | 1 GiB | one root's view |
CORTEX_READ_SET_THREADS | the cores, clamped to 2 to 16 (at most 64) | threads for a read set's parallel search |
CORTEX_READ_RECORDS_MAX_MB | 64 | the agents' read records, least recently used evicted |
CORTEX_LIMIT_BRAIN_SCOPES, _SOURCES, _CONTAINERS_PER_SOURCE, _SETS, _APPS, _POLICIES | 520,000, 16, 50,000, 50,000, 8, 64 | the deployment limits, per org tree |
CORTEX_ROLLUP_CADENCE | team:300,department:3600,org:86400,node:3600 | seconds between a read unit's rollup builds |
CORTEX_ROLLUP_BUDGET_USD | team:0.25,department:0.50,org:1.00,node:0.25 | each unit's daily synthesis budget |
CORTEX_ENRICHMENT_BACKFILL_BUDGET_USD | 5 | the enrich turn-on backfill's daily budget per tenant; 0 queues nothing |
CORTEX_SOURCE_WATERMARK_MAX_AGE_S | 86,400 (a day) | a source whose last sync is older is a watermark gap in coverage |
CORTEX_MCP | off | on serves /mcp |
CORTEX_MCP_PROFILE | read | write adds remember and forget |
CORTEX_MCP_SCOPES | org:{tenant}/{principal}/* | the MCP tools' scope allowlist |
CORTEX_MCP_RESOURCE, CORTEX_MCP_AUTHORIZATION_SERVERS, CORTEX_MCP_ALLOWED_ORIGINS | unset | the resource URI, the authorization servers and the browser origins the MCP server names and admits |
Fixes
The release's last lanes audited every route against its contract and fixed what they found. Each
item says what was wrong; PHASE5_RELEASE_NOTES_DRAFT.md has the rest of each.
Security
- By-id reads bypassed break-glass. The operator key's by-id reads (
GET /v1/facts/{id}, the belief, lifecycle and chunk reads by id, a concept, a conflict, a synthesis job) were decided by the scope the request named: naming anallowtenant's scope, or a non-private ancestor, read adenytenant's or a private region's row with noX-Cortex-Break-Glassand no notice. They are decided by the row's own tenant mode and class, and a by-id read of a row not under its?scope=is 404. - A confined minter minted wider tokens than itself (the mint's
scopesentries). A mint checkedcapsat the mint's scope only, so a token whose ownscopeswere narrow could mint an entry past them, an emptycaps, or a token with noscopesat all. Every minted entry now lies within one of the minter's ("Tokens"). - A change set reached another tenant, and needed no capability. A person of one tenant could
register another tenant's unregistered root (
org:<other>) with itself as Owner, by change set or by the legacyPOST /v1/scopes(on presets whose*holdsscope.create.cross_tenant), and an Owner whose token was narrowed to a read could stage and activate access changes. Change sets now apply the tenant fence and the registry's capabilities, at staging and at activation. - The directory of an unregistered tenant root let every principal of the tenant act as its Owner (read another's emails and accounts, write or erase entries). It is the trusted operator's alone until the root is registered.
- AuthZEN's evaluation of a memory answered its home's decision, so it allowed derived and
machine-written rows that
checkrefuses. It is nowcheck's delivery decision. - Conflicts and coverage leaked what the delivery gate withholds.
GET /v1/conflictslisted a conflict with its subject, predicate and resolution whatever the gate withheld, and the coverage read counted withheld concepts. Both now count and show only what the reader is served; a conflict'snew_informationmust name a record of the conflict's own scope (another tenant's was accepted). POST /v1/audit/verifyconfirmed rows outside the caller's boundary (withaudit.read.cross_actor, any row of the billing tenant): such a row is 404, asGET /v1/audit/{id}answers it.- A rehome told any authenticated caller whether the ids it named lay outside the root
(
event_outside_root) before authorizing it. It authorizes first. - Operator-key paths that skipped break-glass under
deny: the Mem0, Zep, Letta and OpenAI imports (which also skippedRUN_REQUIREDfor an agent chain without a run), a scope migration out of or into a private region or into a shared org-tree scope, a forget or erasure preview naming anent_id, a synthesis into a private region or a shared org-tree scope, an application record's registration or aservice:principal added to its roster, and a tenant rebind that registers its root. Each is in-band now. - The operator key's change-set activation skipped break-glass under
deny. An activation by the key (a dated change set's approval included) of a change set a legacy registry route would make in-band (it registers a record, names aservice:principal a record did not, adds a reader to a private region or otherwise widens who may read one) needed no header, told no one and counted nothing. Underdeny, the deployment's or the tenant's own, it now needsX-Cortex-Break-Glass(else 403BREAK_GLASS_REQUIRED,class: "in_band", and nothing is activated); with it, each private region it widens is told first (else 503NOTICE_UNAVAILABLE); underauditit is counted. Staging, the preview, the status and a discard need no header. - A change set's preview did not see access widened through unit companions or homes. It
evaluated only the records a change writes, over a copy with no companions and no homes, so a
change to a companion's
members_set,heads,delegatesorgrants, a home or a team moved, or an employee record made could stage asnarrowing: true, preview "no access change" and activate past a tenant assertion denying the very access it gave. The preview now evaluates over a complete copy of what the change reaches, every principal who may hold a path there before or after, and a change to a field that admits or grants (a record'sappsorreference; a companion'sheads,delegates,grants,members_set,apps,access_sourcesorapps_enforced) widens unless it provably shrinks; a preview'srollups_hiddenreads every reader of a rollup's home. On a cluster, two change sets that each passed the assertions alone could activate together past one: a change to a companion, a unit or a set now names the tenant'sorgtree:changesmarker, and the later activation is refused 503REGISTRY_STALEand checked again against the earlier one. - A cluster ingress served
GET /v1/admin/metricswith no credential. It needs the operator key. GET /v1/facts/timelinechecked only the granular read rule; it asks for the view's traversal capability, as every layer read does. A belief or episode build at a parent wiped every child's rows, private regions' included; it replaces only its own scope's.
Change sets at scale
- One tenant's long change-set staging wedged the whole server. A change set's preview evaluated under the registry's state lock; with any writer queued behind it, every reader waited too, so one tenant's long staging stalled every tenant's reads and writes, health included. The preview (and the legacy routes' assertion check) no longer evaluates under the lock; the change-set sweep never queues on it (its cleanup takes the lock only when it is free, else waits for its next minute); a staging short of its read-path parts is refused before any evaluation; and the evaluation is lazy and memoized, one per change set.
- Before and after (the repro is
tests/scale/changeset_churn.py): at 5,000 people, recall's stalls of 58 to 74 s during a long staging became none (its p99 4.7 ms; health's p99 went from 30 s to 1.2 ms); at 2,000 people under 20 minutes of churn, recall's p99 went from 3.1 s to 5 ms, and a member's removal to its enforcement (the leaver refused) from 38 / 55 s (p50 / p95) to 8 / 12 s.
Routes 0.13.1 already served
- Retention. A row under a longer retention rule outlived it (one cursor passed rows a shorter
rule had not expired): the sweep keeps a cursor per TTL class, and the first tick after the upgrade
reads the longer classes from the start once. An applying sweep runs on the shard leader only
(503
NOT_LEADERelsewhere); a legal hold record's expiries are counted and expire once it is released;GET /v1/admin/retention/policieswaits and answers 200 (it answered 202 with a poll that never reported); a body without a JSONContent-Typeis 415, where it was ignored. - Audit. The pepper was drawn at each start and kept by none, so every row from before a restart
failed
POST /v1/audit/verify; denials were written asallow; a cancel'saudit_notewas dropped; the servedaudit_rowandlifecycle_eventschemas refused rows the server writes. - The lifecycle stream relayed a 1,024-row broadcast: a resume delivered a row twice, a
subscriber more than 1,024 rows behind lost rows silently, and
?batch_id=and?export_id=were ignored. - Layer reads.
GET /v1/facts,/v1/beliefsand/v1/episodesfiltered a window of the newest 5,000 facts (1,000 beliefs or episodes), so older matches were missing;GET /v1/eventslisted a scope's earliest 5,000 events and loaded the whole log on each request; the episode build read a scope's earliest 5,000 events;include_vectors=truereturned no embedding;GET /v1/facts/timelineignoredas_of, and?subject=did not take the servedent_id; a token whose read entries are exact got 404 for every event by id. - Conflicts and synthesis. A conflict resolution whose log write failed answered 200 and lost it
at the next restart (now 503
WAL_UNAVAILABLE, nothing applied); a synthesis refused by a registry outage or a running forget answered 403 (now the registry's own code, or 409DESTRUCTIVE_OPERATION_IN_PROGRESS); a read that lost a race with an authorization change answered 404 or 403 (now run again, then 503AUTHORIZATION_STATE_CHANGED). - Writes, answers and export.
POST /v1/composeanswered a provider failure with a 200; a cancel left the facts, beliefs, episodes and concepts derived from the event;POST /v1/exportexported cancelled and excluded events and ignored fields it does not honour;GET /v1/experience/status?scope=did not find a write a run redirected;POST /v1/beliefsloaded every captured row of the log to check its supports, and answered a shard refusal as a retriable 503 always. cloud_shared_saasallowed no import or export. Itsimport.*andexport.*matched no capability (a pattern's*is one segment), so every hosted import and export was 403 at the deployment tier; it namesimport.from.*andexport.format.*.- The code plane.
POST /v1/code/import-indexmakes the bundle'srefs/heads/mainthe live index, so the graph,certifyandcoverage/statusread one index;import/scipis all or nothing; a store failure after a verified bundle is 500STORE_ERROR, retriable, not 422BUNDLE_REJECTED;calls,impact,history/for-symbolandgraph/*say what they did not walk, andtests/for-changehonourslimit. - Operator maintenance.
POST /v1/admin/scopes/migratewrote its copies to the storage engine only, so retention, export and every erasure missed them and a rebuild of the views lost them, and a move left the source's rows and idempotency claims on disk behind a node-local tombstone; it now copies through the log and erases the source with an erasure job.POST /v1/admin/persistansweredpersisted: truewhatever its saves did. Dedup, the index audit, vector hygiene, persist and the two index-audit repairs answered 503DB_UNAVAILABLEafterCORTEX_EVIDENCE_TIMEOUT_MSwhile their work went on (deletes and re-indexing landed after the client was told the request failed); they now run to completion. Vector hygiene droppedscopeandvectorsand repaired the whole store, and the index audit, vector hygiene and the source-blob-link repair ignored a body sent without a JSONContent-Type, so a repair ran as the default report and answered 200; each now refuses what it does not apply (422, or 415 for the media type). A fork of a cluster shard's segment-store owner record answered 503ICE_FAILED, retriable, though no retry could succeed (now 409ICE_FORK_UNSUPPORTED). Chunk inspection and the blob repairs were confined to the caller's own billing tenant, which the operator key never matches, so no operator could inspect or repair a hosted tenant's events; they take the tenant from?scope=.GET /v1/usageandGET /v1/plananswered a race with an authorization change as a 403. - Re-derivation, vocabularies, temporal phrases. A re-derivation's 422
ENRICHMENT_SCOPE_NOT_ALLOWEDnamed an allowlist when the scope'senrich: offrefused it (nowdetails.reason: "enrich_off"); the vocabulary schema refused the records the routes return, and a name over 256 characters was stored; a registered temporal phrase was never read.
Shared-memory features, as the pre-release builds served them
- Forget and erasures: a cancel did not stop an erasure; the previews counted no held event; a
forget dropped
about_entitybesideabout_subjectand all but the first attribute underredact_events; a forget's derived pass deleted what held events derived; a job a lease refused said "authorization changed"; two persons' erasures hashed alike in the gdpr row; a forget task that did not complete saidretriable: false. A forget, its preview or an erasure at the caller's own application home that has no record yet (<tenant>/app:<id>/user:<p>, where a redirect lands their writes) answered 403POLICY_DENIEDwhile a read there answered 200; it answers 200 withmatched: 0and deletes nothing, as do the export, a cancel, a layer build and a job's status there. - Agent writes: a write back into the scope its run read was exempt from that scope's atom whatever record governed it; it is exempt only under the target's current record, so a scope deleted and registered again since the run read it is an atom, and the write is redirected where the scope is a private region.
- The access API: the principals lookup stopped silently at its walk's bound (it now says
truncatedand its cursor goes on); the records listing refused a prefix under a deeper tenant root; the scope-less restore override answered an unreadable mark 409; a repeated restore acknowledgement rewrote the stored time; a rehome of large documents failed with a 500 on a cluster data node (now cut by apply's budget, an item too largeskipped); another chain'sappwas refused at its application's reference root; a minter-link refusal was reported as a capability's. - Registry, directory and SCIM:
PUT /v1/apps/{id}and the registry routes answered a shard refusal asSCOPE_STORAGE_UNAVAILABLE, not retriable;DELETE /v1/directory/{id}erased a held person's entry; a directory search page could reach 20 MiB; SCIM's discovery locations answered 404 and its unmapped client errors 500; an Owner in a tenant that enforces applications was refused its registry, an admitted application's chain could not export, andPUT /v1/admin/access/tenant-settingsanswered 503 on every cluster.PUT /v1/apps/{id}'sdisplay_namerefusal named the directory entry's bare path, whose/the router reads as a separator; it now gives the one segment/v1/directory/{id}takes (org:acme%2Fapp:<id>). The operator key's write asservice:<key>at its own reference root needed break-glass underdeny. - Consistency tokens: a token that could not be issued replaced a committed receipt with a 503;
a token could name a root the request did not write;
POST /v1/publishrefused?consistency=1. - Publish: in a tenant that enforces applications no one could publish (a person's chain with
appwas refusedPUBLISH_PERSON_REQUIRED, one without itAPP_NOT_ADMITTED). - Rollups: an earlier build kept only because a stored rollup still cites it was served and
publishable by id (now 410
ROLLUP_SUPERSEDED); the totals took a month bound with a sign (2026-+1), which dropped or kept every month of the year.
Known limitations
- Not built: the mirror that would keep a customer's SpiceDB, OpenFGA or Entra in step with CortexDB's sets, and the AuthZed OAP backend (design §16, DB-25); AuthZEN's endpoints are built.
- A read set reaches its direct scopes only.
scope,extra_scopesand an application's mounts together reach at most 40 scopes; a mounted prefix with more containers is cut, andcoveragenames what was left out (bound,private_unexpanded). The partition scan that would read a mount's prefix past that bound (design §10.2) is built but no route fills it yet. - A narrowing staging that touches a set every member is in takes a full evaluation: about 70 s at 5,000 people. It holds no lock, so nothing else waits on it, and it is the change set's only evaluation; incremental evaluation comes after 0.14.
- A race between two first restore acknowledgements. A repeated acknowledgement keeps the first time, but two concurrent first acknowledgements of one source can still store the later one's.
- Re-import carries the importer's atoms. Re-importing an export keeps each line's
provenancewhere the importing log holds the cited event, but its atoms are the importer's own, stamped from the importing chain, never the file's: onlyscripts/cold_backup.py restorekeeps the original atoms. - Search after
import-index. A code bundle carries facts, not file contents: lexical and semantic code search (context,workspace/context, recall's code lane) keep serving the checkout's files until a refresh reads them again. - The
enrichbackfill starts only on a turn-on. A re-parenting that moves a scope under anoncompanion starts no backfill of its older captures, and the day's spend is each node's own estimate. - On a cluster (
cortexdb node), these hold on a plain node and not yet on a cluster, most surprising first:- Agent writes are redirected more often. A run's read record is known only on a node that has
led, since the run's
run_start, the shard of every root its token's confinement covers. A token whose read entries cover every root (*), or a root another shard holds, has an unknown record on every data node, and a failover makes every earlier run's record unknown (a plain node does so only at a restart): such a run's writes are redirected to its writer's private space, or refused 403ATOMS_REDIRECT_REFUSEDwhere its confinement holds none. An application's reference root on another shard is one such root. Confine runs to their tenant's roots, and place the reference root on the tenant's shard. - Leader-local layers after a failover. Builder beliefs, episodes and concepts are the node's
that built them, so a new leader serves none until a build runs there: on the scheduler's next
pass under
CORTEX_V1_LAYERS_AUTO(concepts at its next concept pass), else at the nextPOST /v1/beliefs/buildor/v1/episodes/build. - Sign-in through a
directoryissuer works only on the nodes of the tenant root's shard: elsewhere such a token is 401SUBJECT_UNMAPPED,directory_not_here. A data node refuses adirectoryentry that hastenants.aliases(exit 78 at start, 422 on reload). - A deactivation reaches only its tenant's shard. SCIM's
active: falseis enforced by the nodes that hold the tenant root's directory, the root's shard: a request on a root another shard holds is not refused. - The permission view is rebuilt after a failover: until it is, the new leader's lookups and
AuthZEN's search answer 503
ACCESS_VIEW_UNAVAILABLE. - Per-node state: the
enrichbackfill's daily spend (a new leader may spend a tenant's day again, and a replica that applied a turn-on inside a snapshot install, or while it was down, never walks it); the audit trail with its pepper and its retention sweep (an ingress serves no/v1/audit*route); an erasure job's receipt, the new kinds' included (another node answers itsGET /v1/erasures/{id},/verifyand/receipt404); the deployment limits (limits.<name>in each data node's[engine]); and the access report's counts, which restart at a failover. watchlists a cluster'sregistryandchangesetitems withoutat, and a change set's activation once per part.- Temporal phrases and vocabularies are a plain node's: a cluster refuses their puts (503
TENANT_MAPS_UNSUPPORTED), so a registered phrase resolves reads on a plain node only. - The MCP server runs on a plain node only: a cluster ingress answers 501
CLUSTER_ROUTE_UNSUPPORTEDfor/mcp, and a data node refusesCORTEX_MCP=on. A browser-based MCP client is not supported yet on either:/mcpallows no MCP header in CORS. - Export, imports and blobs are a plain node's: a cluster ingress serves no
POST /v1/export,/v1/import/*or/v1/blobs*(501CLUSTER_ROUTE_UNSUPPORTED; an operator reaches a node's own withcortexdb admin node call). - Across roots: a write citing another root's event is 422
CROSS_ROOT_PROVENANCEon a plain node and 422PROVENANCE_UNKNOWNon a cluster whose other shard holds that root, and a publish whose original and target are on different shards is 422CROSS_SHARD_REQUESTat the ingress; nothing is written either way. - A legacy registry change racing a change set's activation. The legacy registry routes propose no read paths, so one that races an activation can still pass a tenant assertion the two together would break; two change sets cannot (above, "Security"). The fix is planned for 0.14.1.
POST /v1/admin/index-audit/reincludeanswers 409REINCLUDE_UNSUPPORTEDon a data node.
- Agent writes are redirected more often. A run's read record is known only on a node that has
led, since the run's
Clients
0.14.0 ships five client releases. Each is published by hand, before the server's tag: release.yml's
preflight ("Verify coordinated client packages are already published") fails a tag whose tree names
a cortexdbai (PyPI or npm) or cortexdb-connectors version its registry does not serve, so the
Python SDK 0.13.0, the TypeScript SDK 0.11.0 and the connectors 0.3.0 are on their registries first;
cortexdb-mcp and cortexdb-cli are not checked and have no automation. Until then the registries
hold the versions under "Published".
| Package | Registry | Published | With 0.14.0 | What it adds |
|---|---|---|---|---|
cortexdbai (Python SDK) | PyPI | 0.12.0 | 0.13.0 | a method for every v1 route, shared memory included, on Cortex and AsyncCortex (sdks/python/COVERAGE.md); typed models from the OpenAPI contract; a typed exception per error code; consistency tokens (ConsistencyTokens); the chain mints, break-glass and the subject-token shadow |
cortexdbai (TypeScript SDK) | npm | 0.10.1 | 0.11.0 | a typed call for every v1 route (sdks/typescript/COVERAGE.md): the access API, AuthZEN, change sets, applications, the directory, SCIM, restores, rollups, publish, erasures with their receipts and proofs, the read-free forget; ConsistencyTracker; a class per error code with ERROR_CODES and isRetriable() |
cortexdb-mcp | PyPI | 0.8.0 | 0.9.0 | a person's, an agent chain's or an issuer's token as its credential, the subject-token and break-glass headers, new tools (access_check, access_explain, rollups, notices, acknowledge_notices, directory_lookup, and under the write profile publish and forget_by_key), the write and read profiles (all, the default, no longer lists every tool), typed errors with the server's codes, and every tool checked against 0.14.0 (mcp-server/COVERAGE.md) |
cortexdb-cli | PyPI | 0.6.0 | 0.7.0 | break-glass flags on every command, typed errors with a hint for each code, cortexdb tokens mint with every field and chain claim, cortexdb directory, and every command checked against 0.14.0 (cli/COVERAGE.md) |
cortexdb-connectors | PyPI | 0.2.22 | 0.3.0 | container mode (source containers) for Slack, Teams, Discord, Google Drive, Confluence and Notion |
Each client follows the last server lanes within its version: the Python SDK's models are
regenerated from the final OpenAPI contract; the TypeScript SDK reads a change-set preview whole,
changes.previewAll() and previewPages() (every page of a preview, a unit's records, changes and
people joined across pages; apply() activates after reading it), and throws
V1ChangeSetPreviewMovedError for a page of another revision; the console marks an in-band
activation, shows not_narrowing's details and pages a preview's units; the MCP server and the CLI
take p5v's and p5w's codes.
Their breaking changes, from each package's README and CHANGELOG:
cortexdbai0.13.0 (Python). Every refusal raises the class of itserror_code, a subclass of its HTTP status family's (an unknown code raises its family's class, no longer a bareV1APIError;V1NotConfiguredErroris aV1UnavailableError,V1InvalidRequestErroraV1BadRequestError); a token bearer with noactorsends the token'ssubasX-Cortex-Actor(0.12 sentuser:default);recall,recall_stream,answerandcomposesendviewonly when you pass it (0.12 sentholistic, which a shared org-tree scope refuses); a request the server always refuses fails before it is sent, withValueError.cortexdbai0.11.0 (TypeScript). Codes come back as their own class (still aV1APIError; compare withinstanceof);ForgetSelectorandErasureSelectorare two types, and the erasure calls refuse key selectors;experience(),experienceBulk(),mintToken(),whoami(),forget()andevents()take and return typed shapes, andfacts(),beliefs(),episodes()andunderstanding()take a view or a query object; no default view; every call takes a lastRequestOptions; TypeScript 5.0 or later for the declarations.cortexdb-mcp0.9.0. A tool refuses an argument it does not take (it was dropped); the default profile,all, no longer lists every tool (publishandforget_by_keyneed--tool-profile write); the recall tools sendviewonly whenCORTEXDB_VIEWis set;X-Cortex-Actorcomes from the token whenCORTEXDB_ACTORis unset; errors read asCortexDB returned HTTP <status> <code> …with what to do; the forget tools say they delete derived records under the default cascade;memory_getsends the event's scope.cortexdb-cli0.7.0. The REPL's/forget QUERYandcortexdb forget --queryresolve the query to event ids you confirm (the server refuses a query selector);--cascade noneis gone;recall,answerandcomposesend a view only when you choose one; names go to the directory (cortexdb directory put), nottree.display_name.cortexdb-connectors0.3.0. Nothing breaks without a container root: every connector writes exactly as 0.2.22 does.CORTEXDB_CONTAINER_ROOT(orbind(container_root=...)), set to an org-tree tenant's root, writes each item into its source permission unit's container (<tenant>/source:<system>/container:<key>, or a DM group<tenant>/group:dm-<system>-<key>), registered through change sets, read through sets the directory resolves the source's accounts into; a sharing change moves the item withPOST /v1/access/rehome, and the source's watermark is proposed after each sync that changed something.cortexdb-sync migrate-containers <connector> [--dry-run]moves a tenant's existing items onto containers by rehome; the Slack webhook receiver, whose source writes containers, refuses to run while a container root is bound (run the poll connector instead);CortexConnector.put_container_namenames a container in the directory (connectors/CHANGELOG.md).
The clients published before 0.14.0 predate shared memory: they reach none of its routes,
cortexdb-cli 0.6.0's interactive /forget is refused (strict selectors), and the SDKs' error
tables carry the codes as 0.13.x answered them. Upgrade them with the server.
Performance against 0.13.1
Single-node parity (owner decision A30): met. The release's bound is the p50 and the p95 of
capture, recall and answer within +10 % of 0.13.1's, strictly. Measured at 12cbbc1b, below, and
confirmed on the final server code, 394f46b8: in one interleaved run of v0.13.1, 12cbbc1b and
394f46b8, the final matches 12cbbc1b within ±2.6 % on every write row, all of them inside
+10 % of v0.13.1 (the nearest, wait=captured p95, +6.9 %), and RSS at ready on an empty data
directory is +22.5 %, the binary's size, as accepted.
- How: v0.13.1 (
b9f7ba03) against the head, interleaved, on one quiet 64-vCPU box; jemalloc with the image'sMALLOC_CONF, mock embeddings and the stub answer renderer; five rounds of the light cells, three of the heavy cells (10,000 and 100,000 events), thenrss_at_ready.py(benchmarks/latency/single_node_parity.py; the protocol isdocs/distributed/MERGE_READINESS.md, "Single-node parity against 0.13.1"). - Closest to the bound: recall p50 at 10,000 events, +7.8 % (15.27 to 16.46 ms); a bulk write's
wait=accepted, p50 +5.4 % and p95 +5.6 %. - Other figures (not A30's): a forget by id's p99 −4.9 % (it was +52 % on an earlier candidate); peak RSS +6.5 % in the light cells and −5.6 % at 100,000 events; disk per event +0.8 % at 100,000; the Raft log's peak 19.7 and 24.2 MB, within its 64 MiB budget.
- Outside +5 %, accepted as before: RSS at ready on an empty data directory, +22.0 % (95.9 to 117.1 MiB), mostly the larger binary's code (its text 38.3 to 55.1 MiB; the heap adds 3.1 MiB); and the time to ready, +6.8 % (0.308 to 0.329 s, polled every 5 ms).
Compatibility
- Requests: a request that uses none of the new routes, fields or headers is answered as 0.13.1 answers it, but for what "Breaking changes" lists.
- The shard's apply format is 10 (
ShardRequest::FORMAT): 8 holds the access records, 9 the agent writes' atoms and provenance and the source containers, 10 the derived records. A plain node proposes them once armed; a cluster shard once every member runs 0.14.0 and its leader armed it. - Rollback: only from the backup taken before the upgrade ("Upgrading a pilot", "The way back").