Skip to content

fix: canonicalize git.cafe pull request links - #22634

Merged
maria-rcks merged 3 commits into
mainfrom
t3/gitcafe-pull-links
Oct 25, 2026
Merged

maria-rcks merged 3 commits into
mainfrom
t3/gitcafe-pull-links

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

git.cafe links supplied as host/repository/number, /pull/<n>, or /pulls/<n> now store t3's existing /pulls/<n> format. the git.cafe forge definition shares parsing and normalization across mcp, manual linking, checkout, and persisted links, including production and staging hosts. git.cafe's canonical browser route remains /pull/<n>; t3 accepts both routes.

verified on 2d7ff98483 against main 6548c006d4: a real codex turn linked pingdotgg/t3code https://git.cafe/pingdotgg/t3code/pulls/21353 all three ways, with unlink and empty-list checks between attempts. every new link stored /pulls/21353. manual singular-url linking also stored the plural form, and clicking the linked pr opened its loaded panel.

50 focused existing tests passed through blacksmith; the latest staging fix passed all 18 mcp tests and the persistence/rebuild test again. gitcafe, forge definitions, client-runtime, and server typechecks passed. scoped lint has zero errors and one existing warning; formatting passes. all 30 ci checks pass, and both independent source reviewers approved the final head. no new test files. old persisted singular links are covered by shared parsing but were not exercised in this dev database.

clicking the thread sidebar git.cafe PR badge opens its loaded panel

built by gpt-6.1-sol in the codex harness through t3 code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 21, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 21, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 2d7ff98

Macroscope's review found this PR approvable — This is a narrowly scoped GitCafe URL canonicalization fix that consistently handles both legacy and current routes across client, server, checkout, and persistence paths. It preserves unrelated URLs and adds focused coverage without schema, deployment, security, billing, default, or static-analysis changes.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB +7 B (+0.1%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB +7 B (+0.6%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB −7 B (−0.1%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB −7 B (−0.6%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB 0 B (0.0%) 29.3 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: 6548c00 · PR result: 2d7ff98 · 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: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

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

maria-rcks commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

Note

Written by gpt-6.1-sol on behalf of Maria

all 30 checks pass on 2d7ff98483dff0f17f5e7940d8c55c04dcb74688, including build/typecheck, lint, web tests, all eight server test shards, Macroscope, and CodeRabbit. CodeRabbit reported no actionable findings. both independent final source reviewers returned merge-ready for this exact head. no inline review threads remain.

the real dev build linked https://git.cafe/pingdotgg/t3code/pulls/21353 through fields, singular URL, and plural URL with unlink/empty-list checks between each, always storing /pulls/21353. manual linking stored the same URL. the parent independently clicked the thread's sidebar badge and saw the loaded panel. the updated recording shows that exact interaction. old persisted singular links were not present in the isolated database, so that runtime case remains unverified; existing parsing coverage includes both forms.

integration with main 6548c006d4 resolves the original conflicts and includes main's prior removal of the failed Cursor webhook. final scope against that base: 11 files, +174/-28; no new test files or unrelated ci changes. the forge's singular canonical browser route was acknowledged without changing maria's requested plural storage. nothing merged.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 2a3009c and 2d7ff98.

Files selected for processing: 11
  • apps/server/src/mcp/toolkits/pullRequests/handlers.test.ts
  • apps/server/src/mcp/toolkits/pullRequests/handlers.ts
  • apps/server/src/orchestration-v2/Orchestrator.ts
  • apps/server/src/orchestration-v2/runtimeLayer.test.ts
  • packages/client-runtime/src/pullRequestLinkInput.test.ts
  • packages/client-runtime/src/pullRequestLinkInput.ts
  • packages/source-control-definitions/src/registry.ts
  • packages/source-control-gitcafe/src/server/GitCafeSourceControlProvider.test.ts
  • packages/source-control-gitcafe/src/server/GitCafeSourceControlProvider.ts
  • packages/source-control-gitcafe/src/shared/definition.test.ts
  • packages/source-control-gitcafe/src/shared/definition.ts

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

Walkthrough

GitCafe pull-request URL handling now recognizes both /pull/ and /pulls/ routes on the production and staging hosts. Link resolution and server storage paths canonicalize valid URLs to the plural route.

Changes: GitCafe URL normalization

