Skip to content

feat(comm): add inbox long polling - #1631

Draft
ohdearquant wants to merge 1 commit into
mainfrom
codex/comm-inbox-long-poll
Draft

feat(comm): add inbox long polling#1631
ohdearquant wants to merge 1 commit into
mainfrom
codex/comm-inbox-long-poll

Conversation

@ohdearquant

Copy link
Copy Markdown
Owner

AI-assisted contribution: Codex prepared this change and PR description.

Summary

  • add optional, bounded wait_ms long-poll semantics to comm.inbox while preserving the existing filtering and pagination response shapes
  • wake blocked inbox calls after successful local sends, replies, and non-deduplicated ingests using a generation-counted process-local signal that does not lose notifications between query and wait
  • make the deadline edge race-safe with a final generation-aware query, cap waits at 30 seconds, and document process-local versus cross-process behavior
  • add concurrent-ingest, filtering, timeout, cap, zero-wait, missed-wakeup, and deadline-crossing regressions

Closes #1499.

Test plan

  • cargo test --manifest-path crates/Cargo.toml --workspace
  • cargo check --manifest-path crates/Cargo.toml --workspace
  • cargo clippy --manifest-path crates/Cargo.toml --workspace --all-targets -- -D warnings
  • cargo fmt --manifest-path crates/Cargo.toml --all -- --check
  • RUSTDOCFLAGS=-Dwarnings cargo doc --manifest-path crates/Cargo.toml --workspace --no-deps

All commands passed at 0a0c7e515b051f243eb1d3a73928c35bb2857527 after rebasing onto current main (a152ead3e577b8c01b03024687fdb66d94a00cac).

ADR

  • update ADR-040 with the public wait_ms contract and response-shape guarantees
  • update ADR-056 with signal ownership, generation semantics, publication points, deadline behavior, and the cross-process boundary

AI-assisted contribution checklist

  • Every claim in this PR description matches the actual diff
  • Any agent-authored comment / PR body starts with an attribution line
  • Full workspace behavior, lint, formatting, and documentation gates passed
  • No entity, note, edge, namespace, delivery, or threading semantics changed

Out of scope

  • cross-process push notification; external writers are observed by the final deadline query rather than waking the process-local signal immediately
  • changing channel transport poll intervals
  • changing inbox pagination or filter semantics

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.

Add long-poll support to comm.inbox

1 participant