interplane.Get Omega
Read in your language

cortex

aien-dev/cortex

Brought by drakestapleton

branch main Branches Tags History

cortex / spec / ORACLE-OBSERVED.md

56 lines · 7043 bytes Raw Blame History Source

cortex-rs 0.1.0 behaviour observed on the live binary (2026-10-26)

Binary $HOME/.local/bin/cortex-rs (sha256 91ccba94…afe; SQLite 3.45.0, serde 1.0.229, serde_json 1.0.151, axum 0.7.9, tower-http 0.5.2, hyper 1.11.1, uuid 1.26.1, chrono 0.4.45, rustc 1.98.1), run on a copy of the database with CORTEX_TOKEN=paritytok. Source: archived aien-dev/cortex-rs src/ (identical to the private canonical checkout). T = Authorization: Bearer paritytok, J = Content-Type: application/json.

Routing, auth, CORS (every response carries vary: origin, access-control-request-method, access-control-request-headers)

requeststatusbody / headers
GET /health, /status200{"runtime":"native-arm64-rust","service":"cortex-rs","space":"atlas-memory","status":"ok","version":"0.1.0"} (content-type application/json, 108 bytes)
HEAD /health200headers only, content-length 108
POST /health405empty, allow: GET,HEAD
any /api/cortex/* or unknown path without valid token401{"error":"Unauthorized: invalid or missing Cortex bearer token"}; a wrong method on a known route also carries its allow
token unset and no $HOME/.config/cortex/token503{"error":"Service unavailable: Cortex authentication token unconfigured on host"}
unknown path with valid token404empty
GET /api/cortex/recall (valid token)405allow: POST
DELETE /api/cortex/get405allow: GET,HEAD
PUT /api/cortex/search405allow: GET,HEAD,POST
OPTIONS anything (preflight or not, any origin)200access-control-allow-methods: *, access-control-allow-headers: *, allow of the route (none for unknown paths), access-control-allow-origin only for an allowed origin; no auth
GET with Origin: http://localhost:18095normaladds access-control-allow-origin: http://localhost:18095; http://evil gets none

Body extraction (axum Json)

Query strings (axum Query, serde_urlencoded) → 400 text/plain Failed to deserialize query string: …

duplicate field q; `limit=` → `cannot parse integer from empty string`; `limit=abc` and `limit=-1` → `invalid digit found in string`; `limit=+5` accepted; `limit=99999999999999999999999` → `number too large to fit in target type`; `include_retracted=yes` → `provided string was not `true` or `false; q wins over query.

get

No id/name → 400 {"error":"Missing id or name parameter"}; not found → 404 {"error":"Entity not found"}.

Ordering facts

Writes

{"kind":"entity","value":{"canonicalName":"x","metadata":{"b":1,"a":[1.0,-0,1e2,12345678901234567890,-9223372036854775809]}}} → 201 {"recorded":true,"receipt":{"id":UUIDv4,"operation":"entity.upsert","targetType":"entity","targetId":UUIDv4,"committedAt":"2026-10-26T16:15:15.567077208+00:00"}}; get returns "metadata":{"a":[1.0,-0.0,100.0,12345678901234567890,-9.223372036854776e+18],"b":1} (sorted keys, zmij float text).