Skip to content

Backlog capture: App-level webhooks on shared crew Apps let another hub's routines review and merge this hub's PRs #421

Open

Description

@davison

Backlog capture (deliberately unlabeled). Operator, 2026-10-24. Observed on radiusred/codecrew-www PR #70 (M22, #420).

What happened.

  • 01:40:20Z: The hub's coordination layer dispatched the implementer for codecrew-www#69, and the implementer opened PR Build the identity new verb: guided App creation via the manifest flow #70. The plan was to iterate on the rendered page with the operator before dispatching the reviewer by hand, as the hub's routing table says: Codex, gpt-5.6-terra.
  • About 90 seconds later: The PR had been approved by radiusred-checky[bot].
  • 01:42:36Z: It was merged through task finish by radiusred-cody[bot], and the branch deleted.

The hub dispatched neither of these steps. A different Paperclip company (RR Trading, which coordinates other repositories with the same Apps) did, through seat routines armed on App-level webhooks:

  • The checky App subscribes to pull_request, so the RR Trading reviewer routine created RRT-1372 and reviewed.
  • The cody App subscribes to pull_request_review, so the implementer routine created RRT-1373 and ran task finish on the approval.

The routines' instructions say "on the project repo", but nothing compares the event's repository with the project. An App-level webhook fires for every repository the App is installed on, which here means the whole radiusred org.

Why it matters to CodeCrew.

  • The merge was protocol-compliant: a real approval from the reviewer seat's App, and task finish from the seat that started the task. Yet it bypassed the hub's routing (the model and harness the seat is dispatched under), and it pre-empted an operator review of the rendered page that was in progress.
  • Nothing on the trail says which coordination layer acted. The review and the merge read exactly as if the hub had dispatched them.
  • SPEC §5 treats routing as advisory and the identity as the seat. When one identity serves several hubs or companies, "who holds the seat" no longer answers "who is driving it".

Shapes worth weighing.

  1. Docs (platform-interop.md, identities.md): App-level webhooks fan out to every installation. A routine armed on one must filter on repository.full_name, or the routine belongs on a repository webhook instead (cycle 4's snake setup used repository hooks). Each hub should have its own Apps where coordination layers differ.
  2. Contract/record: the seat's records (start record, review, finish) name the dispatcher or coordination layer, so the trail shows who drove the seat. This connects to Backlog capture: coordination-layer facts about a milestone have no home on the trail, so the record files them as a Deviation #378, where coordination-layer facts have no home on the trail.
  3. CLI (2.2): task finish notes or refuses when the routing table names a harness/model and the session declares another. This is only possible if sessions declare it, so it is probably out of reach.

Related: #177 (a spoke shared by several hubs) is the repository-side version of this identity-side problem. #347 covers Paperclip agents as delegates of a person.

Evidence: radiusred/codecrew-www PR #70 timeline and its review; Paperclip RRT-1372 and RRT-1373; gh api /apps/radiusred-checky shows events pull_request, and /apps/radiusred-cody shows pull_request_review.

Activity

  1. davison commented on Oct 24, 2026

    @davison
    ContributorAuthor

    Operator ruling, 2026-10-24: shape 1, as a docs change only. This is not a protocol or CLI change, so the bedding-in rule doesn't hold it back. Shapes 2 and 3 stay open as 2.2 material.

    Why a filter in the routine isn't enough. A guard on repository.full_name in the routine's instructions would stop the wrong-repo review and merge. But it runs only after the platform has accepted the delivery, opened a ticket and woken an agent. Every PR event in the org would still cost a run in every company armed on the shared Apps. The event has to stop at GitHub.

    The underlying fact. A GitHub App has one webhook URL, and GitHub delivers to it for every installation and every repository those installations cover. So an App-level hook can serve only one coordination layer. Where the Apps are shared, whichever layer owns the URL gets every hub's events.

    What the docs say now, and why it's wrong for shared Apps. Both passages are right when the Apps belong to one hub, and wrong as soon as they don't:

    • docs/identities.md, "The receiver side": "So a platform needs no repository webhooks at all", and the claim that cycle 4's repository hooks "were the workaround … not the design".
    • docs/platform-interop.md, checklist row 2: "App hooks, not repository hooks."

    The change (docs task under a future milestone).

    1. Split the receiver guidance in two:
      • Apps dedicated to one coordination layer: the App hook, as now.
      • Apps shared by more than one layer (several hubs, Paperclip companies or ventures on one set of crew Apps): repository webhooks on each repository that layer drives. That means pull_request to the reviewer's receiver and pull_request_review to the implementer's. The shared Apps' own hooks are switched off.
    2. Give the order: switch off the App hook before adding repository hooks, or every event arrives twice.
    3. Give the command for a repository hook (gh api repos/<owner>/<repo>/hooks, with events, URL, secret and content type JSON). identity webhook covers App hooks only, and that stays as it is.
    4. Name the cost: two hooks per repository per layer, to be added whenever a repository joins the layer.
    5. Mention the alternatives and when each fits:
      • A filtering relay in front of the receiver: it checks the signature, routes by repository.full_name, re-signs and forwards. This is the shape paperclip-webhook-relay already had, before Paperclip had native routine triggers. It's worth it when there are enough repositories to make per-repository hooks a chore.
      • Separate Apps for each layer.
      • A separate GitHub org for each layer, which the operator rejected: duplicating the rest of the org config outweighs the hooks it saves.

    Applied at Radius Red: the RR Trading routines move to repository webhooks on RR Trading's repositories, and the checky and cody App hooks get switched off. Until that's done, the routines stay paused.

  2. davison commented on Oct 24, 2026

    @davison
    ContributorAuthor

    Done (operator, 2026-10-24 ~12:17Z): the ruling above has been carried out. The other Paperclip company's two seat routines now fire from repository webhooks on its own six repositories: pull_request for its reviewer routine, pull_request_review for its implementer routine. Both shared crew Apps' App-level webhooks are deactivated and their secrets removed, so nothing in this hub or its spokes reaches those routines any more. All twelve repository hooks were verified with a ping after the routines resumed: each one returned 422 "Missing routine variables: action". That means the signature was accepted, the ping carried no action, and no run was created. The docs-only change this capture also asks for, splitting identities.md "The receiver side" and the platform-interop checklist into dedicated and shared Apps, is still to be tasked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions