PALIMPSEST
workspace

Proof

Every claim below is checkable without trusting this console, this API, or the project's own test suite.

CockroachDB — the system of record

Distributed vector indexing (C-SPANN), with prefix columns

Quarantining a belief moves its vector into a different k-means tree — it is not a WHERE clause hiding a row.

VECTOR INDEX memories_vec_idx (workspace_id, status, embedding)

CockroachDB maintains a separate tree per distinct prefix value, so (workspace_id, status) gives tenant isolation and quarantine isolation from the same mechanism.

The integrity lattice, as a database constraint

Even if every line of Python were bypassed, the database still refuses to store a belief holding authority its source cannot justify.

CONSTRAINT capability_requires_integrity CHECK (
  (capability_ceiling = 'informational')
  OR (capability_ceiling = 'suppressive' AND integrity_level >= 3)
  OR (capability_ceiling = 'actuating'   AND integrity_level >= 4)
)

Enforced twice on purpose: memory/lattice.py rejects before a connection opens, this CHECK is the backstop.

Atomic contradiction adjudication

Detection, arbitration, the state change, and the audit entry commit or abort together — there is no window where a belief changed status but the ledger doesn't say so.

BEGIN;
  SELECT ... FOR UPDATE (workspace_id, subject_key, predicate)
  -- supersede / quarantine / adjudicate
  INSERT INTO memory_ledger (prev_hash -> entry_hash)
COMMIT;   -- SERIALIZABLE, with a real 40001 retry loop

tests/test_concurrent_admission.py forces genuine 40001 SerializationFailures and asserts the retry loop absorbs them.

Temporal reconstruction

What the agent believed at decision time is recovered from the database's own MVCC history — not from a log this project wrote about itself.

SELECT ... FROM memories
AS OF SYSTEM TIME '<decisions.decided_hlc>'
WHERE workspace_id = ...

decided_hlc is cluster_logical_timestamp() captured at decision time, never now().

Tamper-evident ledger

entry_hash = sha256(prev_hash || canonical_json(payload)). Rewrite any committed payload and the chain stops re-deriving at that exact sequence number.

SELECT seq, payload, prev_hash, entry_hash FROM memory_ledger ...

tests/test_auditor.py mutates a payload behind the gate's back and asserts the auditor reports the break at the right seq.

Verify it yourself, via MCP

Read-only queries you can run against the CockroachDB Cloud Managed MCP Server, with this project entirely out of the loop.

Select a workspace to load the queries.

Same list from the CLI: python -m audit.auditor --print-sql

AWS — what each service actually does here

LambdaGateHandler runs the same FastAPI app as local (api/main.py via Mangum) behind a Function URL, and serves the static console from the same origin. LedgerExportHandler exports the hash chain.
Bedrock — Titan V2Text Embeddings V2, 1024 dims, L2-normalized before insert so the <-> operator ranks equivalently to cosine. Every retrieval candidate is scored by these vectors.
S3 + Object LockLedger export target in governance mode with ~7-year retention, enabled at bucket creation — the only moment it can be. Exported entries cannot be silently rewritten.
EventBridgeFires the ledger export on a 5-minute schedule, so tamper-evidence leaves the database it is evidence about.
Secrets ManagerPALIMPSEST_DSN and the Anthropic key, injected into both Lambdas via CloudFormation dynamic references — never a plaintext value in the CDK source or a build artifact.
CloudWatch Logs7-day retention on both functions, including the read-only middleware's refusals of destructive routes on the public demo.

Deliberately not deployed: Step Functions, API Gateway, multi-region. Each would have added an service to the list without doing real work in this system — see infrastructure/README.md.