Skip to content

feat(electron): report custom URL protocol registrations - #2978

Merged
gensokyo-dev merged 7 commits into
morluto:mainfrom
UnknownHacker1:feat/electron-protocol-registrations
Oct 30, 2026
Merged

gensokyo-dev merged 7 commits into
morluto:mainfrom
UnknownHacker1:feat/electron-protocol-registrations

Conversation

@UnknownHacker1

@UnknownHacker1 UnknownHacker1 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem and outcome

REA could inspect Electron internals but did not expose custom URL protocol entry-point facts. This change records static registration calls, projects url-scheme nodes and relations, and adds an optional registration count. The existing CLI/MCP workflows share the same implementation; no provider, dependency, target execution or new tool is introduced.

Supported calls: app.setAsDefaultProtocolClient, module-level protocol.registerSchemesAsPrivileged, protocol handlers/interceptors, and handlers/interceptors on session.defaultSession.protocol. Findings retain source locations, artifact digests, API, role, session and privileges. Dynamic values remain unknown. Registration success, control-flow reachability and OS/session routing remain unproven.

Valid scheme identity is case-insensitive; original spelling is preserved per observation. Historical summaries without the count remain readable. Existing javascript-facts views support filtering, field selection, paging and retained Evidence. Non-default sessions, URL event listeners and TypeScript assertions on receivers remain outside this change.

Integration review

Integrated against main 69bf61f7c. Additional corrections:

  • Canonicalize schemes once at the graph owner; App and app share identity while raw values survive. A new public boundary regression was observed failing before the fix. Electron scheme rules.
  • Exclude the module-only privileged API from session protocol objects; keep default-session handlers. The new source regression failed before the fix. Electron implementation.
  • Use the existing compositeKey owner for finding deduplication, fixing the first CI architecture-guard failure without an exemption.
  • Align the owning finding type's documentation with emitted Evidence: a source call does not prove reachability. The valid Greptile thread is resolved with cause, boundary/consumer inspection and validation.

Validation

Final head: 3570044eadadc7866ad4bfa75f3e18628112655c.

  • Current-head CI: Source tests 22,235 passed / 16 skipped; all 8 portable shards passed; Portable tests and CI required passed (run). Static checks, build, documentation, JavaScript recovery, bundled Windows controls and Linux native package baseline passed.
  • Current-head Greptile: passed, 24 files reviewed, 0 new comments; all review threads resolved. Codex remote review was unavailable due repository credit limits and is not counted as passed.
  • Local validation: broad JavaScript suite 5,253 passed / 1 existing skip before the internal-key cleanup; after that cleanup, 61 targeted source tests and 41 public protocol/worker tests passed again. Reconstruction consumers: 47 passed. check:fast, docs:check, architecture guards, touched-file formatting and diff checks passed. The final follow-up changes only JSDoc, with no runtime statement changes.

Real application: official Obsidian 1.8.10 updater ASAR, SHA-256 f9e1d3030d2d165a559f339a91a100e1d3381972a4ce5fdb3b481bd550681dd6. Public CLI analysis selects packaged main.js (33,318 bytes; SHA-256 dea142680af9272f0663a5857f6135ba69c54dcb10e5382b943793295d55169e). Actual CLI and stdio MCP paged facts match an independent source-call/position check: registerFileProtocol("app"), handle("app"), and setAsDefaultProtocolClient("obsidian"), at line 38 columns 4128, 4266 and 14388. Three call sites, two canonical nodes; the first two are conditional alternatives. This verifies the selected packaged file, not the entire application or runtime routing. The target was never executed. Runtime validation was repeated on c474f5ffc; the final commit only corrects type JSDoc.

Real limit probe: Obsidian 1.14.5, SHA-256 3a349274f789b62c5b35ad19de10311909a94e8783033569c2210a4bac491780, selecting main.js and starter.js. Shared analysis reports its existing 512-state alias limit and cannot prove the receivers of three visible protocol calls. Evidence remains partial/unknown with zero confirmed registrations; this is a coverage gap, not an absence claim. Limits and shared identity rules were preserved.

