Repository navigation
Conversation
When a workflow runs twice on the same commit and event (for example a
concurrency-cancelled pull_request run followed by a newer one), GitHub's
rollup only counts the newer run. bb deduped checks by name only, so
cancelled jobs from the old run whose names never appear in the new run
(unexpanded matrix names such as "Tests (${{ matrix.shard }}, ...)")
were counted as failures. PR #7000 showed "4 failed" while GitHub showed
the rollup as SUCCESS.
Read each check run's workflow run and drop checks from runs superseded
by a newer run of the same workflow and event, across all check pages.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
When bb cannot resolve the GitHub repository from git remotes, it found the PR with gh pr view and used gh's own statusCheckRollup for drafts, closed PRs and failed GraphQL reads. That output has no workflow run data, so checks from superseded workflow runs were still counted. Use gh pr view only to find the PR URL and read the PR through the same GraphQL read every refresh uses. A failed read now reports unavailable, which keeps any previous snapshot, instead of returning a partial PR. Remove the gh pr view field list and parser that only this path used. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/fix-pr-status-sync-for-thread-thr-prjzzbmtp2-thr_v9ubgyutfm
branch
November 4, 2026 19:18
ymichael
added a commit
that referenced
this pull request
Nov 4, 2026
## Human comments ## What was wrong #7011 (updateWhenIdle settings) reverted two PRs that had merged about 30 minutes before its commit was created: #7028 (merge child notices while the parent is blocked, skip `/compact` turns) and #7030 (count only the latest workflow run in GitHub PR check status). Its body mentions neither, so it looks accidental. - #7011 is a single commit, `6b17f1bc04`, whose parent is #7028's merge commit `920804af63`. Even so, the commit's own diff rewrites 11 files to their earlier content: - In #7028's 9 files it is an exact inverse of #7028, apart from four exports #7011 added to `packages/db/src/data/index.ts`. - #7030's 3 files in `plugins/github-pr-status/host/` went back to their pre-#7030 content. - That pattern fits a branch whose files came from an older checkout and were committed onto a newer base. - CI stayed green because each revert also removed the matching tests. - No other PR was affected. Every file the commit touched was compared with its earlier versions on main; only these two PRs match. What users got back after #7011: - **#7028:** a parent blocked on a question, a starting turn or an offline host collects a separate notice for every child update again (on Nov 3 one parent got ten from one child). `/compact` turns on a child send the parent "No final output was recorded." - **#7030:** bb shows green PRs as failing ("22 passed, 4 failed") when GitHub cancelled a duplicate CI run. ## What changed - Cherry-picks `b0e91c38f8` (#7030) and `920804af63` (#7028) onto current main with `-x`. #7030 applies unchanged. - #7028 conflicted only in `coalesced-system-notices.ts`, because #7029 (merged after #7011) added withdrawing a pending notice there. The result is #7028's version with #7029's withdraw path kept: the pending lookup has no `now` and a merge writes `windowEndsAt`. This is the combination #7029 was tested with before #7011 landed. `child-thread-notifications.ts` resolved to main's existing version, which already guards on a scheduled row. - Restores the #7029 test that depends on #7028: an ownership change undone after its 2 s window but before delivery is withdrawn. Its test helper comes back with it. - `internal/events.ts` and `db/data/events.ts` merged cleanly with the later #7031 and #7033 changes. - No daemon wire, CLI, config or plugin SDK surface change; `check-plugin-sdk-version` reports the surface unchanged. ## How you verified - With main's current code and the restored tests, 7 tests fail. With this branch they pass: - `thread-ownership-notices`: "withdraw a move undone after its window but before delivery" - `system-notice-dispatch`: "merge later outcomes into a row still waiting on the parent" - `child-completion-turn-output`: "does not notify the parent for a turn that only compacted context" - `github-pr-status` `git-host` / `batch`: superseded workflow runs, including on a later checks page and for drafts found through `gh pr view` - Server: ownership notices, notice dispatch, child completion output, notice kinds, child outcomes, parenting, plugin events, queue updates, sidebar status and child notifications all pass (112 tests). - `turbo run test` for the GitHub PR Status plugin, `@bb/db` and `@bb/templates` passes (10/10 tasks). `turbo run typecheck` for server, db, app and the plugin passes (10/10 tasks). > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Human comments
What was wrong
bb showed PR #7000 as "failing (22 passed, 4 failed)" while GitHub's commit rollup was
SUCCESSand the PR wasCLEAN. Every workflow had run twice on the head commit, both frompull_requestevents about a second apart. Concurrency cancelled CI run #20437, and its replacement, #20438, passed. GitHub's rollup only counts the newest run. bb rebuilt the check state from individual check runs and merged duplicates by name only. Four cancelled matrix jobs from the old run never expanded their names (for exampleTests (${{ matrix.shard }}, ubuntu-latest, Node 22.x)), so no check in the new run shared their names, and bb counted them as failures.gh pr checksmerges by name too and shows the same four failures.A second path had the same problem. When bb can't resolve the GitHub repository from git remotes, it found the PR with
gh pr view. For drafts, closed PRs and failed GraphQL reads, it then usedgh's ownstatusCheckRollup, which has no workflow-run data.What changed
plugins/github-pr-status/host/git-host.ts:checkSuite.workflowRun(run number, event, workflow ID). After all check pages are merged, bb drops checks from any run superseded by a newer run of the same workflow and event. Runs for different events, such aspushandpull_request, are both kept, so a real failure is not hidden. Status contexts and non-Actions check runs are unchanged.gh pr viewdiscovery path now asks only for--json url, then reads the PR through the same GraphQL URL read every refresh uses. This now includes drafts and closed PRs. If that read fails, bb reports the PR as unavailable, which keeps any previous snapshot, instead of returning a partial PR. Thegh pr viewfield list, its parser, and thegh-only parsing branches (arrayreviewRequests,workflowNamefallback) are removed.This is host-local to the plugin. The host/server contract and
HOST_DAEMON_PROTOCOL_VERSIONare unchanged.How you verified
Added tests:
The superseded-run tests failed against the first draft of the fix, because the zod parse clones the check objects and dropped the run tags, so they do catch the bug.
pnpm exec turbo run test typecheck lint --filter=bb-plugin-bb--github-pr-status: 174 tests pass, plus typecheck and lint.Read live fix(desktop): allow desktop-launched Computer Use to send Apple Events #7000 with the patched host code:
passing, 22/22,ready_to_merge.Ran
pnpm start:worktreewith a checkout of fix(desktop): allow desktop-launched Computer Use to send Apple Events #7000's branch as a project.bb pull-request showreports checks passing 22/22,CLEAN/MERGEABLE,ready_to_merge. Production bb on the same PR reportsfailing (22 passed, 4 failed, 26 total),checks_failed.Not exercised live: the discovery path for unresolvable remotes. It is covered by unit tests only.
🤖 Generated with Claude Code