Skip to content

feat(integrations): patchy dev reads the real Pidgeon address and simulates sends - #955

Merged
allisonmahmood merged 6 commits into
mainfrom
feat/pidgeon-dev
Oct 28, 2026
Merged

allisonmahmood merged 6 commits into
mainfrom
feat/pidgeon-dev

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

What changed

patchy dev couldn't run Pidgeon at all: every call failed invalid_request, so a builder's agent built a support desk against mail it never saw. Now patchy dev reads the connected address's real mail through the instance's dev read door, as the builder, and simulates every send, reply and triage. Dev's output names what it would have sent, and nobody receives anything.

Closes #826. Part of #822. Ships in one release with #921 and #954, and stacks on #954.

Look at

1. Pressing Send in the Support desk under patchy dev sends nothing. On pnpm dev up pidgeon, I started the workspace repo's pnpm patchy dev --json with the agent launcher's environment, then drove the desk in Chromium: list, open, type a reply, press Send reply.

listed 4 conversations
opened conversation 1: 1 messages
notice: Sent to Lumen Bikes Billing.
after the send, the reloaded conversation has 1 messages

dev.log names the simulated reply. This session logs JSON; a text session prints <viewer> pidgeon/support messages.reply <id>: simulated in dev, nothing reached Pidgeon.

{"type":"simulated","viewerId":"usr_env_lumen_allison","connection":"pidgeon/support","operation":"messages.reply","summary":"messages.reply <message id>"}

The connection's recent calls on the instance show only Dev reads, the last one being the desk's reload after the send. There's no write:

Dev  patchy dev on Dev environment  threads.list          Allison Mahmood  6 rows  Succeeded
Dev  patchy dev on Dev environment  threads.get <thread>  Allison Mahmood  1 row   Succeeded
Dev  patchy dev on Dev environment  labels.list           Allison Mahmood  5 rows  Succeeded
Dev  patchy dev on Dev environment  threads.get <thread>  Allison Mahmood  1 row   Succeeded

pnpm dev down: Pidgeon: revoked 1 key and deleted 1 test address this environment made.

2. A repo whose only live integration is Pidgeon gets the machine key. patchy dev handed its key to the daemon only when PostHog was declared. devLifecycle.test.ts › "hands the key to a repo whose only live integration is Pidgeon…", run over #954's devLifecycle.ts, dev.ts and devPreparation.ts:

AssertionError: {"ok":false,"source":"patchy","error":"The instance refused this machine's key: it expired or was revoked, or your account was deactivated. …","code":"access_denied"}: expected 403 to equal 200

…and over this head: Tests 1 passed | 11 skipped (12).

3. The door reads Pidgeon as a published read does, and refuses writes. packages/integrations/src/DevReads.ts runs pidgeon.read through pidgeon/Operations.ts's new devReads, with the same address checks, slots and held-mail handling. It answers pidgeon.write invalid_request, logged. DevReads.test.ts › "Pidgeon in patchy dev" covers:

  • both viewers reading as the machine's person;
  • held mail staying empty;
  • a write sent straight to the door, refused;
  • simulated writes reaching neither the door nor Pidgeon;
  • a read connection's write refused exactly as a published one is;
  • a revoked key, a deactivated person and a disconnected address stopping reads while simulated writes keep working;
  • slots shared with published reads, and the key checked again after the wait (I confirmed the test fails without the fix).

Live: the new PidgeonDev.live.ts reads a fresh test address through the door, finds held mail empty, and shows that a simulated reply leaves the next read unchanged.

