Skip to content

Revert PR #241: queue pr fixes#249

Merged
arul28 merged 1 commit into
mainfrom
ade/revert-queue-pr-fixes-241
May 4, 2026
Merged

Revert PR #241: queue pr fixes#249
arul28 merged 1 commit into
mainfrom
ade/revert-queue-pr-fixes-241

Conversation

@arul28
Copy link
Copy Markdown
Owner

@arul28 arul28 commented May 4, 2026

This reverts the accidental merge of #241 into main.\n\nPR #241 was merged by Path to Merge before it was ready. This revert preserves history and removes the merged changes from main via a normal follow-up PR.\n\nMerge commit reverted: d42fbc4\nRevert commit: 09354c8

Greptile Summary

This PR cleanly reverts PR #241 ("queue pr fixes"), which was accidentally merged before it was ready. The revert removes the Path-to-Merge orchestrator (~1,052 lines), the Queue Automate Merging Modal (~723 lines), stacked-PR chain-base queue logic, and extended PipelineSettings type fields, restoring the codebase to its pre-#241 state across desktop, iOS, and docs.

  • The iOS DatabaseBootstrap.sql removal surfaces a latent P1 bug introduced by queue pr fixes #241: a raw parameterized INSERT INTO kv … VALUES (?, ?) in a plain SQL file would have caused SQLite to either error or bind NULL, meaning the QUEUE_OVERHAUL_WIPE_MARKER guard was never written and queue_landing_state would have been deleted on every cold start for iOS users on that build.
  • browserMock.ts loses pipelineSettingsGet/Save/Delete mock stubs while those IPC routes remain live; this restores the pre-queue pr fixes #241 baseline but leaves mock-mode callers without implementations.

Confidence Score: 4/5

Safe to merge — the revert is complete and consistent across all layers, with one surfaced P1 bug (iOS SQL) that was already in the wild from the reverted PR

The revert is thorough and internally consistent: IPC constants, preload bindings, type declarations, service wiring, DB migrations, iOS models and SQL, and UI components are all reverted in lockstep. The P1 finding (iOS parameterized SQL) is a bug that was introduced by #241 and is fixed by this revert, not introduced by it. A P2 observation about missing browser mock stubs restores the pre-#241 baseline.

apps/ios/ADE/Resources/DatabaseBootstrap.sql (P1 bug surfaced), apps/desktop/src/renderer/browserMock.ts (missing pipelineSettings mock stubs)

Important Files Changed

Filename Overview
apps/desktop/src/main/services/prs/pathToMergeOrchestrator.ts Entire file deleted (1052 lines) — reverts the Path-to-Merge orchestrator that was introduced in PR #241
apps/desktop/src/renderer/components/prs/tabs/QueueAutomateMergingModal.tsx Entire file deleted (723 lines) — reverts the Queue Automate Merging Modal UI introduced in PR #241
apps/desktop/src/main/services/state/kvDb.ts Reverts DB migrations: removes QUEUE_OVERHAUL_WIPE_MARKER logic and new ALTERs for pr_pipeline_settings and pr_convergence_state columns; existing upgraded DBs retain orphaned columns harmlessly
apps/desktop/src/main/services/prs/prService.ts Reverts separation of runPostMergeCleanup back into land(), removes retargetBase() and stacked-chain base logic from createQueuePrs()
apps/desktop/src/main/services/prs/queueLandingService.ts Reverts pipeline settings merging, retargetNextEntryIfNeeded(), and legacy-field synthesis from StartQueueAutomationArgs; restores simpler DEFAULT_QUEUE_CONFIG
apps/desktop/src/shared/types/prs.ts Reverts PipelineSettings type — removes conflictStrategy, autoAgentSettings, forceFinalizeMode, earlyMergeOnGreen, and related helpers/constants; removes pipeline field from QueueAutomationConfig
apps/ios/ADE/Resources/DatabaseBootstrap.sql Reverts deletion of queue_landing_state and removes a broken parameterized INSERT (raw ? placeholders in a SQL file) that was introduced by PR #241; also removes ALTERs for the new pipeline/convergence columns
apps/desktop/src/main/services/prs/issueInventoryService.ts Reverts extended getPipelineSettings query and savePipelineSettings multi-column upsert; removes savePathToMergeArgs/getPathToMergeArgs; code now only reads/writes the original 4 pipeline columns
apps/desktop/src/main/main.ts Reverts wiring of pathToMergeOrchestrator into app startup and service context; removes resumeFromPersistedState() call on setImmediate
apps/desktop/src/renderer/browserMock.ts Reverts pathToMergeStart/Stop and retargetBase mocks; also removes pipelineSettingsGet/Save/Delete mocks — those IPC methods still exist in ipc.ts so mock consumers calling them will get undefined
apps/desktop/src/main/services/sync/syncRemoteCommandService.ts Reverts prs.pathToMerge.start and prs.pathToMerge.stop remote command handlers and pathToMergeOrchestrator dependency

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph "Reverted (PR #241 removed)"
        PtM["PathToMergeOrchestrator\n(~1052 lines deleted)"]
        QAM["QueueAutomateMergingModal\n(~723 lines deleted)"]
        Chain["Stacked-chain base logic\nin createQueuePrs()"]
        Retarget["retargetBase() +\nretargetNextEntryIfNeeded()"]
        PipelineExt["Extended PipelineSettings:\nconflictStrategy, autoAgentSettings\nforceFinalizeMode, earlyMergeOnGreen"]
        DBMigrations["DB Migrations:\npr_pipeline_settings new columns\npr_convergence_state.ptm_args_json\nQUEUE_OVERHAUL_WIPE_MARKER"]
    end

    subgraph "Restored state (post-revert)"
        Land["land() with inline\npost-merge cleanup"]
        Queue["Queue: all PRs target\nsame branch (no chaining)"]
        PipelineSimple["PipelineSettings:\nautoMerge, mergeMethod\nmaxRounds, onRebaseNeeded"]
        IPC["IPC/Preload/global.d.ts\nconsistently cleaned up"]
    end

    PtM --> Land
    QAM --> Queue
    Chain --> Queue
    Retarget --> Land
    PipelineExt --> PipelineSimple
    DBMigrations --> PipelineSimple
