Skip to content

Chat 20260608 131523#563

Merged
arul28 merged 4 commits into
mainfrom
ade/chat-20260608-131523-a511f3ef
Jun 12, 2026
Merged

Chat 20260608 131523#563
arul28 merged 4 commits into
mainfrom
ade/chat-20260608-131523-a511f3ef

Conversation

@arul28

@arul28 arul28 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

Describe the change.

What Changed

Key files and behaviors.

Validation

How you tested.

Risks

Anything to watch.

ADE   Open in ADE  ·  ade/chat-20260608-131523-a511f3ef branch  ·  PR #563

Greptile Summary

This PR removes the Path-to-Merge (PtM) orchestrator and the associated issue-inventory/convergence pipeline, retiring ~26,600 lines across desktop, iOS, CLI, and docs. The feature is cleanly excised from all layers: IPC handlers, preload bridge, renderer components, iOS views, RPC server tool specs, and shared types.

  • Backend cleanup: issueInventoryService, pathToMergeOrchestrator, and their DB tables (pr_issue_inventory, pr_pipeline_settings, pr_convergence_state) are removed from migrations; a one-time migration deletes orphaned path_to_merge / pr_issue_resolution lane-worktree locks on next DB open, addressing the previously flagged lock-release gap.
  • Frontend cleanup: The Convergence tab, PrConvergencePanel, PrIssueResolverModal, PrPipelineSettings, QueueAutomateMergingModal, PrsContext convergence-state cache, and all related IPC bridge entries are removed in a consistent sweep across desktop and iOS.
  • Utility relocation: shouldAttemptAdminMergeForRestError is moved from the deleted pathToMergeOrchestrator.ts into resolverUtils.ts with identical logic; prService.ts import updated accordingly.

Confidence Score: 5/5

Safe to merge — the removal is thorough and internally consistent across all layers, and the one-time lock-cleanup migration directly addresses the previously flagged lock-release concern.

The sweep is well-coordinated: every call site, IPC handler, preload bridge entry, type declaration, and test fixture that referenced PtM or issue inventory was updated or removed. The new DB migration clears stale path_to_merge / pr_issue_resolution locks. The only gap is that resolverUtils.ts now has three exported functions whose unit tests were deleted alongside the removed files — not a runtime risk, but a coverage gap on the admin-merge gate path.

apps/desktop/src/main/services/prs/resolverUtils.ts — the relocated shouldAttemptAdminMergeForRestError and the two permission-mode mappers no longer have dedicated unit tests after prRebase.test.ts and pathToMergeOrchestrator.test.ts were deleted.

Important Files Changed

Filename Overview
apps/desktop/src/main/services/prs/resolverUtils.ts Slimmed down to 3 exports: mapPermissionMode, mapPermissionModeForModelFamily, and the relocated shouldAttemptAdminMergeForRestError (moved from pathToMergeOrchestrator.ts); all unit tests for these functions were deleted along with the removed files.
apps/desktop/src/main/services/state/kvDb.ts Removed pr_issue_inventory, pr_pipeline_settings, and pr_convergence_state table migrations; added a one-time DELETE clearing stale path_to_merge / pr_issue_resolution lane-worktree locks on DB open, addressing the previously flagged lock-release gap.
apps/desktop/src/main/services/state/kvDb.migrations.test.ts Replaced the legacy pipeline-settings backfill test with a new test validating that path_to_merge and pr_issue_resolution locks are cleared on DB open; lock acquisition tests updated to use conflict_resolution owner kind.
apps/desktop/src/main/main.ts Removed issueInventoryService and pathToMergeOrchestrator instantiation, wiring, and disposal; session-end handler no longer tries to release the removed pr_issue_resolution lock kind.
apps/desktop/src/main/services/ipc/registerIpc.ts Removed all IPC handlers for issue inventory, convergence state, pipeline settings, path-to-merge start/stop, and issue-resolution-from-thread; AppContext type no longer carries issueInventoryService or pathToMergeOrchestrator.
apps/desktop/src/shared/types/prs.ts Removed PipelineSettings.autoMerge, LaneWorktreeLockOwnerKind variants path_to_merge / pr_issue_resolution, and ~170 lines of convergence-runtime and issue-inventory type declarations; doc-comments updated to reflect queue landing scope.
apps/desktop/src/renderer/components/prs/detail/PrDetailPane.tsx Removed the Convergence tab, all convergence panel state, IssueResolverModal, and the ~200-line convergence runtime machinery; fetchChecks callback removed since checks are no longer polled independently for the convergence panel.
apps/desktop/src/renderer/components/prs/state/PrsContext.tsx Removed convergenceStatesByPrId cache, loadConvergenceState/saveConvergenceState/resetConvergenceState callbacks, and related pruning calls; PrsState and PrsContextWarmCache types simplified accordingly.
apps/desktop/src/main/services/review/reviewContextBuilder.ts Removed issueInventoryService dependency and issueInventory field from ReviewContextValidationPayload; buildProvenancePayload no longer receives the validation argument since issue-inventory late-stage signals are gone.
apps/desktop/src/main/services/prs/pullRequestRowCleanup.ts Removed explicit DELETEs for pr_convergence_state, pr_pipeline_settings, and pr_issue_inventory; on DBs created before FK-cascade was applied these rows will be orphaned when a PR is deleted — documented in a previous review comment.
apps/ios/ADE/Views/PRs/PrDetailOverviewTab.swift Removed the entire PrPathToMergeTab SwiftUI view (~963 lines) along with all associated pipeline-settings pickers, issue-inventory list UI, and convergence toggle controls.
apps/ade-cli/src/adeRpcServer.ts Removed pr_refresh_issue_inventory, pr_preview_issue_resolution_prompt, and pr_start_issue_resolution tool specs; summarizePrIssueInventory helper and related TOOL_SPECS / READ_ONLY_TOOLS / MUTATION_TOOLS entries cleaned up.

