Skip to content

test(integrations): live Pidgeon sends go to someone the desk hasn't written to - #1138

Merged
allisonmahmood merged 2 commits into
mainfrom
fix/pidgeon-live-cooldown
Oct 31, 2026
Merged

allisonmahmood merged 2 commits into
mainfrom
fix/pidgeon-live-cooldown

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

What changed

Pidgeon added a recipient cooldown on 2026-10-31: it holds back new messages from an address to someone it has just written to (429 recipient_cooldown; replies always go). Two live cases sent new messages to the customer the desk had just answered.

From 11:44 to about 17:25 UTC, Pidgeon refused the first new message, and the live tier failed on every run, main included. Since then Pidgeon allows three in 10 minutes, as its docs say, and main passes again. The suite now passes only because it sends that customer two new messages, under the current count.

Each of those cases now sends to someone the desk hasn't written to, so the suite doesn't depend on Pidgeon's count. It keeps the address's default cooldown and still checks what it checked before.

Part of #1117; the second PR, stacked on this one, tells patches about the cooldown.

Look at

  • The send-policy case: an outside sender writes to the reply-only desk through POST /test/inbound. The send to a stranger is still refused not_permitted, and the same draft then sends to the outside sender.
  • The held-send case: after the first-contact checks, the desk is open, so the rejected@ send goes beside [email protected] instead of the customer.
  • One recipient per case: a single shared second customer wouldn't work. The first case's send would start the cooldown for the second.

How it was verified

Before, on main (run 41199984623), both cases failed:

PidgeonOperationRateLimited: Pidgeon is limiting this account for now, so nothing was done. Try again in 573 seconds.
  details: { message: 'This address wrote to patchy-lv…[email protected] in the last 10 minutes. Reply in that conversation, or send a new message in 10 minutes.' }

After: the operations live file passed against Pidgeon's test mode with the test admin key:

Pidgeon live run lv4d6d01: 124 calls, 3 keys minted, at most 2 active at once; swept 0 stale keys and 0 stale addresses before, 1 keys and 2 addresses after.
 Test Files  1 passed (1)
      Tests  9 passed (9)

This PR's pidgeon-live check ran the whole tier and passed on 9b20071 and on c734b1f.

Release impact

  • Breaking — requires action from anyone already running this

  • Not breaking — live test tier only; nothing ships

  • What does a revert leave behind? Nothing; the two cases go back to failing.

  • Does the release before it still work with that? Yes.


Made by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running in T3 Code.

@github-actions github-actions Bot added area:integrations Company connections and integration implementations size:s Under 100 changed lines labels Oct 31, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Independent review (GPT 6.1 Sol, xhigh) on 9b20071: no P1 findings.

  • P3: the comment and description stated the cooldown as one message in 10 minutes, where Pidgeon's docs now say three. Fixed in c734b1f. The comment now says what the cooldown does, without a count, and the description says what the failing runs saw beside what the docs say. The fix holds under either count, because neither case sends to anyone the desk has written to.

  • P2: in the held-send case, the approval draft's cleanup starts after the replay. A transient failure on the replay would leave the held draft in the account's approval queue. Not fixing it here:

    Keeping this PR to the cooldown fix; it's worth tightening separately if the queue ever fills.

allisonmahmood and others added 2 commits October 31, 2026 19:17
…written to

Pidgeon now refuses a new message from an address to someone it wrote
to in the last 10 minutes (429 recipient_cooldown). The live suite's
send-policy and held-send cases sent new messages to the customer the
desk had just answered, so both failed on every run.

The send-policy case now sends to an outside sender who writes to the
reply-only desk first, and the held-send case, with the desk open by
then, sends to an address it hasn't written to. Each case keeps its
own recipient, so neither starts the other's cooldown.

Refs #1117

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pidgeon's docs now allow three new messages in the window, where the
failing runs saw one; the comment holds for both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood
allisonmahmood force-pushed the fix/pidgeon-live-cooldown branch from c734b1f to 7aa991e Compare October 31, 2026 18:18
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked 7aa991ebb9f8c093f15e58357600c78351894f3e (base main at 9e176cb5818fc283064be15c8b49e8e5ce0a137e), by Claude Opus 5.5 in Claude Code, running in T3 Code. I did not write this change.

This is a delta acceptance. The earlier verdict (PASS with notes, by GPT-6.1 Sol) checked c734b1f, before the rebase onto 9e176cb. This run confirms the rebase changed none of the PR's own content, that main's changes since then don't touch the files this PR changes, and that the checks pass again at the new head. The earlier verdict's behavioural findings carry over.