Performance and context

Fresh processes, four-CPU affinity, 512 MiB analysis heap, 100 ms process-family RSS sampling including separate sessions. OS caches were uncontrolled: these are single observations, not controlled cold/warm measurements. Comparison pins baseline 0ffed7a48 and the integrated feature tree before the last unrelated main refresh.

Obsidian 1.8.10 selected-file CLI analysis Before After
Elapsed 11.362 s 10.782 s
CPU 11.441 s 11.886 s
Sampled peak family RSS 674.6 MiB 700.0 MiB

No speedup claim. Final runtime recheck: 10.431 s elapsed, 11.629 s CPU, 678.7 MiB RSS, identical protocol facts/provenance. The 1.14.5 probe completed before/after in 40.110 / 40.952 s, CPU 42.924 / 43.962 s and RSS 994.6 / 1009.9 MiB; those two probes shared CPU and do not establish isolated latency. The broad local JavaScript run used 66.408 s elapsed, 110.229 s CPU and 1,898.7 MiB sampled family RSS while sharing CPU with static/build checks.

Token estimates ([email protected]; actual billing unmeasured): selected CLI summary 3,514 → 3,523; relevant MCP input schemas unchanged at 5,024; full relevant definitions 196,186 → 196,219. Summary plus two actual paged MCP request/response exchanges estimates 18,058 tokens, excluding tool definitions. The 17.1 MB complete Evidence stays local. Pages select properties and preserve identity, provenance, coverage and limitations. Existing Evidence parsing/transport costs are included in the observed workflow; no cache was added.

Executed integration checks above were on Linux/Node 24.22.1. The original contributor's Windows/editor validation remains historical evidence in the discussion, not a claim of additional current-head OS/runtime verification.

Author readiness

Human owner: @UnknownHacker1

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-30T18:04:25.329679Z
We couldn’t complete this review. Comment @codex review to try again.
3570044 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Looks like a really interesting PR

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] This PR appears safe to merge, with the previous wording issue fixed and no new findings.

Summary

This PR records static Electron URL protocol calls and adds url-scheme nodes, relations, and registration counts to application analysis.

  • JavaScript analysis records supported Electron URL registration calls.
  • Application graphs and summaries now include Electron URL scheme findings.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[JavaScript source] --> B[Static Electron analysis]
  B --> C[Protocol call findings]
  C --> D[URL scheme nodes and relations]
  C --> E[Registration count]
  D --> F[Shared CLI and MCP results]
  E --> F
Loading

Reviews (15) · Last reviewed commit: "docs(electron): distinguish protocol cal..." · Reviewed by Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09ed16e609

ℹ️ 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".

@UnknownHacker1

Copy link
Copy Markdown
Contributor Author

@morluto thanks! glad it's useful

fixed the review stuff in a2b9257:

  • [first, second] entries collapsing: each entry keeps its own location now so they dont dedupe into one. holes still fall back to the call but get their array index in the key
  • repeated privilege keys: last one wins like at runtime, and a key cant show up twice anymore
  • old saved evidence: protocol_registrations is exactOptional in the summary schema so results from before this still open, it's just absent there. added a test that strips it from the contract example and parses it
  • projection estimate: took protocols out of it since nothing projects them into the graph yet. left them in the electron findings count that adds the "derived from inert syntax" limitation since that caveat applies to them too

if you'd want these as graph nodes in the boundary graph instead of just file facts + the count, i can do that as a follow up

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2b9257163

ℹ️ 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".

@morluto morluto added area: runtime Process capture and runtime observation enhancement New feature or request labels Oct 14, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@UnknownHacker1

Copy link
Copy Markdown
Contributor Author

fixed the as const one in fc886cd, lists, entries and privilege objects wrapped in as / satisfies / ! get unwrapped now

@CassieFox23

