Skip to content

docs(webhook_out): design note for a turn_finished outbound event (#962) - #976

Merged
ajianaz merged 2 commits into
developfrom
docs/turn-finished-event
Nov 19, 2026
Merged

ajianaz merged 2 commits into
developfrom
docs/turn-finished-event

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Step 1 of #962: a design note for a turn_finished outbound webhook event. Docs only, no code.

Why

After an Allow, the gateway (tole-gateway#16, and persona reply routing in #969) still polls session status and the log, because no event says a turn ended. The note settles the shape before any implementation touches the outbound data path or the turn runner.

Changes

  • New docs/turn-finished-event.md: event name and body (ids and a status word only), the mapping from every TurnOutcome to a closed status vocabulary, opt-in through the existing events allow-list (default unchanged), signing and retry identical to feat(cron): outbound signed webhook delivery target for cron results and approval requests #911 v2, idempotency key, ordering against the approval events, size cap, backpressure and queue choice, redaction design and leak-check test plan, what the gateway does with it, and nine owner decisions (D1 to D9). Each point is marked FIXED, RECOMMENDATION or DECISION NEEDED.
  • docs/webhook-delivery-design.md: a pointer in section 2 and open item 13.
  • Not touched on purpose: threat-model rows, CHANGELOG, faces.md, README status line and docs/epics.md. They change in the implementation PR, which the note lists.

Testing

  • Docs only; no code or tests changed.
  • Independent read-only review by a fresh reviewer session (separate session given the doc, the feat(cron): outbound signed webhook delivery target for cron results and approval requests #911 design, the threat model, AGENTS.md and the code). It found no leak path in the proposed payload and 10 findings on how the doc matched the code (serve routes never see TurnOutcome; approval_id not available at settle; entries vs seq cursor; Event enum vs valid_event; session id charset; Option A not being free; faces.md format; stderr sink). All were applied in the second commit, except the cursor question, which stays open as D2.
  • Commits carry no AI attribution trailer (checked with the AGENTS.md grep, no output).

@ajianaz
ajianaz merged commit efeef9e into develop Nov 19, 2026
23 checks passed
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