Layer / File(s) Summary
Shared GitCafe URL parsing and canonicalization
packages/source-control-gitcafe/src/shared/definition.ts, packages/source-control-gitcafe/src/shared/definition.test.ts, packages/source-control-definitions/src/registry.ts
Shared helpers parse supported GitCafe hosts and route forms, and canonicalize valid links. The registry exports the canonicalization helper. Tests cover accepted and rejected references.
GitCafe client recognition and server resolution
packages/source-control-gitcafe/src/server/GitCafeSourceControlProvider.ts, packages/source-control-gitcafe/src/server/GitCafeSourceControlProvider.test.ts
The provider uses the shared parser to resolve pull-request references. Checkout tests cover both route forms.
Application link resolution and storage
packages/client-runtime/src/pullRequestLinkInput.ts, packages/client-runtime/src/pullRequestLinkInput.test.ts, apps/server/src/mcp/toolkits/pullRequests/handlers.ts, apps/server/src/mcp/toolkits/pullRequests/handlers.test.ts, apps/server/src/orchestration-v2/Orchestrator.ts, apps/server/src/orchestration-v2/runtimeLayer.test.ts
Client and server link paths canonicalize valid GitCafe URLs. Tests cover resolution, link commands, stored links, and projection rebuilding.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 2d7ff

No concrete issue remains that calls for a change before merging. Normal checks should still complete.

Security architecture risk: Low · up to 2a300

The change is narrowly scoped to accepting equivalent GitCafe links and storing one canonical format. Existing host and credential restrictions remain in place. No new security weakness was verified, although concurrent and interrupted updates were not fully validated.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed attack surface is user-supplied pull-request references flowing into thread associations and GitCafe retrieval or checkout. Recognition expands to another route on the two existing hosts, not to arbitrary destination hosts or new credential authorities.

Trust Boundaries and Controls

  • observed — Credential selection remains host-scoped: environment credentials require a matching configured host, settings credentials are restricted to production, and CLI lookup receives the selected host. Existing tests explicitly reject production-to-staging and staging-to-production environment-token reuse.

Resilience and Maintainability Implications

  • observed — Link deduplication, ordinary unlinking, and stack-dismissal restoration continue to use normalized identity rather than URL spelling. The unchanged commit mechanism reserves the command receipt, appends events, applies projections, and finalizes the receipt inside a transaction before publishing. Duplicate command IDs reuse the recorded result. These mechanisms provide counterevidence to partial-state concerns, but are not direct validation of every concurrent or interrupted link transition.
Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the problem, implementation, affected components, verification steps, observed results, limitations, and agent details. It does not include the required “Scope and approval” s… Add a “## Scope and approval” section. Link the triaged issue or approval discussion and identify the maintainer approval comment. If no prior issue or discussion exists, explain why this focused fix addresses an obvious bug and qualifies f…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title is concise, specific, and directly describes the primary change: canonicalizing GitCafe pull request links.
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 explains the problem, implementation, affected components, verification steps, observed results, limitations, and agent details. It does not include the required “Scope and approval” section or a link to a triaged issue, approved discussion, or a clear explanation of why this focused fix qualifies for an exemption.

Resolution

Add a “## Scope and approval” section. Link the triaged issue or approval discussion and identify the maintainer approval comment. If no prior issue or discussion exists, explain why this focused fix addresses an obvious bug and qualifies for the exemption.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@macroscopeapp
macroscopeapp Bot dismissed their stale review October 25, 2026 01:33

Dismissing prior approval to re-evaluate 2d7ff98

