)]}'
{
  "commit": "ab9631ca9a5a9cb267fa1389ebd69fc2b6495aad",
  "tree": "8604a2da33ca1e28470a05af5fbc9b91231934dc",
  "parents": [
    "9cc5f596e5174ca6b15db41f63b037fd0d128f86"
  ],
  "author": {
    "name": "Sebastian Ullrich",
    "email": "sebasti@nullri.ch",
    "time": "Wed Nov 18 10:16:50 2026 +0000"
  },
  "committer": {
    "name": "Sebastian Ullrich",
    "email": "sebasti@nullri.ch",
    "time": "Wed Nov 18 10:16:50 2026 +0000"
  },
  "message": "fix: do not count kernel checking toward the elaborator\u0027s `maxHeartbeats` limit\n\nThis PR makes kernel type checking never count toward the elaborator\u0027s `maxHeartbeats` limit of the enclosing command. Previously, the kernel\u0027s allocations counted toward it only when a declaration happened to be checked synchronously on the elaboration thread, so the same kernel work was charged to some commands and not to others. The kernel\u0027s own `maxHeartbeats` limit per declaration is unaffected.\n\n`lean_add_decl` and `lean_elab_add_decl` now restore the thread-local allocation count read by `IO.getNumHeartbeats` on exit, using the new `scope_restore_num_heartbeats`.\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f5dd8c2a6df80cfb587595c1d8f3935e3bb123b9",
      "old_mode": 33188,
      "old_path": "src/kernel/environment.cpp",
      "new_id": "4c2d9c3f274d193f58c8b60827148d3fbb58400b",
      "new_mode": 33188,
      "new_path": "src/kernel/environment.cpp"
    },
    {
      "type": "modify",
      "old_id": "07e4404e428e07fc8679cba8f0acae1a26b5be8e",
      "old_mode": 33188,
      "old_path": "src/library/elab_environment.cpp",
      "new_id": "c26c19b2464495655da090cd9ad185ef7a613de7",
      "new_mode": 33188,
      "new_path": "src/library/elab_environment.cpp"
    },
    {
      "type": "modify",
      "old_id": "45e9787948644ef4546ca62b9add993bba191b2b",
      "old_mode": 33188,
      "old_path": "src/runtime/interrupt.cpp",
      "new_id": "ceeb345f67a4ef7ecdd549be431ccfd2bec4796a",
      "new_mode": 33188,
      "new_path": "src/runtime/interrupt.cpp"
    },
    {
      "type": "modify",
      "old_id": "a1cf67d287116d9cb554812264deb184b7efd9af",
      "old_mode": 33188,
      "old_path": "src/runtime/interrupt.h",
      "new_id": "45a5f0dd11fa3c838d337d3b235ca4e2467f23c9",
      "new_mode": 33188,
      "new_path": "src/runtime/interrupt.h"
    },
    {
      "type": "modify",
      "old_id": "3f4d9bab9939c40a1c98972bce4383ac8ccfa877",
      "old_mode": 33188,
      "old_path": "tests/elab/kernelHeartbeatsPerDecl.lean",
      "new_id": "0937f6df59264768855f291ebc4b885a3227536e",
      "new_mode": 33188,
      "new_path": "tests/elab/kernelHeartbeatsPerDecl.lean"
    }
  ]
}