Comments Outside Diff (2)

  1. apps/desktop/src/main/services/state/kvDb.migrations.test.ts, line 309-365 (link)

    P2 Stale path_to_merge / pr_issue_resolution locks no longer tested

    The test was updated to use conflict_resolution throughout, so the lane-worktree-lock migration no longer validates that rows with the now-removed owner_kind values are handled correctly. On upgrade from a version where the PtM orchestrator was mid-run, lane_worktree_locks rows with owner_kind = 'path_to_merge' or owner_kind = 'pr_issue_resolution' will remain in the database. The lock service's acquire path compares owner_kind strictly, so those unexpired rows will block any conflict_resolution operation on the same worktree until the lease expires naturally (no migration sweep runs for these specific kinds). Adding a test case—or a migration delete step—for both removed owner-kinds would close this gap.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/main/services/state/kvDb.migrations.test.ts
    Line: 309-365
    
    Comment:
    **Stale `path_to_merge` / `pr_issue_resolution` locks no longer tested**
    
    The test was updated to use `conflict_resolution` throughout, so the lane-worktree-lock migration no longer validates that rows with the now-removed `owner_kind` values are handled correctly. On upgrade from a version where the PtM orchestrator was mid-run, `lane_worktree_locks` rows with `owner_kind = 'path_to_merge'` or `owner_kind = 'pr_issue_resolution'` will remain in the database. The lock service's `acquire` path compares `owner_kind` strictly, so those unexpired rows will block any `conflict_resolution` operation on the same worktree until the lease expires naturally (no migration sweep runs for these specific kinds). Adding a test case—or a migration delete step—for both removed owner-kinds would close this gap.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

  2. apps/desktop/src/main/services/prs/pullRequestRowCleanup.ts, line 30-52 (link)

    P2 Orphaned rows on pre-cascade existing databases

    The explicit delete from pr_convergence_state / pr_pipeline_settings / pr_issue_inventory calls were removed. For databases where the tables exist AND were created before the FK-cascade retrofit ran (i.e. the FK_CONSTRAINTS entries that are now also removed), PRAGMA foreign_keys = ON may be active but the stored table SQL lacks the ON DELETE CASCADE clause — so cascade silently does nothing, leaving orphaned rows behind. New installations never create these tables, so this only affects existing users on older schema generations. A lightweight migration DELETE FROM pr_issue_inventory / pr_pipeline_settings / pr_convergence_state WHERE pr_id NOT IN (SELECT id FROM pull_requests) would purge the orphans without risk.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/main/services/prs/pullRequestRowCleanup.ts
    Line: 30-52
    
    Comment:
    **Orphaned rows on pre-cascade existing databases**
    
    The explicit `delete from pr_convergence_state / pr_pipeline_settings / pr_issue_inventory` calls were removed. For databases where the tables exist AND were created before the FK-cascade retrofit ran (i.e. the `FK_CONSTRAINTS` entries that are now also removed), `PRAGMA foreign_keys = ON` may be active but the stored table SQL lacks the `ON DELETE CASCADE` clause — so cascade silently does nothing, leaving orphaned rows behind. New installations never create these tables, so this only affects existing users on older schema generations. A lightweight migration `DELETE FROM pr_issue_inventory / pr_pipeline_settings / pr_convergence_state WHERE pr_id NOT IN (SELECT id FROM pull_requests)` would purge the orphans without risk.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

Reviews (4): Last reviewed commit: "Clear legacy Path to Merge worktree lock..." | Re-trigger Greptile

arul28 and others added 3 commits June 12, 2026 11:51
…p + iOS)

Desktop: thin main-process scheduler injects watch turns into a visible
chat agent per PR; removes standalone resolver + inventory digestion.
iOS: migrate PR-detail surface to the agent-watcher model.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…523-a511f3ef

# Conflicts:
#	apps/desktop/src/main/services/prs/pathToMergeOrchestrator.ts
#	docs/features/pull-requests/path-to-merge.md
Drop the deterministic orchestrator, issue inventory, convergence UI, and related IPC/sync/iOS surfaces so PR workflows rely on queue, merge rails, and agent-driven ship instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview Jun 12, 2026 7:23pm

@arul28

arul28 commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@arul28, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 43 minutes and 45 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 12d7916d-b209-45fa-a534-10dce525d3c4

📥 Commits

Reviewing files that changed from the base of the PR and between b164ba7 and d30d4b9.

⛔ Files ignored due to path filters (14)
  • apps/ios/ADE.xcodeproj/project.pbxproj is excluded by !**/*.xcodeproj/project.pbxproj
  • docs.json is excluded by !docs.json
  • docs/ARCHITECTURE.md is excluded by !docs/**
  • docs/features/agents/tool-registration.md is excluded by !docs/**
  • docs/features/cto/linear-integration.md is excluded by !docs/**
  • docs/features/lanes/README.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/**
  • docs/features/pull-requests/stacking.md is excluded by !docs/**
  • docs/features/remote-runtime/README.md is excluded by !docs/**
  • docs/features/remote-runtime/internal-architecture.md is excluded by !docs/**
  • docs/perf/ios-mobile-action-inventory.md is excluded by !docs/**
  • docs/perf/prs-tab-action-inventory.md is excluded by !docs/**
  • key-concepts.mdx is excluded by !*.mdx
📒 Files selected for processing (90)
  • .agents/skills/ade-perf-prs/SKILL.md
  • apps/ade-cli/README.md
  • apps/ade-cli/src/adeRpcServer.test.ts
  • apps/ade-cli/src/adeRpcServer.ts
  • apps/ade-cli/src/bootstrap.ts
  • apps/ade-cli/src/cli.test.ts
  • apps/ade-cli/src/cli.ts
  • apps/ade-cli/src/services/sync/syncHostService.ts
  • apps/ade-cli/src/services/sync/syncRemoteCommandService.ts
  • apps/ade-cli/src/services/sync/syncService.ts
  • apps/desktop/resources/ade-cli-help.txt
  • apps/desktop/resources/agent-skills/ade-pr-workflows/SKILL.md
  • apps/desktop/src/main/main.ts
  • apps/desktop/src/main/services/adeActions/registry.test.ts
  • apps/desktop/src/main/services/adeActions/registry.ts
  • apps/desktop/src/main/services/ai/tools/ctoOperatorTools.test.ts
  • apps/desktop/src/main/services/ai/tools/ctoOperatorTools.ts
  • apps/desktop/src/main/services/chat/agentChatService.test.ts
  • apps/desktop/src/main/services/chat/agentChatService.ts
  • apps/desktop/src/main/services/conflicts/conflictService.ts
  • apps/desktop/src/main/services/cto/ctoPromptContent.ts
  • apps/desktop/src/main/services/cto/ctoStateService.ts
  • apps/desktop/src/main/services/ipc/registerIpc.ts
  • apps/desktop/src/main/services/lanes/laneService.test.ts
  • apps/desktop/src/main/services/lanes/laneService.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/prIssueResolver.ts
  • apps/desktop/src/main/services/prs/prRebase.test.ts
  • apps/desktop/src/main/services/prs/prRebaseResolver.ts
  • apps/desktop/src/main/services/prs/prService.ts
  • apps/desktop/src/main/services/prs/pullRequestRowCleanup.ts
  • apps/desktop/src/main/services/prs/resolverUtils.ts
  • apps/desktop/src/main/services/review/reviewContextBuilder.test.ts
  • apps/desktop/src/main/services/review/reviewContextBuilder.ts
  • apps/desktop/src/main/services/review/reviewService.test.ts
  • apps/desktop/src/main/services/review/reviewService.ts
  • apps/desktop/src/main/services/review/reviewToolEvidence.test.ts
  • apps/desktop/src/main/services/state/kvDb.migrations.test.ts
  • apps/desktop/src/main/services/state/kvDb.ts
  • apps/desktop/src/main/services/sync/syncRemoteCommandService.test.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/app/TabNav.test.tsx
  • apps/desktop/src/renderer/components/app/TabNav.tsx
  • apps/desktop/src/renderer/components/automations/adeActionSchemas.ts
  • apps/desktop/src/renderer/components/prs/detail/PrDetailPane.test.tsx
  • apps/desktop/src/renderer/components/prs/detail/PrDetailPane.tsx
  • apps/desktop/src/renderer/components/prs/prsRouteState.test.ts
  • apps/desktop/src/renderer/components/prs/prsRouteState.ts
  • apps/desktop/src/renderer/components/prs/shared/PrConvergencePanel.test.tsx
  • apps/desktop/src/renderer/components/prs/shared/PrConvergencePanel.tsx
  • apps/desktop/src/renderer/components/prs/shared/PrIssueResolverModal.test.tsx
  • apps/desktop/src/renderer/components/prs/shared/PrIssueResolverModal.tsx
  • apps/desktop/src/renderer/components/prs/shared/PrPipelineSettings.tsx
  • apps/desktop/src/renderer/components/prs/shared/PrReviewThreadCard.test.tsx
  • apps/desktop/src/renderer/components/prs/shared/PrReviewThreadCard.tsx
  • apps/desktop/src/renderer/components/prs/state/PrsContext.test.tsx
  • apps/desktop/src/renderer/components/prs/state/PrsContext.tsx
  • apps/desktop/src/renderer/components/prs/tabs/QueueAutomateMergingModal.test.ts
  • apps/desktop/src/renderer/components/prs/tabs/QueueAutomateMergingModal.tsx
  • apps/desktop/src/renderer/components/prs/tabs/QueueTab.tsx
  • apps/desktop/src/renderer/components/prs/tabs/RebaseTab.tsx
  • apps/desktop/src/renderer/components/prs/tabs/WorkflowsTab.tsx
  • apps/desktop/src/renderer/components/prs/tabs/queueAutomateMergingRuntime.ts
  • apps/desktop/src/renderer/onboarding/tours/firstJourneyTour.ts
  • apps/desktop/src/renderer/onboarding/tours/prsTour.test.ts
  • apps/desktop/src/renderer/onboarding/tours/prsTour.ts
  • 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/Database.swift
  • apps/ios/ADE/Services/SyncService.swift
  • apps/ios/ADE/Views/PRs/PrAiResolverCtaCard.swift
  • apps/ios/ADE/Views/PRs/PrDetailChecksTab.swift
  • apps/ios/ADE/Views/PRs/PrDetailOverviewTab.swift
  • apps/ios/ADE/Views/PRs/PrDetailScreen.swift
  • apps/ios/ADE/Views/PRs/PrModels.swift
  • chat/capabilities.mdx
  • computer-use/overview.mdx
  • cto/linear.mdx
  • cto/overview.mdx
  • guides/pr-convergence.mdx
  • plans/tui-parity-roadmap.md
  • tools/pull-requests.mdx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/chat-20260608-131523-a511f3ef

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.

@mintlify

mintlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ade-ac1c6011 🟢 Ready View Preview Jun 12, 2026, 5:23 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Comment on lines 2754 to 2762
@@ -2767,18 +2762,6 @@ app.whenReady().then(async () => {
error: error instanceof Error ? error.message : String(error),

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 path_to_merge locks are never released on session end after upgrade

The session-end handler previously released both pr_issue_resolution and conflict_resolution locks for the ending session. The pr_issue_resolution release was removed here alongside the PtM code. On upgrade, any in-flight PtM session whose lock carries owner_kind = 'path_to_merge' (set by the orchestrator's acquire call) won't be caught by either remaining release call, because neither matches. The lock then blocks new conflict_resolution acquisitions on that worktree until the heartbeat lease expires. Consider adding a one-time migration DELETE FROM lane_worktree_locks WHERE owner_kind IN ('path_to_merge', 'pr_issue_resolution') in kvDb.ts to clear these immediately on next DB open.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/main/main.ts
Line: 2754-2762

Comment:
**`path_to_merge` locks are never released on session end after upgrade**

The session-end handler previously released both `pr_issue_resolution` and `conflict_resolution` locks for the ending session. The `pr_issue_resolution` release was removed here alongside the PtM code. On upgrade, any in-flight PtM session whose lock carries `owner_kind = 'path_to_merge'` (set by the orchestrator's `acquire` call) won't be caught by either remaining release call, because neither matches. The lock then blocks new `conflict_resolution` acquisitions on that worktree until the heartbeat lease expires. Consider adding a one-time migration `DELETE FROM lane_worktree_locks WHERE owner_kind IN ('path_to_merge', 'pr_issue_resolution')` in `kvDb.ts` to clear these immediately on next DB open.

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

Fix in Claude Code

After removing the PtM pipeline, orphaned path_to_merge and
pr_issue_resolution locks could block conflict_resolution until lease expiry.

Co-authored-by: Cursor <cursoragent@cursor.com>
@arul28 arul28 merged commit 49efe29 into main Jun 12, 2026
27 checks passed
@arul28 arul28 deleted the ade/chat-20260608-131523-a511f3ef branch June 12, 2026 19: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