Repository navigation
Conversation
A Stream closes only on a close call. Each script checks `closed` where the auto close step did, so a create on a closed Stream still answers closed, an append is refused and a close answers already.
A read writes nothing again, so a Reader needs read access only.
The revert touches only sdk-core, which the crate doesn't use.
A Local Activity writes before its Workflow Task commits, so its close could outlive a failed task and fail the retried task's create.
A filtered read waited for a new append though entries up to the newest one were never scanned, and max_records 1 made one Store call per entry.
The withdraw-only batch failed on such a Stream, so a retry that only reads it failed for good before user code ran.
A user with the documented ACLs couldn't connect or run the scripts. A test now runs each role with exactly the listed commands.
Redis and memory refuse an empty id. Only the native frontend assigns one.
The new c8 commits touch only the Core CHANGELOG and Core tests, which the crate doesn't use.
This was referenced Oct 25, 2026
This was referenced Oct 25, 2026
Owner
Author
|
Closed in favor of the review series. The crate is K1 to K10, #43 to #52, cut fresh onto upstream |
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes the auto close from the Streams crate and fixes the crate findings of an independent review.
The SDK review made the Stream lifecycle a resource manager. The owner closes a Stream explicitly or at the end of an
async withblock. So the Store needs no idle timer, and no layer closes a Stream on its own.What changed?
Auto close.
lua/auto_close.luaand theauto_close()helper are gone. Create, append and close checkcloseddirectly. A create on a closed Stream still returns closed, an append is refused, and a close returns already closed.create.luatakes one ARGV less.Capabilities::AUTO_CLOSE,Store::auto_closeand theauto_closeparameter ofStore::createare gone.CreateStreamRequestfield 5 andDescribeStreamResponsefield 4.close_with_run = 7stays for native.docs/redis.mddrops theacandlameta fields.Review fixes.
wf:<run id>) can close. A Local Activity runs before its Workflow Task commits, so its close is refused. A close whose ref has no run chain is refused too.AppendRecordsacceptswithdraw_runonly from a later run's Local Activity.stream_expired, also when the Stream is closed.docs/redis.md"Access" lists the commands of each role. A Reader needs read and write key access (~), not%R~, since redis-rs sendsEVALSHA.RedisStore::connectskips the version check whenINFOreturnsNOPERM.testdata/withdrawals.jsonhas new cases with no epoch and cases of Local Activity Producers.stream-idapplies to native only. "plugin" is "backend" inextension.rs,ids.rsandextension.proto. The comments use literal wording and keep only the why.The PR also pins sdk-rust Brook c8
f7826366.Please note that a filtered
lastread still stops after the scan cap. It can return fewer Records than asked when the matches are far back. The WIT close still hasprevious-completed-taskandfailed-tasks, which the code doesn't read.Why?
The review found that a Local Activity could close a Workflow's Stream before its Workflow Task committed. If that task failed, the Stream stayed closed, and the retried task's write failed the run. The other fixes are for reads that stalled or waited on an expired Stream, ACL docs that didn't work, and gaps in the shared vectors.
How did you test it?
Each code fix has a test that fails without it.
tests/acl.rsruns create, append, close and read as a Producer user and a Reader user with only the documented commands.cargo test --workspacepasses on memory, and on Redis 8.10.1 standalone and as a cluster.cargo fmt --checkand clippy with-D warningspass. The sdk-streams fork CI passes on the head. It runs the unit and vector tests, the Redis tests, fmt, clippy, the API proto copy check and the FIPS build.The superproject branch
temporalio/internal-ai-prototypes2026/10/ai198-streamspinsee6d1e51, the tested commit. The head commit after it changes only comments and docs, so the pin doesn't change.