CassieFox23 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR: All 26 tests in the two changed test files pass on the PR head, and 5 older Electron test files also pass (252 tests). On plain main, the 10 new protocol tests fail, as they should for a new feature. The PR does not apply to current main as is, so I tested its own tree.

Edit: This is out of date. The author rebased the PR, and the new head merges cleanly into main. I retested it here. The other items under Not run below have not run yet.

I tested head fc886cd, which sits on merge base 2895a18. Main was at 5b16f24. CI has not run on this PR. Its runs wait for a maintainer to approve them. Only the Greptile check ran, and it passed.

Results

Check Result
PR head tree, the new protocol test file 10 of 10 pass
PR head tree, the steps test file 16 of 16 pass
PR head tree, 5 older Electron test files 5 files, 252 tests, all pass
Main 5b16f24 with both PR test files copied in 10 fail (all in the protocol file), 16 pass
  • The PR adds a feature. So the main run shows what is missing. It is not a bug repro. The 10 failures say "expected undefined" where the tests expect a protocol list.
  • The steps test file passed on main too. Its one new test checks that an older result, without the new count, still parses. Main has no such count, so it passes there. That is expected.
  • The five older files are listed in the Commands fold.
  • The change does not apply to main with git apply. Two files do not match. They are named in the Commands fold.
  • So these runs test the PR on its own older base. They do not test the merge result.

Not run

  • The full test suite. Some files in it run the doctor command, which reads agent files in the home folder.
  • The Electron test files that exist only on main, since the PR tree is older.
    Ran in the newer comment, in another way. After the rebase, no Electron test file exists only on main. I ran all 44 test files with "electron" in the name on the merged tree, and 829 tests passed (1 skipped).
  • A real Electron app.
  • Windows and macOS.

Thanks, UnknownHacker1, for the work.

Commands
git -C ~/code/rea-mirror/rea.git fetch origin
git -C ~/code/rea-mirror/rea.git archive refs/pull/2978/head | tar -x -C /tmp/look-1015/t2978-head
npm ci   # Node 24.18.0, exit 0 (the PR lock file differs from main)
npm run test:focused -- src/domain/javascript/electronStaticAnalysisProtocol.test.ts src/domain/javascript/javascriptApplicationAnalysisSteps.test.ts   # exit 0, 26 passed
npm run test:focused -- src/domain/javascript/electronModuleInterop.test.ts src/domain/javascript/electronNativeLoaderPaths.test.ts src/domain/javascript/electronStaticAnalysisIdentity.test.ts src/domain/javascript/electronStaticAnalysisOptions.test.ts src/domain/javascript/electronWrappedCallPaths.test.ts   # exit 0, 252 passed
# git apply onto main fails in: src/application/javascript/JavaScriptArtifactAnalysis.ts, src/domain/javascript/javascriptStaticAnalysisState.ts
# main 5b16f2431 tree, the two PR test files copied in, first command again: exit 1, 10 failed, 16 passed
Test setup
  • Box: Nobara 44 (Fedora 44 base), Linux 7.2.9
  • CPU: AMD Ryzen 9 5900X, 12 cores / 24 threads
  • RAM: 32 GB DDR4-3600
  • Node: 24.18.0
  • Head: fc886cd
  • Base: 5b16f24
  • The box was shared with other test jobs. I give no timings.

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

@UnknownHacker1
UnknownHacker1 force-pushed the feat/electron-protocol-registrations branch from fc886cd to 445d04c Compare October 15, 2026 20:43
@UnknownHacker1

Copy link
Copy Markdown
Contributor Author

@CassieFox23 thanks for testing this!! good catch on it not applying to current main. rebased onto e2db768 (head is 445d04c now), same 3 commits, nothing else changed. on top of current main: typecheck clean, all 75 javascript domain test files pass (1824 tests), 0 lint errors, and it still picks up all 3 registrations on a real electron app. also ran the 4 boundary files that read the summary, everything passes except one whitespace ESM path test in javascriptSelfImportRelationships that fails on plain main too on windows (my repo path has a space in it), so thats not from this

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 445d04c8cd

ℹ️ 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".

@UnknownHacker1

Copy link
Copy Markdown
Contributor Author

fixed the per-value one in 01036e4. { secure: true as const } / true satisfies boolean get unwrapped before the boolean check now, and same for the scheme itself ("app" as const, also on setAsDefaultProtocolClient). test added for both

@greptile-apps

greptile-apps Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 01036e4221

ℹ️ 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".

@UnknownHacker1
UnknownHacker1 force-pushed the feat/electron-protocol-registrations branch from 01036e4 to b247ab7 Compare October 17, 2026 23:14
@UnknownHacker1

Copy link
Copy Markdown
Contributor Author

@morluto This should be ready now. Rebased on current main (7e4eed9), no conflicts, and every bot thread is addressed. The big addition since you looked is that the schemes now show up as url-scheme nodes in the application graph instead of only a count. Updated the description with the current results. Happy to change anything you want.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b247ab7b8b

ℹ️ 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".

@CassieFox23

Copy link
Copy Markdown
Contributor

TL;DR: I retested head b247ab7. It merges cleanly into current main. Both changes the author described work. They are the per-value unwrap and the new url-scheme graph nodes. All new and older tests I ran pass on Node 22, 24 and 26 as listed below. Two newer review threads still point at real gaps.

The head is b247ab7, rebased onto 7e4eed9. Main was at eb2c3b5. My earlier test used head fc886cd, which did not apply to main. CI has still not run on this PR. Its three runs wait for a maintainer to approve them, and only the Greptile check ran.

Results

Check Earlier head fc886cd New head b247ab7
Applies to current main git apply failed in 2 files git merge-tree: clean, no conflicts
Protocol test file (Node 24) 10 of 10 pass 11 of 11 pass
Steps test file (Node 24) 16 of 16 pass 18 of 18 pass (2 more tests came with the rebase)
Five older Electron test files (Node 24) 252 tests pass 392 tests pass (same file names, newer base)
New boundary test file (Node 24) did not exist 2 of 2 pass
Protocol, steps and boundary files (Node 22 and Node 26) not run 31 of 31 pass on each
Main eb2c3b5 with the PR test files copied in 10 fail, 16 pass (older main) 13 fail, 18 pass
Merged tree (main plus PR), 8 files not run 430 tests pass
Merged tree, all 44 test files with "electron" in the name not run 829 pass, 1 skipped
  • The failures on main are expected: the PR adds a feature. 11 are in the protocol file and 2 in the new boundary file.

  • I confirmed the per-value unwrap. The value secure: true as const now counts as enabled. So does standard: true satisfies boolean. The value stream: false as const does not count. Both "app" as const and setAsDefaultProtocolClient("notes" as const) read as the schemes app and notes. The same source without the assertions gives the same result. A value that is not a literal (flag as const) is not counted.

  • url-scheme nodes: confirmed. A real reconstruction run on a small fixture gave 3 url-scheme nodes and 4 edges into them. The nodes are:

    • app
    • config.scheme
    • notes

    app holds both the handler and the privileged entry. The summary count is 4.

  • Bot threads: 12 in total, 4 resolved and 8 not resolved. Five of the open ones describe things the passing tests now cover. So they only need a click. These five are:

    • the shared location
    • the repeated key
    • the asserted array
    • the asserted values
    • exposing the result

    Two threads were posted after the author's "every bot thread is addressed" message. In both I saw the behaviour the bot describes. A static spread such as privileges: { ...{ secure: true }, standard: true } gives unknown privileges. For protocol.handle(42, handler) the finding keeps 42, and from reading the code (not running it) the graph shows it as a dynamic scheme.

Not run

  • The full test suite. Some files in it run the doctor command, which reads agent files in the home folder.
  • Typecheck and lint. The author says both are clean. I did not check.
  • A real Electron app, Windows and macOS.
  • Node 22 and 26 on the five older files and on the merged-tree runs. Those ran on Node 24 only.
  • The graph path for the spread and the non-string scheme cases, and the result-budget thread.
  • The other boundary files the author ran that read the summary.