Decisions you can overturn

  1. No pending_approval in dev. A simulated send always answers sent. The snapshot doesn't carry the address's approval setting, so dev can't know when Pidgeon would hold a send.
  2. A simulated send's or reply's threadId is a dev_ id. Dev can't learn a reply's thread without reaching the instance. Reading a dev_ id answers not_found, so the desk's new-email view opens onto not_found in dev; the skill says so.
  3. Per-operation body bounds at the door. The door reads a body up to the largest live bound, runtime.pidgeon.bytes (1 MiB), then holds each operation to its own; runtime.posthog.bytes stays 256 KiB. A garbage body between 256 KiB and 1 MiB now answers 400 instead of 413.
  4. PostHog's dev client moved into DevDoor. posthog/Dev.ts is now a thin binding over packages/integrations/src/DevDoor.ts, which Pidgeon's binding uses too. Its errors' tags changed from PostHogDev* to DevDoor*. Tags aren't on the wire, and PostHog's messages are unchanged.

Also settled on #826:

  • Triage answers are partial: threads.update returns the id and the new status, and threads.label returns the label when the snapshot lists it.
  • Dev doesn't apply the send policy, replays, the daily budget, or exfiltration and held-reply refusals.

Changes to #954's code

  • pidgeon/Operations.ts:
  • api/pidgeon.ts: PidgeonDevRead, additive.
  • pidgeon/index.ts: live: ["read"].
  • pidgeon/Generate.ts and the patchy-pidgeon skill now say what dev does.

How it was verified

  • pnpm verify on c14b999: all ten suites passed (format, lint, typecheck, synth, test, postgres-concurrency, cli-smoke, install, tier2-smoke, browser). The only difference between that commit and this head is feat(integrations): patches read, reply and send from a Pidgeon address #954's last commit, which changes the Support desk's App.tsx, and no verify suite exercises that file.

  • The live tier, once, on this branch: 3 files, 19 tests passed. The account's keys stayed under the harness cap:

    PidgeonOperations.live.ts  87 calls, 2 keys minted, at most 2 active at once; swept 1 key and 2 addresses after
    PidgeonOperations.live.ts 119 calls, 3 keys minted, at most 2 active at once; swept 1 key and 2 addresses after
    Pidgeon.live.ts            81 calls, 7 keys minted, at most 3 active at once; swept 1 key and 1 address after
    PidgeonDev.live.ts         31 calls, 1 key minted,  at most 1 active at once; swept 1 key and 1 address after
    
  • pnpm dev up pidgeon, the desk under patchy dev, then pnpm dev down: as above.

Every surface #826 named:

  • the wire: devRead.ts and docs/API.md;
  • the CLI: packages/patchy dev, its README and ADR-0004's dev.log lines (no flag or exit code moved);
  • the dev loop: docs/DEVELOPMENT.md and patchy-dev-loop;
  • the global patchy skill with its lock hash, and the project skills;
  • the Integrations glossary, with a new "Simulated write" entry, and GLOSSARY-MAP.md;
  • docs/product.md;
  • ADR-0013, which now says writes never run live in dev and names Pidgeon beside PostHog, with prototype(integrations): patches read and answer a company email address on Pidgeon #819's invoice trial as the evidence.

There's no migration. Prototype #819's fixture door never reached this stack, so there was nothing to remove.

Release impact

  • Breaking — requires action from anyone already running this
  • Not breaking — no action required

Dev only: the door gains one read operation, patchy dev gains Pidgeon's binding, and nothing a published patch does changes.

Made by Claude Opus 5.5 in Claude Code, running in T3 Code.

@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area area:integrations Company connections and integration implementations size:xl Over 1,000 changed lines; review in multiple passes labels Oct 27, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked cce5019db34cf7e9230478814016a2d104834c2a (base 333ea52b763bc1ae330d933c1a212eac3235e43c) on a fresh pidgeon environment, by GPT-6.1 Sol in Codex through T3 Code. I did not write this change. Scope is #955's additions over feat/pidgeon-operations.

