Relate by Neo4j hackathonv0.1.0
Witness cross-examines the graph until only the evidence remains.
22 of 57,645 relationships, each proven needed.
WITNESS 22 relationships · 12 nodes, out of 57,645 · 3,748 68 relationships match the answer rows; 22 of them sufficeCHECK 22 of 22 change the answer (22 of 22 relationships, 0 of 0 isolated nodes) relate CLI: sufficiency + 22 of 22 necessity probes cross-checkedPROVE ONE delete exhibit 9 (PBC)-[:HAS_ROUTE]->(DFW) from a copy of W, re-run CHANGED: 4 rows → 3 rows (PBC drops out)
evidence/demo-2026-11-24.txt · lines selected, order keptThe problem
Graph answers are taken on trust.
A reviewer cannot read 57,645 relationships. “Show the path” is not enough either: a path can include relationships that change nothing.
57,645 relationships · 3,748 nodes · air-routes, drawn: 1,565 airport pairs in frame
The question · queries/two-hub.cypher
One question, three hard parts.
NOT EXISTSOPTIONAL MATCHaggregation
// Which airports of $country have no direct flight to $dest, yet would still reach it in two flights if any one hub closed?
MATCH (a:Airport)-[:IN_COUNTRY]->(:Country {code: $country})
WHERE a.iata <> $dest
AND NOT EXISTS { MATCH (a)-[:HAS_ROUTE]->(:Airport {iata: $dest}) }
MATCH (a)-[:HAS_ROUTE]->(hub:Airport)-[:HAS_ROUTE]->(:Airport {iata: $dest})
OPTIONAL MATCH (hub)-[:IN_COUNTRY]->(hc:Country)
WITH a, count(DISTINCT hub) AS hubs, coll.sort(collect(DISTINCT hc.code)) AS hub_countries
WHERE hubs >= 2
RETURN a.iata AS airport, hub_countries
ORDER BY airport
The answer · full graph
| airport | hub_countries |
|---|---|
| PBC | [MX, US] |
| QRO | [MX, US] |
| TLC | [MX, US] |
| UPN | [MX, US] |
The reduction · from the trace
Delete, re-run, roll back. 371 trials.
Trial 371: the witness, every relationship needed.
Tall tick: answer kept, deletion applied (86). Short: answer changed, rolled back (285).
Exhibit A · pull a tag
Pull any tag. The answer moves.
| airport | hub_countries |
|---|---|
| PBC | [MX, US] |
| QRO | [MX, US] |
| TLC | [MX, US] |
| UPN | [MX, US] |
Exhibit 15 pulled: (TIJ)-[:HAS_ROUTE]->(MEX) · PBC, QRO and UPN drop out.
22 of 22 change the answerRelate is the engine
The loop runs inside Relate, and the proof is a Relate file.
begin_transaction · rollback_transactionthe inner loop: 371 trials in the headline run- 2
QueryResult.query_typerefuse writes - 3
EXPLAINprune unreachable types - 4
read_only=Truereruns cannot write - 5
single-file .rlthe evidence format - 6
relate pullfixture mode - 7
relate query --mode jsonindependent re-check - 8
MCP · why · checkWitness's own tools, beside relate serve --mcp
The proof
Checked twice, on two surfaces.
witnesses/two-hub.manifest.jsonevidence/determinism.jsonevidence/pytest-2026-11-27.txtSpeed
Same loop, two engines.
Trials per second
p50 trial, ms
Median of 3 runs, one machine. An embedded engine versus a Dockerised server: it says nothing about Neo4j's query engine.
For agents · MCP
An agent asks why, and gets the evidence.
Answer (4 rows): PBC, ['MX', 'US']; QRO, ['MX', 'US']; TLC, ['MX', 'US']; UPN, ['MX', 'US']Evidence: 22 relationships (of 57,645) reproduce it; 22 of 22 change the answer — verified deletion-minimal.verified=True · trials=371 · reduction 1.359 s · ledger r-20261126-193623-ae64b5f6
// statement: MATCH (a:Airport) DETACH DELETE a RETURN 1{ "error": { "kind": "query", "message": "write keyword DETACH (read-only queries only)" }, "verified": false}
Excerpted from evidence/mcp-transcript.md (the exhibit list and the re-run path line are omitted; the // statement: line is from mcp-transcript.json) · scripted MCP client, no model in the loop, its own run (timings vary run to run) · recorded 2026-11-26 19:36 UTC · with a real model: evidence/mcp-agent-session.md
Run it
File the evidence, not the whole house.
git clone https://github.com/edycutjong/witness cd witness && uv run witness demo
Needs uv. The repository opens at submission; until then the clone does not resolve.
- For judges/judge/
- Exhibit/exhibit/two-hub.html
Deletion-minimal, never “smallest”: every kept relationship is needed.