GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(bitbucket): PR details report the overall checks state by juliusmarminge · Pull Request #44215 · pingdotgg/t3code

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 27, 2026

Copy link
Copy Markdown
Member

Bitbucket pull request details never included the overall checks state. So when an agent started watching a Bitbucket PR while CI was still running, the watch recorded the checks as not pending, and a pass that landed before the first sweep produced no 'checks passed' notification. getChangeRequest now rolls the checks it already reads into checksState with the shared rollupCheckStatuses helper. If reading checks fails, checksState is left unset instead of claiming the PR has no checks.

Fixes #44202

Reproduction on main

Commit 853318d (origin/main). Added three cases to packages/source-control-bitbucket/src/server/BitbucketPullRequestProvider.test.ts that build the real Bitbucket provider (make) over a mocked BitbucketPullRequestApi: an open PR, one build check with status pending, success or failure, and successful diff/mergeability/permission reads. Each calls provider.getChangeRequest and expects checksState pending, passing or failing. vp test run src/server/BitbucketPullRequestProvider.test.ts: 3 failed, 19 passed; every case gets undefined. In apps/server/src/pullRequest/PullRequestWatchService.ts, setWatching seeds checksPending from read.checksState === "pending". PullRequestService's summary path uses getChangeRequest when a provider has no getChangeRequestSummary, which is the case for Bitbucket, and passes checksState through unchanged. So a Bitbucket watch is always seeded with checksPending=false and no checksState. I did not run a live Bitbucket account or the full server; the defect is entirely in T3's adapter mapping.

Evidence

Being captured: before and after in the real app. This section is filled in before the pull request can merge.

Tests

  • vp test run src/server/BitbucketPullRequestProvider.test.ts (packages/source-control-bitbucket) without the fix: 3 failed, 19 passed (the repro cases)
  • vp test run src/server/BitbucketPullRequestProvider.test.ts with the fix: 22 passed
  • vp run typecheck (packages/source-control-bitbucket): no errors, only existing suggestions
  • vp run check:changed: knip, typecheck (11 packages) and tests (3 files) passed

Not in this change

  • Bitbucket still has no getChangeRequestSummary, so watch sweeps go through the heavier getChangeRequest path (diff stat, mergeability and permission reads).

Who did the work

  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
juliusmarminge and others added 2 commits November 27, 2026 13:01
@juliusmarminge @claude
test(bitbucket): PR detail rolls up checks into checksState
10873f4
Repro for #44202: getChangeRequest reads checks but leaves checksState
unset, so a watch registered while checks are pending seeds
checksPending=false and the first successful run is never reported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge @claude
fix(bitbucket): PR details report the overall checks state
3828780
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 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 0 B (0.0%) 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 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 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 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: 4f7c529 · PR result: 3828780 · 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Bitbucket pull request provider now derives checksState from checks it reads successfully. If the check read fails, the response keeps checks empty and omits checksState. Tests cover pending, successful, and failed check statuses.

Changes: Bitbucket check state

Layer / File(s) Summary
Check-state mapping and unavailable reads
packages/source-control-bitbucket/src/server/BitbucketPullRequestProvider.ts, packages/source-control-bitbucket/src/server/BitbucketPullRequestProvider.test.ts
The provider rolls up statuses from successfully read checks. If reading checks fails, it returns an empty checks list and omits checksState. Tests verify that pending, success, and failure statuses map to pending, passing, and failing.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: Minimal · up to 38287

Bitbucket PR details now report the overall checks state, so a PR watch can see pending checks and later record success. If reading checks fails, the state is left unset. I found no concrete merge-blocking risk. Rollback is a plain code revert because nothing durable is written.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the Bitbucket provider and the change that PR details now report the overall checks state. The raw summary and objectives both describe adding checksState derived from rollupCheckStatu…
Description check Passed The description covers the problem, the change, the linked issue (#44202), and the verification steps, including test commands and results with and without the fix. It also names the model and harness…
Linked Issues check Passed Issue #44202 requires Bitbucket PR details to carry an aggregate checks state for pending, success, and failure, so that watch registration keeps a pending state and the first successful sweep can rec…
Out of Scope Changes check Passed The changes are limited to BitbucketPullRequestProvider.ts (import of rollupCheckStatuses, null fallback for failed check reads, checksState derivation) and BitbucketPullRequestProvider.test.ts (check…
Full details: Title check

Explanation

The title names the Bitbucket provider and the change that PR details now report the overall checks state. The raw summary and objectives both describe adding checksState derived from rollupCheckStatuses in getChangeRequest, so the title matches the main change. It follows the conventional commit form and is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description covers the problem, the change, the linked issue (#44202), and the verification steps, including test commands and results with and without the fix. It also names the model and harness that did the work, as the template asks. Two items are incomplete: the Evidence section says before and after captures are still pending and must be filled in before merge, and the Scope section does not state why this is a bug fix tied to an issue beyond the link. The template asks for before/after evidence for UI changes; this change is server-side, so the missing evidence is a process gap rather than a required item. Overall the description is mostly complete.

Full details: Linked Issues check

Explanation

Issue #44202 requires Bitbucket PR details to carry an aggregate checks state for pending, success, and failure, so that watch registration keeps a pending state and the first successful sweep can record one checks-passed notification. At head, BitbucketPullRequestProvider.getChangeRequest (packages/source-control-bitbucket/src/server/BitbucketPullRequestProvider.ts) reads checks through recoverRead(api.listChecks(target), null) and adds checksState: rollupCheckStatuses(checks.map(check => check.status)) when the read succeeded. This reuses the existing helper on checks already read, with no extra reads. On a failed read, checksState is omitted and checks is []. This matches the issue's requirement that a failed read must not imply there are no checks. The PR adds a parameterized test mapping pending, success, and failure to pending, passing, and failing. The first-read completion logic in PullRequestWatchService is not changed here; the issue states it already exists and depends on the seed this change provides. I did not run the tests or the end-to-end watch path, so the notification behavior rests on the code reading and the author's reported results.

Full details: Out of Scope Changes check

Explanation

The changes are limited to BitbucketPullRequestProvider.ts (import of rollupCheckStatuses, null fallback for failed check reads, checksState derivation) and BitbucketPullRequestProvider.test.ts (checks-state mapping test). The provider change is the adapter fix the issue names. The test directly covers the required mapping. No unrelated changes are visible in the reviewed files. The PR description states that no extra reads or new providers are added, and the head code confirms the check read is the existing one.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: factory/issue-44202
  • File: .coderabbit.config.ts
  • Commit: 3828780
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 94d4feea-9deb-4bf1-8217-f411f588e528
Commits

Reviewing files that changed from the base of the PR and between 4f7c529 and 3828780.

Files selected for processing: 2

  • packages/source-control-bitbucket/src/server/BitbucketPullRequestProvider.test.ts
  • packages/source-control-bitbucket/src/server/BitbucketPullRequestProvider.ts

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge

juliusmarminge commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

The automated pipeline stopped on this pull request and will not merge it:

the fix is written and reviewed, but proving it needs something no worker has:

  • Permanent blocker: an authenticated Bitbucket test account and repository with controllable CI statuses are required; none was supplied in the available VM account configuration.
  • Pending checks at watch registration, the first successful-run notification, and already-passing registration behavior remain unverified on both commits. A mocked adapter run would not establish the requested real-app proof.

It stays open for a person to finish or close.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Yash-Singh1 Yash-Singh1 mentioned this pull request Nov 28, 2026
fix(bitbucket): retain pending checks when a PR watch starts #44217
Closed
@Yash-Singh1
Yash-Singh1 merged commit 1d3ee17 into main Nov 28, 2026
39 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Yash-Singh1
Yash-Singh1 deleted the factory/issue-44202 branch November 28, 2026 02:18
@omegent-app omegent-app Bot mentioned this pull request Nov 28, 2026
Merge upstream main through 0f78747290a1 patroza/t3code#688
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Bitbucket PR watches lose pending checks at registration and miss the first successful run

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@juliusmarminge @Yash-Singh1
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.