Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): link thread PRs without an open client #10101

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/10101/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Thread PR links depended on client-side logic. Automatic relinking required an open web chat, and web and mobile could show different associations.

The server now discovers and saves PR links for each thread's branch. All clients read those links. Manual links stay separate, and stale lookups cannot overwrite newer changes. Settlement checks for a newer open PR before acting on a merged link.

Automatic branch links require the updated server. The client fallback is removed.

Focused tests and affected package typechecks pass. Targeted lint reports warnings but no errors.

Created with GPT-6 Astra in Codex.

Note

Add server-side thread PR discovery and remove client-side VCS PR resolution

  • The server now discovers and syncs thread PRs through the new ThreadPullRequestReactor and thread.pull-request.sync command, allowing PR links without an open client.
  • Web and mobile clients remove local VCS branch PR resolution, relying solely on server-provided linkedPullRequest or branchPullRequest metadata.
  • Migration 048_ProjectionThreadBranchPullRequest adds branch_pull_request_json to projection_threads; projection and contract schemas now support branchPullRequest.
  • GitManager.branchPullRequest supports an optional refresh flag and derives repository keys for GitHub, GitLab, Bitbucket, and Azure DevOps URLs.
  • Risk: thread.pull-request.sync fails with OrchestrationCommandInvariantError if the thread is recreated after the command snapshot. Clients cannot open PRs when no server link exists.
Macroscope summarized 6760605.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.6 KiB13.6 KiB+18 B (+0.1%)15.1 KiB✅
      CodexThread snapshot wire7.0 KiB7.0 KiB+12 B (+0.2%)7.3 KiB✅
      CodexLive turn WebSocket wire6.6 KiB6.6 KiB+6 B (+0.1%)7.8 KiB✅
      CodexLive turn WebSocket decoded57.1 KiB57.1 KiB0 B (0.0%)66.4 KiB✅
      CodexLive turn messages10100 (0.0%)21✅
      ClaudeTotal thread wire13.6 KiB13.6 KiB−47 B (−0.3%)15.1 KiB✅
      ClaudeThread snapshot wire7.0 KiB7.0 KiB0 B (0.0%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.6 KiB6.5 KiB−47 B (−0.7%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded57.9 KiB57.8 KiB−88 B (−0.1%)66.4 KiB✅
      ClaudeLive turn messages108−2 (−20.0%)21✅

      Baseline: 5fa35d2 · PR result: 03c0d05 · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 113.9 KiB
      • Claude decoded thread snapshot: 114.5 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This PR introduces an always-on server reactor that discovers and persists branch pull requests, changes automatic settlement behavior, and propagates new state through migrations, orchestration, web, and mobile clients. Its cross-layer runtime impact and default-on background activity require human review.

      Not approved because:

      • Monthly spending limit reached (workspace setting). Approvability relies on correctness review in order to determine eligibility
      Review your spending limits in [Billing settings](https://app.macroscope.com/pingdotgg/settings/billing). You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Bugbot is paused — on-demand spend limit reached

      Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

      A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

Sign in to join this conversation.