Repository navigation
feat(electron): resolve stable local constant window options - #4400
Conversation
Reuse lexical initialization and alias-aware mutation facts, retain inferred configuration source ranges, and preserve inline observations. Refs #4366; part of #3536. Co-authored-by: Kaoru0822 <[email protected]>
Integrate guarded factory fallthrough before final validation. Co-authored-by: Kaoru0822 <[email protected]>
The real Joplin window query exposed an artifact-path-only coverage assertion; the independent selector already handled both location kinds. Co-authored-by: Kaoru0822 <[email protected]>
Preserve both trial orders, independent source oracles and complete semantic-content comparison; distinguish graph commitments, observed variance and unmeasured costs. Grouped upstream timeout and same-deadline passing controls remain recorded. Co-authored-by: Kaoru0822 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77d43d1f2f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
[Medium impact] The PR appears safe to merge, with no outstanding findings. SummaryResolves stable local
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[BrowserWindow argument] --> B{Local constant candidate?}
B -->|No| C[Keep inline or unknown result]
B -->|Yes| D[Build shared mutation index]
D --> E{Relevant prior or uncertain effect?}
E -->|Yes| F[Keep options unknown]
E -->|No| G[Read original object]
G --> H[Attach inferred source ranges]
C --> I[Restore constructor order]
F --> I
H --> I
I --> J[CLI, MCP, and retained fact views]
Reviews (3) · Last reviewed commit: "test(javascript): preserve mutation quer..." · Reviewed by Greptile |
Restore source order in the producing collection before module attribution and graph consumers. Cover mixed constant, inline, unresolved and previously escaped options; preserve uncertainty after the first constructor receives an object. Co-authored-by: Kaoru0822 <[email protected]>
Keep the original two trial pairs unchanged and append source-order red/green results, the same complete Joplin answer, current source/runtime pins and current check receipts. Co-authored-by: Kaoru0822 <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Separate lexical identity lookup from effect reporting, stop mutation predicates at the first relevant prior or unknown effect, and reuse the owner in window and request analysis. Preserve complete reports for the require-source consumer. Add bounded-read and stored-reference regressions plus a reproducible scaling control. Co-authored-by: Kaoru0822 <[email protected]>
Retain raw before/after capacity samples, separate V8 warm-up and real Joplin results, preserve earlier trials, and record current source/runtime and verification receipts. Document the nonreproduced stored-reference finding with executed CLI and regression evidence. Co-authored-by: Kaoru0822 <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Merged as d72d856. All 17 authored source hashes and the exact tested feature patch match; the required coauthor is present. A separate cleanup-diagnostics main commit landed before the squash, so whole-tree equality with the reviewed head does not hold. The combined merged tree was independently verified: 124 cases across 12 files passed (the original 107 plus the newly integrated provider/error-projection coverage); full static checks passed (6 tasks plus architecture guards). A fresh real Joplin CLI/MCP workflow returns the exact same complete answer, raw semantic fingerprint, token projections and view Evidence parity as the reviewed source. One CPU / 8 GiB, no observed OOM and payload cleanup verified. The original PR-head CI remains 36/36 core jobs successful; these post-merge local checks are separate evidence. |
Summary
new BrowserWindow(options)previously lost explicit preferences whenoptionswas a local constant. This resolves stable const options/preferences through the shared lexical and mutation owners, while keeping relevant writes, escapes, shadowing and ambiguous initialization unknown. Unrelatedoptions.iconwrites do not discardwebPreferences.Fixes #4366; part of #3536 and #4027. #3536 remains open for popup overrides and optional spreads.
Contract and boundaries
Evidence and validation
Real official Joplin 3.7.21 ASAR: one unchanged window identity now reports five explicit preferences (four literal booleans and dynamic
session). Both trial orders pass independent source oracles and exact complete CLI/MCP view Evidence parity. Complete semantic content is equal after excluding only the changed parent-graph commitment and its derived graph ID; raw digests remain recorded.Current shared-query implementation:
npm run checkandnpm run docs:check(5 consistency cases) passed; 107 focused cases across ten files passed. Seventeen current source pins and the 1647-JavaScript runtime tree verified after commit.Shared owner exposes lexical identity and early-exit mutation checks without allocating full reports; complete effects remain available to the require-source consumer. A deterministic regression bounds repeated effect reads. The synthetic capacity control at 1024 constructors measured 4.413→0.200 median CPU seconds; first-run/V8 warm-up and raw samples are retained. This is not a real-app speedup claim.
Focused 9-file invocation: 156/157 passed. An unchanged upstream generator case hit its 30s limit; isolated runs at that same limit passed on main and candidate (18.590/18.034s). The original failure remains recorded; no deadline changed.
The pinned checker passes two original real trial pairs, both subsequent real-app validations and eight mutated-result controls. The complete CLI semantic-content comparison and checker replay passed. The ordering regression failed before the producer fix; fresh real Joplin runs after the ordering and shared-query fixes preserve the exact complete answer and semantic fingerprint (44.028/44.607s, same BPE). Original trial receipts remain unchanged. The stored-alias review example already returned unknown on the reviewed code; executed CLI evidence and its retained regression document the disagreement, with no mutation-rule change.
Reproducible record and limitations, compact data.
Projected structured-task BPE 13337→13432 (+95); identical selected catalog. No speedup claim: the reversed pair was 42.958s on main versus44.793s here. One CPU, 8GiB hard limit; all observed runs reported no OOM and verified payload cleanup. No Electron GUI, live-model billing or system-cold claim.
Author readiness
Human owner: @N0zoM1z0
The session authorized implementation, validation, ready PRs and merging, including waiving manual declarations. The agent reviewed the diff/evidence. A human final-diff review is not asserted; declarations remain unchecked.
Before merge
Final head
73ac512f9ae633e3a65849ec7a862ad3c151fa7f: all 39 checks passed; core CI completed with all 36 jobs successful. Codex and Greptile reviewed this head with no outstanding findings; all three review threads are resolved.