# test: warn on polling loops in tests and make adapter test harnesses event-driven · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/d789eef8e73af37f01beae80c40101dcf6aa0ddf)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: d789eef8e73af37f01beae80c40101dcf6aa0ddf

Requested commit: d789eef8e73af37f01beae80c40101dcf6aa0ddf

Commit: d789eef8e73af37f01beae80c40101dcf6aa0ddf

Tree: d395b6a80ce24b6d221635bc7f7395c426553775

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
test: warn on polling loops in tests and make adapter test harnesses event-driven

Add t3code/no-polling-loop-in-tests (warn for now) for loops that spin on yieldNow, sleep, or timer/microtask ticks until a predicate holds. Fixed-N flushes stay allowed.

The Claude and Codex adapter harnesses now publish to a PubSub whenever they record an event, continuation, or prompt. awaitTerminal, awaitContinuation, awaitSubagentStatus, and until re-check only when that state changes, replacing the 5000-yield awaitUntil budget. Settle windows that followed an offered SDK frame now use offerAndWait. OpenCode2 offer and turn waits now use Deferreds, and desktop preview waits use a change signal fed by state subscribers and the favicon mocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

```

## Parents

- [a9550e8cf64dfa10a839f19573a6384017669bbe](https://git.cafe/pingdotgg/t3code/commit/a9550e8cf64dfa10a839f19573a6384017669bbe?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/d789eef8e73af37f01beae80c40101dcf6aa0ddf?format=markdown)
