TETHESIS
ENGINEERING REFERENCE / CONTRACT VALIDATION

Prove the contract.
Test the refusal.

A successful query is only the beginning. Validate the behavior that matters when inputs change, permissions narrow, a worker loses authority or a response disappears.

These are documented request shapes and expected outcomes for controlled evaluation. They are not captured live test transcripts, and this page does not run the engine.

01 / CONDITIONAL COMMIT

Refuse a write based on stale evidence.

A caller reads a record, retains its revision, and proposes a change. Another authorized writer updates the record first.

DOCUMENTED / ILLUSTRATIVE REQUEST
POST /graphs/vault/cypher
Idempotency-Key: merge-an-512-1

{
  "query": "MATCH (a:Analysis {id: $id}) SET a.raw = $merged",
  "parameters": {
    "id": "an-512",
    "merged": "reviewed result"
  },
  "conditions": [
    {
      "node": "an-512",
      "rev": "1792310400123456789"
    }
  ]
}
EXPECTED CONTRACT / NOT A LIVE RESPONSE
409 CONDITION_FAILED

No protected write committed.

Acceptance test

Verify the record still holds the intervening update. Refresh evidence and independently re-evaluate the proposal before attempting a new operation.

Technical reference →
02 / FENCED LEASE

Refuse a superseded worker's protected commit.

Worker A acquires a lease, then stalls. After expiration, worker B acquires a later fencing token. Worker A attempts a protected write with the earlier token.

DOCUMENTED / ILLUSTRATIVE REQUEST
POST /graphs/ops/leases/acquire

{
  "key": "task:42",
  "ttlSeconds": 300,
  "holder": "planner-1"
}

# Initial token: 17
# Later holder: token 18
# Submit a covered write with token 17
# using the documented lease-bound write contract.
EXPECTED CONTRACT / NOT A LIVE RESPONSE
Illustrative documented error fields:
{
  "subcode": "LEASE_LOST",
  "retry": "terminal",
  "details": {
    "executed": false,
    "write_committed": false,
    "key": "task:42",
    "reason": "superseded"
  }
}

Acceptance test

Verify the stale write did not commit. A lease does not prevent speculative work or guarantee external effects cannot occur; the protected commit must actually be covered by the fencing contract.

Technical reference →
03 / IDEMPOTENCY

Distinguish a lost response from a lost commit.

A client submits a mutation with an idempotency key. Its response is lost after the server commits. Use the same key within the documented scope and inspect the recorded outcome.

DOCUMENTED / ILLUSTRATIVE REQUEST
POST /graphs/vault/cypher
Idempotency-Key: merge-an-512-1

# Same authorized operation and payload

GET /graphs/vault/idempotency-keys/merge-an-512-1
EXPECTED CONTRACT / NOT A LIVE RESPONSE
Expected: original recorded result;
no additional mutation from the retry.

Acceptance test

Check the committed state and history. Do not reuse a key for different business intent or infer exactly-once behavior at external providers.

Technical reference →
04 / BITEMPORAL RECONSTRUCTION

Preserve the earlier recorded view.

A correction recorded after June 15 applies to an earlier effective period. Query a fixed valid date and compare recorded-time coordinates.

DOCUMENTED / ILLUSTRATIVE REQUEST
MATCH (c:Customer {id: $id})
AT VALID '2026-06-01'
AT RECORDED '2026-06-15'
RETURN c

# Compare with a later AT RECORDED date.
EXPECTED CONTRACT / NOT A LIVE RESPONSE
Expected: the earlier retained view;
the later view can include the correction.

Acceptance test

Seed a known late correction in a disposable graph. Verify both results, including access restrictions, retention and explicit TEMPORAL_READ_LIMIT refusal rather than partial historical data.

Technical reference →
05 / DEPENDENCY AWARENESS

Find recorded work that depends on changed evidence.

A decision or derived artifact links to a source through recorded dependency relationships. When the source changes, traverse known downstream links.

DOCUMENTED / ILLUSTRATIVE REQUEST
CALL db.impact(
  ['src:market-feed'],
  {dependsOn: [{type: 'DERIVED_FROM'}]}
)
YIELD record, class, depth
RETURN record.id, class, depth;
EXPECTED CONTRACT / NOT A LIVE RESPONSE
Expected: recorded direct and indirect dependents
within the selected relationship contract.

Acceptance test

Establish a known dependency fixture, include an unrelated record, and check returned IDs and depth. Missing mappings remain a coverage limitation.

Technical reference →
06 / GOVERNED RETRIEVAL

Filter the eligible population before ranking.

Seed a small document collection with an unauthorized record that is more semantically similar than permitted documents. Query with restricted credentials.

DOCUMENTED / ILLUSTRATIVE REQUEST
MATCH (c:Customer {id: $cid})-[:OWNS]->(d:Document)
RETURN d.title
ORDER BY cosine(d.embedding, $q) DESC
LIMIT 10;
EXPECTED CONTRACT / NOT A LIVE RESPONSE
Expected: only eligible records participate
in the covered exact ranking.

Acceptance test

Compare the authorized eligible set against the expected exact nearest neighbors. Verify hidden records are not returned or included in covered ranking, and test approximate mode separately.

Technical reference →
07 / INTEGRITY VERIFICATION

Verify the retained record.

Run supported audit and provenance verification with an authorized credential. For independent verification, retain signed anchors outside the server and use the trusted offline verifier.

DOCUMENTED / ILLUSTRATIVE REQUEST
GET /graphs/vault/audit/verify
GET /graphs/vault/provenance/verify

# Use documented signed-anchor and export procedures
# for independent verification.
EXPECTED CONTRACT / NOT A LIVE RESPONSE
Expected: verification of the covered chain,
or an explicit failure identifying the problem.

Acceptance test

Compare with a controlled known-good fixture and authorized corruption test in a disposable environment. A hash chain without an independent anchor does not defeat an operator able to recompute it.

Technical reference →
VALIDATION BOUNDARIES

Establish the conditions before testing.

Use disposable graphs and approved fixtures; record engine and SDK versions, configuration, license, credentials, request payloads, actual outputs and post-operation state. Verify tracked-read coverage for the installed release, including transaction-integrated and relationship reads before depending on them. Test held approvals, WORM, erasure, restore and guarded external execution separately under their documented procedures. Do not run destructive tests against production.

Bring your own workload.

Agree on the actual acceptance criteria, then measure the result.