Skip to content

docs: specify forward poll cursors - #45

Merged
shivros merged 1 commit into
mainfrom
runner/COD-456-forward-cursors
Sep 6, 2026
Merged

docs: specify forward poll cursors#45
shivros merged 1 commit into
mainfrom
runner/COD-456-forward-cursors

Conversation

@shivros

@shivros shivros commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the frozen OpenSpec contract for COD-456's agent-discoverable forward polling.

  • Preserves existing list_messages / list_threads array responses unchanged.
  • Adds additive generated poll_messages / poll_threads operations with opaque forward cursors.
  • Defines safe bootstrap, total source ordering, bounded continuation, AEAD cursor binding/rotation, email UIDVALIDITY behavior, and explicit thread-change semantics.

Verification

  • git diff --check — pass
  • OpenSpec artifact structural validation — pass
  • openspec validate add-forward-poll-cursors --strict — unavailable: openspec is not installed on this host

Implementation gate

This is a spec-only PR. T1 requires review/approval and merge before implementation tickets/PRs begin.

Closes COD-456

@shivros

shivros commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated Review Panel

Reviewer A — BLOCK → resolved

Initial review found four contract gaps: incompatible array-to-envelope replacement, undefined empty bootstrap, unsafe bounded cursor advancement, and unspecified query binding. The spec now keeps existing list arrays unchanged; introduces additive poll_* pages; requires a non-null bootstrap checkpoint even for empty sources; advances only through the final emitted item; and enumerates operation/principal/instance/thread bindings.

Follow-up review found one remaining ordering gap. Resolved: the contract now requires an immutable, totally ordered source position with a deterministic tie-breaker and a consistent source snapshot. Email uses UID within UIDVALIDITY.

Reviewer B — BLOCK → resolved

Initial review additionally found bootstrap ambiguity, thread-update ambiguity, cursor confidentiality risk, misleading no-I/O epoch validation, missing generic capability/error semantics, and missing generated-surface compatibility policy. The final spec defines zero-item high-water bootstrap; ordered thread-change observations (duplicates allowed); AEAD encrypted, size-limited, key-rotated tokens; pre-I/O outer validation plus minimal metadata read for UIDVALIDITY; generic ForwardPolling capability/stable errors; and additive HTTP/MCP/CLI operations preserving existing array contracts.

Follow-up review: APPROVE.

Panel result: APPROVE after fixes. This PR deliberately contains the frozen contract only; implementation is gated on its merge.

@shivros
shivros marked this pull request as ready for review September 5, 2026 05:56
@shivros
shivros force-pushed the runner/COD-456-forward-cursors branch from fd1a7ea to e24a769 Compare September 5, 2026 21:58
@shivros
shivros force-pushed the runner/COD-456-forward-cursors branch from e24a769 to 2bf08c2 Compare September 6, 2026 17:28
@shivros
shivros merged commit 64a9dfd into main Sep 6, 2026
6 checks passed
@shivros
shivros deleted the runner/COD-456-forward-cursors branch September 6, 2026 18:07
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