)]}'
{
  "commit": "ee2218a12181d259b020630b30b24de94856d36a",
  "tree": "21236c382365de7539b487111e699963534889e8",
  "parents": [
    "22d279f81f2dc0f2610e211b1dfdf2c5fe4ebdf0"
  ],
  "author": {
    "name": "Leonardo de Moura",
    "email": "leomoura@amazon.com",
    "time": "Wed Sep 30 20:37:58 2026 +0000"
  },
  "committer": {
    "name": "Leonardo de Moura",
    "email": "leomoura@amazon.com",
    "time": "Wed Sep 30 20:37:58 2026 +0000"
  },
  "message": "fix: elaborate section variables with the visibility of the enclosing scope\n\nThis PR fixes anonymous `public` instances being silently dropped, and `public axiom`, `public structure`, and `public inductive` failing with a misplaced error, when an unused section variable mentions a private declaration in a `module`.\n\n`runTermElabM` elaborated the section variables with whatever visibility was current. `elabMutualDef` runs `mkDefView` under `withExporting` with the declaration\u0027s own visibility, and for an anonymous instance `mkDefView` calls `mkInstanceName`, which uses `runTermElabM`. So `variable [C]` with a private class `C` was elaborated in exporting mode, where `C` is not accessible, and the instance-implicit binder check threw. `mkInstanceName` discards the messages logged during name generation, and `logAt` suppresses the escaping exception because its message contains a synthetic `sorry`, so the failure was silent.\n\n`runTermElabM` now elaborates the section variables with the visibility of the enclosing scope, as `elabDeclaration` already does at the top level, and restores the caller\u0027s visibility only around `elabFn`.\n\nCloses #15302\n\nCo-Authored-By: Claude Fable 5.1 \u003cnoreply@anthropic.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "67bd2731709953cc8fc5cf2d80dce3686353f1f3",
      "old_mode": 33188,
      "old_path": "src/Lean/Elab/Command.lean",
      "new_id": "559ec406ffcd38aca73408083be142139bf40f9b",
      "new_mode": 33188,
      "new_path": "src/Lean/Elab/Command.lean"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "edf006cda337623e808e6aa573b05422a658cf3f",
      "new_mode": 33188,
      "new_path": "tests/elab/issue15302.lean"
    }
  ]
}