The rebase

  • PR content unchanged: passed. git range-diff c69769b..c734b1f 9e176cb..7aa991e reports both commits =, so their patches are identical.
  • Main's changes since c69769b don't interact: passed. Main changed no file this PR changes (packages/integrations/live/PidgeonOperations.live.ts only). The tree delta c734b1f → 7aa991e is exactly main's c69769b → 9e176cb delta.

Done means (carried from c734b1f, re-run at this head)

Evidence

CI at 7aa991e (Pidgeon live, run 41228782273):
PidgeonOperations.live.ts   9 passed
Pidgeon.live.ts             7 passed
PidgeonDev.live.ts          3 passed
Test Files  3 passed (3)
Tests      19 passed (19)
Sweep what this run left in Pidgeon: success

Local at 7aa991e:
pnpm exec vitest run --config test/vitest.config.ts packages/integrations/src/pidgeon packages/api packages/sdk/src/SdkApi.test.ts
Test Files  14 passed (14)
Tests      123 passed (123)
pnpm typecheck: 24 successful, 24 total; exit 0
pnpm lint: exit 0

Every other check on this head passed, including CI (Node 22/24/26 tests, browser, tier2-smoke, clerk-live, cli-smoke, install on Linux, macOS and Windows, lint, rollback-rehearsal). attio-live was skipped because this PR has no Attio changes.

Golden journeys

  • Not touched: Sign in, Log a machine in, Publish a page, Share and unshare, Find and open a tool, Use a tool live, Use a tier 2 tool, Invite and join. The diff changes only which recipients the live test uses. CI's browser, tier2-smoke and clerk-live jobs passed at this head.

Rollback answers: match the diff. The diff is test-only: no shipped code, migration, stored data or client contract changes. The rollback-rehearsal check passed at this head. No one-way label is needed.

Not run

  • A local live Pidgeon run: CI ran the full live tier at this head, and this run was told not to use the shared account.
  • A local full verify and manual dev-instance journeys: the diff doesn't touch them, and CI's broader suites passed at this head.

Notes

  • Carried over: the held-draft cleanup only starts after the replay assertion, so a transient replay failure can leave an approval draft until it expires. This gap already existed and the diff doesn't add it. Cleanup succeeded in CI at this head.

