Skip to content

Cookie import adds cookies without signing you out of sites - #34113

Merged
brennanb2025 merged 12 commits into
mainfrom
brennanb2025/lbc-r1-merge-only-import
Oct 27, 2026
Merged

brennanb2025 merged 12 commits into
mainfrom
brennanb2025/lbc-r1-merge-only-import

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 22 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1044 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1532 $\color{#cf222e}{\Huge{\mathbf{−}}}$​488
Prod 28 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​354 $\color{#cf222e}{\Huge{\mathbf{−}}}$​990 $\color{#cf222e}{\Huge{\mathbf{−}}}$​636

Importing cookies can sign the built-in browser out of sites because the import removes existing cookies before it knows whether replacements can be written. A rejected row can also undo successful writes, and a stuck browser command can block later imports on that profile.

Cookie import now adds readable cookies to the existing jar, one coordinate at a time. It preserves source host-only/domain scope and partition keys, skips unreadable or expired rows, continues after individual rejections, and reports only successful live writes as imported. Destination cookies at other names, paths or domains survive. A confirmed non-mutating rejection leaves the previous value; a transport failure after dispatch remains an uncertain write outcome.

New imports no longer write restart stages or register replay. A completed native live-write phase still clears any older pending stage for that partition, so a previously delayed shipped record cannot overwrite the newer import at restart. Cookies rejected by the live writer, including name+value over Chromium's approximately 4 KB limit, are skipped and counted. They will not be retried at restart. Brennan approved this support boundary on October 26: the common pattern has no replay writer, and the retained fallback could erase cookies preserved by the live merge, replay an older import after a newer success, or drop valid sibling cookies during cold loading. Previously, cookies merely staged for restart were counted as imported; they now count as skipped unless their live write succeeds.

The change removes pre-clear, destination snapshots from import, rollback, family-wide withholding, unnamed-family refusal, target-database initialization probes, new-stage construction and its obsolete warning. Expired rows are skipped before dispatch because Chromium otherwise treats their write as deletion of the destination coordinate. Attachment and commands have a ten-second deadline; the first timeout retires the dedicated hidden target before releasing the shared Session lock. Remaining rows fail immediately and a later import can proceed. Flush runs outside the lock. Pinned implementation evidence establishes that an already accepted mutation precedes later same-coordinate writes on the partition's cookie manager; retirement is not presented as cancellation.

Differences from the common pattern and compatibility boundaries:

  • Intended: CDP writes preserve supported partitioned cookies. The shared Session lock also orders imports with cookie copies that read and write under that lock, tracked in Land the WSL project mover dark (merges only after verify-15b, the flag-off audit and green CI) #34059.
  • Intended: importing a snapshot of a running source browser remains supported. Existing Google exclusion remains because those sessions are device-bound.
  • Intended: destination names and paths not overwritten by a source cookie survive. JSON, Firefox and Safari imports can partially succeed rather than roll back all writes. Whether a non-Google site rejects a mix of old and imported cookies is unmeasured.
  • Intended: the startup compatibility reader and its scope helpers remain for pending records saved by shipped builds, including direct upgrades and inactive profiles. Unsuperseded valid scoped records keep their existing replay contract and are consumed once; completed native live-write imports supersede older records under the shared Session lock, while source refusals and zero-decrypted imports retain them. Known permanent failures remove the record and stage. Transient SQLite locking/I/O failures retry until the stage file is fourteen days old, derived from mtime. Unknown outer formats remain pending; unmarked legacy images are never applied and expire unapplied. This can discard a requested imported value; the source can be imported again. The reader has no release-count removal deadline.
  • Intended: destination-removal, identity snapshot/restore and grouping helpers remain available even though imports no longer call them. The partition-copy work depends on their APIs, and the separate repeatable Google-only clear work tracked in STA-4398 will reuse snapshot, per-coordinate removal and restoration.
  • Accepted P2 limitation: paired clients running an older shipped renderer retain its inaccurate partition-warning wording until that renderer updates. The current renderer's warning is corrected; the wire format remains compatible.
  • Deferred P3 copy nits: partition warnings can show a truthful zero related-skip count, and a single ordinary skip reads “1 cookies skipped.” The current renderer safely uses its generic warning for an old host's removed fallback-warning code.

The import toast includes the skipped count when ordinary rejected rows accompany successful writes. The existing page banner names only domains from confirmed successful live writes; rejected-only sites are excluded. Existing warning paths keep their own explanations without repeating that count. The partition-skip warning describes skipped cookies without claiming that successfully imported readable siblings were left unchanged. The restart-fallback warning and its catalog strings are removed with the writer.

Tracked in STA-3654, STA-4240, STA-4183, STA-4969, STA-4986.

Review path: full; this changes saved-data recovery and ordering and has an approved private plan. QA type: targeted real native Chromium import from a synthetic source profile, host-only re-import, preservation across restart without a new stage, shipped-format pending-record compatibility, and the extended real-Electron partition fixture. No agent code changes.

Validation: CI run 40453551528 passed on 15bfa3a (static analysis/types, Linux and Windows packages, all five node24 shards, relay and aggregate checks). The final successful-domain correction passed 49 targeted native/store/banner-hook tests. Targeted tests cover source/writer consumers, deadline operations at 200 / 2,000 rows, queued preparation at 2 / 20 imports, and real SQLite shipped-stage terminal/supersession contracts.

Targeted M4Air QA passed using only synthetic profiles and isolated background copies: native Settings import accepted 2 / skipped 2 while preserving a working session and unrelated path; reimport updated one loopback identity without a twin; graceful restart kept site-updated values and created no new stage. A shipped scoped-v1 record applied once; a real SQLITE_BUSY-retained record was superseded by a newer native import and did not replay after another process restart. Main with the same input reported 4 imported while only 2 live writes remained and working/path cookies were removed. The current toast screenshot shows both 2 imported and 2 skipped using the actual shipped emitter with that recorded native summary.

The explicit extended real-Electron partition fixture passed in the admitted slot on dea8cc8: 1 test passed, 0 failed / 0 skipped, asserting exact DNS host/domain identity, working session under rejection, unrelated path, CHIPS and 5 imported/2 skipped. Loopback CDP has no explicit hostOnly flag; the real-Electron fixture supplies the DNS scope assertion. Native/recovery evidence is on d8caeae, toast screenshot on 4abc1f, and subsequent changes are reviewed test-only deltas, the authorized main merge, the successful-domain feedback correction at bc65521, and final main-repair merge 15bfa3a (independently reviewed). Cookie delivery and recovery are unchanged by the feedback correction. No agent code changed or agent QA was required. The full loop status comment contains the visual proof and final evidence marker.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 26, 2026 23:54
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
Walkthrough

Cookie imports now merge eligible cookies into the destination store without deleting existing cookies. Import flows count rejected and expired rows as skipped and can flush the store after successful writes. Chromium imports no longer create replay stages. Persisted staged imports expire after 14 days and distinguish retryable from permanent failures. The session registry’s pending-import controls were removed. Cookie debugger attachment and disposal now use a dedicated helper with bounded operations.

Priority: Normal

Merge Risk: Moderate · up to 4abc1

A completed cookie import can be replaced by an older pending stage after a transient metadata failure. Resolve that risk before merging; the remaining findings affect import reporting, mixed-version warnings, and test coverage.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description gives detailed information about the change, rationale, testing, QA, compatibility boundaries, and review scope. However, it does not follow the required template structure and does no… Reorganize the content under the required headings: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. Add an actual issue link using the required “Fixes…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main behavior change: cookie imports add cookies without signing users out of existing sites.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description gives detailed information about the change, rationale, testing, QA, compatibility boundaries, and review scope. However, it does not follow the required template structure and does not provide the required actual linked issue in a “Fixes #…” entry. It also omits explicit template sections and checklist confirmations.

Resolution

Reorganize the content under the required headings: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. Add an actual issue link using the required “Fixes #…” format, or document the maintainer exception. Add visual proof or state “N/A” with a reason, identify tested platforms, complete the testing and checklist items, and provide the required AI disclosure if applicable.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Nitpick comments: 1
src/main/browser/cookies/browser-cookie-clear-store-lifecycle.test.ts: 1

114-115: Trivial · Maintainability & Code Quality · Quick win

Strengthen the late-attach assertions. They pass even if the late load attaches.

The test name says a late load is disposed "without attaching". Neither assertion checks that.

  • lease.release is called only from dispose. A wrongly acquired lease would also leave it uncalled.
  • attach never sends a command, so sendCommand stays uncalled in either case.

If the signal.throwIfAborted() guard in attachCookieClearSession is removed, this test still passes. Assert directly that the lease was not acquired. Use the existing mock for acquireElectronDebugger from ../electron-debugger-lease. Add await vi.advanceTimersByTimeAsync(0) instead of the single await Promise.resolve() so the continuation has run.

     electron.windows[0].resolveLoad()
-    await Promise.resolve()
-    expect(lease.release).not.toHaveBeenCalled()
+    await vi.advanceTimersByTimeAsync(0)
+    expect(acquireElectronDebugger).not.toHaveBeenCalled()
     expect(electron.windows[0].webContents.debugger.sendCommand).not.toHaveBeenCalled()

Use the actual mock variable name from the test setup for acquireElectronDebugger. That setup is in unchanged lines.


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3d78d4c2-7d6b-47d5-b417-c29bb9922c0a
Commits

Reviewing files that changed from the base of the PR and between 8a001a9 and 04a1862.

Files selected for processing: 47
  • src/main/browser/__mocks__/browser-session-registry-persistence-fixture.ts
  • src/main/browser/browser-session-cookie-staging.scoped.test.ts
  • src/main/browser/browser-session-cookie-staging.test.ts
  • src/main/browser/browser-session-cookie-staging.ts
  • src/main/browser/browser-session-registry.persistence.test.ts
  • src/main/browser/browser-session-registry.ts
  • src/main/browser/cookies/browser-cookie-clear-store-lifecycle.test.ts
  • src/main/browser/cookies/browser-cookie-clear-store.ts
  • src/main/browser/cookies/browser-cookie-debugger-session.ts
  • src/main/browser/cookies/browser-cookie-import-clear-atomicity.test.ts
  • src/main/browser/cookies/browser-cookie-import-concurrency.test.ts
  • src/main/browser/cookies/browser-cookie-import-google-exclusion.test.ts
  • src/main/browser/cookies/browser-cookie-import-partition-fidelity.test.ts
  • src/main/browser/cookies/browser-cookie-import-pipeline.ts
  • src/main/browser/cookies/browser-cookie-import-plan-writes.test.ts
  • src/main/browser/cookies/browser-cookie-import-policy.test.ts
  • src/main/browser/cookies/browser-cookie-import-policy.ts
  • src/main/browser/cookies/browser-cookie-import-replace-partition-rollback.electron.test.ts
  • src/main/browser/cookies/browser-cookie-import-replacement.test.ts
  • src/main/browser/cookies/browser-cookie-import-route-partition-staging.test.ts
  • src/main/browser/cookies/browser-cookie-import-scope.test.ts
  • src/main/browser/cookies/browser-cookie-import-snapshot-ownership.test.ts
  • src/main/browser/cookies/browser-cookie-import-validated-partition.electron.test.ts
  • src/main/browser/cookies/browser-cookie-import-write.test.ts
  • src/main/browser/cookies/browser-cookie-import-write.ts
  • src/main/browser/cookies/browser-cookie-import.test.ts
  • src/main/browser/cookies/browser-cookie-import.ts
  • src/main/browser/cookies/browser-cookie-staged-import.ts
  • src/main/browser/cookies/chromium/finalize-import.ts
  • src/main/browser/cookies/chromium/import-context.ts
  • src/main/browser/cookies/chromium/import-cookies.ts
  • src/main/browser/cookies/chromium/prepare-import.ts
  • src/main/browser/cookies/chromium/scan-source-rows.ts
  • src/main/browser/cookies/sources/browser-cookie-firefox-import.ts
  • src/main/browser/cookies/sources/browser-cookie-import-undecryptable.test.ts
  • src/main/browser/cookies/sources/browser-cookie-safari-import.ts
  • src/main/browser/cookies/sources/browser-cookie-sqlite.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/browser-cookie-import-toast.test.ts
  • src/renderer/src/lib/browser-cookie-import-toast.ts
  • src/shared/browser-workspace-types.ts
Files with no reviewable changes: 4
  • src/main/browser/cookies/browser-cookie-import-replace-partition-rollback.electron.test.ts
  • src/main/browser/cookies/browser-cookie-import.ts
  • src/main/browser/cookies/sources/browser-cookie-firefox-import.ts
  • src/main/browser/cookies/sources/browser-cookie-sqlite.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Major · Do not complete degraded-import cleanup when… · browser-session-cookie-staging.ts:178-180

src/main/browser/browser-session-cookie-staging.ts:178-180
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Do not complete degraded-import cleanup when metadata loading fails.

When a live write is rejected, finalizeChromiumCookieImport still calls clearPendingBrowserCookieImport and returns ok: true. A transient metadata read failure makes that function see an empty map, so it leaves the shipped stage and its metadata entry untouched. If metadata is readable at the next startup, replay can delete in-scope live rows and replace them with the older staged rows.

The loader and early return existed in the base. The PR-specific degraded-import path changed from replacing the pending entry with setPendingCookieImport to unconditionally clearing it. Make metadata-read failure distinct from an empty pending-import map, and do not report supersession as complete until the staged file and metadata entry are retired.


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 168edf05-2f88-49a9-bb13-37eacab6f6a0
Commits

Reviewing files that changed from the base of the PR and between f932ae6 and 5c734ad.

Files selected for processing: 9
  • src/main/browser/browser-session-cookie-staging.scoped.test.ts
  • src/main/browser/browser-session-cookie-staging.ts
  • src/main/browser/browser-session-registry.persistence.test.ts
  • src/main/browser/browser-session-registry.ts
  • src/main/browser/cookies/browser-cookie-import-route-partition-staging.test.ts
  • src/main/browser/cookies/browser-cookie-import-snapshot-ownership.test.ts
  • src/main/browser/cookies/browser-cookie-import.test.ts
  • src/main/browser/cookies/chromium/finalize-import.ts
  • src/main/browser/cookies/chromium/import-cookies.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Major · Clear the shipped pending stage after direct imports. · browser-cookie-import-pipeline.ts:102-144

src/main/browser/cookies/browser-cookie-import-pipeline.ts:102-144
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Clear the shipped pending stage after direct imports.

A validated JSON, Firefox, or Safari import writes cookies through importValidatedCookies, but this path does not clear pendingCookieImports. Startup replay can then apply overlapping staged cookies with INSERT OR REPLACE and replace the newly imported cookies.

This requires a correction in the direct-import path. It is independent of Chromium's finalize cleanup and its metadata-read-failure handling.

Suggested fix
 import {
   emptyImportWritePhase,
   planImportWrites,
   writeImportedCookies,
   type ImportWritePhase
 } from './browser-cookie-import-write'
+import { browserSessionRegistry } from '../browser-session-registry'
@@
   if (cookieClearStore) {
     const releaseMutationLock = await acquireCookieMutationLock(target.mutationLockOwner)
     try {
@@
       }
     }
   }
 
+  if (phase.importedCount > 0) {
+    browserSessionRegistry.clearPendingCookieImport(targetPartition)
+  }
+
   if (phase.importedCount > 0) {
     try {
       await target.flushStore?.()

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 76ae074a-e733-49ec-9e27-51e37252dc5d
Commits

Reviewing files that changed from the base of the PR and between 5c734ad and d8caeae.

Files selected for processing: 14
  • src/main/browser/cookies/chromium/import-context.ts
  • src/main/browser/cookies/chromium/prepare-import.ts
  • src/main/browser/cookies/chromium/scan-source-rows.ts
  • src/main/browser/cookies/sources/browser-cookie-import-undecryptable.test.ts
  • src/main/browser/cookies/sources/browser-cookie-sqlite.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/browser-cookie-import-toast.test.ts
  • src/renderer/src/lib/browser-cookie-import-toast.ts
  • src/shared/browser-workspace-types.ts
Files with no reviewable changes: 3
  • src/main/browser/cookies/chromium/scan-source-rows.ts
  • src/main/browser/cookies/sources/browser-cookie-sqlite.ts
  • src/main/browser/cookies/chromium/prepare-import.ts
Files skipped from review as they are similar to previous changes: 7
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/browser-cookie-import-toast.ts
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/ja.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Comment thread src/shared/browser-workspace-types.ts Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Restore the legacy warning to the shared type and renderer. · browser-cookie-import-toast.ts:30

src/renderer/src/lib/browser-cookie-import-toast.ts:30
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Restore the legacy warning to the shared type and renderer.

An older host can return restart-fallback-unavailable when live writes fail and restart staging is unavailable. The current renderer routes this code to the generic unrecognized-warning message. Restore the warning union member, formatter branch, and the existing restartFallbackUnavailableNone and restartFallbackUnavailablePartial localization keys.


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1aa7542e-2c48-4ab1-a5d2-485e853c5f42
Commits

Reviewing files that changed from the base of the PR and between d8caeae and 4abc1f5.

Files selected for processing: 13
  • config/flaky-test-pattern-baseline.txt
  • src/main/browser/browser-session-cookie-staging.scoped.test.ts
  • src/main/browser/cookies/browser-cookie-import-policy.test.ts
  • src/main/browser/cookies/browser-cookie-import-write.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/browser-cookie-import-toast.test.ts
  • src/renderer/src/lib/browser-cookie-import-toast.ts
Files with no reviewable changes: 1
  • config/flaky-test-pattern-baseline.txt
Files skipped from review as they are similar to previous changes: 8
  • src/main/browser/cookies/browser-cookie-import-policy.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@brennanb2025

brennanb2025 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Cookie import could sign the built-in browser out because it deleted existing cookies before knowing whether replacements would work. Import now merges successful writes, preserves unrelated cookies, and counts rejected rows as skipped. The existing toast now reports ordinary skipped rows too, and the page banner names only sites with a successful live write.

The full review closed three restart/data-loss findings by removing the new restart writer, corrected both misleading warning paths, and bounded queued source preparation with the existing Session lock. The shipped-record startup reader and terminal policy remain. Completed native imports retire older pending records before flush, preventing a delayed shipped stage from overwriting the newer import. Clear/snapshot APIs remain intentionally available for the partition-copy and Google-only-clear work.

Brennan approved skipping live-rejected cookies without restart retry on October 26, including oversized name+value rows. An older paired renderer's shipped partition-warning copy remains an accepted P2 deferral. Two P3 copy nits are deferred: a zero related-skip count and singular grammar in “1 cookies skipped.” The removed old-host warning uses the previously verified generic warning fallback. A transport failure after dispatch remains an uncertain write outcome; per-site reactions to a mixture of accepted and preexisting cookies are unmeasured.

Verification: four correctness rounds, architecture challenge/panel, independent performance and readiness checks, and continued merge/test/copy reviews. CI run 40453551528 passed on 15bfa3a, including static/types, both desktop packages and all test shards. N / 10N deadline and source-preparation operation contracts passed. Targeted M4Air QA passed through the actual native Settings import, host-only reimport, graceful restart, shipped scoped-v1 apply-once, and a real SQLite BUSY→new native import→cold-start supersession. The explicit real-Electron partition fixture passed on dea8cc8 (1 test, 0 failures / 0 skips), covering DNS host/domain identity, unrelated path, SameSite rejection, CHIPS and 5 imported/2 skipped. No agent code changed.

Main's same four-row native input reported 4 imported while only 2 valid cookies remained live and working/path cookies were gone. Branch reports 2 imported/2 skipped and preserves both. Both loopback reimports produced one updated identity; CDP exposes no explicit hostOnly boolean there, so the real-Electron fixture supplies the exact DNS scope assertion.

For Brennan's review:

Native result Main Branch
Counts Main reports 4 imported Branch shipped emitter reports 2 imported and 2 skipped
Session Main loses working sid and destination-only path Branch keeps working session and destination-only path
Reimport Main loopback reimport singleton Branch loopback reimport singleton and preserved destination path

The corrected-toast screenshot invokes the actual shipped emitter with the recorded native 2 imported / 2 skipped summary; it is rendering evidence, not a repeated native/recovery run.

Restart/recovery flow Full-window proof
Post-import restart: working/session-current/path values survive; no new stage Post-import restart
Shipped scoped-v1 stage applies once Shipped stage first startup
Second process keeps site-rotated value Shipped stage second startup
New native import supersedes BUSY-retained shipped stage New import supersedes shipped stage
Cold restart keeps new-import, with old stage/pending absent Supersession survives cold restart

Judgment points: live merge, native supersession boundary, shipped-stage terminal policy.

Native/recovery QA head d8caeae. Later 59e5389/feb4935f/dea8cc8 are test-only; 4abc1f changes the toast tests-row flow (37 targeted tests, continued reviewer AGREE, screenshot above); 489236f is the authorized main merge, independently checked. Commit bc65521 corrects only native summary domains, with 49 targeted native/store/banner-hook tests; cookie delivery and recovery match the native QA head. The explicit Electron fixture passed on dea8cc8 and carries across that feedback-only correction. Final main-repair merge 15bfa3a includes #34256; an independent narrow review confirmed all PR code and QA carry are preserved.

@brennanb2025
brennanb2025 merged commit 6708d27 into main Oct 27, 2026
43 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/lbc-r1-merge-only-import branch October 27, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant