Repository navigation
Conversation
|
@codex review |
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. |
7db4b11 to
90594b3
Compare
90594b3 to
07654b7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7db4b11be6
ℹ️ 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".
There was a problem hiding this comment.
Stale comment
PR Review — Quality: 3.0 / 5 · Review load: Focused (~30–45min)
POSIX paths and
C:\...paths match the description: one regex per sdk path, longest match first, JSON stays valid and byte-identical off the match. Request changes. A UNCuserDatais kept at init and then left in the payload, with no skip error, so the home directory this component exists to remove still ships.Customer impact: Low —
PathScrubberhas no production caller, so payloads stay as they are until a later PR callsscrub.
Concern Serialized payload scrubbing Risky Quality — 3.0: POSIX and drive-letter paths are correct, and the tables, property checks, and linear-time test match that risk. The class JSDoc covers this internal type; there is no public API to document. One compiled regex per path, applied longest first on the serialized string, will take another notation or a new
sdkPathsentry cleanly. The caller still has to pass plaintext JSON, including a replay segment before compression, because the on-disk replay batch is metadata plus base64. The UNC miss is what holds this at 3.0.Review load — Focused (~30–45min): One risky boundary: which bytes
scrubrewrites. Almost all of the time ispathScrubber.ts(notations, nested paths, JSON validity). The bench and coverage exclude belong to that same boundary. Windows matching landed in2aa7793and is the same boundary.Findings
- [Blocking] UNC paths are never scrubbed —
src/tools/pathScrubber.ts:163(2aa7793) sends\\server\\share\\...through the POSIX lookahead[/f], so a path whose JSON form starts with\never matches and is never logged. Compile UNC like a drive path, and include the raw pattern's first character in the lookahead.- [Minor] Windows segment case stays in the payload —
src/tools/pathScrubber.ts:166(2aa7793) folds only the drive letter, and the near-miss table treatsC:\\users\\...like a different path. Fold each segment, or confirm stacks always reuseapp.getPath's casing.- [Nit] Scrub failure drops the thrown error —
src/tools/pathScrubber.ts:79wraps a freshError, so the oneaddErrorstack points at the catch. Pass the caught error through.Sent by Cursor Automation: electron-sdk reviews
07654b7 to
616b7bb
Compare
The fixed message is deliberate. The caught error could carry part of the unscrubbed payload (e.g. a value in a |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 616b7bb5aa
ℹ️ 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".
There was a problem hiding this comment.
Stale comment
PR Review — Quality: 4.5 / 5 · Review load: Focused (~30–45min)
This is ready to merge. POSIX paths and Windows paths, including a different case, match the description: one regex per sdk path, longest first, valid JSON in and out. Approve. One file-URL encoding is still open, on the line below. e2e and integration were still running when I posted.
Customer impact: Low —
PathScrubberhas no production caller, so payloads stay as they are until a later PR callsscrub.
Concern Serialized payload scrubbing Risky Quality — 4.5: The scrubber matches its contract on the paths I checked: raw stacks, forward-slash file URLs, nested
crashDumps, and Windows case. The tables, property checks, and linear-time test cover that risk in proportion. The class JSDoc is the right doc for this internal type; there is no public API. One compiled regex per path, applied longest first, will take another notation or a newsdkPathsentry cleanly, and the next caller still has to pass plaintext JSON, including a replay segment before compression. The opposite-case non-ASCII file URL is what holds this below 5.0.Review load — Focused (~30–45min): One risky boundary: which bytes
scrubrewrites. Almost all of the time ispathScrubber.ts(notations, case, JSON validity) together with the tables that pin it. The bench and the coverage exclude sit on that same boundary. Windows matching is79991d1.Findings
- [Minor] Opposite-case non-ASCII file URLs stay in the payload —
src/tools/pathScrubber.ts:212(79991d1) percent-encodes only the sdk path's own code point, soJosédoes not matchJOS%C3%89. Also encode that other simple case, or list it next to the%61limit if nothing emits it.Sent by Cursor Automation: electron-sdk reviews
616b7bb to
0e3d8c9
Compare
|
@codex review |
There was a problem hiding this comment.
Stale comment
PR Review — Quality: 5.0 / 5 · Review load: Focused (~30–45min)
This is ready to merge.
PathScrubberreplaces sdk paths in serialized JSON, the app path with/and data folders with<userData>/<crashDumps>, including the Windows notations, and it is not wired into the writers yet. Approve. The percent-encoded non-ASCII case limit is now in the class JSDoc, with the other limits. Integration was still running when I posted.Customer impact: Low —
PathScrubberhas no production caller, so payloads stay as they are until a later PR callsscrub.
Concern Serialized payload scrubbing Risky Quality — 5.0: The scrubber matches its contract: raw stacks, file URLs, nested
crashDumps, and Windows case come out as the tables say, and a near miss stays byte-identical. Those tables, the property checks, and the linear-time test are proportionate to the regex. The class JSDoc keeps pace for this internal type; there is no public API to document. The design is sound: one compiled regex per path, longest first, will take another notation or a newsdkPathsentry. Wiring it later means passing plaintext JSON, including a replay segment before compression, since the on-disk replay batch is metadata plus base64.Review load — Focused (~30–45min): One risky boundary: which bytes
scrubrewrites. Almost all of the time ispathScrubber.ts(notations, case, JSON validity) together with the tables that pin it. The bench and the coverage exclude sit on that same boundary.Sent by Cursor Automation: electron-sdk reviews
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e3d8c933b
ℹ️ 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".
|
@codex review Please focus on issues likely to happen in real Electron apps. The main purpose is consistent paths for source maps; masking user paths is best effort, and its known limits are listed in the class JSDoc. Skip edge cases that need unlikely setups (unusual characters in install or data folder names, hand-crafted URLs, folders packagers never create), and don't raise again points already answered in resolved threads. |
0e3d8c9 to
9203612
Compare
There was a problem hiding this comment.
PR Review — Quality: 5.0 / 5 · Review load: Focused (~30–45min)
This is ready to merge. PathScrubber replaces sdk paths in serialized JSON, the app path with / and data folders with <userData> / <crashDumps>, including the Windows notations, and it is not wired into the writers yet. Approve. The named start constants on this head compile the same lookaheads as before. e2e and integration were still running when I posted.
Customer impact: Low — PathScrubber has no production caller, so payloads stay as they are until a later PR calls scrub.
| Concern | |
|---|---|
| Serialized payload scrubbing | Risky |
Quality — 5.0: The scrubber matches its contract: raw stacks, file URLs, nested crashDumps, and Windows case come out as the tables say, and a near miss stays byte-identical. Those tables, the property checks, and the linear-time test are proportionate to the regex. The class JSDoc keeps pace for this internal type; there is no public API to document. The design is sound: one compiled regex per path, longest first, will take another notation or a new sdkPaths entry. Wiring it later means passing plaintext JSON, including a replay segment before compression, since the on-disk replay batch is metadata plus base64.
Review load — Focused (~30–45min): One risky boundary: which bytes scrub rewrites. Almost all of the time is pathScrubber.ts (notations, case, JSON validity) together with the tables that pin it. The bench and the coverage exclude sit on that same boundary.
Sent by Cursor Automation: electron-sdk reviews
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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". |
Replaces the installation-specific app path with `/` in serialized payloads, so source maps resolve whatever the install folder.
Windows paths appear JSON-escaped, with forward slashes, a long-path prefix or as file URLs, and must resolve the same way.
Payloads must stay valid JSON whatever surrounds a path, and scrubbing a full replay segment must stay within budget.
9203612 to
7b73f73
Compare


Motivation
Stack traces and URLs collected in Electron apps contain installation-specific paths (
file:///Users/alice/…/app.asar/dist/main.js,C:\Users\alice\AppData\…). They prevent source maps from resolving, leak the user's home directory, and split aggregations per installation. This PR adds the component that replaces the app path in serialized payloads. It is not wired yet: the next PR in this stack injects it where payloads are written.Changes
PathScrubber(src/tools/pathScrubber.ts), created withawait PathScrubber.init(): the app path (and its.unpackedfolder) becomes/, so frames read/dist/main.jsand match source maps uploaded with a/dist/prefix.file://URL).MyApp2).userDataare not masked; the other known limits are listed in the class JSDoc). A false positive only costs misleading data, a miss leaves the path as is.scrub()keeps valid JSON valid and never throws: on an internal error it returns its input and reports once.Things to look at:
Test instructions
yarn vitest bench --run src/tools/pathScrubber.bench.ts: every case stays well under 50 msit.eachtables insrc/tools/pathScrubber.spec.ts: each row is an input payload fragment and its scrubbed formChecklist