@allisonmahmood
allisonmahmood merged commit 327c8b6 into main Oct 31, 2026
23 checks passed
@allisonmahmood
allisonmahmood deleted the fix/pidgeon-live-cooldown branch October 31, 2026 19:25
allisonmahmood added a commit that referenced this pull request Oct 31, 2026
…ld to reply (#1139)

## What changed

Pidgeon holds back new messages from an address to someone it has just
written to: `429` with `error.code` `recipient_cooldown`. Replies always
go. A patch that answers a customer and then sends them a new message
hits it, and Patchy read every 429 as the account's request rate. So the
patch was told "Pidgeon is limiting this account for now… Try again in
573 seconds", and its agent would wait and retry instead of replying in
the conversation.

Now the patch hears which limit it hit and what to do instead. Closes
#1117 with #1138, which this is stacked on.

## Look at

- **`Source.classify`:** reads Pidgeon's code on a 429 into `limit:
"recipient_cooldown"`; anything else stays `"requests"`.
- **`Operations.RateLimited`:** the cooldown's message says nothing was
sent and to reply in that conversation, or send again after
`retryAfter`. Every Pidgeon limit now carries Pidgeon's explanation in
`details.message`; a cooldown's names the recipient. The daily budget is
Patchy's and carries none.

  Before, from the live tier on main:

  ```
source_rate_limited: Pidgeon is limiting this account for now, so
nothing was done. Try again in 573 seconds.
  details: { limit: "requests" }
  ```

  After:

  ```
source_rate_limited: This address wrote to a recipient of this message
recently, and Pidgeon holds a new message to them for a while, so
nothing was sent. Reply in that conversation, or send it again in 573
seconds.
details: { limit: "recipient_cooldown", message: "This address wrote to
[email protected] in the last 10 minutes. Reply in that conversation,
or send a new message in 10 minutes." }
  ```

- **Where the rule is stated:** the client's `PidgeonDetails` type, the
generated context's `messages.send` line, and the `patchy-pidgeon`
skill. The skill and context also say dev doesn't apply the cooldown,
since dev simulates writes.
- **The count isn't fixed.** The runs that failed today were refused
after one earlier message, and Pidgeon's docs now say three new messages
in 10 minutes. So the live case sends new messages to the customer until
one is held, at most four. It then checks the refusal and sends the held
draft's key as a reply in her conversation; a 429 isn't kept, so the key
still sends. The case uses the customer, one of the run's own addresses:
in test mode, mail to outside addresses goes nowhere and doesn't count
toward the cooldown, which a first version of this case found.

## How it was verified

- **Offline, red then green.** The new `Source.test.ts` and
`Operations.test.ts` cases fail against the old mapping (`expected …
'limit' of 'recipient_cooldown', but got 'requests'`) and pass with it.
All Pidgeon offline suites pass (37 tests).
- **Live:** the operations live file passed against Pidgeon's test mode
with the test admin key, the new cooldown case included:

  ```
Pidgeon live run lvd71a4b: 129 calls, 3 keys minted, at most 2 active at
once; swept 0 stale keys and 0 stale addresses before, 1 keys and 2
addresses after.
        Tests  10 passed (10)
  ```

An earlier attempt at 17:33 UTC failed in two cases this PR doesn't
touch: a Pidgeon write passed the 15-second deadline, and test mode's
`drop` didn't drop. The rerun passed.
- **`pnpm check`:** format, lint, typecheck and synth pass. Its offline
tests failed locally only in the CLI suites that record stray `GET /`
requests from this machine's port probes, and one Supervisor timeout
under load; none touch Pidgeon. CI runs them clean.

## Release impact

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — a new `details.limit` value and a
`details.message` on an existing refusal; patches already handle
`source_rate_limited`

- **What does a revert leave behind?** Nothing stored. A cooldown would
read as `"requests"` again, with the old message.
- **Does the release before it still work with that?** Yes.

---

Made by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, running in
T3 Code.

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
allisonmahmood added a commit that referenced this pull request Oct 31, 2026
## What changed

This adds release 32's What's new entry, written from `58d94b3`. It
covers everything merged since release 31's `through` (`5888411`). It
also sets the `patchy` release to `0.32.0` in
`packages/patchy/package.json` and `CURRENT_RELEASE`.

| Change | PRs |
| --- | --- |
| Fixed: a patch has the keyboard as soon as it opens, so its shortcuts
work, and Space and Page Down scroll it, without a click first | #1097 |
| Improved: agents give a patch pages of its own, each view at its own
address under the patch, with back and forward working; repos pick it up
at their next refresh | #1095 |
| Fixed: a patch that hits Pidgeon's hold on a new message is told
nothing was sent and to reply in the conversation, not to wait and retry
| #1139 |
| Behind the scenes: refresh and `patchy dev` keep working when a repo
holds a skill the instance's release doesn't ship, so a rollback can't
break them | #1099 |

#1138 is a live test tier change with nothing that ships. #1140 is
release 31's own entry.

## Look at

- **The entry**, at the top of `releases` in
`packages/core/src/whatsNew.ts`.
- **Rollback safety, from the live commit `9e176cb` (release 31) to
`58d94b3`:** #1138, #1139, #1097, #1095 and #1099. None is labelled
`one-way`, and their Release impact answers agree:
  - #1097 changes only the shell's script.
  - #1095 changes only skill text.
- #1139 adds a `details.limit` value and a `details.message` on an
existing refusal.
- #1099 adds no skill, so a repo refreshed on this release holds only
skills release 31 also ships.
  - #1138 is tests only.
- **#1099 has to be live before #1092 (PR #1098, `patchy/hotkeys`)
ships.** That's why this release goes out alone. Once #1098 is live, a
rollback to release 32 or later keeps refresh and dev working for repos
that picked up the new `patchy-hotkeys` skill.

**Rollback line:** If this release misbehaves, roll back to `9e176cb`
(release 31).

## How it was verified

- **Tests.** `whatsNew.test.ts`, `schemas.test.ts` and
`WhatsNewPages.test.ts` pass (21 tests), and prettier passes on the
changed files.
- **The range.**
- #1097, #1095 and #1099 were each reviewed by GPT 6.1 Sol, with every
finding resolved. Each got a fresh acceptance PASS with notes after its
rebase onto Preact 11.
  - Each landed with all 12 required checks green on its final head.
  - #1138 and #1139 were merged from their own thread.
- **Deploy state.** The live commit, pinned from `/healthz/deep`, is
`9e176cb` (release 31). The Deploy run updated last succeeded, and none
is unfinished.

## Release impact

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required

Text and version numbers only. The `0.32.0` bump tells CLIs and patch
repos installed before this deploy to upgrade, as every release does.

- **What does a revert leave behind?** Nothing.
- **Does the release before it still work with that?** Yes.

Built by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, through T3
Code.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:integrations Company connections and integration implementations size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant