Observe Markdown image close ownership before native fixture retirement

This commit is contained in:
zsviczian committed 2026-10-29 22:38:32 +01:00
1 parent 9fe8f28411
commit 4199a3dd38
3 files changed
+15 -1

No files matched your search

+8
View File
@@ -3216,3 +3216,11 @@ remain strict pending maintainer classification; no production changes.
excluded or silenced. Baseline restoration and native negative controls pass.
Next check: focused storm reproduction with complete raw evidence; no second
full retry until this strict blocker is understood. Production remains exact.
- 2026-10-29 (#3022): Post-run baseline is usable and a two-second passive
no-input/no-layout-sampling/no-debugger observation records no notifications.
The failed desktop sequence retained an open Markdown-image sidepanel. Added
read-only active-owner/grace/save snapshots around its existing close/save/
retirement steps to distinguish pending native cleanup from a product loop.
Existing delays, actions, assertions and deadlines remain unchanged pending
evidence. Focused image/web-drop predecessor reproduction is next.
+4
View File
@@ -146,8 +146,12 @@ async function exerciseMarkdown(control, drawingPath) {
const sharedBounds = checkSharedWidth();
c.results.push({ kind: "markdown-shared-width", copies: 2, previousWidth, nextWidth, displayed: sharedBounds, fileId: image.fileId });
c.tab.close(); c.tab = null;
const closeEvidence = { kind: "markdown-image-close-evidence", afterSignal: { active: view.sameFileEditGate.hasActiveOwners, grace: view.sameFileEditGate.isInGracePeriod, saving: view.isSaveInProgress() } };
c.results.push(closeEvidence);
await new Promise(resolve => setTimeout(resolve, 100));
closeEvidence.after100ms = { active: view.sameFileEditGate.hasActiveOwners, grace: view.sameFileEditGate.isInGracePeriod, saving: view.isSaveInProgress() };
await view.forceSave(true, true);
closeEvidence.beforeRetire = { active: view.sameFileEditGate.hasActiveOwners, grace: view.sameFileEditGate.isInGracePeriod, saving: view.isSaveInProgress() };
await leaf.setViewState({ type: "empty", state: {} });
await leaf.setViewState({ type: "excalidraw", state: { file: drawingPath } });
await waitFor(() => leaf.view.excalidrawAPI && leaf.view.getViewElements().some(el => el.id === image.id), "Markdown image reopen");
+3 -1
View File
@@ -96,7 +96,9 @@ export async function exerciseMarkdownCrop(control, drawingPath) {
if (!png?.size) throw Error("PNG crop export failed");
const expected = copies().map(element => ({ id: element.id, crop: { ...element.crop }, width: element.width, height: element.height }));
c.tab.close(); c.tab = null;
const closeEvidence = { afterSignal: { active: view.sameFileEditGate.hasActiveOwners, grace: view.sameFileEditGate.isInGracePeriod, saving: view.isSaveInProgress() } };
await view.forceSave(true, true);
closeEvidence.beforeRetire = { active: view.sameFileEditGate.hasActiveOwners, grace: view.sameFileEditGate.isInGracePeriod, saving: view.isSaveInProgress() };
await leaf.setViewState({ type: "empty", state: {} });
await leaf.setViewState({ type: "excalidraw", state: { file: drawingPath } });
await waitFor(() => leaf.view.excalidrawAPI && croppedIds.every(id => leaf.view.getViewElements().some(element => element.id === id)), "cropped shared image reopen");
@@ -105,6 +107,6 @@ export async function exerciseMarkdownCrop(control, drawingPath) {
reopened.forEach((element, index) => {
if (element.width !== expected[index].width || element.height !== expected[index].height || JSON.stringify(element.crop) !== JSON.stringify(expected[index].crop)) throw Error("crop geometry changed on reopen");
});
c.results = [{ kind: "markdown-shared-crops", crops: 2, widths, diskSave: true, svgExport: true, pngExport: true, finite: true }];
c.results = [{ kind: "markdown-shared-crops", crops: 2, widths, diskSave: true, svgExport: true, pngExport: true, finite: true, closeEvidence }];
c.reopen = true;
}