Files
orca/docs/audits/closed-editor-model-lifetime/worktree-fixed-node-results.json
T
921882619e fix: retire closed editor models from the app shell (#21178)
* fix: retire closed editor models from the app shell

* test(editor): use checked Monaco attachment calls

* Preserve bounded editor view caches when retiring closed models

* docs(editor): describe batched model retirement

* fix(editor): preserve cleanup work across registry replacement

* fix(editor): build editor model URIs with the file scheme

Monaco keys its model registry by `uri.toString()`, and both
`@monaco-editor/react` (via the `path` prop) and the closed-tab disposal
path built that key with `Uri.parse`. On Windows a raw path such as
`C:\repo\a.ts` parses as scheme `c`, which fails the scheme gate in
`modelService._schemaShouldMaintainUndoRedoElements`, so closed-file undo
history was dropped for every file at any size — not only the large files
the tradeoff note covers.

Add `toEditorModelUri`, the one filesystem-path -> model-key function,
built on `Uri.file` so the result always carries the `file:` scheme and
re-parses to itself. Route model creation, disposal lookup and the
still-open ownership comparison through it so all three agree; a
divergence there would dispose a model an open editor is still editing.

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
Co-authored-by: Neil <neil@stably.ai>
2026-09-19 17:51:55 -07:00

67 lines
1.9 KiB
JSON

{
"runtime": {
"node": "24.20.0",
"acorn": "8.18.0",
"ada": "4.0.0",
"amaro": "1.1.11",
"ares": "1.34.8",
"brotli": "1.2.0",
"cldr": "48.0",
"icu": "78.3",
"llhttp": "9.4.3",
"merve": "1.2.2",
"modules": "137",
"napi": "10",
"nbytes": "0.1.4",
"ncrypto": "0.0.1",
"nghttp2": "1.70.0",
"nghttp3": "",
"ngtcp2": "",
"openssl": "3.5.7",
"simdjson": "4.6.6",
"simdutf": "6.4.0",
"sqlite": "3.53.4",
"tz": "2026c",
"undici": "7.29.0",
"unicode": "17.0",
"uv": "1.52.1",
"uvwasi": "0.0.23",
"v8": "13.6.233.17-node.53",
"zlib": "1.3.2.1-motley-42c2f19",
"zstd": "1.5.7"
},
"variant": "fixed",
"graph": "worktree",
"sourceFence": {
"sources": 1021,
"graphSha256": "389b3a60b0ddc080a86e9569c371ac1d51db1e6845c8f6d65a1987d92e11cec9",
"manifestSha256": "c3f9b3b2e3c669a5565df1c73adb4a0b6468835f7ef5674e822032d08bf6459b",
"scenarioSha256": "afc0b7e45e056d1f730ac58f266094471b58187646c91b4436b909544a3a4e29",
"loaderSha256": "d5914770eb9db3c75b153b55d7f2f94415d3ab1850bc5b021be1165d104828be"
},
"observations": [
{
"control": "eight-last-file-closes",
"openFiles": 0,
"retainedModels": 0,
"logicalCharacters": 0
},
{
"control": "panel-stays-mounted",
"closedDisposed": true,
"liveDisposed": false
},
{
"control": "hidden-close-and-remount",
"retainedClosedModel": false,
"openFiles": 1,
"models": 1
},
{
"control": "normal-switch",
"originalModelPreserved": true
}
],
"scope": "Actual legacy surface, cleanup hook, disposal, Store close action and installed Monaco models. Shell/Panel bodies are controlled ports; files/models are seeded. Eight distinct fixture paths, 256 KiB characters each. No native editor widget, app window, field file sizes, heap bytes or incident allocation rate."
}