Done means

  • A builder in patchy dev lists and opens real conversations: passed. The runner delivered 10 messages in six conversations and published the Support desk. Both dev viewers listed the same six conversations as the published desk (four Open, one Waiting, one Resolved), and opened “Where is order LB-20488?” with its original three messages. The connection page attributed both viewers' dev reads to Allison Mahmood on the machine “Dev environment.”
  • Pressing Send shows a simulation and sends nothing: passed. I pressed Send reply from each dev viewer, Send for a new email, and Waiting on the order conversation. Dev logged all four simulations. Afterward I reloaded and opened the same thread through the published desk: still three messages, still Open, neither reply present, and no new conversation. Immediately after the colleague's reply, the connection page's latest ten calls contained only threads.list, threads.get and labels.list; all succeeded, with no write.
  • ADR-0013 prohibits live dev writes and names Pidgeon: passed. The opening rule says “writes never run live in dev,” explains Pidgeon's live reads, and describes local simulated sends, replies and triage.

Selected fields from this instance's patchy dev logs --json (scenario message/thread identifiers omitted):

simulated  pidgeon/support  messages.reply   [scenario message]
simulated  pidgeon/support  messages.send “Acceptance 955 simulated new email” to [email protected]
simulated  pidgeon/support  threads.update   [scenario thread] waiting
simulated  pidgeon/support  messages.reply   [scenario message; colleague viewer]

Golden journeys and risks

  • Open and use a tier 1 tool: passed. The published Support desk and both local dev viewers loaded and read the connected address; browser console checks were clean. Published reads still worked after the simulations.
  • Tier 2 dev actions: passed offline. The Pidgeon-only action test reads through the instance as the machine's person and simulates replies for both viewers. The tier 1 Pidgeon-only daemon lifecycle test passed too.
  • PostHog dev reads: passed offline. The real dev-door tests over the PostHog double passed, covering both viewers, rows, refusal details, key expiry/revocation/deactivation, limits, slot rechecks and unavailable instances.
  • Safety and shared admission: passed offline. The tests refused a write sent directly to the door; simulated sends/replies/triage reached neither the instance nor Pidgeon; malformed arguments and read-only writes were refused; revoked/deactivated/disconnected reads stopped; published and dev reads shared slots and rechecked credentials after waiting.

Focused local run:

vitest: DevReads, pidgeon/Operations, devExecution,
        devLifecycle, devLog, devResources
Test Files  6 passed (6)
     Tests  52 passed (52)

All checks were green on this head. I read the Pidgeon live job: all 19 tests passed, including all three PidgeonDev.live.ts tests (real reads, held mail empty, simulated reply absent from the next read). The CI run also passed browser, tier 2, CLI, install, concurrency and offline suites.

Rollback answers: match the scoped diff. There is no migration, infrastructure change or live dev write. Dev reads leave machine-call records in the existing shape; the base already understands that shape. No one-way label is needed for #955. The lower stack layers' rollback effects remain theirs.

Not run

  • A second standalone Pidgeon live suite or sweeper: prohibited for this run; used the green live CI log on the exact head instead.
  • Live PostHog: no disposable project/key is available; exercised its shared door offline.
  • A duplicate full local pnpm verify: relied on current green CI for the broad suites, alongside the focused local run and fresh scenario checks above.

Notes

  • Confirmed the accepted dev limitation from the PR's product decisions: after a simulated new email, the desk follows the synthetic dev_ thread and shows “Pidgeon has nothing by that id that this key reaches.” The simulation itself succeeds and is logged; this is not a new acceptance objection.

@allisonmahmood
allisonmahmood force-pushed the feat/pidgeon-operations branch from 333ea52 to 5d2310a Compare October 27, 2026 23:33
Base automatically changed from feat/pidgeon-operations to main October 27, 2026 23:48
allisonmahmood and others added 6 commits October 28, 2026 00:48
…es its writes

The instance's dev read door takes pidgeon.read beside posthog.query, through
the same address checks, slots and refusals as a published read. Its body is
read up to the largest live bound, then held to each operation's own.
patchy dev's side of the door moves out of PostHog's binding into DevDoor, and
Pidgeon's dev binding reads through it and answers every write itself, with
dev_ ids and test: true, printing what it would have sent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nds stay in dev's output

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…v door and simulates a reply

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…side PostHog