@maria-rcks
maria-rcks merged commit eabcfa2 into main Oct 25, 2026
31 of 32 checks passed
@maria-rcks
maria-rcks deleted the t3/gitcafe-pull-links branch October 25, 2026 01:51
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Oct 25, 2026
## What's Changed
* perf(mobile): highlight code with native @pierre/highlights instead of Shiki by @juliusmarminge in pingdotgg/t3code#24544
* fix(desktop): support Linux distro protocol launchers by @juliusmarminge in pingdotgg/t3code#24591
* fix(provider-acp): force-kill terminal commands that ignore SIGTERM by @juliusmarminge in pingdotgg/t3code#24596
* fix(grok): invoke leading picked skills through native commands by @juliusmarminge in pingdotgg/t3code#24605
* fix(server): long agent turns no longer load whole when a thread opens by @t3dotgg in pingdotgg/t3code#24589
* fix(server): analytics stop counting reconnects, retries, and dev servers by @t3dotgg in pingdotgg/t3code#24601
* fix(acp): idle agent errors fail their turns by @juliusmarminge in pingdotgg/t3code#24615
* fix(provider-acp): Grok monitors show as monitors in background work by @t3dotgg in pingdotgg/t3code#24609
* feat(server): devices on the same network reach background services over LAN by @t3dotgg in pingdotgg/t3code#24588
* fix(codex): bound pending requests after app-server stdout closes by @juliusmarminge in pingdotgg/t3code#24600
* fix(cursor): discover built-in skills in the composer by @juliusmarminge in pingdotgg/t3code#24595
* fix(server): retry provider event writes after brief SQLite locks by @juliusmarminge in pingdotgg/t3code#24571
* fix(server): settle inactive threads with persisted open PR links by @juliusmarminge in pingdotgg/t3code#24617
* feat(mobile): Settings is a workspace tab, and tabs never open on an empty detail by @juliusmarminge in pingdotgg/t3code#24524
* feat(mobile): the folded Duo opens search from a search tab below the tab bar by @juliusmarminge in pingdotgg/t3code#24360
* revert(mobile): take the folded Duo search tab back out for now by @juliusmarminge in pingdotgg/t3code#24626
* fix(web): preview images outside the workspace by @juliusmarminge in pingdotgg/t3code#24627
* fix(threads): Working holds only background work the agent waits on by @t3dotgg in pingdotgg/t3code#24610
* fix(web): switched threads and Scroll to end land on the real end by @t3dotgg in pingdotgg/t3code#24622
* fix(web): attach DNG originals as generic files by @juliusmarminge in pingdotgg/t3code#24625
* fix(server): surface failed runtime request answer delivery by @juliusmarminge in pingdotgg/t3code#24616
* fix(preview): report navigation timeout accurately by @Ethereal49 in pingdotgg/t3code#24356
* fix(web): give PR row metadata room below the title by @juliusmarminge in pingdotgg/t3code#24553
* fix(mobile): center floating status actions by @PixPMusic in pingdotgg/t3code#24526
* fix(mobile): the iPhone new-chat button sits beside the tab bar on iOS 26.6 by @wojas in pingdotgg/t3code#24492
* fix(web): signed-out T3 Connect shows a Sign in button by @t3dotgg in pingdotgg/t3code#24636
* perf(mobile): stop menu fault logging and whole-list re-renders on Home by @juliusmarminge in pingdotgg/t3code#24646
* fix(mobile): preserve syntax and navigation in large diffs by @juliusmarminge in pingdotgg/t3code#24276
* perf(shell): cold connects skip idle subagent threads, a third of the thread list by @t3dotgg in pingdotgg/t3code#24648
* feat: share a thread with a guest who watches live and sends messages you approve by @t3dotgg in pingdotgg/t3code#24104
* fix(antigravity): say when sign-in cannot reach Google by @t3dotgg in pingdotgg/t3code#24652
* fix: canonicalize git.cafe pull request links by @maria-rcks in pingdotgg/t3code#22634
* feat(mobile): manage labels, edit PRs and comments, react, and refresh checks live by @juliusmarminge in pingdotgg/t3code#24602
* perf(web): highlight code with @pierre/highlights instead of Shiki by @maria-rcks in pingdotgg/t3code#23178
* perf(server): thread opens and live events send each message body once by @t3dotgg in pingdotgg/t3code#24647
* refactor: halve code comments and cap comment blocks at four lines by @maria-rcks in pingdotgg/t3code#21514
* chore: fit three comments to the four-line cap so lint passes on main by @t3dotgg in pingdotgg/t3code#24675
* fix(claude): ENABLE_TOOL_SEARCH=auto no longer costs 10x cache writes per session by @t3dotgg in pingdotgg/t3code#24654
* perf(orchestration): thread snapshots send each long ID once by @t3dotgg in pingdotgg/t3code#24643
* fix(mobile): keep visible diff files highlighted by @juliusmarminge in pingdotgg/t3code#24682
* fix(mobile): Settings split view keeps its selection and its header matches the page by @juliusmarminge in pingdotgg/t3code#24644
* fix(mobile): every Duo header blurs under the vertical bar, from one place by @juliusmarminge in pingdotgg/t3code#24671
* feat(settings): follow-ups steer the running turn by default by @maria-rcks in pingdotgg/t3code#24718
* fix(mobile): Duo threads no longer open shifted left by @juliusmarminge in pingdotgg/t3code#24732
* fix(mobile): PR links open in the app the same way they do on web by @juliusmarminge in pingdotgg/t3code#24738
* feat(web): command palette search finds options inside submenus by @maria-rcks in pingdotgg/t3code#24709

## New Contributors
* @Ethereal49 made their first contribution in pingdotgg/t3code#24356
* @wojas made their first contribution in pingdotgg/t3code#24492

**Full Changelog**: pingdotgg/t3code@v0.1.3-nightly.20261024.3643...v0.1.3-nightly.20261025.3655

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.3-nightly.20261025.3655
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant