Repository navigation
feat(progressive): bind handles to host turn scope - #147
Conversation
Update the tinybus and wiki submodule pointers to their latest commits. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the tinybus and wiki submodule pointers to their latest commits. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ssive-host-bridge
…er turn Add a test asserting that feeding output to a scoped handle with a turn id that differs from the one it was opened with fails and never reaches the callback. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add an OpenScoped command that opens a progressive handle bound to a provider target and host-authorized turn, and reject FeedOutput requests whose scope differs from the bound one. This keeps a handle from being reused to emit output under a different turn or conversation than the host authorized. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The scoped open test now supplies matching channel and conversation references so the bound turn can be exercised end to end. It asserts that replaying an identical feed output returns the same delivery result and that closing the handle twice still sends exactly one typed request. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Extend the scoped open rejection test with cases where the channel or conversation reference does not match the bound turn, asserting both are rejected so the scoping checks are exercised beyond the turn id alone. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reindent the scoped feed output rejection assertions in the progressive tests to match rustfmt's preferred wrapping. No behaviour or coverage changes. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Tiny Sweeper review
Last completed reportTiny Sweeper reviewReviewed head: Verdict: Ready for maintainer review · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): feat(progressive): bind handles to host turn scope. This pull request adds `ProgressiveCommand::OpenScoped`, letting a progressive handle be bound at open time to a provider target plus a turn ID, channel reference, and conversation. Later `FeedOutput` requests on a scoped handle whose scope differs are rejected before replay or callback dispatch, while legacy `Open`, `Feed`, and `FeedOutput` stay unchanged. The review notes the code index is behind this head so retrieved context may be stale. Review snapshot
Completeness: Complete What changedIntroduces a scoped open path: `ProgressiveCommand::OpenScoped` carries channel, turn_id, channel_ref, and conversation; `open` accepts an optional scope and stores a constructed `OutputScope` as `bound_scope` on the entry; `FeedOutput` compares the freshly built scope against `bound_scope` and returns an error on mismatch before replay or dispatch. A new regression test exercises rejection on mismatched turn, channel ref, and conversation, then matching-scope delivery with replay, and repeated close without duplicate typed sends. The description states the PR is stacked on #145 and is a draft until that lands. Features
Tests
FindingsNo active actionable findings. Before mergeNone. Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
…ive-host-bridge # Conflicts: # crates/tinychannels-module/src/progressive.rs
Summary
Adds
ProgressiveCommand::OpenScopedwhile preserving legacyOpen,Feed, andFeedOutput. Scoped handles bind the provider channel, turn ID, channel reference, and conversation at open time.FeedOutputrejects any later request whose turn scope differs before replay or callback dispatch. Matching output batches keep the existing ordered host callback path, typed delivery outcomes, receipts, and idempotent replay/close behavior.This PR is stacked on #145, which provides the canonical typed output path and host callback transport. It must land first. This PR is a draft until #145 is merged and the branch can be retargeted to
main.References OpenHuman #7964; it does not complete OpenHuman integration or close that issue.
Validation
cargo fmt --checkcargo test -p tinychannels-module scoped_open_rejects_feed_output_from_another_turncargo test -p tinychannels-module(214 passed)cargo test -p tinychannels-bus(103 passed)cargo test -p tinychannels(1,075 passed; providers off)cargo test(workspace: tinychannels 1,307, bus 106, module 214, runtime 230 passed)cargo clippy --workspace --all-targets --all-features -- -D warningsgit diff --checkThe regression test first failed to compile because
OpenScopedwas not defined. It now verifies turn/channel-ref/conversation mismatch rejection before callbacks, successful delivery-result replay for matching scope, and repeated cancellation without duplicate typed sends.