Repository navigation
refactor: replace zod with Effect so the broker runs against an in-memory store - #13
Merged
Merged
Conversation
…mory store The broker's commit protocol could only be exercised through a real Durable Object and R2. Moving the Worker and broker onto Effect makes R2, the clock, id generation, and background work into services, so test/broker.test.ts drives batching and compare-and-set retries, including a lost race, against an in-memory store. Effect Schema replaces zod for request bodies, config, and the stored queue file. Stored objects keep unknown fields through storedStruct, and the file format is unchanged. The vendored anti-slop plugin moves to upstream 63dbb09 and its Effect rules are enabled. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This was referenced Nov 20, 2026
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.
The broker's commit protocol could only be tested through a real Durable Object and R2, so batching and compare-and-set retries had no direct test. This moves the Worker and broker onto Effect. R2, the clock, id generation, and background work become services, and the new
test/broker.test.tsruns the protocol against an in-memory store, including a lost race.storedStructkeeps fields a newer broker wrote, and the R2 format is unchanged.63dbb09, and its Effect lint rules are now on.Proof:
npm run checkpasses (oxlint, lint-rule tests, oxfmt, Wrangler dry run, tsc).npm testpasses: 6 files, 33 tests. I didn't run TLC locally because there's no Java here. The spec change is a comment only, and CI'smodel-checkjob covers it. Reviewed with sol-loop: 2 rounds with gpt-6.2-sol. Sol verdict: approved. Three nits stay open as follow-ups:1e400in a field the server ignores now gets400 invalid_json.Instantno longer rejects impossible dates like2026-02-30. OnlytoISOStringwrites stored instants, so a broker can't produce one.srcinterrupts broker fibers, so this can't happen today.The Effect migration was already in the working tree when this session started. I reviewed, verified, and filed it with Claude Opus 5.5 in T3 Code.
🤖 Generated with Claude Code