Thanks, UnknownHacker1, for the rebase and for the quick fixes.

Commands
git -C ~/code/rea-mirror/rea.git fetch origin
git -C ~/code/rea-mirror/rea.git archive b247ab7b8 | tar -x -C /tmp/rea-rt-2978/head
git -C ~/code/rea-mirror/rea.git archive eb2c3b589 | tar -x -C /tmp/rea-rt-2978/main
# merge check, in a scratch repo under /tmp with objects fetched from the mirror
git -C /tmp/rea-rt-2978/mt merge-tree --write-tree --name-only eb2c3b589 b247ab7b8   # exit 0, tree fab0927cb, no conflicts
npm ci && npm run build:cached && npm run test:prepare   # Node 24.18.0, in head and in main, all exit 0
npm run test:focused -- src/domain/javascript/electronStaticAnalysisProtocol.test.ts src/domain/javascript/javascriptApplicationAnalysisSteps.test.ts   # head, Node 24: exit 0, 29 passed
npm run test:focused -- src/domain/javascript/electronModuleInterop.test.ts src/domain/javascript/electronNativeLoaderPaths.test.ts src/domain/javascript/electronStaticAnalysisIdentity.test.ts src/domain/javascript/electronStaticAnalysisOptions.test.ts src/domain/javascript/electronWrappedCallPaths.test.ts   # head, Node 24: exit 0, 392 passed
npm run test:focused -- tests/boundary/filesystem/javascript-applications/electronProtocolBoundaries.test.ts   # head, Node 24: exit 0, 2 passed
npm run test:focused -- src/domain/javascript/electronStaticAnalysisProtocol.test.ts src/domain/javascript/javascriptApplicationAnalysisSteps.test.ts tests/boundary/filesystem/javascript-applications/electronProtocolBoundaries.test.ts   # head, Node 22.23.1: exit 0, 31 passed; Node 26.11.1: exit 0, 31 passed
# main eb2c3b589 with those three test files copied in from the head, same command, Node 24: exit 1, 13 failed, 18 passed
# merged tree laid over the main tree (same lock file), build:cached exit 0, then the three files plus the five older files, Node 24: exit 0, 430 passed
# merged tree, all 44 test files with "electron" in the name, Node 24: exit 0, 829 passed, 1 skipped
# a throwaway probe test (not part of the PR) printed the findings and graph nodes quoted above
gh api graphql   # query only: reviewThreads(first:50) isResolved / isOutdated
Test setup
  • Box: Nobara 44 (Fedora 44 base), Linux 7.2.9
  • CPU: AMD Ryzen 9 5900X, 12 cores / 24 threads
  • RAM: 32 GB DDR4-3600
  • Node: 22.23.1, 24.18.0, 26.11.1
  • Head / base: b247ab7 / 7e4eed9 (main eb2c3b5 for the merge)
  • The box was shared with other test jobs. I give no timings.

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

@UnknownHacker1

Copy link
Copy Markdown
Contributor Author

@CassieFox23 Thanks again for retesting, you were right about both. Fixed in cb64564: literal spreads in privileges are read now (last definition wins), and a non-string literal like protocol.handle(42, ...) shows up as non-string-literal with its exact value instead of dynamic. Rebased on current main (99d2d7a), replied to and resolved all the bot threads, and updated the description with a fresh validation run.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb64564d62

ℹ️ 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f900b72e92

ℹ️ 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".

@CassieFox23

Copy link
Copy Markdown
Contributor

Thanks for the fixes, UnknownHacker1, they help a lot. This is a read of the mirror, not a retest. cb64564 is in the PR, and its tests for literal spreads in privileges are in electronStaticAnalysisProtocol.test.ts. One name changed: your comment calls the non-string case non-string-literal. On head f900b72 the code says invalid-literal, which matches your later reply in the review thread and the PR body.

