Skip to content

Close ACP stdin failures and isolate GitHub panel logic - #1973

Merged
ymichael merged 2 commits into
mainfrom
bb/review-slop-cop-comments-thr_79ncrhnnnh
Aug 19, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/review-slop-cop-comments-thr_79ncrhnnnh

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

What was wrong

The post-merge review on #1967 identified two valid root causes. The ACP connection suppressed expected EPIPE / ERR_STREAM_DESTROYED events without changing connection state, so an agent that closed stdin but kept another handle alive could leave pending requests unresolved forever and continue accepting future requests. Separately, five pure GitHub route and query tests imported the 2,508-line panel entrypoint, initializing its React, plugin SDK, and UI dependency graph just to exercise synchronous logic.

What changed

  • Treat a closed ACP stdin as a fatal transport closure: make the connection unavailable, reject pending requests, force-stop the child, and report the exit. The regression fixture closes fd 0 while deliberately keeping the process alive and checks both pending and future requests.
  • Move GitHub item, route, query, and suggestion logic into app-logic.ts. The pure module returns serializable icon descriptors; app.tsx alone renders them into the existing state-dot and avatar UI.
  • Point the logic tests directly at the pure module and remove their jsdom and plugin-runtime setup.
  • No server/daemon wire contract, CLI, user-facing configuration, guide, or protocol-version changes are involved.
  • I did not consolidate the two fake-gh fixtures noted by the review: they share only temporary PATH plumbing, while their command behavior and failure controls are intentionally different.

How you verified

  • The new ACP persistent-child regression failed before the fix because the request remained pending past its deadline; it passes after the connection teardown change.
  • pnpm exec turbo run test typecheck --filter=bb-plugin-github --filter=bb-plugin-provider-acp — 21 GitHub tests and 169 ACP tests passed; both typechecks passed.
  • pnpm exec turbo run build --filter=bb-plugin-github — the production server, app JavaScript, and app CSS bundles built successfully.
  • git diff --check origin/main...HEAD passed.
  • In the focused GitHub logic test, Vitest import time dropped from 2.75 s to 27 ms and total file duration dropped from 3.53 s to 129 ms.

Fixes: N/A — post-merge review follow-up to #1967.

AGENT GENERATED: by GPT-5

@ymichael
ymichael merged commit df3aa09 into main Aug 19, 2026
12 checks passed
@ymichael
ymichael deleted the bb/review-slop-cop-comments-thr_79ncrhnnnh branch August 19, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant