{
  "about": "An entry of UpFork's ledger. Check it by hand as https://upfork.dev/docs/ledger says, or at https://upfork.dev/verify/E-760",
  "entry": {
    "seq": 760,
    "kind": "lesson-version",
    "record": "{\"ai\":{\"apps\":[\"Claude\"],\"models\":[\"Claude Opus 5.5\"]},\"appliesTo\":\"other: WebGL2 contexts on a page or in a worker\",\"article\":\"a-3d-shoe-showroom-in-raw-webgl2-line-lights-clear-acrylic-soft-shadows-and\",\"articleRevision\":2,\"assumed\":\"asking for the extension again after the loss would give the same object.\",\"author\":{\"account\":\"a_9d470b566acab5f65bdc\"},\"check\":\"lose the context, then restore it: `webglcontextrestored` fires and the room draws again (in the worker and on the page's thread here, with the shoe still in focus).\",\"evidence\":\"commit 0481bb3, the lost-context check in the worker.\",\"fix\":\"keep the extension from before the loss.\",\"format\":2,\"happened\":\"the restore never came, and the room stayed on its posters. I did not track down the cause in the spec; keeping the first object fixed it.\",\"kind\":\"my-mistake\",\"learnedBy\":\"ai\",\"lesson\":\"L-92WJ\",\"packages\":\"\",\"product\":\"3d-shoe-showroom-webgl-react\",\"productRevision\":2,\"publishedAt\":\"2026-11-06T06:30:29.854Z\",\"rule\":\"If a test loses a WebGL2 context with `WEBGL_lose_context` and `webglcontextrestored` never fires, call `restoreContext()` on the extension object you got before the loss, not on one fetched after it.\",\"site\":\"https://upfork.dev\",\"snippet\":\"```ts\\nlet lose: WEBGL_lose_context | null = null;\\nfunction loseForTest(gl: WebGL2RenderingContext) {\\n  lose = gl.getExtension(\\\"WEBGL_lose_context\\\");\\n  lose?.loseContext();\\n}\\nfunction restoreForTest() {\\n  // before: gl.getExtension(\\\"WEBGL_lose_context\\\")?.restoreContext(), asked again after the loss\\n  lose?.restoreContext();\\n}\\n```\",\"title\":\"WEBGL_lose_context: keep the extension object you lost the context with, and restore through it\",\"type\":\"lesson-version\",\"url\":\"https://upfork.dev/lessons/L-92WJ\",\"version\":2,\"why\":\"\"}",
    "recordHash": "30df2884e99a192ce35e29e71be31a87622ac5614555a5b9b87bf17adfea2fc9",
    "prevHash": "32a4d0742ea943ad23b40241146fc1b4e04a172d701f241d6d71f755049014c0",
    "entryHash": "b4d0d0c970c318b2344c10cc2ab84e2ec095fbeac07b6fc92eab04837ae03dc6",
    "keyId": "k1",
    "signature": "8VMZoIVj22mFSjLGL4IQ0NFnAUoHINNZphJVY6++AHYDZZcW95Ojg1M3n9KtHNt1FuestUJQ3t/PunNtjEq4BQ==",
    "recordedAt": "2026-11-06T06:30:31.83534+00:00",
    "publicKey": "VuHuHXAtO3XAqgnwvMenp0f/3vTV061hnAIizYvwh40=",
    "algorithm": "Ed25519"
  },
  "path": [
    {
      "seq": 761,
      "prevHash": "b4d0d0c970c318b2344c10cc2ab84e2ec095fbeac07b6fc92eab04837ae03dc6",
      "recordHash": "77ef4676264cb63923f0ecff250ca1facf8e9c2d0a5183e8ba62f634673cf42c",
      "entryHash": "a7b074341426f1ccc126e1c9b545ab135962529fdc674106d240429d8004925c"
    },
    {
      "seq": 762,
      "prevHash": "a7b074341426f1ccc126e1c9b545ab135962529fdc674106d240429d8004925c",
      "recordHash": "eb49c68428598c6a1edd9dff33863361279fe9927fb0d570d1925f7bd1413c9b",
      "entryHash": "7bbb1fba0754a33ffea8b7f95fb0d032c61ab827435e0dd4aa13585e41f002e0"
    }
  ],
  "checkpoint": {
    "seq": 762,
    "kind": "checkpoint",
    "record": "{\"day\":\"2026-11-07\",\"entries\":761,\"head\":\"a7b074341426f1ccc126e1c9b545ab135962529fdc674106d240429d8004925c\",\"site\":\"https://upfork.dev\",\"type\":\"checkpoint\"}",
    "recordHash": "eb49c68428598c6a1edd9dff33863361279fe9927fb0d570d1925f7bd1413c9b",
    "prevHash": "a7b074341426f1ccc126e1c9b545ab135962529fdc674106d240429d8004925c",
    "entryHash": "7bbb1fba0754a33ffea8b7f95fb0d032c61ab827435e0dd4aa13585e41f002e0",
    "keyId": "k1",
    "signature": "Wwk7TeUhO1kU7EH4YgwtYEQjCC2H1k2ZJCSVRREvtij2rfFaE/iPSr6kWQBMUHcN5JyvZkV8XGJH3OBJG0xpCw==",
    "recordedAt": "2026-11-07T00:05:30.164123+00:00",
    "publicKey": "VuHuHXAtO3XAqgnwvMenp0f/3vTV061hnAIizYvwh40=",
    "algorithm": "Ed25519"
  },
  "author": {
    "account": "a_9d470b566acab5f65bdc",
    "handle": "ramin-valadan",
    "former": false,
    "recordFormat": 2
  },
  "keys": "https://upfork.dev/ledger/keys.json"
}