Loading

Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
apps/desktop/src/renderer/browserMock.ts:4574
**Missing browser mock implementations for pipeline settings IPC**

This revert removes the `pipelineSettingsGet`, `pipelineSettingsSave`, and `pipelineSettingsDelete` mock implementations from `browserMock.ts`, but those IPC methods still exist in `ipc.ts` (`prsPipelineSettingsGet/Save/Delete`), `preload.ts`, and `global.d.ts`. Any renderer component that calls `window.ade.prs.pipelineSettingsGet(prId)` in browser-mock mode (tests, Storybook) will receive `undefined` instead of a function and throw at call time. The pre-PR #241 baseline appears to have been missing these mocks as well, but if any component added during or after #241 relies on them in mock mode, it will break.

### Issue 2 of 2
apps/ios/ADE/Resources/DatabaseBootstrap.sql:708-711
**Broken parameterized SQL removed by revert**

PR #241 introduced `insert into kv (key, value) values (?, ?) on conflict(key) do update set value = excluded.value` — raw `?` placeholders in a plain SQL bootstrap file that SQLite executes as-is. SQLite would treat `?` as a syntax error (or bind as `NULL` in some contexts), meaning the `QUEUE_OVERHAUL_WIPE_MARKER` guard was never recorded on iOS, and every app launch that hit this migration path would re-run the destructive `delete from queue_landing_state`. The revert correctly removes both lines. iOS users who upgraded to the #241 build may have had their queue state wiped on every cold start.

Reviews (1): Last reviewed commit: "Revert "Merge pull request #241 from aru..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored May 4, 2026 9:07pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Warning

Rate limit exceeded

@arul28 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 27 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dc9af8c2-c491-4a2e-bb44-3c525ff9bb4e

📥 Commits

Reviewing files that changed from the base of the PR and between d42fbc4 and 09354c8.

