feat(electron): resolve stable local constant window options

Resolve stable local constant BrowserWindow options with retained provenance and shared early-exit mutation queries. Preserve source ordering and unknown results for relevant mutations or escapes.

Includes real Joplin correctness/cost receipts and regression coverage.

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
This commit is contained in:
YsopwnableandKaoru0822 authored and GitHub committed 2026-10-16 14:52:33 +08:00
1 parent 5a77acfbcd
commit d72d856f58
20 files changed
+4544 -64

No files matched your search

@@ -98,13 +98,28 @@ const addBrowserWindow = (
web_preferences: value.web_preferences,
preload_path: value.preload_path,
preload_resolution_context: value.preload_resolution_context,
...(value.resolution_sources === undefined
? {}
: {
resolution_sources: value.resolution_sources.map(
(location) => ({
source: file.path,
...location,
}),
),
}),
absence_means_default: false,
},
evidence: astObservationEvidence({
evidence: (value.resolution_sources === undefined
? astObservationEvidence
: staticInferenceEvidence)({
sha256: file.sha256,
path: file.path,
range: value.location,
operation: "observe-browser-window-construction",
operation:
value.resolution_sources === undefined
? "observe-browser-window-construction"
: "resolve-browser-window-constant-options",
coverage,
limitations: [
"Only explicitly present webPreferences are reported; omitted properties are not interpreted as Electron defaults.",