Skip to content

Revert "fix(native-chat): keep chats an older Orca saved after a downgrade (#42783)" - #42962

Closed
brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/revert-42783
Closed

brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/revert-42783

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Reverts #42783.

On profiles whose chat store was converted by a build before #42783 (internal team/hourly builds), the first launch of a build with #42783 treats every saved chat as changed by an older Orca:

  • The saved receipt lacks the WAL fields fix(native-chat): keep chats an older Orca saved after a downgrade #42783 added, so a byte-for-byte comparison reports the original journal as changed even though nothing wrote it.
  • Those profiles lack the new per-chat revision markers, so every chat looks continued: closed chats get tabs again, and converted chats get a second copy.

A teammate's profile went from 1,650 to 9,085 tabbed chats, with 1,967 copies matching #42783's copy IDs. The renderer slowed with it.

The revert removes the per-launch reconcile. Stores already reconciled keep their extra metadata keys, which nothing reads after this revert. Chats it already reopened or copied stay as they are, and none are deleted. A repair for those profiles and a corrected downgrade fix will follow separately.

Profiles upgrading straight from a release (no store converted yet) never hit the mismatch: their first copy writes the new receipt and markers.

Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 $\color{#cf222e}{\Huge{\mathbf{−}}}$​233 $\color{#cf222e}{\Huge{\mathbf{−}}}$​231
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​15 $\color{#cf222e}{\Huge{\mathbf{−}}}$​407 $\color{#cf222e}{\Huge{\mathbf{−}}}$​392

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes remove legacy chat revision tracking and reconciliation from journal database initialization and import paths. Existing destination databases now return without absorbing older Orca writes. Initial creation still records a legacy-source receipt, and nonempty WAL receipts now record only size. The recorded-state key for session tabs becomes module-local, and the persistence test fixture clears all metadata rows during reset.

Merge Risk: Minimal · up to 76ce1

This revert stops the per-launch reconciliation that could reopen closed chats and create duplicates on profiles converted by earlier builds. Chats already reopened or copied are not removed, and the PR says a repair is planned separately. No remaining merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names a revert of PR #42783 and the feature it added, which is the main change in the changeset. The diff removes the legacy-chat reconcile path, the per-chat revision API, and the WAL recei…
Description check Passed The description follows the template's core content. It explains the problem (profiles converted by pre-#42783 builds, which lack WAL fields and revision markers, were misread as changed), the mechani…
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: Title check

Explanation

The title names a revert of PR #42783 and the feature it added, which is the main change in the changeset. The diff removes the legacy-chat reconcile path, the per-chat revision API, and the WAL receipt fields that #42783 introduced, so the title matches the changeset's primary intent. It is a revert title, so it states the reverted PR but not the user-facing effect.

Full details: Description check

Explanation

The description follows the template's core content. It explains the problem (profiles converted by pre-#42783 builds, which lack WAL fields and revision markers, were misread as changed), the mechanism of the revert (removing the per-launch reconcile), the observed impact (tab count growth and duplicate copies), and the residual state of affected profiles. It also cites the revert target. It does not fill in the ELI5, Linked Issue, Visual Proof, Testing checkboxes, Risk level, or Checklist, so several template sections remain missing.

  • 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

Recent 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: c09752e3-f129-41ce-b3c7-8babd965115b
Commits

Reviewing files that changed from the base of the PR and between b13f5c8 and 76ce1c8.

Files selected for processing: 13

  • config/main-blocking-sqlite-baseline.txt
  • src/main/native-chat/agent-session-journal/database/journal-domain-database.test.ts
  • src/main/native-chat/agent-session-journal/database/journal-domain-database.ts
  • src/main/native-chat/agent-session-journal/database/journal-domain-profile-import.ts
  • src/main/native-chat/agent-session-journal/database/journal-legacy-reconcile.test.ts
  • src/main/native-chat/agent-session-journal/database/journal-legacy-reconcile.ts
  • src/main/native-chat/agent-session-journal/database/journal-legacy-source-receipt.ts
  • src/main/native-chat/agent-session-journal/database/journal-legacy-source.ts
  • src/main/native-chat/agent-session-journal/journal-domain-import-rows.ts
  • src/main/native-chat/agent-session-journal/journal-domain-import.ts
  • src/main/native-chat/agent-session-journal/journal-sql-reader-entry.ts
  • src/main/runtime/agent-session/records/agent-session-record-rows.ts
  • src/main/runtime/agent-session/records/agent-session-record-store-persistence.test-fixture.ts
Files with no reviewable changes: 6

  • src/main/native-chat/agent-session-journal/database/journal-domain-profile-import.ts
  • src/main/native-chat/agent-session-journal/database/journal-legacy-reconcile.test.ts
  • src/main/native-chat/agent-session-journal/database/journal-legacy-reconcile.ts
  • src/main/native-chat/agent-session-journal/database/journal-legacy-source.ts
  • src/main/native-chat/agent-session-journal/journal-domain-import-rows.ts
  • src/main/native-chat/agent-session-journal/journal-domain-import.ts

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

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Not reverting; forward fix in progress.

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