docs(spec): body-level on — buffered subscriptions with idle/deadline bounds - #433
Conversation
…ne bounds (#432) Specify how a running flow subscribes to events after it starts, keeps events that arrive while a step runs, and ends a wait when events stop. The motivating case is a flow that babysits the pull request it opened: there is no "no more feedback" signal, so a flow ends on provider state and uses idle/deadline time bounds only as a backstop. Adds docs/EVENT-AWAIT.md and points to it from SURFACE.md §6, kernel DESIGN.md §1.4 (noting wait.event is not yet produced and timeout_at_ms is not enforced), and RFC-0001 §7 open questions. Spec only; no code. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Session-Id: 6c4b0b76-e06f-498b-aa62-2ac0700fe146
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review swarm: maintainabilityNo fresh transcript was produced for run |
Review swarm: historyNo fresh transcript was produced for run |
Review swarm: structureNo fresh transcript was produced for run |
Review swarm: FAILED
Cloud run: |
|
The direction and acceptance suite are strong, but this needs three contract decisions before it can serve as the implementation spec.
A smaller follow-up: specify the authorization boundary recorded in a binding (provider installation/resource scope), so a body-level pattern cannot subscribe outside the run's mounted integration scope. |
Session-Id: 01a09c40-ce3b-7f11-a7df-b6b7ccab6fd9
Session-Id: 01a09c40-ce3b-7f11-a7df-b6b7ccab6fd9
Session-Id: 01a09c40-ce3b-7f11-a7df-b6b7ccab6fd9
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 33bdef8. Configure here.
Session-Id: 01a09c40-ce3b-7f11-a7df-b6b7ccab6fd9

Refs #432. This PR changes docs only.
Why
A flow that opens a PR has no way to stay with it: waking on review comments or CI, fixing, and stopping when the PR is merged, closed, or ready.
onis already a resident verb (decision 13), but the spec doesn't say:There is never a "no more feedback" signal. A flow ends on provider state and uses time only as a backstop.
What
docs/EVENT-AWAIT.md. It covers:f.on(...)inside a body,next()returningevents | idle | deadline, andsettle/idle/deadline/includeSelfsubscription.opened/subscription.closed, a stream-backedwait.eventextension, enforced wait timers)SURFACE.md§6,kernel/DESIGN.md§1.4, and RFC-0001 §7 open questions.kernel/DESIGN.md§1.4: nothing produceswait.eventyet, andtimeout_at_msisn't enforced.It adds no new step kind or verb, so the kernel vocabulary stays closed.
Review focus
idleanddeadlineboth be required (unbounded_subscriptionat preflight)?timeoutplusresult.timeout, rather than adding new completion reasons?patternfor subscriptions?🤖 Generated with Claude Code
Note
Low Risk
Documentation-only; no runtime, auth, or data-path code changes. Future implementation of the spec would touch kernel and Cloud routing.
Overview
Adds
docs/EVENT-AWAIT.md, a proposed spec for using residentoninside a running flow body (not only as an entry trigger). It defines durable buffered subscriptions withactivity.next()waking onevents,idle,deadline, oroverflow, requiredidle/deadlinebounds (flows check→unbounded_subscription), and options likesettleandincludeSelf.The doc also spells out semantic laws (level-triggered re-reads, no loss while open, self-event filtering), additive kernel journal (
subscription.opened/closed, stream-backedwait.event, enforced wait timers), the Cloud router handshake, and a 15-point crash-injection acceptance list. It records today’s gaps (nowait.eventproducer, dropped events while busy, unenforced timeouts, no bodyonin surface).Cross-links:
SURFACE.md§6 open questions, RFC-0001 §7 (“Ending a resident wait”), andkernel/DESIGN.md§1.4 (proposed extension + current-state note). No new kernel verbs — vocabulary stays closed per decision 13.Reviewed by Cursor Bugbot for commit 5fa199c. Bugbot is set up for automated code reviews on this repo. Configure here.