The dev read door's API description, the Integrations glossary (dev binding,
dev read, simulated write), the product's Development section, DEVELOPMENT,
the patchy-dev-loop skill, the CLI README and ADR-0004, the global patchy skill
and the project skills now say patchy dev reads the real Pidgeon address and
simulates its sends, replies and triage. So do Pidgeon's generated context and
its SDK capability line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and the caller-refusal marker says why

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…onnection with Schema.is

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood
allisonmahmood merged commit c5175bd into main Oct 28, 2026
21 checks passed
@allisonmahmood
allisonmahmood deleted the feat/pidgeon-dev branch October 28, 2026 00:02
allisonmahmood added a commit that referenced this pull request Oct 28, 2026
… patchy survives a Node update (#962)

## What changed

This PR adds release 20's What's new entry, written from `c5175bd`. It
covers everything merged since release 19's `through` (`156a228`), and
it sets the `patchy` release to `0.20.0` in
`packages/patchy/package.json` and `CURRENT_RELEASE`. With this release
patches can read and answer a company email address on Pidgeon, and the
`patchy` command keeps working after a Node version change.

| Change | PRs |
| --- | --- |
| New: Patches can read and answer a company email address | #921, #954,
#955 |
| Fixed: The patchy command survives a Node update | #944 |
| Behind the scenes: Patchy keeps only a key for the connected address,
never the Pidgeon admin key | #921 |

Two merged PRs get no line: #941 is release 19's own entry, and #945
adds CI install checks on macOS and Windows, which is tooling.

## Look at

- **The entry**, at the top of `releases` in
`packages/core/src/whatsNew.ts`. Its labels are the pages' own:
Integrations, Read, Read and send. The 200 sends a day is
`pidgeon.sends.daily`'s default. The Node fix says what #944's Release
impact asks of the note: people whose terminal doesn't look in
`~/.local/bin` are shown the line to add when they rerun the install
line.
- **Rollback safety, from the live commit `fe8a0f2` to `c5175bd`.**
Three PRs in the range are labelled `one-way`:
- **#921 and #954 (Pidgeon).** Release 19 hides Pidgeon connections and
ignores the new `pidgeon_sends` table, but a patch whose current version
declares or calls Pidgeon needs this release to serve. Recovering it
means rolling forward.
- **#944 (CLI install).** On machines where the new installer put
`~/.local/bin/patchy` ahead of Node's own bin on PATH, release 19's
install-and-login line refuses after installing. Those people would need
to clean that up by hand.
- **#955 and #945** answer both Release impact questions with "Yes".
`rollback-rehearsal` passed on every landed head, including #954's
migration `0028`.

## How it was verified

- **Tests.** `whatsNew.test.ts` (4), `WhatsNewPages.test.ts` (6),
`schemas.test.ts` (11) and the skill lock (1) pass. Typecheck passes for
core, api and the CLI, and so do prettier and eslint on the changed
files.
- **The stack.** #921, #954 and #955 each had GPT 6.1 Sol reviews to
merge-ready and an acceptance verdict of PASS with notes. Each landed
after all 21 checks passed on its rebased head, `Pidgeon live` included.
Each rebase left the tree byte-identical to the accepted head, and
`main`'s tree at `c5175bd` is identical to #955's accepted `cce5019`.
- **Deploy state.** The live commit was pinned from `/healthz/deep`:
`fe8a0f2`, release 19. 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

This PR changes only the changelog text and the `patchy` version. As
with every release, a CLI installed before this deploy is told to
upgrade.

- **What does a revert leave behind?** Nothing. People whose seen marker
reached 20 would just see no new release.
- **Does the release before it still work with that?** Yes.

Rolling back past #921 and #954 would stop any patch whose current
version uses a Pidgeon connection from serving, and rolling back past
#944 would break the install-and-login line on machines where the new
installer put `~/.local/bin/patchy` ahead of Node on PATH; fix forward
instead.

Made by Claude Opus 5.5 in Claude Code, running in 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:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area area:integrations Company connections and integration implementations area:server Touches the server area size:xl Over 1,000 changed lines; review in multiple passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(integrations): patchy dev reads the real Pidgeon address and simulates sends

1 participant