{
  "schemaVersion": 1,
  "generatedAt": "2026-08-17T18:41:53.943Z",
  "generationKey": "062d0a4f7ddf4b0ce2ea298b7ff767d5ff9c7aeee22de4689cf49faf7ab46d7c",
  "metadataPayloadSha256": "ccaf6fc341f8c4abac579f2ac598923d3912bff32602a0ca2231a003b2e9e453",
  "diagram": {
    "id": "warrant-primary-runtime-flow-eb6432fd",
    "title": "Warrant — primary runtime flow",
    "description": "approveChangeRequest claims the row before applying and stamps appliedAt only after the apply commits. The apply itself runs through manual.ts and curation.ts, so the revision and audit rows are identical to what a direct edit would have produced — plus the change_request activity link.",
    "status": "current",
    "canonicalAppearanceKey": "tsx:src/app/(docs)/docs/modules/warrant/page.tsx:warrantRuntimeFlowChart#1"
  },
  "aliases": [],
  "concepts": [
    "Warrant runtime flow",
    "Modules",
    "Warrant"
  ],
  "keywords": [
    "POST :id/approve (API)",
    "audit_log (store)",
    "change-requests.ts (service)",
    "concept_change_requests (store)",
    "manual.ts + curation.ts (service)",
    "entity_revisions (store)",
    "append change_request.approve",
    "Reviewer (SDK or curl)",
    "entities (store)",
    "append a revision with activity change_request:id",
    "approveChangeRequest with an optional note",
    "load the request, must be open",
    "claim the row, status open to approved",
    "apply the payload by kind",
    "stamp appliedAt only after the apply commits",
    "closed request plus appliedEntityId",
    "guard kb:write and the governance:write capability",
    "/api/v1/change-requests",
    "reviewer gate — owner or steward only, when either is set",
    "write the fields, promote authority to at least curated"
  ],
  "mermaid": {
    "type": "sequence",
    "sourceSha256": "eb6432fde77d55f982c084e22ea0fb29b05ef24382ab24d98c65b036bfaa6d0b"
  },
  "provenance": [
    {
      "appearanceKey": "tsx:src/app/(docs)/docs/modules/warrant/page.tsx:warrantRuntimeFlowChart#1",
      "surface": "route",
      "sourcePath": "src/app/(docs)/docs/modules/warrant/page.tsx",
      "line": 97,
      "route": "/docs/modules/warrant",
      "symbol": "warrantRuntimeFlowChart",
      "caption": "approveChangeRequest claims the row before applying and stamps appliedAt only after the apply commits. The apply itself runs through manual.ts and curation.ts, so the revision and audit rows are identical to what a direct edit would have produced — plus the change_request activity link."
    }
  ],
  "embeddedMetadata": [
    {
      "sourcePath": "src/app/(docs)/docs/modules/warrant/page.tsx",
      "caption": "approveChangeRequest claims the row before applying and stamps appliedAt only after the apply commits. The apply itself runs through manual.ts and curation.ts, so the revision and audit rows are identical to what a direct edit would have produced — plus the change_request activity link."
    }
  ],
  "generation": {
    "application": {
      "name": "eli-ai",
      "version": "0.1.0"
    },
    "environment": {
      "node": "v26.3.1",
      "yarn": "4.17.1",
      "platform": "linux",
      "architecture": "x64",
      "containerImage": "playwright:v1.62.1-noble@sha256:c091b21d9fae78c76e85cd4356431e9b018402f172a214fc7d7a5e9a7e29d8ac+node:26.3.1-bookworm-slim@sha256:209558c3e5e40e8adff68959d3c2ba7cd73723e716d89196878a0c362fa1e109"
    },
    "packages": {
      "mermaid": "11.16.0",
      "mermaidCli": "11.16.0",
      "playwright": "1.62.1",
      "playwrightCore": "1.62.1",
      "puppeteer": "25.6.0",
      "puppeteerCore": "25.6.0"
    },
    "renderer": {
      "mermaidConfigSha256": "68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101",
      "themeCssSha256": "c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033",
      "browser": {
        "name": "chromium",
        "revision": "1234",
        "version": "151.0.7922.34",
        "executableSha256": "0b20b130e7edd9dd51873be867761295fe0cfad490c2b9a64f95bd3cfc08fa71"
      },
      "font": {
        "family": "Eli Diagram Inter Variable",
        "fileSha256": "3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62",
        "licenseSha256": "3b0a5fca3d17942cde889069889dedbbbd075e9b599968c82a95f4d944e9b345"
      }
    },
    "adapterVersions": {
      "diagramGenerator": "2",
      "drawioFlowchart": "1",
      "drawioSequence": "1",
      "drawioState": "1",
      "drawioGantt": "1"
    }
  },
  "artifacts": {
    "mmd": "/diagrams/warrant-primary-runtime-flow-eb6432fd/warrant-primary-runtime-flow-eb6432fd.mmd",
    "svg": "/diagrams/warrant-primary-runtime-flow-eb6432fd/warrant-primary-runtime-flow-eb6432fd.svg",
    "png": "/diagrams/warrant-primary-runtime-flow-eb6432fd/warrant-primary-runtime-flow-eb6432fd.png",
    "drawio": "/diagrams/warrant-primary-runtime-flow-eb6432fd/warrant-primary-runtime-flow-eb6432fd.drawio",
    "json": "/diagrams/warrant-primary-runtime-flow-eb6432fd/warrant-primary-runtime-flow-eb6432fd.json"
  },
  "artifactSha256": {
    "mmd": "84c944c13649d404b7998ab9db5a008fee9cb0689caf84f933212f31c84d2df3",
    "svg": "5a56c9631686573045306992345182d1c1015b7076a36a196c1b9c18a96fdcaf",
    "png": "1a8f25365d8de6e7b717e1d790c541537c62bc32d875d84654e5a982c2bbfa3e",
    "drawio": "dabd6ccc9864378997d08a62dd26124d047375704c873cba1542d5ab8ad4d560"
  }
}
