Repository navigation
fix(bitbucket): PR details report the overall checks state - #44215
Conversation
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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
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:
It stays open for a person to finish or close. |
…#44215) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
getChangeRequestnow rolls the checks it already reads intochecksStatewith the sharedrollupCheckStatuseshelper. If reading checks fails,checksStateis 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, onebuildcheck 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 getsundefined. In apps/server/src/pullRequest/PullRequestWatchService.ts, setWatching seeds checksPending fromread.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.tswith the fix: 22 passedvp run typecheck(packages/source-control-bitbucket): no errors, only existing suggestionsvp run check:changed: knip, typecheck (11 packages) and tests (3 files) passedNot in this change
Who did the work
Run by the t3code factory in T3 Code.