Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.
Rust ai-nativedescription-logicsformal-verificationinfrastructure-as-codeisabelle-languageknowledge-graphleanlean4mcpmcp-serverontologyowlowl2reasoningrustshaclsparqltheorem-proving
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# tardygrada-gatekeeper: a proof-carrying-action gatekeeper, exhaustively verified\n",
"\n",
"An action is dispatched only if it carries a certificate the gatekeeper can check against a safety spec. Because the multi-agent system is bounded, we verify safety **completely** (not sampled): over the whole reachable state space the gate admits an action iff the result is safe.\n",
"\n",
"**Runtime -> Run all.** Pure Python standard library, no installs.\n",
"\n",
"Repo: https://github.com/fabio-rovai/open-ontologies/tree/main/case-studies/tardygrada-gatekeeper\n"
]
},
{
"cell_type": "code",
"metadata": {},
"execution_count": null,
"outputs": [],
"source": [
"import urllib.request, os\n",
"os.makedirs('src', exist_ok=True)\n",
"urllib.request.urlretrieve('https://raw.githubusercontent.com/fabio-rovai/open-ontologies/main/case-studies/tardygrada-gatekeeper/src/gatekeeper.py', 'src/gatekeeper.py')\n",
"print('fetched gatekeeper.py')\n"
]
},
{
"cell_type": "code",
"metadata": {},
"execution_count": null,
"outputs": [],
"source": [
"!python3 src/gatekeeper.py\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"Sound and complete over the reachable space: 672/672 unsafe actions blocked, 504/504 safe admitted, 31-line trusted core, ~0.36us per check. Without the gate, 57% of actions violate the spec. Write-up: https://gov.tesseract.academy/research/proof-carrying-action-gatekeeper\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
},
"colab": {
"provenance": []
}
},
"nbformat": 4,
"nbformat_minor": 5
}