⛔ Files ignored due to path filters (3)
  • docs/ARCHITECTURE.md is excluded by !docs/**
  • docs/features/pull-requests/README.md is excluded by !docs/**
  • docs/features/pull-requests/path-to-merge.md is excluded by !docs/**
📒 Files selected for processing (35)
  • apps/ade-cli/README.md
  • apps/ade-cli/src/cli.test.ts
  • apps/ade-cli/src/cli.ts
  • apps/desktop/src/main/main.ts
  • apps/desktop/src/main/services/ipc/registerIpc.ts
  • apps/desktop/src/main/services/prs/issueInventoryService.ts
  • apps/desktop/src/main/services/prs/pathToMergeOrchestrator.test.ts
  • apps/desktop/src/main/services/prs/pathToMergeOrchestrator.ts
  • apps/desktop/src/main/services/prs/prIssueResolution.test.ts
  • apps/desktop/src/main/services/prs/prMergeQueue.test.ts
  • apps/desktop/src/main/services/prs/prService.ts
  • apps/desktop/src/main/services/prs/queueLandingService.ts
  • apps/desktop/src/main/services/state/kvDb.ts
  • apps/desktop/src/main/services/sync/syncHostService.ts
  • apps/desktop/src/main/services/sync/syncRemoteCommandService.test.ts
  • apps/desktop/src/main/services/sync/syncRemoteCommandService.ts
  • apps/desktop/src/main/services/sync/syncService.ts
  • apps/desktop/src/preload/global.d.ts
  • apps/desktop/src/preload/preload.ts
  • apps/desktop/src/renderer/browserMock.ts
  • apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx
  • apps/desktop/src/renderer/components/prs/detail/PrDetailPane.issueResolver.test.tsx
  • apps/desktop/src/renderer/components/prs/shared/PrConvergencePanel.test.tsx
  • apps/desktop/src/renderer/components/prs/shared/PrPipelineSettings.tsx
  • apps/desktop/src/renderer/components/prs/shared/prFormatters.ts
  • apps/desktop/src/renderer/components/prs/tabs/QueueAutomateMergingModal.tsx
  • apps/desktop/src/renderer/components/prs/tabs/QueueTab.tsx
  • apps/desktop/src/shared/ipc.ts
  • apps/desktop/src/shared/types/prs.ts
  • apps/desktop/src/shared/types/sync.ts
  • apps/ios/ADE/Models/RemoteModels.swift
  • apps/ios/ADE/Resources/DatabaseBootstrap.sql
  • apps/ios/ADE/Services/SyncService.swift
  • apps/ios/ADE/Views/PRs/PrDetailOverviewTab.swift
  • apps/ios/ADE/Views/PRs/PrDetailScreen.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/revert-queue-pr-fixes-241

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 and usage tips.

@@ -4576,44 +4574,6 @@ if (typeof window !== "undefined" && shouldInstallBrowserMock(window)) {
convergenceStateDelete: async (prId: string) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Missing browser mock implementations for pipeline settings IPC

This revert removes the pipelineSettingsGet, pipelineSettingsSave, and pipelineSettingsDelete mock implementations from browserMock.ts, but those IPC methods still exist in ipc.ts (prsPipelineSettingsGet/Save/Delete), preload.ts, and global.d.ts. Any renderer component that calls window.ade.prs.pipelineSettingsGet(prId) in browser-mock mode (tests, Storybook) will receive undefined instead of a function and throw at call time. The pre-PR #241 baseline appears to have been missing these mocks as well, but if any component added during or after #241 relies on them in mock mode, it will break.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/browserMock.ts
Line: 4574

Comment:
**Missing browser mock implementations for pipeline settings IPC**

This revert removes the `pipelineSettingsGet`, `pipelineSettingsSave`, and `pipelineSettingsDelete` mock implementations from `browserMock.ts`, but those IPC methods still exist in `ipc.ts` (`prsPipelineSettingsGet/Save/Delete`), `preload.ts`, and `global.d.ts`. Any renderer component that calls `window.ade.prs.pipelineSettingsGet(prId)` in browser-mock mode (tests, Storybook) will receive `undefined` instead of a function and throw at call time. The pre-PR #241 baseline appears to have been missing these mocks as well, but if any component added during or after #241 relies on them in mock mode, it will break.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

Comment on lines 708 to 711

alter table queue_landing_state add column updated_at text;

delete from queue_landing_state;

insert into kv (key, value) values (?, ?) on conflict(key) do update set value = excluded.value;

create table if not exists rebase_dismissed (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Broken parameterized SQL removed by revert

PR #241 introduced insert into kv (key, value) values (?, ?) on conflict(key) do update set value = excluded.value — raw ? placeholders in a plain SQL bootstrap file that SQLite executes as-is. SQLite would treat ? as a syntax error (or bind as NULL in some contexts), meaning the QUEUE_OVERHAUL_WIPE_MARKER guard was never recorded on iOS, and every app launch that hit this migration path would re-run the destructive delete from queue_landing_state. The revert correctly removes both lines. iOS users who upgraded to the #241 build may have had their queue state wiped on every cold start.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/ios/ADE/Resources/DatabaseBootstrap.sql
Line: 708-711

Comment:
**Broken parameterized SQL removed by revert**

PR #241 introduced `insert into kv (key, value) values (?, ?) on conflict(key) do update set value = excluded.value` — raw `?` placeholders in a plain SQL bootstrap file that SQLite executes as-is. SQLite would treat `?` as a syntax error (or bind as `NULL` in some contexts), meaning the `QUEUE_OVERHAUL_WIPE_MARKER` guard was never recorded on iOS, and every app launch that hit this migration path would re-run the destructive `delete from queue_landing_state`. The revert correctly removes both lines. iOS users who upgraded to the #241 build may have had their queue state wiped on every cold start.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

@arul28 arul28 merged commit cb6722c into main May 4, 2026
22 of 24 checks passed
@arul28 arul28 mentioned this pull request May 4, 2026
@arul28 arul28 deleted the ade/revert-queue-pr-fixes-241 branch May 8, 2026 03:21
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