My earlier results cover head b247ab7 only. I have not retested f900b72. The checks listed on f900b72 show only Greptile and the author declaration, so no test job ran there.

🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊

Detect app.setAsDefaultProtocolClient, protocol.registerSchemesAsPrivileged,
and protocol handlers and interceptors on protocol or
session.defaultSession.protocol as electron.protocols findings. Project each
scheme into the application graph as a url-scheme node linked by handles or
exposes, count registrations in the summary, end feature traces at schemes,
and give them a reconstruction obligation policy.
A handler or interceptor without a callback, and a privileged scheme list
that is known not to be an array, install nothing in Electron, so they are
no longer reported. The privileges lookup now reads past nullish entry
spreads like the scheme lookup.
@UnknownHacker1
UnknownHacker1 force-pushed the feat/electron-protocol-registrations branch from f900b72 to a9c1a51 Compare October 28, 2026 17:20
@UnknownHacker1

Copy link
Copy Markdown
Contributor Author

@CassieFox23 Thanks for catching the name. Yeah, non-string-literal became invalid-literal in the next round so a malformed string like "not a scheme" shares the same state. My comment was just out of date.

Also rebased onto current main (64196b0) since it had conflicts again, and fixed the three new Codex threads (handlers with no callback and non-array privileged lists no longer count as registrations). Validation in the description is updated for the new head a9c1a51. Main's CI jobs don't seem to run on fork PRs here until a maintainer approves them, so the local runs are what I have for now.

…d lists

Electron converts the whole privileged list or throws, so a hole, a
non-object entry or an entry without a scheme now means the call registers
nothing. A privilege value that is not a boolean literal makes the set
unknown instead of dropping it, and allowExtensions is read.
@UnknownHacker1

Copy link
Copy Markdown
Contributor Author

@morluto Hey, whenever you get a chance, this one should be ready for a look. It's rebased on current main with no conflicts, all review threads are addressed, and the readiness check passes. CI is waiting on workflow approval since it's from a fork. Happy to change anything if you'd rather it go a different way. Thanks!

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@gensokyo-dev gensokyo-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the integrated diff at cfaf0f7 against current main, including the shared identity producer, graph projection, version/feature consumers, worker contract and historical summaries.

The two reproduced defects are fixed at their owning boundaries: schemes use case-insensitive canonical identity with original source spelling retained, and the module-only privileged-scheme API is excluded from session protocol objects. Static call observations no longer claim reachability or successful routing.

Validation: 5,253 JavaScript tests passed (one existing skip), 41 public boundary/worker tests passed, 47 reconstruction consumer tests passed, and static/docs/format checks passed. Real Obsidian 1.8.10 CLI and actual stdio MCP pages match all three selected-source call sites, scheme identities and locations. Final-head rerun preserves the exact facts/provenance. CPU, elapsed time, process-family RSS and token estimates are recorded in the PR body.

The Obsidian 1.14.5 shared alias-capacity limitation is explicitly recorded as partial/unknown, not absence. Non-default sessions, receiver TypeScript assertions and runtime OS routing remain unverified/out of scope. Codex remote review could not run due repository credit limits. This is an AI-assisted code review; it does not replace the original author's human ownership declaration. Current-head CI and Greptile must finish before merge.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@gensokyo-dev gensokyo-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed final follow-up c474f5f. The only change since the prior integration review is replacing the protocol detector's new delimiter-joined internal key with the existing compositeKey owner. Architecture guards now pass without an exemption. The 61 targeted source tests, 41 public protocol/worker tests and check:fast pass. Final real Obsidian CLI output preserves exact protocol identities/provenance, and actual MCP fact pages again match all three independent source positions.

My earlier review and its explicit static-analysis/coverage limitations still apply. This is an AI-assisted review; final-head CI and Greptile are tracked separately.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation enhancement New feature or request provider: electron Analysis provider / engine: electron

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants